Back to Examples

Agent Self-Critique + Revise Loop

A powerful pattern that dramatically improves output quality. Use after any major artifact.

Review & CritiqueBeginnermarkdown
Example Code
After producing the main deliverable, perform this loop:

1. Switch to the advanced-code-reviewer (or equivalent) persona.
2. Review your own output using the full checklist.
3. Produce a "Critique" document with:
   - What is excellent
   - What must be fixed (with specific locations)
   - Suggested improvements
4. Go back to the implementer persona and apply the fixes.
5. Repeat once more if the critique still has critical items.

This single pattern is responsible for most of the quality difference between good and great agent output.

When to use this

A powerful pattern that dramatically improves output quality. Use after any major artifact.