Claude Code harness guide: task contracts, isolated worktrees and adversarial verification across three models
blaizedsouza · x · 2026-11-22
A widely shared Claude Code architecture guide, "The Harness Is the Machine," proposes encoding a multi-model coordination harness directly in the prompt:
- Roles: Opus 5.5 as ARCHITECT (compiles task contracts, locks paths, never edits implementation); Sonnet 5.5 as BUILDER inside isolated git worktrees writing atomic diffs; Fable 5.2 as read-only SKEPTIC running Z3 symbolic checks and signing receipt.json
- Task contracts: taskcontract.json with allowedpaths, acceptance criteria (deterministic test commands, expected exit codes), forbidden patterns, max turns
- Worktree isolation: builder sees only branch history; turn-14 stalls trigger a wipe and revert; main is never touched directly
- Adversarial verification: builders never grade their own code; raw diffs go to Fable in a fresh context to hunt race conditions and leaks
- Failure recovery: three escalation tiers—retry, wipe worktree, circuit breaker pausing for human input
- Memory: failed tests crystallize into permanent linter rules in .claude/rules/learnedpatterns.md
The author claims task completion jumps from 18% to 95% (unverified), and the full prompt is shared for direct reuse.
More from coding & agent
- Developer Praises Google Antigravity's Agent Swarm UX — majidmanzarpour · 2026-11-22
- Store Scraper MCP exposes App Store and Google Play data to AI agents — modelcontextprotocol · 2026-11-22
- etapa MCP offers a free AI cycling coach for beginners — modelcontextprotocol · 2026-11-22
- Claude Code plugin turns hooks into persistent memory shared across Codex and Cursor — blaizedsouza · 2026-11-22
- Brandon Galang: As Models Get Capable, UX Scaffolding Melts Away in Favor of Context Flow — brandongalang · 2026-11-22
- Simon Willison on evals, going weird, and tools for Pulitzer-level journalism — TheTuringPost · 2026-11-22