[research@ai4se] : ~ $
cd ../
[harmony] | | 8 min

# 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.

[hitl-hotl][harmony]

Separating the Three Roles

RoleResponsibilityRequired condition
PlannerReads requirements → writes Spec / PlanUnderstands business context
GeneratorReads Spec → generates codeExecutes in a sandbox
EvaluatorReads Spec → accepts codeIndependent 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

MaturityPlannerGeneratorEvaluator
L1HumanHumanHuman
L2HumanAgentHuman
L3HumanAgent AAgent B (different model/role)
L4Agent PAgent GAgent 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