Open source · MIT · 3 patterns

Multi-agent patterns,
ready to drop in.

Field-proven architectures for AI-agent development — each one a design write-up plus working scaffolding, E2E-tested before it ships. Humans decide at two gates; the agents do the rest.

Installthree-agent-architect-builder-reviewer
npx agent-templates@latest adopt three-agent-architect-builder-reviewer .

Already installed? Update with npx agent-templates@latest adopt three-agent-architect-builder-reviewer . --force — commit first, --force overwrites changed files.

Every model/effort claim carries a source label and an expiry date

Role boundaries enforced by config, not prose

Deterministic, zero-token E2E gates every scaffold change

3

patterns in the catalog

v0.16.2

on npm · MIT

0

tokens spent in the E2E gate

2

human gates per phase: sign-off & smoke test

Patterns

Choose by runtime and assurance boundary. The two three-agent entries preserve the same independent-review topology on different runtimes; hub-and-spoke trades that independence for parallel throughput. Commands and guarantees do not carry across — adopt installs exactly one pattern.

These are not versions of each other. Commands, artifacts and guarantees do not carry across — adopt installs exactly one pattern.

Three-Agent Architect–Builder–Reviewer

trialed · as of 2026-08-04 (every role cut one effort level — Architect high, Builder medium, Reviewer high, Triage high; §7)

One ticket flows through three agents in sequence: Architect plans → Builder implements → Reviewer (fresh context, different model tier) clears or bounces. No agent judges its own work.

Commands
/breakdown-prd [prd-path] [focus notes, e.g. module-count hint or what to defer]
Decompose a PRD into sub-PRDs + template-compliant tickets (three-agent pattern, pre-Gate-1 planning); appends a new phase to an existing PRD tree without touching delivered work
/build-ticket <ticket-id>
Run the Builder stage on a planned ticket (three-agent pattern)
/deliver-ticket <ticket-id> [supervised]
Deliver one reviewed-CLEAR ticket by hand, after a /review-ticket CLEAR — the manual path the stage commands stop short of
/nightly-issues [max-issues]
Nightly issue sweep — triage open issues, auto-fix the fixable ones through the three-agent pipeline, post the morning report (designed for headless `claude -p "/nightly-issues"`)
/plan-ticket <ticket-id or path to ticket file>
Run the Architect stage on a ticket (three-agent pattern)
/publish-tickets <module dir, e.g. docs/prd/01-foo> [--all]
Publish a module's tickets as tracker issues (and Asana subtasks if connected), then STOP — no pipeline run
/review-ticket <ticket-id> [branch-or-PR-ref]
Run the Reviewer stage on a built ticket (three-agent pattern) — requires a fresh context
/start-all [supervised|autonomous] [concurrency] [none]
Gate 1 for the whole PRD — publish every module's tickets, then run them all through the pipeline scheduled from one dependency DAG
/start-milestone <module dir, e.g. docs/prd/01-foo> [supervised|autonomous] [concurrency]
Gate 1 start signal — publish the module's tickets as tracker issues, then run the milestone pipeline (three-agent pattern)
/verify-delivery <ticket-id>
Post-merge Definition-of-Done check for a ticket (three-agent pattern) — verifies delivery instead of assuming it
/connect-asana "[asana-task-url]"asana · optional
Connect this repo to an Asana task so the pipeline mirrors milestones and tickets as Asana subtasks (optional; the pipeline runs fine without it)
Roles · model · effort
ArchitectClaude Opus 5 @high BuilderClaude Opus 5 @medium ReviewerClaude Sonnet 5 @high Triage (nightly only)Claude Sonnet 5 @high
Install this pattern
npx agent-templates@latest adopt three-agent-architect-builder-reviewer .

From a bare PRD.md to shipped

1. Adopt

npx agent-templates@latest adopt three-agent-architect-builder-reviewer . — scaffold, templates, docs skeleton, CLAUDE.md, in one idempotent command.

2. Break down

/breakdown-prd — the Architect turns your PRD into sub-PRDs and cold-startable tickets, then stops.

3. Gate 1 — you decide

Review the breakdown, then /start-milestone: tickets become tracker issues and the pipeline starts.

4. Autonomous middle

Plan → build → fresh-context review (bounce-capped in code) → merge on CLEAR → issue closed → delivery verified.

5. Gate 2 — smoke test

Agents own unit/integration/E2E all along; you test once per phase, when that PRD is done. A nightly sweep fixes issues while you sleep.

Parallel delivery — opt in with one number

concurrency — one number decides the shape. 1 (default) is the original sequential runner, one ticket at a time, unchanged. N (autonomous only) runs independent tickets — the ones the dependency DAG says don't block each other — as parallel lanes, scheduled by the deterministic workflow.
/start-milestone docs/prd/01-foundation autonomous 4   /start-all autonomous 4

Isolated worktrees

