Spec-driven: the spec is pinned to a commit
An analyst agent and an architect agent check that the task is clear and buildable before anything is built. The approved spec is pinned to the starting commit, and its fingerprint is checked at every later gate. If the spec changes after approval, the chain breaks and the work stops.
Test-first for AI agents: red tests before any code
A test author writes acceptance tests from the spec and runs them on the starting commit. Every new test must fail. Only then does a developer agent write code, and it cannot edit the tests, the test configuration or the CI files. A passing suite then means the code met a target it could not move.
Under every gate
- The approved spec’s digest is carried through every later manifest. A change in the spec after approval breaks the chain.
- Each gate reads the previous gate’s evidence back from the remote before it trusts it.
- Gates fail closed. A timeout, a tampered file or a drifted spec keeps the gate shut.
- Agents run in a sandbox with no network and no credentials, and host files outside the worktree are out of reach. Only the orchestrator’s own deterministic code commits, pushes or updates the tracker.
- The gates are tested against themselves. Deliberate defects are injected into the gate code, and the test suite has to catch every one.