# Planner / Generator / Evaluator: AI4SE's Three-Role Pattern
Harmony's core question isn't 'human vs. AI' — it's 'how do three roles operate independently': who plans, who generates, who accepts. The three roles can be held by different Agents or humans, but the responsibilities must stay separate.
Separating the Three Roles
| Role | Responsibility | Required condition |
|---|---|---|
| Planner | Reads requirements → writes Spec / Plan | Understands business context |
| Generator | Reads Spec → generates code | Executes in a sandbox |
| Evaluator | Reads Spec → accepts code | Independent from the Generator |
Why the Evaluator Must Be Independent
If the Generator also acts as the Evaluator:
- Self-assessment bias — it’s more lenient toward its own output
- No second perspective — blind spots go undetected
- Accountability vacuum — no one can say “No”
Implementations at Different Maturity Levels
| Maturity | Planner | Generator | Evaluator |
|---|---|---|---|
| L1 | Human | Human | Human |
| L2 | Human | Agent | Human |
| L3 | Human | Agent A | Agent B (different model/role) |
| L4 | Agent P | Agent G | Agent E + human sign-off |
Anti-Patterns
- The same Agent becomes the Evaluator just by swapping in a different system prompt
- The Evaluator only looks at the diff, not the Spec
- “Planning” means simply pasting the requirements to an Agent