Skip to Content
turbo-12f
Architecture

System overview

How turbo-12f stacks its Go packages, enforces zero external Go dependencies, and separates no-net/http core binaries from HTTP companion and driver processes.

Explanation

turbo-12f keeps its Go runtime small, deterministic, and isolated from direct HTTP linking. Core and containment binaries (t12, t12-cage, t12-container) link no net/http while they verify code and hash-chained evidence, while companion processes and subprocess adapters handle UI HTTP, AI harnesses, Cloudflare, and GitHub.

Core & cages (no net/http)

  • Zero Go dependencies: Builds with the Go standard library only.
  • No HTTP code: t12, t12-cage, and t12-container link zero HTTP clients or servers.
  • Deterministic gates: Scripts verify every test, diff, and hash chain.

Companion processes & UI

  • Web workbench (t12-ui): Serves the React app, manages auth/Observer, and shells out to t12.
  • Subprocess & network adapters: t12-adapter holds HTTP/token integrations (context7, SRE probes), while t12 calls subprocess adapters (ghcli, ghissue, ghrepo, fbreport).
  • AI harnesses: agy, omp, and claude run behind RPC wrappers and guard hooks.

New to turbo-12f?

Read The factory pipeline first for a plain-language overview before diving into Go packages.

Six-layer package stack

The target v2 design in design.md stacks Go packages from storage up to CLI and HTTP entry points.

LayerPackagesResponsibility
Foundationinternal/store, internal/schema, internal/gitio, internal/dag, internal/envfile, internal/access, internal/projectAtomic JSON, tool schemas, git helpers, DAG ordering, configs, auth store
Record & specsinternal/record, internal/spec, internal/rollup, internal/approvals, v1 internal/modelHash-chained logs, OpenSpec views, lint rules, rollups, approvals
Containmentinternal/sandbox, internal/cage, internal/container, internal/readonlysession, *rpc, internal/docs, internal/served, internal/skillmap, internal/runner, internal/eval, internal/benchevalLandlock/Docker cages, revert guards, harness RPCs, Context7 socket, skill checks, role evals & bench grading
Roles & mergeinternal/roles/*, internal/mergequeue, internal/mergepolicy, internal/adapters/*Thirteen role packages, staging rebase queue, policy rules, external adapters
Orchestrationinternal/orchestrator, internal/observer, internal/setup, internal/docschatLane DAG scheduling, slot pools, file locks, failure routing, Observer loop, onboarding setup, docs chat
Entry pointsinternal/cli, internal/ui, cmd/*CLI dispatch, embedded React dashboard with SSE, and 12 helper binaries

Factory architecture across six layers

Flow
100%
binds netappendsderivesJSON + SSEEntry pointsLayer 6internal/cli · internal/ui · cmd/*Orchestration and automationLayer 5orchestrator · observer · setup · docschatRoles and mergeLayer 4internal/roles/* · mergequeue · mergepolicy · adaptersContainment and driversLayer 3sandbox · cage · *rpc · readonlysession · eval · benchevalRecord, specs, and approvalsLayer 2internal/record · spec · rollup · approvals · v1 modelFoundationLayer 1store · schema · gitio · dag · envfile · access · projectProcess splitnet/http on boundsView readerUI reads rollupState homerequests/<id>

Six Go package layers align with downward dependencies from CLI and UI entry points down to Foundation storage.

Click any node or press Play

Downward import rule

In the target architecture, dependencies flow strictly downward. Roles never import each other or the orchestrator, and only the orchestrator writes lane progression events to the log.

Zero-dependency Go stdlib rule

go.mod targets Go 1.27, excludes docs-site via ignore ./docs-site, and has zero require lines. Every binary in cmd/ builds strictly with the Go standard library.

External Node tooling is isolated to internal/ui/web (bun and vite-plus for embedded UI assets) and docs-site. Neither directory adds third-party Go modules.

Core and network boundary

turbo-12f splits binaries into no net/http core/containment programs and HTTP-capable companion or driver programs so containment code cannot accidentally link HTTP clients or server stacks.

Program groupBinariesNetwork and model policy
Core & cages (no net/http)cmd/t12, cmd/t12-cage, cmd/t12-containerZero net/http; v2 t12 invokes local harnesses and subprocess adapters (ghcli, ghissue, ghrepo, fbreport) while cages run offline
Web UI servercmd/t12-uiServes SPA, auth, approvals, and Observer; forks sibling t12 for mutations
Network adapterscmd/t12-adapter, plus v1 t12-runner, t12-cc, t12-job, t12-queueLinks net/http directly (t12-adapter) or transitively (internal/adapters/common, internal/skills); handles Context7 Unix-socket proxy, intake, delivery, and SRE HTTP probes
Helper toolscmd/t12-mutate, cmd/t12-wizard, cmd/t12-benchRuns Go mutation testing, host setup, and FactoryBench grading outside cages (zero net/http)

When a no net/http component needs direct HTTP calls or UI actions, it calls a sibling binary across an OS process or Unix-socket boundary (sibling("t12") in cmd/t12-ui, t12-adapter sre probe --url in SRE, or t12-adapter context7 serve for caged docs lookups).

Boundary check

TestTheCoreAndTheCageProgramsLinkNoNetworkCode in naming_test.go checks t12, t12-cage, and t12-container with go list -buildvcs=false -deps for net/http (internal/roles/context uses internal/schema rather than internal/contextcreator or internal/drive).

Process and network boundary

Flow
100%
No net/http · core & cagesnet/http & v1 driver binariessibling t12isolatesv1 ccexecUnix sockprobe JSONt12 core binaryCoreask · confirm · run · release · previewt12-cage & t12-containerSandboxLandlock & container wrapperst12-wizard · t12-mutate · t12-benchsetup, mutation & bench gradingt12-uiSPA · SSE · ObserverLegacy v1 driversrunner · job · queuet12-cc (v1)v1 context modelt12-adapterdocs · SRE · intakeProcess & socket boundarysibling t12 · sre probe · Context7 sock

Core and containment binaries link no net/http while companion processes handle UI HTTP, model turns, SRE probes, and Context7 lookups.

Click any node or press Play

Key takeaway

Keeping the Go core stdlib-only and offline lets turbo-12f verify every build inside air-gapped cages while confining credentials and network calls to thin sibling adapters.

Next steps

On this page