Skip to Content
turbo-12f
Architecture

Agent roles

How the team flow's five members map onto the thirteen role packages under internal/roles and the internal/observer loop, each combining deterministic scripts with bounded LLM sessions.

Explanation

Every automated step in turbo-12f wraps its LLM session inside a Go script shell. Go builds prompts from embedded files, confines workspace permissions, validates structured outputs or test results afterward, and writes a RoleReport.

What the Go shell guarantees

  • Bounded context: Prompts receive explicit trees, scopes, findings, or diff hunks, and every session that works in a worktree starts with the list of its files, so it opens paths instead of guessing them.
  • Deterministic verdicts: Exit codes, diff checks, SHA-256 baselines, and replays compute Pass/Fail/Blocked.
  • Least-privilege tools: Each role gets only the read/write surface its step requires.

What the LLM session does

  • Bounded reasoning: Clarifies specs, plans lanes, writes tests/code, or audits diffs.
  • Structured exit: Finishes via schema-checked tool calls (analyzer_plan, engineer_done, code_review).
  • Never self-certifies: Agents cannot mark their own work passed or waive gates.

The team and its packages

A conversation runs one of two flows (orchestrator.Flow, chosen from the project's flow preference). The default, team, groups the role packages into the members of a small development team; each part costs three agent sessions (plan, build, review), and a failed check is routed by rules alone.

Team memberLane stepsPackages it drivesAgent sessions per part
Product OwnerNone: talks with the person before any part existsinternal/roles/contextNone per part (it runs during the conversation)
Tech LeadSplits the conversation into parts, then analyzeinternal/roles/strategist (Route, Split), internal/roles/analyzerOne plan
Developerengineerinternal/roles/engineerOne build, plus fix attempts
QAqa: tests, then screens, then one review; stops at the first that failsinternal/roles/qc, internal/roles/uicheck, internal/roles/codereviewOne review, on three times the budget of a single classic reviewer
DevOpsmerge-policy, merge, deploy-dry-runinternal/mergepolicy, internal/mergequeue, internal/roles/devopsNone (scripts)

The classic flow runs the same packages as eleven separate steps and adds deslop, red-team, and sre to every lane, plus a Strategist session (strategist.Decide) for failures no rule routes. Both flows share the release checks (qc, uicheck, redteam, deploy-dry-run, optional qc.explorer), the record, the cages, the merge queue, and sign-off. See ADR 0006 for the measurement that made team the default.

All role packages

While design.md groups the system into 11 logical roles, the codebase splits quality into qc, uicheck, and explorer plus release, totaling 13 packages under internal/roles/ alongside layer-5 internal/orchestrator.

Script shell around every agent core

Flow
100%
Script shell · validates & decidesAgent core · typed JSON onlyaskJSONaskJSONaskJSONaskJSONOrchestratorL5pure script spineProduct Owner & Tech Lead shellspec lint · split · routing rulesProduct Owner & split coreinterviewer · judge · splitTech Lead & Developer shellworktree · fail-on-base · capTech Lead & Developer coreplan JSON · blind fixQA shelltests · screens · rulesQA review, Red team & Explorerreview · probe · hypothesesDevOps, Release & SRE shellpolicy · merge · gate · probesDevOps & SRE coreCI fix · error triage

Deterministic script shells wrap model sessions across thirteen role packages under internal/roles, grouped here by the team flow member that drives them, while Orchestrator stays pure script.

Click any node or press Play

Containment modes across roles

ModeRoles and timeoutsWorkspace access
No commandscontext, strategist plan (3m), sre triage (10m), observer (5m)NoCommands: true denies bash for strategist plan, sre and observer. context runs in an empty scratch folder with no built-in tools; observer reads only the evidence files staged for the item
Read-only (guardTree)codereview (10m, also QA's review), deslop (5m), redteam (10m), strategist route (3m), explorer (15m)readonlysession.Run (confine: true, optional allow_read) reverts edits on exit
Scoped write cageanalyzer (15m), engineer (20m, plus 15m for each check of a candidate)analyzer writes TestGlobs; engineer uses a Docker lane cage

devops, release, and qc run no LLM session. devops bootstrap writes the starter template, .t12/ config, and the CI workflow into a fresh repository on the host.

Intake and routing

RolePackageTriggerKey deterministic guardDetails
Context creator (Product Owner)internal/roles/contextt12 ask, UIVerbatim quote check, zero open points, 25 lint rules, mock UI contrast checkContext and specs
Strategist (Tech Lead's split)internal/roles/strategistt12 run, splits; failures only in classicrules.json table, DAG partition check, Tasks fallbackStrategist

Build and check

RolePackageTriggerKey deterministic guardDetails
Analyzer (Tech Lead)internal/roles/analyzerLane step 1FinalSchema(), diffCap, reproFailsOnBaseAnalyzer
Engineer (Developer)internal/roles/engineerLane step 2Docker lane cage, turn-cap, 7 verify.go gates, QC, screen and origin checks on each candidate inside the sessionEngineer
QC (QA)internal/roles/qcqa first check; classic step 3; releaseSequential build–mutation + ui-capture (qc-cache)QC
UI check (QA)internal/roles/uicheckqa second check; classic step 4; releaseSettled PNG SHA-256 baselines, overflow/unstyled rules, advisory axe-core findingsUI check
Explorerinternal/roles/explorerRelease (qc.explorer)Fresh served.App replay of Playwright/curl recipesExplorer

Security and review

RolePackageTriggerKey deterministic guardDetails
Deslopinternal/roles/deslopclassic step 5Stack packs (typescript, go, python, rust), .md fixer, t12 rules judgeDeslop
Red teaminternal/roles/redteamclassic step 6; releasegitleaks, offline osv-scanner, originCheck on a freshly served app, replayed probesRed team
Code review (QA)internal/roles/codereviewqa last check; classic step 7unrequested / invented-dependency gate, stack-filtered packsCode review

Delivery and operations

RolePackageTriggerKey deterministic guardDetails
DevOpsinternal/roles/devopsconfirm, deploy-dry-run, mergePure Go: empty-repo bootstrap, InstallTimeoutRetries, promotions that stay DryRunOnly{} until a hosting account is connectedDevOps
Releaseinternal/roles/releaserelease lane, gate, mergePure Go: tree-pinned ledgers, proof Bisect, --no-ff mergeRelease and SRE
SREinternal/roles/sreclassic sre step, t12 sre watch, triaget12-adapter sre probe, fingerprints, 24h RollBackRelease and SRE
Observerinternal/observert12 ui loop (10s)NoCommands: true, 9-kind priority, acts with the opener's rightsObserver

Key takeaway

Every role isolates AI judgment inside a Go harness: scripts supply exact context, enforce workspace confinement, and compute the final RoleReport verdict. The team flow decides only how many of those harnesses a part passes through.

Deep-dive guides by stage

On this page