Interface
Commands expose stable verbs and entry modes.
/feature resume 001Composition / System architecture
The team becomes dependable when every role receives a bounded input, writes a durable output, and returns control to an explicit state machine.
probabilistic workers connected by deterministic state
Choose a stage to inspect its runtime, input, output, and ownership boundary.
01 / Six layers
A portable implementation does not begin with eleven prompts. It begins with six architectural responsibilities whose interfaces remain stable when models, languages, or tools change.
Commands expose stable verbs and entry modes.
/feature resume 001The orchestrator tracks stage, sequence, rounds, and approvals.
state → next ownerAgents perform one kind of bounded interpretation.
artifact → artifactSkills supply shared rules, procedures, and schemas.
role + relevant policyFiles and logs make progress, evidence, and recovery observable.
filesystem + SQLite + gitA feature worktree contains mutable implementation work.
feature/001-nameEach layer may depend on contracts below it, but no specialist should secretly become the state machine above it.
02 / Artifact ledger
Sequence numbers express order. Agent IDs express ownership. New rounds append files instead of replacing history.
docs/briefs/001-sync-status/03 / Execution isolation
The discovery brief lands on the main branch. From architecture through synthesis, agents work in a dedicated feature worktree. Shared learning remains outside the branch.
001.01-dis-*.md committed firstdocs/icp/ and docs/roadmap.mddb/agent_log.sqlite3 shared learning historyAGENT_LOG_DB↔shared evidenceIf a worktree agent writes to a local default log database, its decisions vanish when the worktree is removed. The explicit shared log path is part of every launch contract.
04 / Parallel gate
Change any reviewer result. The routing rule is mechanical: one NEEDS WORK sends the complete evidence set back to engineering.
Pattern coherence, Rails conventions, coverage, data integrity.
Authorization, injection, mass assignment, XSS, exposure.
Queries, indexes, callbacks, collection growth, constraints.
Did code follow the plan—and did the plan solve the original problem?
The loop does not repeat forever. If the same finding category persists into round 2, the orchestrator names it explicitly before routing back again. If it persists into round 3, routing stops—the orchestrator escalates to the human instead of launching another round. Three rounds of the same finding means the spec or the skill is wrong, not the engineer.
05 / Resumability
Choose the first missing artifact. The system re-derives its checkout and worktree, reconstructs the current round, and routes to the owner of that missing contract.
Session variables are disposable. Artifact paths, branch names, and sequence rules must be sufficient to reconstruct state in a fresh conversation.
06 / Completion is another system
The pipeline does not stop at “all tests green.” It compresses the feature, captures adjacent scope safely, opens a reviewable change, and records whether earlier decisions held.
Write 001-summary.md so a downstream reader does not need eight reports.
The orchestrator sweeps tagged scope ideas, checks for duplicates, and files each survivor to GitHub once.
Push the feature branch and open the PR. A human owns merge.
Architect and engineer compare expected outcomes with live review evidence.
Agents may propose changes to skills. They should not silently rewrite the rules that govern future agents.
07 / Port it to another language
A Python, Elixir, Go, or Java team needs different engineering policy. It does not need a different execution grammar.
Feature directories, sequence numbers, owner IDs, append-only rounds.
Stage prerequisites, routing, parallel barrier, combined verdict, retry math.
Discovery, architecture, design, engineering, independent review lenses.
Swap Rails principles for the target ecosystem’s native conventions and tooling.
Use the language’s tests, security scanners, linters, profilers, and package audit.
Map commands, agent launches, tool permissions, and workspaces to the host platform.
Make state visible before adding agents.
Keep mechanical transitions out of prompts.
Coordinator → engineer → one reviewer → retry.
Parallelism follows independent lenses, not organizational theater.
08 / Portable state machine
This pseudocode is the minimum architecture: determine the first missing contract, run the owner, wait at the four-review barrier, and append another round when any reviewer blocks.
Inspect the source orchestratorfeature = identify(invocation)
state = scan_artifacts(feature)
while !state.complete?
stage = first_missing_stage(state)
case stage
when :discovery
run_in_conversation(:discovery, user_intent)
when :architecture, :design, :engineering
run_agent(stage.owner, stage.required_inputs)
require_file(stage.expected_output)
when :reviews
reports = run_parallel(
:code_review,
:security_review,
:performance_review,
:fidelity_review
)
require_files(reports)
if reports.any?(&:needs_work?)
sequence += 5
run_agent(:engineering, reports: reports)
else
state.complete = true
end
end
state = scan_artifacts(feature)
end
write_summary(feature)
capture_todos_once(feature)
open_pull_request(feature)
record_outcomes(feature)