Four processes, two human gates and a task cycle driven by code, not by a model. Every process is started by a human. Drawn in BPMN: a rectangle — work, a diamond — a fork with two exits, a circle — an event, a cylinder — a store, a dashed line — a message between participants.
The names on the diagrams are terms from the entity catalogue: what a dossier, a delivery, a verdict or a receipt is, what each consists of and where it lies in the repository, is defined there, and the diagrams introduce nothing beyond that list. Words with a dotted underline are catalogue terms, not synonyms: each has a definition, a composition and an address in the repository, and the underline leads straight to it. Entity names in the diagram captions are underlined the same way. Statuses, outcomes, task labels and role models live on the third page — states and labels. What exactly goes in and out of each of the eight roles — in «Eight black boxes».
This is not a single chain from idea to release. There are four processes, each with its own launch, its own frequency and its own end, and each is started by a human: the engine starts nothing by itself. Discovery and delivery are linked not by an arrow but by the topic backlog: discovery puts a dossier there, delivery takes out what the human chose.
The human starts the process and ends it too: they decide to groom a topic, answer the PM's questions through the orchestrator and look at the finished dossier. Discovery does not create a delivery and does not cut tasks — decision ADR-0012: cutting into tasks something whose release has not been chosen yet means doing the work twice. A topic may lie in the backlog for as long as it likes and never travel into a delivery.
mode: "questions" and wait to be resumed with the answers. The boundary «discovery → planning» is deliberately not counted a gate: these are different sessions, and the human launching the next command is itself an act of approval.A delivery begins not with an idea but with a finished dossier that the human picked out of the backlog: the engine shows topics with status groomed, grouped by release, and waits for a decision — the order of releases is none of its business. Both gates have two exits, and their return paths differ: before the build the human's remarks are edits for roles, after the build they are bugs.
demo/rejected with a reason, and the remarks enter the build as bugs.All of the engine's machinery lives here. A task runs in its own worktree outside the repository, the stages are called one after another, and between them stand forks computed by code, not by a role: a short-lane claim is judged against the real diff, a new red by comparing three lists of names. There are three attempts, and they are counted by the journal — by the number of Developer entries, not by a separate counter that would reset on a restart. Any «rejected» creates a bug, even when the decision is not to fix it.
Exhausting the attempts takes nothing down automatically — the engine has no such right (ADR-0009). The cycle simply ends without acceptance and writes escalated into the journal: the task stays unmerged and moves to blocked, while the run carries on with the other tasks. It is sorted out beyond the cycle — at step 3 of the /firm-build command, where the Orchestrator runs the adjudication and calls the Architect, and the decision is made by the human. Adjudication has three outcomes, and the most frequent one is not taking the task down. First: the blockage is resolved and the task returns to the cycle from the start (lifecycle/arbitrated); the attempts are not reset — the count runs over the whole life of the task. The text of the decision is not a note here but a working document: it reaches the executor verbatim, on its own line in the next stage's prompt, after the remarks of the previous review. Second: the task was cut too coarsely and is superseded by new ones (lifecycle/superseded, with superseded_by in the old one's header), and then the replacements enter the cycle in their turn; the superseded task's branch and tree are not deleted, and the bugs hanging on it are moved across — otherwise doctor returns bugs_on_terminal_tasks. Third: the task is cancelled without a replacement (lifecycle/cancelled). The decision must be laid down as an event, not merely as a field in the header: otherwise the argument computation of the next run would hand the dropped task back as input — that is how, on the pilot, a superseded task arrived in the build a third time.
parallelism, each task — in its own tree ../<repo>.worktrees/T-XXX;parallel_safe runs alone; while others are in work it waits, but it may be skipped in favour of the next ones — otherwise slots stand idle for nothing;needs-browser goes before equals in readiness: its tail determines when the whole run ends;Stage transitions are written by code — the runtime hooks and the git hook — because a step inside the engine can be bypassed and a hook cannot. The model writes no events at all. One file per event: parallel task branches merge without conflicts. Everything shown to a human is computed from the journal on every request, so there is nothing for it to fall out of sync with.
FIRM2-TICKET: T-XXX, which the builder puts into every stage prompt: without it the hook writes an event with ticket: unknown and returns an error. The status in the task card is a derived cache; the journal is authoritative, and on a disagreement it wins.| Stage | Who runs it | Events |
|---|---|---|
| dev | Developer | started · finished · escalated |
| test | Tester | started · finished · escalated |
| review | Reviewer-QA, a panel of up to three votes | started · accepted · rejected · escalated |
| adjudicate | Architect on a split panel | rejected · accepted |
| merge | the git hook post-merge | finished · failed |
| release | the same hook, by the delivery branch name | finished |
| guard/* | engine code, no role | short-lane · new-red · suite-abandoned · egress |
| lifecycle/* | the human, through record | arbitrated · superseded · cancelled |
A rule in a prompt is a request, and a role goes around it when it cannot be carried out. That is why part of the rules is executed not by a role but by code: the tool simply does not let it be done otherwise — it refuses with an exit code, computes the needed number itself, or returns the work one step back without asking the role. That is what «holds» means: not an agreement in text but a prohibition or a computation in the mechanism. The list of such places grows with every analysis and deliberately carries no number in its heading — each has a measured reason, and each stands on the preflight: if the mechanism disappears, the version does not go up, so there is physically nothing to travel into projects.
The boundary is the same for all of them and is also their criterion: the machine holds what a role cannot carry out or cannot measure. Where a role merely made a mistake, the place stays with the prompt — a prohibition instead of an explanation teaches it to go around the prohibition.
The ceiling of a single tool call is 10 minutes, the project's full suite runs for 43. The ban on pushing a run into the background was broken on two attempts out of two, and the second time the prompt forbade it verbatim. A ban without a workable path is a ban that gets gone around.
A measurement over 172 stages of one delivery: out of 5677 shell calls, 2038 were searches through the code, 11.8 per stage. Two thirds of the moves went into the question «what did the Developer do». The carrier is line ranges, not a patch: the median patch is 55,342 characters against 1,799 for a list.
A role that proved attribution by comparing 460 failures on the base with 9104 on the delivery was comparing different suites. The assertion was taken away from it, not forbidden in words.
A criterion promising the absence of a name is checked by grep: a reader in the file of a task that is not an ancestor of this one by depends_on is a breakage scheduled for the future. The reason is measured: one such task cost 13.2M tokens against 2.7M for its replacement.
Under the sandbox the step returned an empty list three times and noted in prose that this meant «did not look». The field is machine-readable, the note is not, and the wave's report looked like «no litter» with eleven orphans standing.
The price of letting it through is measured: prune --help wiped out two worktrees. Destructive commands have a dry run, and the refusal itself says so.