The agent can reach everything. The client sees only code.
Layer 03 · Roles
A team, not a chatbot.
conduct
orchestrator
01 · plan
architect
02 · build
implementer
03 · attack
reviewer
04 · prove
verifier
PR ✓ human merges
Layer 03 · Roles
A role is just a markdown file.
→Narrow job. One gate, done well.
→Narrow tools. No Edit or Write tool.
→A stance. Prove it wrong, not right.
.claude/agents/reviewer.md
---name: reviewerdescription: Gate 1. Adversarial read of the difftools: Read, Grep, Bash---Adversarial by default: try to find why
it's wrong, not confirm it's right.## Rules
- Read the plan first, then the diff.
- Check the diff against every memory rule.
- Mark each finding block or nit.
- Never edit code. Report only.
Layer 03 · Roles
Every hand-off is a gate.
Gate 0
implementer
Self-check
Builds to the plan, then checks its own work first.
Gate 1
reviewer
Try to break it
Adversarial read. Block or nit.
Gate 2
verifier
Run it for real
Real app, screenshots, compared to the design.
Gate 3
steward
Audit the drift
Checks scope and every decision the agents made alone.
↺ any gate fails → back to the implementer
“A criterion with no evidence is a fail.” the verifier
Layer 04 · Isolation
One story. One worktree.
codebase · fresh main
.worktrees/hq-142implementerbuilding…
.worktrees/hq-143reviewer1 block · 2 nits
.worktrees/hq-144verifierreal stack ✓
Branch from a fresh mainResume in place, never recreateCap at ~6 lanes. 10 crashed the machine.
Layer 05 · Guardrails
Every mistake becomes a rule.
0portable rules, plus ~90 live memories
◆Fix the pattern, not the screen
◉Test on the real stack
⟳Rebuild before you trust a red
■The final report ends the task
Layer 05 · Guardrails
Anatomy of a rule.
1Agent makes a mistake
↓
2You write the rule + why
↓
3Agents read it before acting
memory-seed/final-report-ends-task.md
---name: final-report-ends-tasktype: feedback---
A background agent's final report
ends the task. No action after it.
Why: an agent was told "do not merge".
It reported done, then merged and
deployed anyway.
How to apply: after every agent,
check remote state before trusting it.
Layer 06 · Feedback
Eight checks before a human looks.
01
Red-first tests
The failing test comes first
02
Differential gate
No new failures vs main
03
Adversarial review
On every risky diff
04
Real-stack canary
Real server, real logins
05
Quality verdict
Pass · with debt · block
06
Migration check
No collisions
07
CI + static analysis
Green, not "mostly"
08
Test-tamper gate
No deleted, skipped or weakened tests
Layer 06 · Feedback
The night shift.
22:00
Run it all
Smoke test, then the full suite
night
Triage
Known rules first, cluster the rest
06:30
Re-run
Then one morning report
~10 min
You rule
New · healed · needs a ruling
next night
Rule → code
Your ruling becomes a deterministic rule
Code-blind QA. It knows only the spec and the running app.
Report only. No auto-fixes. One "failure" was a stale test.
Layer 07 · Human
Agents propose. Humans decide.
the agents do
Plan, build, review, verify
Open a draft PR
Log every solo call
Ask for a yes or no
⇄decisions inbox
always a human
Auth, money, migrations
Scope and public contracts
New dependencies
Every merge
Layer 07 · Human
Who decides? A rule, not a mood.
1
Reversible?
Can we undo it cheaply?
2
Local?
Is the blast radius small?
3
Settled?
Does the charter already answer it?
All yesagent decides, logs why
Any nodecisions inbox
“Bringing a reversible, local decision to the human is a defect, not diligence.” the orchestrator
All seven layers, running
One command. A pipeline.
iTerm2 · tmux · project-wrapper
Does it work?
8 weeks. One client project.
729PRs opened694 merged, by a human
1,986commits on mainacross parallel worktrees
259evidence foldersscreenshots and gate verdicts
583QA scenariosrun every night, code-blind
222human rulingslogged word for word
34portable ruleseach one a past mistake
Tools in the loop
The harness has hands.
Speak
Wispr Flow
Talk, don't type
→ context
See
px0
Read AI code fast
→ human
Ship
gstack
/review → /qa → /ship
→ feedback
Plan
CraftHQ
Stories in, PRs out
→ roles · human
Run
iTerm2 + tmux
Many agents, one screen
→ isolation
CraftHQ · what it is
A control plane for agent-driven builds.
You plan and approve in the browser. Agents build and report back.
Planning
You · planning
Approved
✋ approve the plan
In progress
Agent · working
In review
You · review
Done
✋ accept the result
Storiesplan page, notes, runs, PR
Turn badgewhose move is it?
Decisions inboxonly what a human must answer
Previewsa live build per story
“A note is a conversation. A status is an instruction.”
CraftHQ · how it works
Stories in. PRs out.
Youbrowser
Agentsloop
1
Intake
Drafts the story, plan and open questions
2
Approve
Answer decisions, approve the plan
3
Claim & build
Worktree, live run log, draft PR
4
Verify
A second agent sets In review, or asks you
5
Accept
Read PR + preview, merge, Done
The builder never moves its own story to reviewOpen decision → agent skips the storyThe assistant never merges
What we got wrong
Harness anti-patterns.
✕
Agent reviews its own work
It defends what it wrote. A second agent verifies.
✕
Screenshots on fake data
Looked great, proved nothing. Real stack, real logins.
✕
Ten agents at once
The machine crashed. Cap the lanes.
✕
Auto-fixing night failures
The test was stale, not the app. Report, then rule.
Start tomorrow
Your first harness, in five steps.
Move your repo into a wrapper folder
context · boundaries
Write down what's in your head
context
Turn your next mistake into a rule, with a why
guardrails
Give the agent one loop it can run itself
feedback
Keep a human on merge
human
One line to remember
Your codebase is for code. Your harness is for everything else.