Library › Book 3 › The Critic-Actor Pattern
The Critic-Actor Pattern
7.1🔒Adversarial Quality Through Separation of ConcernsThe Critic-Actor pattern separates test generation from test review. One agent (the Actor) generates tests. Another agent (the Critic)…
7.2🔒ArchitectureThe flow: 1. Actor generates tests from the specification 2. Critic reviews each test against the specification 3. Critic returns feedback…
7.3🔒Complete Implementation
7.4🔒The Critic's Review PromptThe Critic is the quality engine. Its prompt must be rigorous and specific:
7.5🔒The Actor's Revision PromptWhen the Critic returns REVISE feedback, the Actor receives targeted instructions:
7.6🔒Multi-Round ConvergenceThe Critic-Actor loop typically converges in 2-3 rounds:
7.7🔒Quality BenchmarksIn benchmarks, critic-actor pipelines produce measurably better tests:
7.8🔒Variant: The Three-Agent PipelineFor even higher quality, add a third agent -- the Specifications Analyst:
7.9🔒When to Use the Critic-Actor PatternBest for: - When test quality matters more than speed - Critical paths (authentication, payments, data integrity) - Regulated environments…
7.10🔒The Critic Role in the Wild (as of July 2026)The critic role is no longer only something you build -- it is something you can buy, and interviewers expect you to know the commercial…
7.11🔒Career Translation- Implemented Critic-Actor adversarial pipeline for AI-generated test review, reducing tautological assertion rate from 18% to 3% and…
7.12🔒Q&AInterview Depth CheckPrompt: Your Critic-Actor pipeline generates 30 tests in round 1. The Critic approves 15, revises 10, and rejects 5. After round 2…