Safety, cages, and gates
How turbo-12f separates AI code generation from deterministic gates, offline cages, per-person credentials, and tamper-evident audit logs kept in the database.
turbo-12f starts from a simple rule: AI models propose changes; deterministic scripts decide whether anything passes.
What AI agents do
- Clarify intent: Ask questions until requirements match your exact words.
- Plan & code: Map files, write failing tests, and implement features inside a cage.
- Audit & probe: Run read-only reviews, UX exploration, and security replay recipes.
What deterministic scripts enforce
- Readiness gates: Refuse ambiguous specs, missing quotes, or dirty repositories.
- Test & size rules: Verify new tests fail on base, pass on candidate, kill mutants, and respect diff caps.
- Containment & logs: Strip secrets, block network access, and chain every event by SHA-256 hash.
Three readiness gates before shipping
| Gate | When it runs | What it blocks |
|---|---|---|
| Spec gate | Before you can confirm a request | Missing user quotes, unresolved open points, vague words, or OpenSpec lint failures |
| Project gate | On t12 confirm | Missing staging or main branches, invalid settings, tampered skill bundles, or a base commit whose install, build, or tests are red |
| Release gate | Before merging staging to main | Failing or missing staging checks, requests not signed off by the person who accepts them (or whose sign-off lapsed because a scenario fails or a later merge changed one of their screens), held requests, or open high-severity bug-bash bugs |
What checks every lane
Before any lane merges into staging, it passes automated checks inside offline verification cages. In the default team flow the qa step runs three of them in order and stops at the first that fails; the classic flow runs each as its own step:
- Test-first proof: New tests must fail on the base branch and pass on the candidate commit.
- Build, lint, unit & mutation: Compiles the app, enforces clean diffs with zero stray comments, runs unit tests, and checks that new tests kill code mutants.
- Browser E2E & visual baselines: Runs real browser scenarios and compares settled screenshots byte-for-byte against
stagingbaselines to catch layout drift or horizontal overflow. - Code review: Blocks unrequested file edits or unlisted dependencies, then checks the diff against language and security rule packs. The team flow runs one review session per part.
Two more layers run per lane only in the classic flow. The team flow leaves them to the release checks, which both flows share:
- Hygiene (Deslop): Flags placeholder stubs, swallowed errors, duplicate clones, and AI narration filler on changed lines. Classic only; at release it checks the release pull request text.
- Security (Red team): Scans commits for leaked secrets, checks dependencies against an offline vulnerability database, verifies write routes, and replays any live security finding before blocking. Runs on every lane in
classic, and on the whole app at release in both flows.
A project picks its flow with the flow preference. A conversation records its flow before its first part starts and keeps it, and no step of that flow can be switched off.
Offline cages and merge policy
Agent coding and verification commands run inside Landlock cages on Linux or network-disabled Docker containers, and an agent session that has no lane cage refuses to start. Secrets, API tokens, and git override environment variables are stripped before any child process starts. A run uses the credentials of the person who asked for it, never another person's. A Docker cage reaches the database only through a unix socket on the host, so no connection string enters it.
Even after all automated checks pass, merge policy inspects the patch for four sensitive areas:
data-loss: Database migrations that drop or rename tables or columns, or delete rows.auth: Edits touching authentication paths or auth-tagged work.licence: New packages with dependencies outside the allowed license list.delivery: Changes to deployment, monitoring, or credential settings.
Every step, verdict, cost, and decision writes to an append-only, hash-chained event log kept in the database, which t12 conversation verify checks end to end. Twelve fixed factory rules, including caged commands and human merges to main, cannot be disabled by project settings.
Key takeaway
No single AI model can waive a failing test, hide an unverified edit, or push code to main on its own.
Next steps
The factory pipeline
How a plain-English request moves through specification, parallel lanes, failure recovery, and staging release checks.
Autonomy, people, and Observer
Understand the Operator and team roles, who accepts a request, the four factory autonomy modes, two-operator safety rules, and the optional Observer assistant.