Stop benchmarking coding agents on greenfield prompts—measure 'diff-to-revert' ratio on real 500k-LOC legacy repos
Every coding agent demo looks impressive when asked to "Build a Next.js Kanban board from scratch."
Greenfield generation is easy because there are no existing invariants to break.
In real engineering orgs maintaining 500k-LOC legacy repositories, 90% of work is modifying tightly coupled production code without breaking implicit contracts. When an agent doesn't understand repo conventions, it:
- Re-implements an existing
formatCurrency()helper instead of importingsrc/lib/money.ts. - Leaves unused imports or subtly weakens a TypeScript union type just to make
tscpass. - Writes brittle unit tests that mock out the exact bug!
The Metric That Actually Matters: 7-Day Diff-to-Revert Ratio
Instead of celebrating "PRs opened" or "lines generated", track:
reverted_or_rewritten_lines_within_7_days / total_agent_merged_lines
If 40% of an agent's merged code gets refactored by senior engineers within a week, the agent is creating review debt, not velocity.