/do-it:build-loopfrom do-it
Executes Do-it tasks: reads specs and proposals, picks the next buildable band, builds via TDD (software) or acceptance-driven (generic), and keeps loop memo current. Triggered by /do-it:build or autonomously.
Ships in do-it. 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.
One invocation builds one band: a set of tasks dispatched to subagents in a single message. A band of 1 is
the serial path. The interactive driver (/do-it:build) and the autonomous drivers (/do-it:loop,
/do-it:ralph) follow the same discipline.
Write everything this skill produces in the house voice: ${CLAUDE_PLUGIN_ROOT}/references/voice.md.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
When you write the code before the test, delete the code. Not "keep it for reference", not adapted, and not commented out. Delete it, write the test, and write the code again. Do you think "skip TDD just this once"? Stop. That is a rationalization.
A generic project uses the parallel law: NO ARTIFACT SECTION WITHOUT EXPLICIT ACCEPTANCE CRITERIA FIRST.
Decision checkpoints. Two things make you stop and not guess · a destructive or irreversible action (a
data-loss migration, a history rewrite, a secret, a payment, an external side effect) · an ambiguous or
contradictory requirement. Record it in .do-it/progress.md as ### Decision needed or as ### Needs grill,
in plain sentences, and never shorten it. That block is what stops the loop, under
_meta.json.autonomy_level.
Clear it by appending ### Resolved — <the decision>. loop-guard.sh scans the whole file. It treats a
checkpoint as open until a later ### Resolved appears, so an uncleared block keeps the loop stopped. Never
delete the original block.
Whenever you end the loop, print a stop report first. ${CLAUDE_PLUGIN_ROOT}/skills/loop-runner/SKILL.md
§ Stop report holds both templates.
reason= and next= lines.checkpoint: slot that is not NONE · review_mode: manual at a green gate.Under template 2, write the ### Decision needed block or the ### Needs grill block to progress.md before
you print. Every PAUSE below means "print the stop report, then stop".
Resolve the metadata through ${CLAUDE_PLUGIN_ROOT}/scripts/meta-config.sh:
review_cadence defaults to per-feature. per-task and off stay as explicit escape hatches.knowledge_maintenance defaults to false. A legacy project with no such key resolves it from wiki_cadence
(off gives false; per-task and per-feature give true).| Per task — always | Per feature — the product gate |
|---|---|
| Iron Law: the failing test first | Feature review — 2 subagents in parallel |
| typecheck, lint, tests green | production build green |
| security scan clear | spec delta merged, change archived |
| one commit, one box, one progress line | optional wiki and retrospective when maintenance is on |
| a screenshot for UI work | memo advanced to the next work |
Keep the tasks small. Run /do-it:review <change-id>/<task-id> by hand when a risky task needs earlier judgment.
v0.14 spends fewer review agents. It spends the same on every deterministic check. These stay mandatory, at every cadence:
scripts/verify-report.sh over every claimed commitscripts/security-check.shbuild_cmd at feature scopeThe cut removes a model's opinion. It never removes a measurement.
In this order, before anything else:
.do-it/loop-memo.md — the loop's working memory. Read it first. It saves you from deriving everything
below again..do-it/specs/_meta.json — read every field. Do not infer a declared value again. (The schema lives in
${CLAUDE_PLUGIN_ROOT}/references/meta-schema.md. Open it when a field is unclear, not every iteration.).do-it/changes/ — the open change folders, without archive/. tasks.md is the work queue..do-it/specs/<domain>/spec.md for the domain the current change's proposal.md names. Not the whole
directory. It grows a merged delta with each feature. To read all of it every iteration is the single
largest compounding read..do-it/design/ (tokens, foundation, contracts) and .do-it/codebase/, when they exist.AGENTS.md, when it exists. Its instructions still carry weight, even when automatic promotion is off.docs/index.md, and then only the touched entity pages. Do this only when the effective
knowledge_maintenance is true, or when the task is documentation-scoped..do-it/progress.md — the tail only. The memo is the digest.Before you select work, check a software project with UI scope for an archived F0-foundation. When none
exists, F0 is the priority barrier. That holds for a brownfield app, and for a project with older open feature
folders.
.do-it/design/tokens.json and .do-it/design/foundation.json. When one is absent, stop with
Next: /do-it:design. When no open F0 exists, create .do-it/changes/<date>-F0-foundation/. Its ordered
tasks are:
ui-shell — scaffold only when no app exists; otherwise check it and reuse it. Establish the application
frame, the smoke test, the warm preview, and the gallery route.ui-foundation tasks. Each one consumes .do-it/design/foundation.json, wires the tokens and
the theme, and reuses the existing primitives. Then it adds only the missing shared components and their
important states.A feature bootstraps lazily, one at a time, when its predecessor archives. Each folder holds proposal.md and a
layer-tagged tasks.md with the gate line inserted. The default domain UI order after F0:
ui-types → ui-fixtures → ui-component(s) → ui-wire
─── UI-first review gate ───
data-schema → wire-api → wire-swap
Mark <!-- par --> only for authored independence. Never parallelize F0 past ui-shell. A foundation primitive
may join a later parallel band only when its files and its dependencies are disjoint.
Continue straight to Step 3. The deliberate first-paint stop happens after the ui-shell task, not after you
write the bootstrap Markdown.
When someone passed change-id/task-id as an argument, that is the band, subject to the gate rule.
Otherwise collect every currently buildable task, and cap the band at _meta.json.subagent_concurrency
(default 4, hard cap 5). ${CLAUDE_PLUGIN_ROOT}/references/parallel-loop.md holds the full rules · eligibility ·
the worktree requirement · the barriers · <!-- par --> semantics.
The short form:
<!-- par -->.subagent_concurrency > 1 needs use_worktrees: true. Enable it and say so once, or fall back to a band of 1.
Never fan out into one working tree.gate_strictness: strict forbids a cross-change band.ui-types tasks in one band unless the contracts split per entity.When nothing qualifies: run a due gate, and otherwise check for completion or report the blockers.
Skip this when branch_per_change: false, when the project is generic, or when this is not a git repo.
BR="$("${CLAUDE_PLUGIN_ROOT}/scripts/branch-name.sh" <change-id>)" # from _meta.json.branch_template
if git show-ref --verify --quiet "refs/heads/$BR"; then
git checkout "$BR" # existing change → resume its branch
else
git checkout -b "$BR" # new change
fi
Use the explicit if, not A && B || C. The || form turns a dirty-tree checkout failure into a confusing
"branch already exists". When either checkout fails, stop and report the working-tree state. Never build on the
wrong branch.
feat/F1 off feat/F0).git merge-base <base-branch> HEAD. A band cannot stack, because its changes
start together. Note in progress.md which mode produced the branch.use_worktrees: true runs the change in .worktrees/<change-id>/, on the same branch name.Run this gate for F0 always, and for every UI feature when _meta.json.frontend_first is true:
F0 may not archive, and a data-*, wire-* or logic task in change X may not start,
while required ui-* work is unchecked or its tasks.md lacks <!-- gate-passed: DATE -->.
| Candidate layer | Gate state | Action |
|---|---|---|
ui-* | any | Build it. |
| backend | not passed, a ui-* task unchecked | Skip it. Build the next ui-*. |
| backend, or feature completion | every ui-* checked, marker absent | Run the gate now. Continue in the same turn. |
| backend | marker present | Build it. |
To run the gate — mechanical and visual, with no review subagent. Follow
${CLAUDE_PLUGIN_ROOT}/references/ui-verification.md. By now every ui-* task already screenshotted against the
warm preview, so this step mostly asserts over captures that exist.
Green: write <!-- gate-passed: YYYY-MM-DD --> below the gate line, log the evidence block, and continue with the
backend tasks in the same turn.
Red: treat it as a REVISE on the responsible ui-* task. Run iterate-fix, check once more, then PAUSE.
review_mode: manual: PAUSE even on green.
This step and a /do-it:review PASS are the only two places that may write the marker.
gate_strictness (strict, per-feature, soft) scopes the rule. See
${CLAUDE_PLUGIN_ROOT}/references/layer-ordering.md.
The per-layer recipes live in ${CLAUDE_PLUGIN_ROOT}/references/layer-recipes.md. A build subagent reads that
file itself. The dispatcher does not need it.
F0 ui-shell owns the first preview boot. Reuse it before any later ui-* band. When .do-it/preview.json
is absent or dead, the loop thread restarts it per first-paint.md. A build subagent screenshots, and it never
boots. Every ui-foundation, ui-component, and ui-wire task must render in the warm gallery or route before
anyone checks its box.
Check it first. At per-feature cadence the report is the only thing between a defect and the seven tasks on top of it. The agent being graded wrote it. Do not read it and believe it. Derive it again.
6a. Refute the report from git. For every report that claims a commit, before anyone ticks a box:
"${CLAUDE_PLUGIN_ROOT}/scripts/verify-report.sh" \
--cwd <that task's worktree or the repo root> \
--base <the sha captured for THAT TASK at dispatch> \
--commit <the sha the report claimed> \
[--iron-law off] [--no-security] [--rerun-gates --typecheck … --lint … --test …]
It asserts four things · the sha exists · exactly one commit separates it from the task's base · the diff holds
a test file · security-check.sh --range comes back clean.
| Flag | When |
|---|---|
--iron-law off | project_type: generic, or layer ui-types — its recipe permits the typecheck itself as the test |
--no-security | security_scan: false |
--rerun-gates | verify_reports: true. It defaults to false, because a re-run of the suite doubles the critical-path wall clock on every green task. The git assertions and the credential scan are always on, and they cost seconds. |
The base sha is per task, not per band. Capture git -C <cwd> rev-parse HEAD for each task immediately
before you dispatch it (Step 8). A change's branch gains one commit per task, so one band-wide base refutes every
task after the first.
Exit 1 is a red gate. Handle it exactly as the table below handles one. Never tick a box over a refutation.
6b. Then read the report. Take the first word of each slot, literally:
| Reported | Action |
|---|---|
| the block is missing, or a slot does not parse | A malformed report is red. Do not check the box. Do not guess what it meant. |
verify-report.sh exit 1 | Red. The report disagrees with git. Treat the refutation text as the failure. |
tests: pass · typecheck: pass · lint: pass · security: clean · commit: a real sha | Go to bookkeeping. |
any slot says fail, or commit: - | Do not check the box. Run iterate-fix on the root cause, and run the gates again. A second failure on the same task means PAUSE. |
security: blocking | The same as red. Also say plainly that the credential needs a rotation — to remove it from the diff does not un-leak it. |
security: warn | Not blocking. Carry the detail into the memo for the feature review. |
screenshot: blank, or console errors | Red. A component that compiles and does not render is not done. |
checkpoint: is not NONE | Handle it under safety_stops and autonomy_level. Record a ### Decision needed block or a ### Needs grill block, then PAUSE. Never guess past it. In a band the whole loop stops, so no other worker races past a human decision. |
Then bookkeep. This is deliberately cheap, and only the loop thread writes any of it:
tasks.md, with an outcome note of 6
words or fewer..do-it/progress.md:
- {date} {change-id}/{task-id} {layer} {title} — {N}f {sha} {n}t{, shot: path}. A multi-line block is only
for a gate, a review, an iteration, an archive, or a decision.knowledge_maintenance is true, admit a reusable: discovery to AGENTS.md only at the
existing threshold. In code-first mode, carry an immediate operational fact in the memo, and do not promote it
automatically..do-it/loop-memo.md once
(${CLAUDE_PLUGIN_ROOT}/references/loop-memo-template.md). Refresh it again immediately before any turn end
and before any PAUSE.Then go straight to the next band. The default code-first cadence dispatches no documentation worker.
A task is done when: every mechanical gate is green (from real output, not from an assumption) · the box is checked · one commit exists · one progress line exists. A band is done when: you applied every report · the memo is current.
This fires under two conditions. The band's last task was the last unchecked task in its change. The gate marker is present, or the change has no UI task.
7a. Feature review. Apply ${CLAUDE_PLUGIN_ROOT}/skills/review-work/SKILL.md at feature scope. It
dispatches two subagents in one message · spec compliance · quality with security. They cover the whole
change and the feature diff ({base}..HEAD). Skip it only under review_cadence: off.
Refutation runs inline in the loop thread at refute_cap findings or fewer (default 3). A normal feature
review costs 2 agents.
Verdict actions live in review-work Step 3. A REVISE goes to /do-it:iterate, and then to review-work
Step 3d, which re-reviews the blocking tasks' diff with one lens. After 2 consecutive REVISE verdicts on one
feature, or on any REJECT, PAUSE and route to /do-it:grill. A REJECT never retries blind, and it never
archives.
7b. Archive (only after a PASS):
specs/<domain>/spec.md (ADDED, MODIFIED, REMOVED) and merge it into
.do-it/specs/<domain>/spec.md..do-it/design/foundation.json exists · the code implements and gallery-tests
every declared primitive · the shell and foundation screenshots are present. A missing or stale foundation is
a REVISE, not an archive..do-it/changes/<id>/ to .do-it/changes/archive/<YYYY-MM-DD>-<id>/.auto_merge: true. Note in progress.md that the
branch is ready.knowledge_maintenance. When it is false, the archive path stops here. When it is true, dispatch the
wiki pass and the retrospective as two fresh subagents in ONE message. Their own skills own the
documentation validation. An explicit legacy wiki_cadence: off skips the wiki pass, and the manual commands
still work.A feature is done when: every box is checked · the gate marker is present (when the change has UI tasks) ·
the review says PASS · build_cmd is green · the delta is merged and the change is archived · the memo points at
the next change. When maintenance is on, the passes it asks for must also finish cleanly. Documentation health
never blocks code-first completion.
Dispatch a fresh subagent for each task in the band. Put all Task calls in ONE message, so they run in
parallel. Use ${CLAUDE_PLUGIN_ROOT}/references/briefs/build-task.md with every slot filled, including
{PLUGIN_ROOT}, {cwd}, and {repo_root}. A subagent cannot resolve ${CLAUDE_PLUGIN_ROOT}, and an
unfilled path quietly breaks the script references inside the brief.
Before each dispatch, record that task's base sha with git -C <its cwd> rev-parse HEAD. Step 6a needs one
for each task. Keep them in the band's working notes. Do not write them to .do-it/.
Layer to subagent type, when _meta.json.model_tiers names one:
${CLAUDE_PLUGIN_ROOT}/references/model-tiers.md. An empty model_tiers (the default) means the plain
do-it-builder type everywhere.
Hand the subagent the absolute path to the brief plus the filled slots. Do not inline its whole body. It reads the file itself.
Await the whole band, apply every report (Step 6), and then evaluate the barriers. Never start a band with a report unapplied. An unapplied report is an unticked box, and the next band picks the same task again.
Do not pause between tasks. Stop only at a gate, at an archive boundary, at completion, or at a hard block.
Numbered, and evaluated in order. The full contract is ${CLAUDE_PLUGIN_ROOT}/references/workflow-band.md.
/do-it:loop or /do-it:ralph → Step 8, unchanged. Stop here. A background band has nothing to
await into, and nothing on the disk records it in flight. The next iteration would dispatch a second
concurrent band into the same worktree.--workflow not passed → Step 8. It is opt-in, and it stays opt-in.Workflow is absent, or the probe has not passed on this host → Step 8, noted once in the memo.${CLAUDE_PLUGIN_ROOT} to a literal absolute path and call
Workflow({scriptPath: "<abs>/workflows/build-band.js", args: {…}}). The loop thread already created the
worktrees, captured each task's baseSha, and resolved each task's agentType.BAND_RESULT log line. Then run Step 6 unchanged · verify-report.sh per
task, with that task's own base sha · the bookkeeping. A schema proves the report is well-formed. It never
proves the report is true. Do not run loop-guard.sh, and do not start another band, before the
notification arrives.What it changes · a schema validates the report edge · each task runs on its layer's tier, under one dispatch object. What it does not change · the brief · the gates · the checks · the bookkeeping · who writes what.
Three conditions must hold. Do-it archived the required F0 foundation (a UI project). The code implements every
.do-it/specs/ requirement. No change is open.
<promise>COMPLETE</promise>
The loop runner greps for it. It is the only "done" signal. Emit it falsely and the safety property breaks.
<!-- gate-passed --> written by a build subagent, or written on a red self-check because the screenshots
looked fine.verify-report.sh refuted.commit: sha trusted with no re-derivation from git. The agent that wrote the report is the
agent being graded..do-it/**, docs/**, or AGENTS.md. Its own .do-it/preview/ screenshot is
the one exception.workflows/build-band.js dispatched from inside a loop, or with isolation: 'worktree'. Workflow's
worktree is ephemeral, and it would strand or discard the change's commits.knowledge_maintenance enables it.wire-api test. Hardcoded data in a component. A deleted fixtures.ts on
wire-swap.specs/.Band {n}: {k} tasks
{change-id}/{task-id} {layer} ✓ {M}f {sha} {n}t{ shot: path}
...
Remaining: {count} in this change ({ui} ui, {backend} backend, gate {state}); {n} open changes
Next: {next band | UI-first gate | feature review}
Archived:
Archived {change-id}: {title} — {N} tasks, review PASS
Delta merged, branch {branch} ready{, maintenance complete | , maintenance deferred}
Next: {next change}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
do-it, build-loop, tdd, task-automation, development-workflow
13 skills in this plugin
/designEmit the compact design state the build loop consumes: tokens, the F0 foundation manifest, and per-entity contracts. Narrative design docs defer to --full.
/do-itRun the Do-it spec-driven MVP workflow in Codex. Use for PRD, brownfield mapping, config migration, grilling, design, preview, building, review, iteration, project status, retrospectives, or autonomous delivery./grillAdversarially challenge a spec-layer artifact — PRD, change proposal, or design system — before code exists. Hunts gaps, contradictions, ambiguity, scope creep. Triggered by /do-it:grill or "challenge the PRD", "poke holes".
/iterate-fixApply fixes after a REVISE verdict, or after a task's mechanical gate goes red. Root-cause discipline only — no symptom fixes, no test-softening. Triggered by /iterate, or by the Ralph loop on a red gate or a REVISE.
/llm-wikiMaintain docs/ as an optional LLM Wiki. Direct Pass/Query always work; automatic passes run only when project knowledge maintenance enables them.
/loop-runnerSet up and explain Do-it's autonomous drivers — /do-it:loop (Claude Code's native loop, deterministic stop via scripts/loop-guard.sh) and /do-it:ralph (the legacy in-session Stop hook that re-feeds the iteration contract). Preflight, settings resolution, the stop report, and stop semantics for both. Adapted from anthropics/claude-code's ralph-wiggum plugin over snarktank/ralph's prompt-as-program discipline.
npx claudepluginhub flyingwebie/skills --plugin do-itOther plugins' skills for the same job