/ab-method:codebase-designfrom ab-method
Provides a shared vocabulary and principles for designing deep modules with small interfaces and clean seams, grounded in Ousterhout's A Philosophy of Software Design. Includes seam doc format, default seam catalog, and red flags.
Ships in ab-method. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. The aim is leverage for callers, locality for maintainers, and testability for everyone.
This skill is the single source of the architecture vocabulary used across AB Method — by the in-plan deepening scan and seam design gate in create-task / extend-task, by review-implementation's cleaner-architecture lens and review-pr's reviewers when judging a diff, by improve-codebase-architecture for repo-wide reviews, and by tdd when choosing a test boundary. Consumers reference it; they don't restate it.
It follows John Ousterhout's A Philosophy of Software Design: complexity is the enemy, deep modules are the main defence, and good design is a continuous investment rather than a phase (strategic programming: working code isn't enough; each change leaves the design a little better).
| File | Holds |
|---|---|
| SEAM-FORMAT.md | the docs/seams/ doc: template, the bar, the status lifecycle |
| SEAM-CATALOG.md | the seven default seams most apps have, each from the book |
| RED-FLAGS.md | the book's red flags and the three symptoms every finding names |
| DEEPENING.md | deepening a cluster given its dependencies |
| DESIGN-IT-TWICE.md | designing an interface several radically different ways |
Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
Module Anything with an interface and an implementation. Deliberately scale-agnostic — applies equally to a function, class, package, or tier-spanning slice. Avoid: unit, component, service.
Interface Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Avoid: API, signature (too narrow — those refer only to the type-level surface).
Implementation What's inside a module — its body of code. Distinct from Adapter: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
Depth Leverage at the interface — the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is deep when a large amount of behaviour sits behind a small interface. A module is shallow when the interface is nearly as complex as the implementation.
Seam (from Michael Feathers) A place where you can alter behaviour without editing in that place. The location at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it. Avoid: boundary (overloaded with DDD's bounded context).
Adapter A concrete thing that satisfies an interface at a seam. Describes role (what slot it fills), not substance (what's inside).
Leverage What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests.
Locality What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere.
Deep module = small interface + lots of implementation:
┌─────────────────────┐
│ Small Interface │ ← Few methods, simple params
├─────────────────────┤
│ │
│ Deep Implementation│ ← Complex logic hidden
│ │
└─────────────────────┘
Shallow module = large interface + little implementation (avoid):
┌─────────────────────────────────┐
│ Large Interface │ ← Many methods, complex params
├─────────────────────────────────┤
│ Thin Implementation │ ← Just passes through
└─────────────────────────────────┘
When designing an interface, ask:
interface keyword or a class's public methods: too narrow — interface here includes every fact a caller must know.Good interfaces make testing natural:
Accept dependencies, don't create them.
// Testable
function processOrder(order, paymentGateway) {}
// Hard to test
function processOrder(order) {
const gateway = new StripeGateway();
}
Return results, don't produce side effects.
// Testable
function calculateDiscount(cart): Discount {}
// Hard to test
function applyDiscount(cart): void {
cart.total -= discount;
}
Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.
This is the design-side counterpart of the tdd skill's seam discipline: tdd says test only at pre-agreed seams; this says shape the module so the seam is worth testing at.
create-task runs it.The architecture vocabulary here names shapes; CONTEXT.md names concepts. Use both: "the Order intake module is shallow" — domain noun from CONTEXT.md, architecture verdict from this glossary. Never "the OrderService is badly factored", which uses neither.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
deep-modules, software-design, architecture, seams, ousterhout
npx claudepluginhub ayoubben18/ab-method --plugin ab-method36 skills in this plugin
/ab-analyze-backendAnalyze and document a project's backend patterns — API design, data access, service structure. Use when the user wants a backend-only architecture analysis./ab-analyze-frontendAnalyze and document a project's frontend patterns — component structure, state management, conventions. Use when the user wants a frontend-only architecture analysis./ab-analyze-projectAnalyze a project's architecture end to end — extract domain language, map the tech stack, document frontend and backend patterns. Use when onboarding a new codebase or refreshing the architecture baseline./ab-cleanupClean up a repo already using AB Method - compact the domain and architecture docs to their budgets, split pattern docs by topic, remove disposable task leftovers, and migrate the structure index to 4.0. Use when docs have grown too large, after upgrading AB Method, or when the user asks to clean up./ab-create-goalProduce a ready-to-run prompt for an autonomous /goal loop. Use when the user wants to hand off one continuous objective with a verifiable stop condition to run autonomously./ab-create-roadmapTurn a larger idea into a dependency-ordered roadmap of tasks — the layer above create-task. Use when the work is several distinct tasks with real ordering between them (schema before API before UI), and you want the whole task graph drawn before implementing. Producer only; ab-start-roadmap executes it.Other plugins' skills for the same job