Dynamic Workflow Squad Doctrine
What the Claude Code Workflow tool (plan → build → review → fix → test squads of subagents) actually did across three rounds of the metanomicon-design-canon work, and the rules that fell out of it. This is the practical annex to agents and claude: claude stays the bounded implementation specialist, the squad is the harness, and the operator's standing instruction was "use subagents when working, mainly workflows and spawn smart."
What worked
- Builder / adversarial-reviewer / fixer pairs per stratum. Two reviewers reproducing the builder's harness caught the two real errors of the round: the observer coordinate and the essence-coloured cursor ring. Single-agent builds did not.
- Predictions stated before measurement. The King Wen dither builder wrote its clumping prediction first, measured, and reported "half right." That line is worth more than a success.
-
Evidence files beside the code. Every stratum leaves
evidence.md, its probe scripts, and its JSON results in its own directory, so the judge (a human or the orchestrator) re-runs rather than trusts. - Model matching. Heavy synthesis and shader work on the strongest model; probe scripts and screenshot capture on a cheaper one.
What broke, and the rule each break produced
| Break | Rule |
|---|---|
| Large code returned through a structured-output schema truncated or failed | Builders write to disk early and return short text: a path and three numbers. Never route code through a schema. |
| A permission hook stripped subagent tool parameters, so every agent in a squad was blocked before its first read | Launch one probe agent that reads a file and writes a file before launching the squad. If the probe fails, build by hand and say so in the evidence. |
| Container restarts (~45 min) killed background work | Bank the workflow script in the repo (artifact/workflows/*.js) and journal progress to disk so the run can resume from the journal, not from memory. |
| Usage limits ended two runs mid-squad | Same: everything durable is on disk before the squad is launched; the orchestrator can finish by hand. |
Subagents overwrote the orchestrator's own scripts (verify.mjs, build.mjs) twice | Subagents get their own directory. They never write to the orchestrator's scratch paths. |
A heredoc python failure did not stop a && chain, so later steps ran on unpatched files | Patches live in .py files run under set -e. |
git run from the scratch directory reported "not a git repository" | Every git command is git -C <repo> or begins with cd <repo>. |
| A builder documented the observer at 0°N 0°E while the code used the Royal Observatory | Every number in prose must be traceable to a line of code or a probe output; reviewers check the prose against the code, not against the builder's summary. |
Doctrine
- Disk first, chat last. A squad that only produces chat is entertainment, per agents.
- Probe before you spawn. One cheap agent proves the tool surface works.
- State the falsifier. Each builder names what would prove it wrong before it measures.
- Judge by re-running. The orchestrator reruns at least one probe per stratum with its own harness before integration.
- Falsified stays visible. The ledger keeps the wrong claim beside its correction.
Related
- agents · claude · hermes
- agent-memory-infrastructure — where the journal-on-disk rule comes from
- operator-loop-doctrine — the wider loop these squads run inside
- metanomicon-design-canon · seed-is-the-identity