Configuration reference
Schemas for .t12/config.json and .t12/preferences.json, fixed rules, env file format, and environment variables.
Project repo (`.t12/`)
.t12/config.json: The project's config: stack, commands, globs, and branch names (project.Parserejects unknown keys)..t12/preferences.json: Autonomy, budgets, slots, and merge policy (updated viat12 config set)..t12/project.json: The profile, with the rules every task of the project shares (profile.Parse, checked byt12 profile-check). It is not the project's config.
Local host (`~/.config/t12/env`)
- Host credentials & tuning: Harness choice, Docker engine, SMTP, and API tokens.
- Strict permissions: Must be mode
0600(envfile.Loadexits otherwise). Process env vars override file values.
# Minimal ~/.config/t12/env (chmod 600)
T12_HARNESS=agy
T12_MODEL=gemini-4-neon
T12_THINKING=medium
T12_SANDBOX_ADAPTER=docker.t12/config.json
A repo written before the rename keeps .t12/product.json, which is still read when .t12/config.json is absent.
| Key | Kind | Req | Default or constraint | Safety | Description |
|---|---|---|---|---|---|
schema | number | No | 1 (1..1) | No | File layout schema version. |
name | slug | Yes | ^[a-z0-9][a-z0-9-]*$ | No | Project slug name. |
type | choice | Yes | web-blog or web-app | No | Project type selecting the default catalogue. |
stack | text | Yes | Non-empty string | No | Summary of the project technology stack. |
repository | text | No | owner/repo slug (^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$) | No | Connected GitHub repository for adopted/linked projects. |
cage_image | text | No | Non-empty (golang:1.27, t12-web-blog:2, or project.Detect stack image) | No | Docker image for caged commands and installs. |
branches.staging | text | No | "staging" (or "t12-staging" on adopted repos) | No | Branch where verified lanes merge first. |
branches.main | text | No | "main" (or "master" / "staging" on adopted repos) | No | Release branch merged only after human sign-off. |
delivery.target | choice | No | "cloudflare-workers" | No | Deployment target identifier. |
commands.install | command | Yes | Non-empty argv list | No | Installs dependencies (runs with network access). |
commands.build | command | Yes | Non-empty argv list | No | Builds the project. |
commands.lint | command | Yes | Non-empty argv list | No | Runs static lint checks. |
commands.typecheck | command | Yes | Non-empty argv list | No | Runs static type checks. |
commands.unit | command | Yes | Non-empty argv list | No | Runs the full unit test suite. |
commands.unit_files | command | Yes | Argv list containing {files} once | No | Runs named unit test files. |
commands.mutate | command | No | Argv list containing {mutate} once | No | Runs changed-line mutation tests (reports/mutation/mutation.json). |
commands.e2e | command | No | Non-empty argv list | No | Runs browser E2E scenarios (reports/e2e/results.json). |
commands.serve | command | No | Non-empty argv list | No | Starts project against a fresh local DB in cage. |
serve_url | text | No | Non-empty string | No | URL where commands.serve listens (expects /healthz). |
commands.deploy_dry_run | command | Yes | Non-empty argv list | No | Builds the deployable artifact and stops before upload. |
globs.test | paths | Yes | Non-empty list of valid globs | No | Globs identifying test files. |
globs.source | paths | Yes | Non-empty list of valid globs | No | Globs identifying project source files. |
deslop.exclude_paths | paths | No | Non-empty list of valid globs | Yes | Paths omitted from Deslop checks (Operator approval required). |
commands.* must be argv arrays, never shell strings; project.CheckCommand blocks shell metacharacters in argv[0] and flags like --dangerously-skip-permissions, --no-sandbox, and --bypass-sandbox.
project.Detect picks node:26-bookworm, oven/bun:1, golang:1.24-bookworm, python:3.12-slim, or rust:1-bookworm, while StackTags tags effect (effect/@effect/*), cloudflare-workers, typescript, javascript, nodejs, go, python, and rust.
.t12/preferences.json
Safety-group preference approvals
t12 config set updates .t12/preferences.json on staging and records a decision under <home>/decisions/. When a non-Operator changes a Safety key, it writes a pending proposal under <home>/proposals/config-*.json until an Operator approves it.
| Key | Kind | Default or constraint | Safety | Description |
|---|---|---|---|---|
schema | number | 1 (1..1, read-only via t12 config set) | No | File layout schema version. |
roles.default.harness | choice | T12_HARNESS or "agy" (agy, omp, claude) | No | Default agent harness for all roles. |
roles.default.model | text | T12_MODEL (or "gemini-4-neon" for agy) | No | Default model identifier for all roles. |
roles.default.thinking | choice | T12_THINKING or "medium" (agy: low..xhigh, claude: low..max, omp: off..max) | No | Default reasoning effort ("default" resets to harness default). |
roles.<group>.harness | choice | Unset (inherits roles.default) | No | Per-group harness override (review, judge, explorer, observer). |
roles.<group>.model | text | Unset (inherits roles.default) | No | Per-group model override (review, judge, explorer, observer). |
roles.<group>.thinking | choice | Unset ("default" or harness levels) | No | Per-group reasoning effort override (review, judge, explorer, observer). |
budgets.retry_tokens_per_task | number | 2 (0..5) | Yes | Pooled retry tokens per task when Strategist reroutes findings. |
budgets.fix_attempts_per_lane | number | 3 (1..5) | Yes | Mechanical fix attempts given to Engineer within one lane. |
budgets.diff_cap_lines | number | 800 (T12_DIFF_CAP_LINES, 0..10000) | No | Max added source lines per candidate before splitting (0 disables). |
autonomy.level resolution
Preferences.ResolveAutonomy(override) (internal/project/autonomy.go) lets T12_AUTONOMY (injected by t12 ui from <home>/access/mode.json) override .t12/preferences.json, computing budgets as max(configured, levelFloor).
| Level | FixAttempts floor | RetryTokens floor | StepRetries | AnswerQuestions | PartsWait | MatchesWait |
|---|---|---|---|---|---|---|
review | 0 (configured) | 0 (configured) | 0 | 0 | true | true (even if policy is "auto") |
default | 0 (configured) | 0 (configured) | 0 | 0 | false | merge_policy.mode != "auto" |
auto | 4 | 3 | 2 | 1 | false | merge_policy.mode != "auto" |
turbo | 5 | 5 | 4 | 3 | false | false (data-loss still waits) |
Fixed rules (project.FixedRules)
- Every pass rule is a script, and the Orchestrator never calls a model.
- The event hash chain, role reports, and decision records for choices with alternatives.
- Every agent command runs in the cage.
- A person merges
stagingtomain; mirrors are read-only. - The must-haves only the person can give block the start.
- New tests fail on base and kill a mutant.
- The agent never edits its own rules.
- The root-cause repeat cap sends a second repeat to a different route and turns a third repeat into a Problem.
- Context creator trust status is derived.
- No code comments outside the directive allowlist.
- The project repo cannot add MCP servers.
- No role can be switched off.
~/.config/t12/env format
Strict 0600 permissions required
envfile.Load (internal/envfile/envfile.go) exits immediately if group or world permissions are set (chmod 600 required). A missing file is ignored without error.
- Syntax: Skips blank lines and
#comments, strips optionalexport, splits on the first=, and trims outer quotes. - Literal paths: Values never expand
~or$HOME; pass full paths like/Users/<you>/.config/t12/claude. - Precedence: Existing process environment variables (
os.LookupEnv) override file entries.
Environment variables
| Variable | Default | Used by | Description |
|---|---|---|---|
T12_ENV_FILE | ~/.config/t12/env | t12, t12-ui, t12-adapter, t12-container, t12-bench grade | Overrides the host environment file path. |
T12_HOME | ~/t12/home | t12, t12-ui | Overrides the default v2 state home when --home is omitted (~ expanded). |
T12_ROOT | /var/lib/t12 / ~/t12 | docker-compose.yml, bootstrap-cages.sh | Shared host/container root for home/, cache/, and repos. |
T12_OSV_CACHE | ~/t12/cache/osv | redteam, setup.sh, bootstrap-cages.sh | Offline OSV vulnerability database dir (~/.cache/t12/osv fallback). |
T12_ADMIN_SOCKET | <home>/admin.sock | t12-ui | Overrides Unix socket path for --status, --drain, --shutdown. |
T12_TIMED_LOCK | /tmp/t12-timed-run.lock | internal/runner | Overrides machine-wide flock file serializing timed unit runs. |
Internal runtime variables (T12_TASK_ID, T12_ROLE, T12_ROLE_KIND, T12_SESSION, T12_WORKTREE, T12_GUARD_POLICY, T12_CAGE_EXEC, T12_DOCS, T12_PROBE_SECRET) are managed by the factory and should not be set manually.
Stripped variables (sandbox.IsForbiddenEnvKey)
Exact names (case-insensitive): AGY_ADC_AUTH, ASANA_ACCESS_TOKEN, ASANA_PAT, ASANA_TOKEN, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, ANTHROPIC_API_KEY, DATABASE_URL, GITHUB_TOKEN, GH_TOKEN, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_CLOUD_LOCATION, GOOGLE_CLOUD_QUOTA_PROJECT, GOOGLE_GEMINI_BASE_URL, OPENAI_API_KEY, PRODUCTION_DATABASE_URL, SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, SLACK_BOT_TOKEN, TURBO_GITHUB_TOKEN, SSH_AUTH_SOCK, SSH_AGENT_PID, GIT_ASKPASS, SSH_ASKPASS, GIT_SSH, GIT_SSH_COMMAND, GIT_DIR, GIT_WORK_TREE, GIT_COMMON_DIR, GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY, GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_CONFIG_PARAMETERS, GIT_CONFIG_COUNT, PYTHONPATH, PYTHONHOME, PYTHONSTARTUP, PYTHONUSERBASE, LD_PRELOAD, DYLD_INSERT_LIBRARIES, XDG_RUNTIME_DIR, DBUS_SESSION_BUS_ADDRESS, DBUS_SYSTEM_BUS_ADDRESS, NOTIFY_SOCKET, GPG_AGENT_INFO, DOCKER_HOST, WAYLAND_DISPLAY, and DISPLAY.
Regex patterns (case-insensitive): (^|_)(PROD|PRODUCTION)(_|$), (^|_)(SECRET|PASSWORD|PRIVATE_KEY|ACCESS_TOKEN|AUTH_TOKEN|API_KEY|PAT|TOKEN)(_|$), ^(AWS_|GITHUB_|GH_|ASANA_|STRIPE_|SLACK_|TWILIO_|SENDGRID_|SSH_|GIT_CONFIG_), and ^TURBO_.*_URL$.