Dev.to
6/30/2026

Self improving code using the agentic evaluator workflow
Short summary
Author implements a three-agent loop where Claude Opus generates Python code, Claude Haiku scores it with structured feedback, and Opus refines it until reaching 9.6/10 quality. Key insight: passing full scoring history prevents regression and ensures consistency. Full code examples and model selection rationale provided.
- •Three-agent pattern: generator (Opus 4.8) → scorer (Haiku) → refiner (Opus) in a loop until quality threshold hit
- •History injection to scorer prevents regression; without it, previous scores are forgotten and inconsistently re-evaluated
- •Structured REMOVE/ADD diff format makes refinement deterministic instead of vague instruction-following
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



