Enforces mechanics
- Parse modes and arguments
- Allocate numbers and paths
- Scan for required artifacts
- Wait at review barriers
- Calculate rounds and routes
Same state → same next stepImplementation tutorial / Portable build
Your first success is not twelve agents. It is one feature that can move from command to engineer to independent review, fail, and resume without hidden conversation state.
00 / The operating split
Reliability comes from assigning every responsibility to the right kind of system. If an agent is enforcing sequence or code is interpreting product intent, the boundary has already drifted.
01 / Smallest working slice
The narrow slice exercises every hard architectural problem: entrance, coordination, mutation, independent evaluation, a deterministic verdict, and append-only recovery.
Normalize a feature request and adopt the coordinator.
/feature "Add sync status"Assign paths, launch work, validate outputs, and route.
scan → run → requireRead a brief, change code, test it, and report evidence.
001.02-eng-*.mdInspect code and report PASS, NOTES, or NEEDS WORK.
001.03-cr-*.mdDelete the conversation, invoke resume, and reach the same next step from files alone. Until that works, you have a prompt chain—not a system.
02 / Build sequence
Select a maturity level. The sequence stays cumulative: later capability never substitutes for an earlier invariant.
Protocol
Define feature directories, filename grammar, allowed verdicts, round math, and completion conditions.
Scanner
List artifacts, find the first missing contract, reconstruct sequence, and detect incomplete review sets.
Coordinator
Parse full, brief-first, and resume modes. Launch only the owner of the next missing output.
Vertical slice
Require the engineer report before review. Route NEEDS WORK back with the whole evidence set.
Definition
Give each role one output and only the policies it needs. Keep interactive discovery in the main conversation.
Independent gates
Code, security, performance, and fidelity run with fresh context. The barrier waits for all four.
Isolation
Commit discovery to main, create one feature branch, and keep review history beside the implementation.
Compounding
Log decisions centrally, sweep adjacent scope into GitHub once, rank it against ICP, and let analysts propose—never silently apply—policy changes.
03 / Repository scaffold
This is a portable starting structure. The directory names may change; the ownership boundaries should not.
commands/
feature.md # parse + route only
agents/
orchestrator.md # state-machine contract
discovery.md # interactive requirements
engineer.md # implementation judgment
code-review.md # independent gate
skills/
language-principles/
SKILL.md # ecosystem doctrine
artifact-format/
SKILL.md # output schema
orchestrator/
scan # deterministic state scan
validate # path + verdict checks
docs/
briefs/ # append-only execution trace
icp/ # definition of customer value
# scope ideas route to your issue tracker, labeled — not a local file
db/agent_log.sqlite3 # shared decision evidence
test/orchestrator/ # state-machine contract testsArgument grammar and routing. They do not plan or implement.
One identity, approved inputs, allowed tools, and one defined output.
Load domain doctrine where it changes decisions—not into every context.
Scanning and validation belong in code even when Markdown describes them.
04 / Contract tests
The model may vary its reasoning. These invariants may not vary at all.
| Invariant | Given | Expected |
|---|---|---|
| Exact output address | Engineer completes without its report | Stop; do not launch review |
| Prerequisite order | Design spec is missing | Engineering cannot start |
| Parallel barrier | Three of four review files exist | Wait; do not calculate verdict |
| Combined verdict | Any report says NEEDS WORK | Route to engineer with all reports |
| Round arithmetic | Round 1 begins at sequence 04 | Round 2 engineer begins at 09 |
| Append-only history | A repair round begins | Prior reports remain untouched |
| Resumability | Process restarts after architecture | Resume at first missing design spec |
| Workspace boundary | Subagent runs in worktree | Writes only allowed feature state |
| Shared evidence | Worktree logs a decision | Use main checkout’s database path |
| Human governance | All reviewers pass | Open PR; never self-merge |
05 / Starter control plane
The scanner is the source of truth. Each worker receives explicit inputs and an expected output. The loop cannot advance on a persuasive narrative alone.
Compare with the Rails orchestratorfeature = parse(invocation)
state = scan(feature.directory)
until state.complete?
stage = first_missing_contract(state)
result = run_worker(
owner: stage.owner,
inputs: stage.required_inputs,
expected_output: stage.output_path
)
require_file(stage.output_path)
if stage.review? && result.needs_work?
append_next_round(feature, evidence: all_reviews)
end
state = scan(feature.directory)
end
open_pull_request(feature) # human owns merge06 / Resist premature organization
Each item is useful eventually. None proves that your core system can hand off, fail safely, or resume.
Files and a clear CLI are enough until operators cannot diagnose state.
Start with inspectable artifacts and explicit context selection.
A small static route table makes ownership legible.
Learning should produce a proposal with evidence and human approval.
Add a specialist only when an independent decision boundary exists.
Use files, git, a small scanner, and the host agent runtime first.
07 / Definition of built
That is the reusable asset: not a set of prompts, but an execution protocol another language can inhabit.