Inception
Ask reviewUnderstand the problem, define API surface, and elaborate into units
Hat Sequence
Api Architect
Focus: Design the public API surface — the contract that consumers will depend on. This is load-bearing work because once published, changing the public surface breaks every consumer. Decisions here set the semver policy and dictate how painful every future release will be.
Produces: API Surface document with:
- Public entry points — every function, class, type, or module exported from the library, with signatures
- Error model — how errors are returned (exceptions, result types, sentinel values), and what error classes exist
- Extension points — how consumers customize or extend behavior (hooks, subclassing, middleware)
- Semver policy — what constitutes a breaking change in this library's judgement (signature changes are obvious; behavior changes less so)
- Stability tiers — if the library has experimental/stable/deprecated APIs, define the tiers and their guarantees
- Naming & conventions — module layout, export style, idiomatic usage patterns consumers will see first
Reads: Discovery document, ecosystem conventions for the target language, existing code in the repo.
Anti-patterns (RFC 2119):
- The agent MUST NOT design internal implementation details — only what consumers will see
- The agent MUST NOT expose framework primitives that leak into consumer code (e.g., returning internal classes)
- The agent MUST prefer small, composable public APIs over large, monolithic ones
- The agent MUST specify what consumers can rely on and what they cannot (internal namespace conventions, underscored names, etc.)
- The agent MUST NOT design for hypothetical future consumers — design for the users identified in discovery
Elaborator
Focus: Decompose the intent into verifiable units. Each unit should be scoped to a single bolt and have concrete, testable completion criteria.
Produces: Unit specifications with:
- Clear scope — what this unit delivers and what it explicitly doesn't
- Dependencies — which other units must complete first (feeds the DAG)
- Completion criteria — verifiable conditions, each tied to a command or test
- Unit type —
researchfor inception units
Reads: Discovery document, API Surface document.
Anti-patterns (RFC 2119):
- The agent MUST NOT create units with vague criteria like "implementation complete"
- The agent MUST ensure the unit DAG is acyclic
- The agent MUST scope each unit to a single bolt
- The agent MUST NOT skip API surface units — consumers depend on that contract
Researcher
Focus: Understand the problem this library solves, who consumes it, and what the competitive landscape looks like in this ecosystem. Libraries live or die by adoption — establish who will use it, why they'd pick it over alternatives, and what consumer experience the library needs to deliver.
Produces: Discovery document with:
- Problem statement — what consumers can't do today, and what this library unlocks
- Target consumers — who integrates this (backend devs, CLI users, other libraries, etc.) and at what technical sophistication
- Ecosystem survey — existing libraries in this space, what they do well, where they fall short, and licensing/governance differences
- Adoption signals — how consumers will find and evaluate this library (package name conventions, docs expectations, example style)
- Non-goals — what this library explicitly will NOT do, to bound scope
Reads: Intent problem statement, existing consumer code in the repo, competitor library docs and READMEs.
Anti-patterns (RFC 2119):
- The agent MUST NOT propose the API surface here — that's the api-architect's job
- The agent MUST NOT skip ecosystem survey — libraries fail most often by ignoring what consumers already use
- The agent MUST ground the discovery in real consumer needs, not hypothetical users
- The agent MUST identify non-goals explicitly — scope creep kills libraries
Review Agents
Api Stability
Mandate: The agent MUST challenge the proposed API surface for long-term stability risk. Public APIs are contracts — this review exists to stop bad contracts before consumers depend on them.
Check:
- The agent MUST flag any API that leaks internal implementation types into consumer code (returning internal classes, framework primitives)
- The agent MUST flag any API with parameters or return types that would naturally grow over time and force breaking changes (e.g., positional args instead of options objects)
- The agent MUST flag any API that conflates stable and experimental concerns in the same entry point
- The agent MUST flag any API that depends on caller-side type inference for correctness
- The agent MUST verify that the error model is stable — error types are part of the contract, and ad-hoc errors are breaking changes in disguise
Completeness
Mandate: The agent MUST verify that discovery and API surface documents fully cover what downstream stages need to proceed.
Check:
- The agent MUST verify that the discovery document identifies target consumers concretely, not generically
- The agent MUST verify that every exported symbol in the API surface has a full signature
- The agent MUST verify that the error model is complete — no "and more errors TBD"
- The agent MUST verify that the semver policy answers the non-obvious cases (behavior changes, error type changes)
- The agent MUST verify that non-goals are explicit — scope boundaries must be visible
Feasibility
Mandate: The agent MUST challenge whether the proposed library is technically achievable given the target language, runtime, and dependency constraints.
Check:
- The agent MUST verify that the proposed API surface is implementable in the target language without exotic runtime features
- The agent MUST verify that dependencies are compatible with the library's intended license and distribution model
- The agent MUST verify that the ecosystem has no existing library that would trivially absorb this one's scope (don't reinvent existing mature libraries)
- The agent MUST surface any consumer integration that would require the consumer to adopt unrelated dependencies
Inception
Library inception covers both discovery (what problem does this solve, who are the target consumers, what's the competitive landscape) AND API shape (public surface, semver policy, extension points, error model). Unlike application development there is no separate product or design phase — API decisions are made here because the API is the product.
Completion Signal (RFC 2119)
Discovery document MUST exist with problem statement and target consumers. Public API surface MUST be specified with semver policy, error model, and extension points identified. Units MUST have verifiable criteria. Unit DAG MUST be acyclic.