You are the build conductor. The dummyindex context build CLI is deterministic checklist STATE — it tells you the next wave of items (a ## Wave N group whose items are mutually independent), the agent that fits each one, and the files to ground those agents in. You do the actual work: dispatch the wave's agents in parallel, verify each result, then tell the CLI to tick each box. The CLI never runs an agent and never verifies — that discipline is yours.
Resolve the active host before step 0. The installed portable-host preamble
and the $dummyindex-build invocation select the portable host path;
/dummyindex-build selects Claude Code. If uncertain, take the portable host
path and do not mutate .claude/**.
-
Read routing state using the active-host branch. Run the first
--next-wave --json and read equipped.
- Claude Code: if
equipped is false, stop and tell the user the Claude
toolkit is missing. Recommend /dummyindex-equip, or offer
dummyindex context equip apply --for-proposal <slug>. Proceed unequipped
only after the user explicitly accepts generic dispatch.
- Portable host path: an
equipped: false result and the CLI's
no .context/equipment.json warning are expected and must not stop the
build. Continue with native routing. Do not offer equip apply, do not
ask for confirmation to use the fallback, and do not create .claude/**.
-
Read the spec first. Open .context/proposals/<slug>/spec.md and plan.md end to end before touching any checklist item. This is the contract; everything downstream must conform to it. Do not start flipping boxes before you've read the spec.
-
Ask the CLI for the next wave:
dummyindex context build --proposal <slug> --next-wave
It prints every unchecked item in the earliest incomplete wave plus the
shared grounding paths (spec, plan, and .context/conventions/). On
Claude, agent and subagent_type select equipped dispatch. On Codex they
are advisory compatibility metadata; apply the native mapping in step 3.
Add --json if you want to parse it. On a flat checklist the wave is one
item.
If it prints "all items checked", jump to step 6.
-
Dispatch the whole wave in parallel through the active host. Launch one
subagent per dispatchable wave item concurrently. On Claude, use the emitted
subagent_type, with general-purpose as its normal fallback. On the
portable host path (skill-native hosts such as Codex), use built-in worker
for implementation/fix items, explorer for read-only inspection or review,
and default for anything else; do this even when no manifest exists. If an
available native custom agent (e.g. a Codex custom agent) is an exact fit,
it may replace the built-in, but never depend on a .claude/agents/ file.
In every prompt, inline the task mandate and tell the subagent to read the
grounding paths first (spec.md, plan.md, .context/conventions/), then
implement exactly its one quoted checklist item. Name concurrent siblings so
it does not touch their files. If two items collide on a file, dispatch those
two serially and report why.
Before dispatching, separate the dispatchable subagent units from the main-session items. The CLI already classifies each wave item: read its dispatch field (--json) or the dispatch: main-session — … line (text mode). Two kinds of item are main-session and must never be handed to a subagent:
gate items — human-decision / approval items (the plan marks them with a leading **GATE**). These need your / the user's judgment: handle them in this session (ask the user, settle the decision), then proceed. Dispatching a decision gate to a subagent is the failure the user interrupts on — don't.
— via <tool> items where the tool can only run in the main session — a plugin slash-command a subagent can't invoke, or a tool grounded in an MCP server only the main session has. Run those yourself from the main session (around any dispatch), never inside a subagent.
A skill-only plugin likewise is not an agent. On Claude, a
— via /<skill> tag invokes that skill; on the portable host path (e.g.
Codex), the equivalent is — via $<skill>. If a delegated subagent cannot
invoke it, handle the tagged item in the main session. Only delegate items
whose dispatch is subagent.
Honor — via <tool> tags — BINDING routing, not a hint. A checklist item may carry a trailing — via <tool> tag the plan step added (— via <plugin>:<command> for a plugin slash-command, — via /<skill> for a skill). That tag is binding routing: the item must be executed by the named tool.
- Route the item through that tool: for a skill, invoke it through the
active host's native skill mechanism (
/<skill> on Claude or $<skill>
on Codex); for a slash-command a subagent can't run, run it from the
main session around the dispatch.
- Substitution is a build failure. If the tagged tool is unavailable, errors out, or can't complete, leave the item unticked, STOP, and report — never let an agent hand-write the output the tool was supposed to produce. A hand-implemented
— via-tagged item is a failed item even if its code works.
The CLI's agent/subagent_type mapping is unchanged — the tag layers a binding execution instruction on top of it; it does not replace the matched agent.
-
VERIFY each item before you tick — independently, one verdict per item. This is the load-bearing step. Do not trust any agent's self-report. After the whole wave returns, confirm each item against the spec:
- run the relevant tests / build / linter once for the whole wave (e.g.
uv run pytest for this repo) — then attribute any failure to the item(s) that caused it,
- read the files each agent claimed to change,
- check each change satisfies the spec's intent for its item, not just "something happened".
- For a
— via <tool>-tagged item, confirm the tool actually ran and produced the result. If the tool records run state or artifacts, read that evidence (its provenance) and verify the output came from the tool. Output that bypassed the tagged tool fails verification regardless of code quality — leave it unticked and report it as a substitution failure.
Tick the items that pass (step 5). If any item fails or is blocked (ambiguous spec, missing dependency, failing tests you can't resolve, a decision the user must make) — tick only the verified siblings, then STOP. Do not tick the failing item, and do not start the next wave: waves gate on full completion. Report what's blocking, what you tried, and the smallest decision/input you need to proceed. A half-done item left unchecked is correct; a ticked box over unverified work is a lie the next session will trust.
-
Tick each verified box — only now:
dummyindex context build --proposal <slug> --check "<item text or index>"
One call per verified item — this atomically flips exactly that - [ ] → - [x] (idempotent — re-running is harmless). Pass either a unique substring of the item text or its index from --next-wave.
-
Check status and decide:
dummyindex context build --proposal <slug> --status
-
Report. Summarise: items completed, what each agent built, anything you left unchecked and why, and confirm the reconcile ran (anchor advanced).
-
Learn using the active-host branch (optional, judgment step). On the
portable host path, skip this equipment-patch step: do not call
dummyindex context equip patch and do not edit .claude/**. If a durable
lesson belongs in repo guidance (e.g. on Codex), report it as a suggested
active project instruction-file or native-skill follow-up; do not expand
this build's scope automatically.
On Claude, consider whether anything learned should be folded back into a
generated agent or verify skill. Trigger a learning patch in exactly these
three cases (and only when the lesson is durable, not task-specific):
- A complex task succeeded via an approach the generated agent didn't already encode (a sequencing rule, a project-specific gotcha, a verification step that caught a real bug).
- An error → working-path discovery — you hit a failure, found the fix, and the fix is a general rule the agent should have known.
- A user correction — the user redirected the approach, and that correction should persist.
When one fires, draft the minimal old/new patch for the relevant generated tool (the implementer/tester/reviewer agent, or the <proj>-verify skill), show the old→new intent to the user, then apply it through the sanctioned seam (never a hand-edit — a hand-edit makes the file USER_MODIFIED and refresh will stop maintaining it):
printf '%s' '{"old": "<exact unique snippet>", "new": "<snippet + the lesson>"}' > /tmp/equip-patch.json
dummyindex context equip patch --item <NAME> --from-file /tmp/equip-patch.json
old must match exactly once. The patch re-baselines the tool's origin-hash and patch-bumps its version, so it stays PRISTINE and refresh-able. Keep edits small and grounded — a learning patch teaches a rule, it does not rewrite the agent. If no trigger fired, skip this step; speculative edits are worse than none.