BACK_TO_COURSE
The Build Loop — From Idea to Committed Code
/do: One Task, Fully Verified
The Pipeline Behind a Single Task
/do executes one task through a fixed spine. The Main Agent owns the task list, the plan and every judgment call:
- Gather context — read the acceptance criteria and the actual current content of every file involved
- Recall memory — search prior decisions, patterns and rejected approaches
- Write the plan to disk first (
docs/.output/plans/{stamp}-do-{slug}.md) so a dead session can resume - Write tests from the acceptance criteria before implementing
- Implement — directly for small work, delegated for large
- Gate — build and test through
gate.js - Verify every acceptance criterion against evidence, not the implementer's report
- Commit through
commit.js, regenerate the handoff, append the outcome to the plan
Who Implements?
A persisted Complexity score routes it. At 5 or below the Main Agent implements directly — no lossy hand-off. At 6 or above it delegates to an agent with a rich prompt (variable names, code snippets, constraints). --delegate forces delegation.
Related Commands
/todowrites an execution-ready checklist with acceptance criteria and a wave plan/run-todoexecutes a whole checklist in parallel waves with gates and auto-commit/run-testsruns manual/E2E testing with parallel browser agents/primeloads context at session start;/endsaves the handoff
TIP
Tests come from the acceptance criteria, not from reading the implementation. A test written after the fact tends to confirm what was built instead of what was specified.
QUIZ
A story carries `Complexity: 4`. How does /do implement it by default?
Sign in to track lesson progress and earn a certificate.SIGN IN TO SAVE PROGRESS