Orchestrating AI code review at scale
3 days ago
- #DevOps
- #AI Code Review
- #Software Engineering
- Cloudflare built an AI code review system using multiple specialized agents to address bottlenecks in traditional code review, reducing median review time to 3 minutes 39 seconds.
- The system employs a plugin architecture for flexibility, isolating components like version control and AI providers, and uses OpenCode as the core coding agent with JSONL for structured logging.
- Risk tiers (trivial, lite, full) and diff filtering optimize costs and performance, with an average review cost of $1.19 and a cache hit rate of 85.7% saving significant token expenses.
- Specialized reviewers (security, performance, code quality, etc.) produce structured findings with severity levels, and a coordinator agent deduplicates and judges issues, biasing toward approval to avoid unnecessary blocks.
- The system includes resilience features like circuit breakers, failback chains, and dynamic configuration via Cloudflare Workers, alongside an escape hatch ('break glass') for human override, used in only 0.6% of merge requests.