Based on Anthropic's harness design for long-running apps: separate the agent doing the work from the agent judging it.
Never let the builder evaluate their own work on complex tasks. LLMs reliably praise their own output — even when it's mediocre. An independent evaluator, tuned to be skeptical, catches what self-evaluation misses.
text
Planner (you/human) → Generator (sub-agent) → Evaluator (independent sub-agent)
↑ |
└──────────── feedback loop ←──────────────────┘
Every task gets a BRIEF.md. The Sprint Contract section is mandatory — it lists specific, testable completion criteria.
markdown
# Task Brief
## Background
[Why this task exists]
## Objective
[What to build/fix]
## Sprint Contract (Completion Criteria)
- [ ] Criterion 1 (specific, verifiable)
- [ ] Criterion 2
- [ ] ...
⚠️ Write criteria specific to THIS task. No generic checklists.
## Related Files
[File paths relevant to the task]
## Constraints
[Tech stack, prior decisions, known pitfalls]
## Handoff Requirements
Write a HANDOFF.md when done, containing:
- What was done (file change list)
- Design decisions made (and why)
- What's left / known issues
- Everything needed for reporting to the human
The generator receives the BRIEF.md and builds against the Sprint Contract. Key rules for the generator prompt:
After the generator finishes, spawn a separate agent as evaluator. The evaluator prompt must include:
The Sprint Contract — copied from BRIEF.md, to verify each criterion.
4 Evaluation Dimensions (select what's relevant):
DimensionWhat to checkFunctional completenessEvery Sprint Contract criterion passesUser experienceFlow is intuitive, no dead endsVisual qualityLayout, spacing, colors are professionalCode/content qualityNo errors, clean logic, no regressions
The critical prompt line:
"Your job is to find problems, not to praise. If everything looks fine, you probably didn't test carefully enough. Report issues honestly — better a false alarm than a missed bug."
Based on evaluator feedback:
Task complexityGeneratorEvaluatorExampleSimple (< 30 min)Sub-agentSelf-evaluate, mark "⚠️ untested"Fix a typo, update configMedium (30 min - 2 hr)Sub-agentIndependent sub-agentNew feature, bug fixComplex (2+ hr)Claude Code / ACPIndependent sub-agent + human reviewArchitecture change, new project
See references/contract-examples.md for project-specific contract templates.