Don't Read the Code? Verifying AI-Written Code
The author of Clean Code now argues humans shouldn't review AI-written code line by line: specify what correct means, verify it with deterministic tools, and keep humans accountable for specs and sign-off.
🌱 A rough idea, planted recently. Expect rough edges — it will grow.
On this page
Robert C. Martin, “Uncle Bob”, wrote Clean Code, a book built on the idea that code is written for humans to read. So it stopped me in my tracks to see him arguing, in recent posts and talks, that humans should stop reading AI-written code line by line. Hearing one of the field’s elder statesmen take that view, alongside similar noises from Martin Fowler and perhaps Kent Beck, says a lot about how fast the ground is moving.
The argument
Coding agents write code far faster than anyone can review it. Reviewing every line throws away the speed that made the agent worth using. So the engineer’s job shifts: define what “correct” means, let the agent implement, and let machines check the result.
As I understand it, his playbook has three rules:
- Surround the agent with an automated gauntlet. Unit and integration tests, Gherkin-style specifications, code quality and complexity metrics (cyclomatic complexity, module size, dependency structure), test coverage, change-risk scores, and mutation testing, which injects deliberate bugs to prove the tests actually catch them.
- Use deterministic tools, not AI guesses. Never ask a model to estimate coverage or compute a metric. Use tools that give exact answers, and if a procedure must be followed, encode it in software rather than hoping a prompt holds.
- Keep humans responsible for specifications and final sign-off.
The pushback
Critics worry about architecture quietly decaying, “vibe-coded” technical debt, edge cases nobody validated, and test suites so heavily mocked that they prove nothing. Those are fair: a gauntlet is only as good as what it checks.
Where I land (for now)
- Rule 2 is already how I work. This site is fed by a pipeline where a model rewrites my notes for publishing, but a plain, deterministic script decides what’s allowed out. The same night I read this, that script caught a formatting bug the model had missed.
- Metrics as the review invite gaming. Once the numbers are the gate, agents will optimise for them (Goodhart’s Law). Mutation testing is the honest counterweight: it tests the tests.
- Specs become the craft. If humans stop reading implementations, the skill moves to writing precise specifications and good tests, which is very close to TDD as a Feedback Loop.
- It connects to a question I keep asking about low-code platforms: if people stop reading code, maybe the platform becomes the place where we describe and pilot software.
I’m not ready to stop reading code. But I’m reading less of it, and checking more of it automatically. See also mutation testing and feedback sensors for coding agents on my radar.
Sources: Uncle Bob on X · Uncle Bob on X (2)
- #ai
- #coding-agents
- #testing
- #mutation-testing
- #code-review
- #verification
↩ Linked from (12)
…on of fitness functions. Skills are Golden Paths for agents. The generator/evaluator split is the idea behind Don't Read the Code? Verifying AI-Written Code. Scope discipline and hooks are the executable-rules layer of A…
…and Bounded Contexts). It also means the checks around agents are deterministic, not another model's opinion (Don't Read the Code? Verifying AI-Written Code).
…ests and the code, and "done" includes deleting the old path. Related: Agent Skills and Harness Engineering · Don't Read the Code? Verifying AI-Written Code · Architecture Fitness Functions.
And test the evaluator itself, the way you'd test a CI suite: inject seeded bugs (mutation testing) and make sure it fails. Same principle as Don't Read the Code: trust the verification, then verify the verifier.
…h no pre-filled answers). Pair AI output with deterministic verification rather than trusting a read-through: Don't Read the Code.
…akness, typing lots of code on a small screen, stops mattering when the job becomes specifying and reviewing (Don't Read the Code? Verifying AI-Written Code).
Related: Agentic System Design Checklist for where guardrails sit in the overall design, and Don't Read the Code for verifying what an agent produces.
…e diffs that are easy to test and revert. Ask agents for proof: screenshots, recordings, runtime data, tests (Don't Read the Code? Verifying AI-Written Code). You own what you merge. "The AI wrote it" isn't a defence in…
…between two poles. One is "read everything". The other is the case for verifying rather than reading at all (Don't Read the Code? Verifying AI-Written Code). Blast radius tells you where on that line each change belongs…
…ood argument that the automated checks around coding agents need domain defaults, not just tests and metrics (Don't Read the Code? Verifying AI-Written Code).
…argument in A Safe Path for AI Agents in a Large Codebase. Verification is the job now. Cognitive debt is why Don't Read the Code? Verifying AI-Written Code matters.
…nd contracts make a codebase easier for an agent (and a human) to work in. I wrote more about verification in Don't Read the Code? Verifying AI-Written Code.
↪ Links to (3)
Related by topic
- Seedmetaphor
The First Rep Isn't Owning the Skill
Calisthenics Lab - Seed
Multimodal Web Agents
AI, machine learning - Seed
Make the System Explain Itself
Platform engineering - Seed
AI Reverse Engineering and Where Value Moves
AI, machine learning