Domdhi logoDOMDHI.OS
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:

  1. Gather context — read the acceptance criteria and the actual current content of every file involved
  2. Recall memory — search prior decisions, patterns and rejected approaches
  3. Write the plan to disk first (docs/.output/plans/{stamp}-do-{slug}.md) and open a run record, so a dead session can resume
  4. Write tests from the acceptance criteria, record the red run and freeze them
  5. Implement — directly for small work, delegated for large
  6. Gate — build and test through gate.js
  7. Verify every acceptance criterion against evidence, not the implementer's report, then review once and seal
  8. Regenerate the handoff and commit through commit.js --ship-check (the handoff rides in the same commit), then 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.

The Same Proof as a Full Run

When the task is a story from a TODO, /do runs the software factory's proof path (Module 3) for that one story:

  • ac-verify.js red records that the tests fail now, for the right reason; ac-verify.js freeze locks the story's test files and verify: lines
  • after the gate, ac-verify.js run re-runs every binding
  • one review at the end, and every finding fixed in that pass — there is no later review to defer to
  • ship-check.js seal, then commit.js --ship-check --sc-kind task

Two variations: an ad-hoc /do (no TODO) has no bindings, so it skips the red run and the freeze and seals the gate evidence alone; a docs-only change has no code to gate, so it commits with the audited --sc-skip "docs-only change: no code to verify". A run budget is off by default; --budget turns one on.

Related Commands

  • /todo writes an execution-ready checklist with acceptance criteria, verify: bindings and a wave plan
  • /run-todo executes a whole checklist in waves with gates, proof and a commit per wave
  • /run-tests runs manual/E2E testing with parallel browser agents
  • /prime loads context at session start; /end saves 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 — which is why the red run is recorded before a line of implementation exists.

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