Each independent ticket runs in its own git worktree — builder and reviewer work there, so concurrent lanes never clash on the working tree.

Serialized merge

Delivery to the default branch never overlaps; a hidden file-scope overlap surfaces as a merge conflict → abort → escalate, so nothing lands broken.

DAG-bounded, opt-in

A failed ticket skips its dependents; real parallelism is bounded by the dependency graph and the runtime's agent cap. >1 multiplies token spend — opt in per run.

See the plan before you run it

/breakdown-prd writes docs/prd/dag.html — every ticket in one dependency graph, colored by module. A self-contained file: double-click it, no server, no build step. It tells you the concurrency worth passing instead of making you guess, and flags a module that can only ever use one lane — that is a file-scope decomposition problem, and Gate 1 is the cheapest moment to fix it.

15 tickets, 4 modules — pick a lane count and watch the same graph re-shape. This board is computed at build time by the pipeline's own scheduler, so it is the schedule you would actually get.

concurrency
01-core02-api03-jobs04-docs
wave 1 · 4/4 010101-core 010201-core 030103-jobs 040104-docs
wave 2 · 4/4 010301-core 010401-core 030203-jobs 040204-docs
wave 3 · 2/4 010501-core 030303-jobs idle lane idle lane
wave 4 · 4/4 020102-api 020202-api 020302-api 020402-api
wave 5 · 1/4 020502-api idle lane idle lane idle lane

1 lane — the shape of the DAG

Every ticket waits for the one before it, so the board is a single column per wave and the run is as long as the ticket count. Useful as the baseline: it is what concurrency defaults to.

More lanes — until they stop filling

Independent tickets pack into the same wave and the run gets shorter — up to a point. Past the widest wave the extra lanes render as idle, which is exactly the number the page tells you not to exceed.

Where you are, mid-run

/start-all reloads the DAG every few finished tickets, so a ticket added while it runs is published, scheduled, and re-rendered into the same page. Re-open it during a run — or regenerate any time with node .claude/scripts/dag-report.mjs docs/prd.

The project doesn't end at Gate 2

The PRD document splits by phase. The ticket tree never does. Write the next phase as its own PRD and point /breakdown-prd at it — it decomposes into the same docs/prd/, because /start-all schedules one global DAG and a dependency that crosses phases only resolves inside it. Then run the same command again: everything already delivered has a closed issue and filters itself out.

Three commands, no migration:

docs/PRD-02-billing.md                    # write the next phase
/breakdown-prd docs/PRD-02-billing.md     # appends modules; delivered work is frozen
/start-all autonomous 2                   # only the new tickets run

One tree, two phases — toggle to see what the second run actually schedules. Both boards are computed at build time by the pipeline's own scheduler. Watch BIL-1: it is blocked_by a phase-1 ticket that already shipped — the edge every argument for splitting the tree would break.

run
01-core phase 102-api phase 103-billing phase 2
already delivered 0101delivered · skipped01-core 0102delivered · skipped01-core 0103delivered · skipped01-core 0201delivered · skipped02-api 0202delivered · skipped02-api
wave 1 · 1/2 BIL-1← 0201 · phase 103-billing idle lane
wave 2 · 2/2 BIL-203-billing BIL-303-billing
wave 3 · 1/2 BIL-403-billing idle lane

One tree, one DAG

A parallel docs/prd2/ would make every cross-phase dependency a dangling reference — a hard error by design. Keeping one root is what lets new work depend on shipped work.

Delivered work is frozen

Existing files under docs/prd/ may only be added to — never modified or deleted — and that is checked against git, not asked for politely. A shipped ticket is the record of what was built.

Nothing is skipped silently

The run reports every ticket it dropped as already delivered. Edit a ticket after it shipped and it comes back as drift for a human to judge — the scheduler never re-runs it, and never hides it either.

Finish first, publish later

The tracker is not on the critical path unless you put it there. Pass none and every ticket merges to your local default branch — no push, no PR/MR, no tracker.

/start-all autonomous 1 none

Every delivery defect this catalog has recorded lives at the forge boundary — a pipeline gate, a protected branch, a 403 MR API, squash-merge ancestry, an expired token — and each one stopped a whole run. Review is unchanged: a ticket still only merges on CLEAR. What is deferred is publication, not judgement.

A committed ledger, not a scratch file

docs/delivered.json records each delivered ticket and the commit it landed as. That is the resume signal — a re-run executes only the new work — and what you or an agent read afterwards to know what still needs pushing. A gitignored file would vanish on the first clean checkout, exactly when it is needed.

It hands the work over

The run ends by stating that nothing was pushed and giving the exact command — git push origin main. A mode that quietly accumulates work on one machine and says nothing is indistinguishable from work nobody can see.

Same filter, different signal

With no tracker there is no closed issue to resume from, so the ledger carries that role — at launch and at every mid-run rescan. One rule, two sources; a delivered ticket is never re-planned and re-built against work it already contains.