A REQUIREMENTS FOLDER
GOES IN.
A CLEAN COMMIT COMES OUT.
CT6 is a multi-agent coding pipeline for Claude Code. It maps your codebase, validates a 100%-coverage plan, dispatches long-lived named teammates with their own 1M-context windows, gates every completion behind a hook that reads real evidence, runs Playwright against a real backend, auto-spawns a fix team for every surfaced issue, and auto-commits + pushes on a clean pass — the dev loop closes itself end-to-end.
Not a copilot. A pipeline that won't sign off on its own work.
CT6 ships as the architect-team plugin for Claude Code. It accepts an OpenSpec proposal, a Superpowers brief, or plain markdown — and drives the work through ten phases with explicit exit contracts.
Reads the codebase first
Cartographer + integration-explorers build CODEBASE_MAP, ROUTE_MAP, and INTEGRATION_MAP before any code is touched, so reuse decisions cite files that actually exist.
Long-lived agents, 1M context each
Claude Code's experimental Agent Teams primitive — named teammates with their own context windows and a shared task list, coordinated by a lead. Falls back to ephemeral subagents when the flag isn't set.
Hooks block completion until evidence is real
A 12-field evidence schema plus an independent reviewer (not the same agent that wrote the code). PostToolUse(TaskUpdate) exit-2's until everything validates. 3 consecutive rejections escalate.
Every surfaced issue spawns its own team
Failed tests, visual drift, placeholder pages, unwired controls — each becomes a Solution Requirement that auto-spawns a fix team. The originating check has to go green to close it out.
Ten phases. each with an exit contract.
100%-coverage hard gate. 12-condition exit checklist.
- 01openspec validate --all --strict must be valid — independently re-run by the Stop hook (v3.9.2) so a skipped or mis-reported verdict cannot pass.
- 02Every requirement has ≥ 1 measurable scenario; every both-layer requirement has an explicit front-to-back integration criterion.
- 03Reuse decisions cite real files/symbols in CODEBASE_MAP; no duplicate capabilities.
- 04Phase 2 cannot start until all 12 conditions hold.
Activation drift, detected and healed.
A non-merge-preserving rewrite of ~/.claude/settings.json silently dropped the gateway env block while gateway.json still recorded activated: true — and every consumer stayed green. v3.42.1 fixes the whole class: a recorded-consent flag is never ground truth. Every consumer either verifies against claude_env_applied() or heals from the recorded consent.
status names the drift: a dedicated activation-drift fail row + a first-class --json field. carry-forward heals: a plain install re-applies the env block from the persisted master key in gateway.env. SessionStart self-heal: on a drifted-but-live-gateway machine, the hook re-applies the env block merge-preservingly — a user-customized BASE_URL is never clobbered.
Root cause named: the test suite itself. An unsandboxed uninstall call in test_uninstall_purge_removes_state_dir was stripping the real settings.json env block on every full pytest on an activated machine. Fixed in three redundant layers + a session-scoped tripwire that SHA-256-digests settings.json / gateway.json / gateway.env at suite start and fails LOUDLY at suite end on any mutation. Suite 5,891 passing + 16 skipped.
∧ settings.json env block NOT fully applied
↳ token-only loss = half-drift, still counts
↳ credit-exhaustion failover flips state; the heal steps aside — no silent fight.
A gateway with a chosen secondary. instructions with a written ethos.
Seven principles, injected — plus a real-model eval tier
- ›docs/ETHOS.md — reuse-before-build, producer-never-checker, honest-boundary, unbounded-solving, default-to-action, documentation-currency, evidence-before-assertion. Each paired with its anti-pattern.
- ›The principles block is compiled into all 39 agents/*.md + 5 pipeline skills; drift is suite-pinned — the principles hold by construction.
- ›Recall data-envelope wraps every MemPalace block — recalled context is data, never instructions. Opt-in CT6_EVALS=1 tier judges routing + a planted-defect outcome.
Per-provider route dialects + spawn-compatible impersonation
- ›Each secondary provider carries a route_dialect (openai / hosted_vllm) — no more anthropic-format calls 404'ing at api.z.ai.
- ›Dev-class agents spawn on claude-haiku-4-5 (a real harness-accepted id), gateway-mapped to the chosen secondary. Disclosed honestly, printed by status, test-pinned.
- ›Confirm probe is spawn-mandatory + identity-verifying via /model/info. Deploy is verify-then-swap, never dark — a staging instance passes the full ladder before the cutover.
OpenAI Codex or Z.ai GLM 5.2 — one choice, remembered
- ›SECONDARY_PROVIDERS single-sources every provider; a future provider is one dict entry — help text, prompts, key slots, routes all derive from it.
- ›Provider-neutral ct6-secondary alias under policy secondary-split. Legacy codex-5.6-sol / codex-split accepted on read; writers emit only the new.
- ›Resolution ladder: --secondary > CT6_SECONDARY_PROVIDER > recorded choice > grandfather (openai) > interactive. Never re-asks.
Missing keys captured in-flow — never punt-to-script
- ›Setup asks for a missing ANTHROPIC_API_KEY / OPENAI_API_KEY via AskUserQuestion and applies it itself. decline <key> records a permanent decline.
- ›--external-llm --yes provisions + registers + activates in one call, then polls /v1/models and requires a real completion — "CONFIRMED live — CT6 runs the split" or an honest fail row.
- ›Runtime split targets the INSTALLED plugin cache (never the dev checkout) so it survives plugin updates; SessionStart re-heals a drifted copy.
Unbounded solving, producer/checker enforcement, auto-merge on green.
The dev loop runs unbounded (v3.8.0). Every run / iteration ceiling is gone — the global 20-iteration cap, oscillation→abort, exhaustion→escalate-and-stop, the bounded sub-loop caps (diagnostic-research, editability, expensive-verification, mapping ralph). The 3-pass RCA rigor floor and the owner-input-only escalation marker are kept.
Producer/checker enforcement (v3.9.2). The Stop hook independently re-runs openspec validate --all --strict once a master-review verdict exists — a stale, orphaned, or malformed openspec change hard-blocks the Phase 8 commit instead of shipping silently.
Auto-merge on green (v3.7.0). The clean architect-team/<slug> branch is merged --no-ff into main, pushed, deleted (local + remote); the worktree is pruned. Conflicts or protected-branch rejects fall back to feature-branch + PR — --force is never added.
Honest boundary: live polyglot call-graph extraction against arbitrary target repos (CDLG P5) is the agent's runtime job and is not yet claimed proven end-to-end. The deterministic schema, IDs, witness reconciliation, freshness, and cost pieces are unit-tested.
asset://<path>:<fingerprint>
↳ rename-stable join key for MemPalace + diffing
The road to v3.42.1
Compiled ETHOS + behavioral evals
docs/ETHOS.md single-sources 7 operating principles; the block is compiled into all 39 agents + 5 pipeline skills, drift suite-pinned. Recall data-envelope wraps MemPalace at the render boundary. Opt-in CT6_EVALS=1 verifies a real model ACTS correctly, not just that instructions are well-formed.
GLM 5.2 secondary, made real
Per-provider route dialects (openai / hosted_vllm); claude-haiku-4-5 spawn-compat impersonation alias (disclosed); completion+identity confirm probe via /model/info; verify-then-swap deploy; launcher port guard; prisma no-DB auth 500 troubleshooting.
Selectable secondary API
Pick OpenAI Codex (gpt-5.6-sol) or Z.ai GLM 5.2 (glm-5.2) at setup — asked once, remembered. Provider-neutral ct6-secondary alias under policy secondary-split. Legacy codex-split accepted on read; the uniform lever refuses both aliases.
Hand it a brief.
Walk away.
CT6 is built for senior engineers who'd rather review a finished branch than babysit a chat. Maps, plans, dispatches, gates, tests, fixes, commits, pushes.