The self-observing factory
Features ship through one gate. Fixes come back through another.
Six layers, read from the ground up
Each layer depends on the one beneath it. The sections that follow open them one at a time; the legend in each corner shows where you are.
Two engines, one invariant
The factory runs two engines on one codebase. One ships deterministically. The other watches the system and proposes fixes. Neither mutates production on its own.
Deterministic ship
Every change rides the same lane, gated by the same checks, promoted by exact SHA.
Autonomous triage
The system reads failure prose, investigates read-only, and outputs actionable proposals.
The single definition of green
Every change travels one lane, from a leased worktree to an exact-SHA promotion. CI decides what is green; independent models then try to break it.
Three gateways, one channel
The factory watches itself from three vantage points (inside the app, beside it, and from outside it), and every signal lands in one place.
The red run path
When a staging run goes red, the system classifies it, investigates read-only and hands a human a ready decision.
The autonomous workforce
Five roles, each with a fixed job, a fixed authority and a fixed reason to stop and escalate.
| Worker | Does | Decides | Escalates when |
|---|---|---|---|
First Mate orchestrator |
Orchestrates workflows, writes contracts, splits work | What gets built next, how work is split | Anything high-risk |
Crewmate builder |
Codes against one contract in one leased worktree | Everything inside its contract | Scope changes; a second owner for a fact |
Deckhand chores |
Executes fast-lane integration chores | Nothing beyond the chore | Anything that is not the chore |
Sweeper docs |
Maintains documentation truth via atomic fix-up PRs | Whether a document contradicts the code | Contradictions needing product decisions |
Watch on-call |
On-call triage. Investigates read-only and proposes | Nothing. It proposes and stops | Everything |
The on-call agent contract
Four terms bind every on-call invocation: how much it may do, whose data it may see, what it may spend and what it must record.
Autonomy modes
term_01Tenant scoping
term_02Cost budget
term_03Action log
term_04Risk tiers & the execution perimeter
Every verb an agent can run belongs to a tier. The higher the tier, the less an agent may do on its own. At the top, nothing at all.
Incident memory & quantitative state
Incidents are written as structured records, not stories, so the factory can measure itself from its own history.
YYYY-MM-DD-<slug>.md
Knowledge as code: the validator system
Instructions that agents rely on are treated like code: budgeted, structured and checked by the build.
Decaying text
Validated state
Three principles hold it together
Every layer of the factory is an application of one of these three rules.
The agent proposes, the human mutates.
High-risk operations (promotion, secrets, schemas) are physically and permanently locked out from autonomous actors.
Missing scope means refuse.
Tenant isolation is absolute. In this architecture, null is never interpreted as global scope.
Verification is mechanical.
A capability without mechanical enforcement decays into prose. If a document cannot be verified by a command-line reproduction, it is treated as a systemic liability.