by Drew Owens
Execute complex plans and projects with three agents — a Builder, an Adversarial Reviewer, and a Verifier — looping until it genuinely works. The build half of the plan->build pipeline.
← Commit history
README.md+14@@ -27,6 +27,20 @@ The most important rule, and the reason the skill exists: A plan encodes assumptions. A good builder experiments, discovers an assumption was wrong, and adapts. A verifier that checks against the *original* plan would then raise a false alarm — flagging correct work as "not implemented as described." The work was fine; the plan was wrong. So the Builder is free to correct the plan (logging each deviation as an amendment), and a plan↔behavior mismatch is a note for the human, never an automatic failure. +## Checkpoints: ship small, publish often, say where you are++New in 0.3.0. The build is cut into checkpoints, small slices that can each ship alone, and every checkpoint ends the same way:++| Step | What happens |+|------|--------------|+| **Build** | The Builder does one checkpoint, well under an hour of work. |+| **Prove** | The orchestrator runs the tests itself. A builder's "all green" is a claim, not a result. |+| **Publish** | Green means publish. Red means hold, and say what failed. |+| **Report** | A status update of a few lines: what shipped, what is running, what is next. |+| **Review in parallel** | Several narrow, time-boxed reviewers and the Verifier attack the published checkpoint while the Builder starts the next one. |++The first long run of this skill did everything in one pass, one agent at a time, and published nothing for three hours. The work was good and the human still had to ask why it was taking so long. Checkpoints fix that: there is something to use after the first one, and a status update arrives without being asked for.+ ## Model assignment | Role | Default | Why |
SKILL.md+87−11@@ -1,13 +1,13 @@ --- name: three-musketeers-description: "Orchestrate a long or complex BUILD through three separate subagents — a Builder that does the work, an Adversarial Reviewer whose only job is to poke holes in it, and a Verifier that confirms it genuinely works by behaving as a user (browser/computer use) — looping until the adversary finds nothing and the verifier passes. Use when the user wants to build something substantial and have a separate agent try to break or critique it and then verify it actually works — e.g. 'build it, have another agent poke holes, then verify it works', 'build, review, and verify this with subagents', 'drive this build with a builder, reviewer, and verifier', 'loop until it's genuinely done'. This is the build/verify phase — NOT planning a sketch (use adom-plan) and NOT auditing a finished artifact (use deep-audit). Triggers: /three-musketeers, three musketeers, builder adversary verifier, adversarial build loop, build and verify with subagents, run the musketeers, all for one."+description: "Orchestrate a long or complex BUILD through three separate subagents — a Builder that does the work, an Adversarial Reviewer whose only job is to poke holes in it, and a Verifier that confirms it genuinely works by behaving as a user (browser/computer use) — looping until the adversary finds nothing and the verifier passes. The build moves in CHECKPOINTS: small shippable slices, each published and reported with a short status update as soon as it is verified, with narrow reviewers fanned out in parallel. Use when the user wants to build something substantial and have a separate agent try to break or critique it and then verify it actually works — e.g. 'build it, have another agent poke holes, then verify it works', 'build, review, and verify this with subagents', 'drive this build with a builder, reviewer, and verifier', 'loop until it's genuinely done'. This is the build/verify phase — NOT planning a sketch (use adom-plan) and NOT auditing a finished artifact (use deep-audit). Triggers: /three-musketeers, three musketeers, builder adversary verifier, adversarial build loop, checkpoint and publish, build in checkpoints, parallel reviewers, status updates during a build, build and verify with subagents, run the musketeers, all for one." user-invocable: true argument-hint: "[task description or path to plan/spec]" --- # three-musketeers — Builder / Adversary / Verifier build loop -Drive a long-running build through three roles, each a **separate subagent with fresh context**, looping until the work is genuinely done:+Drive a long-running build through three roles, each a **separate subagent with fresh context**, looping until the work is genuinely done. The build moves in **checkpoints**: small shippable slices, each one published and reported to the human as soon as it is verified, with reviewers fanned out in parallel so nobody waits hours for one big reveal. | Role | Job | One-line mandate | |------|-----|------------------|@@ -52,6 +52,57 @@ Consequences, baked into the workflow: - **The builder amends the plan.** When it deviates, it appends a dated follow-up note explaining what changed and why — this becomes an intentional plan amendment, not a defect. - **A plan mismatch is a note for the human, never an automatic verifier failure.** The verifier judges the *new* behavior on its merits. +## Checkpoints: ship small, publish often, say where you are++The second rule of this skill, learned the hard way. A first run of it built six changes in one pass, ran each role one after another, and published nothing for three hours. The work was good and the human still had to interrupt to ask why it was taking so long. A loop the human cannot see is indistinguishable from a loop that is stuck.++So the build is cut into checkpoints, and every checkpoint ends the same way:++| Step | What happens |+|------|--------------|+| **Build** | The Builder does ONE checkpoint. Small enough to finish in well under an hour. |+| **Prove** | The orchestrator runs the tests ITSELF. A builder's "all green" is a claim, not a result. |+| **Publish** | Green means publish, to wherever the work ships (the wiki, a registry, a branch, a deploy). Red means do not publish; say what failed. |+| **Report** | A status update of a few lines: what shipped, what is running now, what is next. |+| **Review in parallel** | Reviewers and the Verifier attack the published checkpoint WHILE the Builder starts the next one. Their findings become the first items of the next checkpoint. |++Rules that make it work:++- **Cut by what can ship alone.** A checkpoint is a slice a user could take as it is, not a layer ("the data model") that does nothing until the next one lands. Three to five checkpoints is typical. If the task is one small change, it is one checkpoint.+- **Publishing at a checkpoint is part of the job, once the human has asked for this way of working** or the destination is a private or draft one. If publishing is outward-facing and nobody has said to do it, ask once at Phase 0, then never again for that build.+- **Never publish on red.** A failing test, a verifier FAIL or an unresolved Critical or High finding holds the checkpoint. Report the failure in the status update instead of the release.+- **Bump the version every checkpoint.** A published version is never overwritten; the next fix is the next version.+- **The human should never have to ask.** A status update goes out at every checkpoint and whenever a round takes longer than expected. Say what is slow and why.++### Fan out: more agents, narrower jobs++One reviewer asked to attack everything is slow and shallow. Several reviewers each given ONE target, a time box and a private scratch directory are fast and deep, and they run at the same time.++- **Split the adversary by target, not by severity.** For example: one on the new layout logic, one on persistence and data, one on whether the test suite can lie. Give each a time box ("about 15 minutes") and tell it not to re-run slow suites that are already known green.+- **Run the Verifier alongside the reviewers,** not after them. It needs nothing from them.+- **Give every agent its own ports and its own scratch directory,** and tell it to kill only what it started. Parallel agents that share a port test each other's servers.+- **One owner per file.** Two agents editing the same file at once lose work. Reviewers and the Verifier are read-only. When work can be split across files (the app and its test suite, the server and the client), give each file to one agent and run them together. When it cannot (a single-file app), keep ONE Builder and parallelise everything around it.+- **A finding that only touches the tests goes to a separate test agent at once.** It does not have to wait for the app reviewers to finish.+- **Small fixes are the orchestrator's.** Waking a Builder with a large context to change five lines costs more than making the change, proving it in the browser and moving on. Hand the Builder what needs its judgment.+- **Long suites get a subset switch.** If a full run takes more than a few minutes, the suite needs a way to run one group, and the orchestrator uses it while iterating. The full run is for the checkpoint gate.++### The status update++Short, the same shape every time, written for someone who has been away:++```markdown+**Checkpoint N: <what shipped, with its version>** (or: **Status:** <what is holding>)++| Item | State |+|------|-------|+| <agent or task> | done / running / waiting on <x> |++Tests: <counts from the orchestrator's own run>.+Next: <the next checkpoint, in one line>.+```++Lead with what the human can use now. If something failed, that is the headline, not a footnote.+ ## Model assignment | Role | Default model | Rationale | Escalate / downgrade |@@ -69,24 +120,28 @@ Net pattern: **Opus builds, Opus adversarially reviews (diverse context), Sonnet 1. Resolve the target: the task the user described, the `argument-hint` path, an active plan in `/home/adom/.claude/plans/`, or what's in the conversation. If genuinely ambiguous, ask one question. 2. Confirm a plan/spec exists. If there's only a vague sketch, recommend running **adom-plan** first — a thin plan produces a weak loop. A *light* plan is fine (we want room for the builder); a *missing* one is not. 3. Note the **stage** and **how to run/exercise it** (the URL, command, or device the Verifier will drive). The Verifier needs a real way to behave as a user — establish it now.-4. State the lineup to the user before launching: roles, models, and the running target.+4. **Cut the work into checkpoints** (see Checkpoints above) and write them into the plan. Name where each one publishes to. If publishing there is outward-facing and the human has not asked for checkpoint publishes, ask once now.+5. Make sure the tooling the Verifier and the tests need actually works (a browser that launches, a free port, credentials) BEFORE the Builder starts. Finding out two hours in is the expensive way.+6. State the lineup to the user before launching: roles, models, the running target, and the checkpoints. ### Phase 1 — Builder -Spawn the Builder (see **Builder prompt** below) with the task, the plan, and the working context. The Builder:+Spawn the Builder (see **Builder prompt** below) with the task, the plan, the working context and **the one checkpoint it is building**. Run it in the background so the human can still reach you. The Builder: - Does the real work, invoking whatever domain skills/tools the task needs. - When it hits a wrong assumption, **adapts** and appends a `## Build notes — <date>` amendment to the plan file describing the deviation and why. - Returns a structured summary: what it built, files touched, what it changed about the plan and why, and how to run/exercise the result. ### Phase 2 — Adversarial review -Spawn the Adversarial Reviewer (see **Adversary prompt**) with the builder's summary and the actual artifact. Default: **one focused Opus adversary**. Scale up to a small fan-out (e.g. correctness + security + a Sonnet co-reviewer) only for high-stakes builds, or delegate to **deep-audit** for maximum breadth.+First, run the tests yourself. Then publish the checkpoint if it is green and send the status update. Reviewing starts on something the human already has.++Spawn the Adversarial Reviewers (see **Adversary prompt**) with the builder's summary and the actual artifact, **all in one message so they run together, in the background**. Default: **two or three narrow Opus or Sonnet reviewers, one target each, time-boxed**, plus the Verifier from Phase 4 in the same launch. A single reviewer is right only for a small checkpoint. Delegate to **deep-audit** for maximum breadth. If there is a next checkpoint and it does not depend on the findings, start the Builder on it now. The adversary is **read-only** and returns a findings list: `title | location (file:line) | what's wrong | failure scenario | severity | confidence`. It assumes the work is broken until proven otherwise. "Looks done" is not done. ### Phase 3 — Builder fixes (the loop body) -Hand the adversary's findings back to the Builder (continue the same Builder subagent via SendMessage to preserve its context). The Builder fixes real findings and explicitly rebuts any it disagrees with (a finding can be wrong, too). It returns an updated summary.+Sort the findings as they arrive; do not wait for the slowest reviewer. Test-only findings go to a test agent at once. Small, clear fixes you make yourself and prove in the browser. The rest go to the Builder as the first items of its next checkpoint (continue the same Builder via SendMessage while its context is useful; start a fresh one with pointers when that context has grown large). The Builder fixes real findings and explicitly rebuts any it disagrees with (a finding can be wrong, too). ### Phase 4 — Behavioral verification @@ -100,11 +155,13 @@ If no behavioral surface is reachable (pure library, no UI/CLI), the Verifier ru ### Phase 5 — Convergence control (loop) -Repeat **Phase 2 → 4** until **both**:+Convergence is judged **per checkpoint**, and each checkpoint that converges is published and reported before the next one is. Repeat **Phase 2 → 4** until **both**: 1. The adversary produces no new substantive findings (give it one extra "anything left?" round to confirm the well is dry — the tail matters), and 2. The verifier passes on behavior for every intended flow. -This loop is **self-paced** — you decide each round whether to continue, based on whether findings are still landing and verification still failing. Cap pathological loops: if the same finding survives 3 fix attempts, stop and surface it to the user as a genuine disagreement/blocker rather than looping forever. `log` each round's finding count and verifier verdict so the user sees progress.+This loop is **self-paced** — you decide each round whether to continue, based on whether findings are still landing and verification still failing. Cap pathological loops: if the same finding survives 3 fix attempts, stop and surface it to the user as a genuine disagreement/blocker rather than looping forever. Each round's finding count and verifier verdict go into the status update, so the user sees progress without asking.++A hardened test suite will sometimes turn red on a bug that was there before the build started. That is the suite working. Decide whether to fix it now (small, and the checkpoint is otherwise ready) or to report it and ship the checkpoint with the check marked as a known failure. Never weaken the check to get back to green. ### Phase 6 — Handoff @@ -155,7 +212,7 @@ Same order as the handoff — build first, decisions second, rationale third, pr 1. **What was built** — the deliverable and its independently-verified state, with the run target. One paragraph. 2. **Decisions for you** — the open human calls, each with a recommendation and the cost of the options. If a dangerous finding survives, it goes first, named plainly. 3. **Key decisions made during the build** — the calls the loop made and the findings that forced them (the "builder was right" plan amendments live here).-4. One line of process ("converged in N rounds") + path to the handoff doc.+4. One line of process ("converged in N rounds, M checkpoints published") + path to the handoff doc. 5. Note the Builder subagent is still resident — offer follow-ups via SendMessage. Do not lead with the round-by-round story. A skimming reader must still see the thing that would hurt them.@@ -172,6 +229,10 @@ You are the BUILDER in a three-role build loop. Your job is to do the actual wor ## Task {{TASK}} +## This checkpoint+{{THE ONE CHECKPOINT TO BUILD NOW, and a time budget. Name what comes next so the+builder does not paint itself into a corner, and say not to start it.}}+ ## Plan / spec (a guide, not a contract) {{PLAN — may be light on purpose}} @@ -190,6 +251,9 @@ Return (your final message IS the report): 2. Files touched (path — one line each). 3. Plan amendments — every deviation, with the wrong assumption and your reasoning. 4. How to run / exercise it — the exact URL, command, or device flow a user would use.+5. Test results you actually saw — real counts, and the subset command for this checkpoint.++Do not publish or deploy. The orchestrator publishes after it has run the tests itself. ``` ### Adversary prompt@@ -199,6 +263,11 @@ You are the ADVERSARIAL REVIEWER in a three-role build loop. Your ONLY job is to holes in what the builder did. Assume it is broken until proven otherwise. "Looks done" is not done. You are STRICTLY READ-ONLY — do not modify anything. +## Your one target+{{ONE NARROW TARGET, e.g. "the header layout logic". Other reviewers have the rest.}}+Time box: about {{N}} minutes. Scratch directory: {{PRIVATE DIR}}. Ports: {{PRIVATE RANGE}}.+Kill only what you started. Do not re-run {{SLOW SUITE}}; it is already known green.+ ## What the builder claims it built {{BUILDER SUMMARY}} @@ -211,10 +280,12 @@ break on the second try. Be concrete — name the failure scenario, not just the Return: 1. One-paragraph verdict: how broken is this, really?-2. Findings table: title | location (file:line) | what's wrong | failure scenario | severity (Critical/High/Med/Low) | confidence (High/Med/Low)+2. Findings table: title | location (file:line) | what's wrong | failure scenario | severity (Critical/High/Med/Low) | confidence (High/Med/Low) | REPRODUCED or INFERRED 3. Top must-fixes, ranked.+4. What you attacked and found clean. -Cite file:line for every finding. Mark uncertain ones low-confidence. No padding.+Cite file:line for every finding. Mark uncertain ones low-confidence. No padding: if the+well is dry, say so. ``` ### Verifier prompt@@ -258,8 +329,13 @@ A user has an approved plan to add CSV export to a reporting dashboard. Net: the plan was wrong about pagination, the builder was right, and the verifier confirmed the *real* behavior instead of raising a false "doesn't match the plan" alarm. +Run as checkpoints, the same build is two: **export works** (published after step 1's tests pass, with the adversary and the verifier attacking it in parallel while the Builder starts on) **large reports and escaping** (published with the two fixes). The human has a working export after the first checkpoint instead of after the last round.+ ## Guidelines +- **Checkpoint, publish, report.** Small slices, each published when green and announced in a few lines. The human should never have to ask what is happening.+- **Fan out.** Several narrow, time-boxed reviewers and the Verifier in one launch, in the background, each with its own ports and scratch directory. One owner per file.+- **Run the tests yourself before you believe them,** and never publish on red. - **Each role is a fresh subagent.** Independence is the point — the adversary must not inherit the builder's blind spots. Use the `model` option per the table; give the adversary a different disposition than the builder. - **Continue the Builder via SendMessage** across fix rounds so it keeps its context; spawn the adversary and verifier fresh each round so they stay independent. - **Never let the verifier grade against the plan.** This is the whole point of the skill. Behavior is truth; the plan is a starting guess.
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "three-musketeers",- "version": "0.2.0",+ "version": "0.3.0", "type": "skill", "description": "Execute complex plans and projects with three agents \u2014 a Builder, an Adversarial Reviewer, and a Verifier \u2014 looping until it genuinely works. The build half of the plan->build pipeline; pairs with adom-plan.", "tags": [
page.json+1−1@@ -4,7 +4,7 @@ "slug": "three-musketeers", "title": "Three-Musketeers", "brief": "Execute complex plans and projects with three agents — a Builder, an Adversarial Reviewer, and a Verifier — looping until it genuinely works. The build half of the plan->build pipeline.",- "version": "0.2.0",+ "version": "0.3.0", "tags": [ "multi-agent", "build",