Domains
Orchestrator Flow
The Orchestrator loop from Intake to Settle, the Track lifecycle, and the go-solo and reopen transitions.
Orchestrator Flow
How one Orchestrator runs a job from the human's request to settled Tracks. Rules and their reasons: Orchestrator Phase. Terms: glossary.
Trigger and actors
- Trigger: the human types
$orchestrator-phasewith a request, or a Solo Thread whose work has grown reopens it. - Actors: the human, the Orchestrator, one Track per scope, and Workers.
Loop steps
The steps run in this order for a new job. Afterwards the Orchestrator sits in Listen; each event sends one Track through Merge, Ship or Verify and back to Listen.
- Intake. Read the request and choose the route:
- an unclear requirement → a Track that runs
requirements-phase, thendelivery-phasein the same thread; - an accepted spec, plan or clear bug → a Track that runs
delivery-phase; - work smaller than one PR with no decision → a Worker;
- a runtime failure → a
debugging-phaseTrack or a Worker; - an existing thread the human names → Adopt it;
- work that needs no orchestration → go solo (see below).
- an unclear requirement → a Track that runs
- Charter. Write
.orchestrator/<run>/charter.mdand show it once in the first report. Tracks start without waiting for approval. - Split. Cut the work into Tracks, record their dependencies in the Ledger, and decide whether an integration branch is needed (final PR above about 1.5 million changed lines).
- Spawn. Start each Track in the project of its repository, or adopt an existing thread, with a brief: the typed phase command, scope and boundaries, dependencies, the Charter path, the report contract, "never merge; report ready with the head commit", and "never use a question tool". A Worker then runs the start check: if the Track's first run has not started within 2 minutes, the Track is stalled and the Orchestrator relaunches it or opens a Needs-you item for missing access.
- Listen. Wait for one event (a Track report, a PR update, a deploy
result, a Worker result or a human message), update the Ledger, act or
delegate, and end the turn.
- When a Track reports its grill closed, write
deliveringin the Ledger, then send$delivery-phase, unless the human said to hold. A repeated report for a Track already delivering is ignored.
- When a Track reports its grill closed, write
- Merge. Merge the exact commit the Track reported ready, once the repository's checks and review mechanism are clean on it. Classify the PR: a new functional PR waits on a Human Gate; a fix or pre-approved code merges at once. Squash always. With an integration branch, sync or rebase it and tell each dependent Track to rebase and report a new ready commit.
- Ship. Release and deploy per the Charter. npm, dev and staging run autonomously; production waits on a Human Gate.
- Verify. A Worker checks the deployed target with the method that fits
the change:
agent-browserfor UI,verify-behaviorfor API behavior, model checking for state and concurrency flows. The Track is verified only with that evidence. - Settle. Close finished Tracks and archive their threads. When the Ledger's exit criteria all hold, close the run.
Track lifecycle
Side states: blocked_access (only the human can give the access),
stalled (no start or no report), parked (held by the human), and
superseded.
Go solo and reopen
- Go solo. At Intake, and whenever its last live Track settles, the Orchestrator asks whether the remaining work needs orchestration: many cross-dependent scopes of big size do; many small scopes or one big scope do not. It goes solo only with no live Track and no Needs-you item of another Track. It writes a final "went solo" Ledger entry, the Charter stops applying, and the thread runs the routed phase itself as a Solo Thread, under that phase's normal rules.
- Reopen. When a Solo Thread's work grows to need parallel scopes or
other repositories, it reopens
orchestrator-phase: it forks itself, sends the fork a$handoffdocument plus the Track brief, and becomes the Orchestrator again with the same Ledger.
Terminal outcome and closeout signal
- Closed run: every exit criterion in the Ledger holds and every Track is settled or superseded.
- Solo: the Ledger's last entry records the go-solo decision.
- Closeout signal: the final report lists what shipped, its verification evidence, the Autonomous Decisions (out-of-bounds first), and any open Needs-you items.