← Back to library

Review code continuously before a human looks

Addy Osmani describes a team where an agent writes most code and review has moved from a final gate to a continuous process, rather like spellcheck while typing. The agent checks and fixes changes at least once before any person sees them, with a target of one human reviewer on a typical change and no rise in reverts or incidents.

  • OutcomeKeep up with the volume of agent-written code by running review continuously, so a person only spends time on what automation cannot catch.
  • SetupAn afternoon+
  • LevelAdvanced
  • CreditAddy Osmani
View original
Works with
Claude CodeClaude

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • Agents produce more code than humans can review
  • Review has become the bottleneck
  • You track reverts and incidents to stay safe

Not for: Cutting review without watching reverts and incidents; Large or risky changes that still need deep human reading

What do you need, and what do you get?

You need

  • Tests, builds and screenshots the agent can run
  • A subagent that reads diffs with clean eyes
  • Metrics for reverts and incidents

You get

  • Changes reviewed and fixed before a human looks
  • Pull requests merging with one human at most
  • A guardrail that catches regressions early

How does it work, step by step?

  1. Ask what could go wrongFor every change, work out whether a person or an automated test is better placed to catch each risk.
  2. Move review earlierKeep review going as code is written, rather than waiting until a pull request opens.
  3. Make the agent prove itAsk it to run the tests or a build and paste the real output rather than asserting it passed.
  4. Add a fresh-context reviewerLet a subagent read the change with clean eyes, and run skills that hunt bugs and simplify.
  5. Guard with revert ratesTrack reverts and incidents; if they rise, you moved work, not saved it.

The prompt

Our own prompt, inspired by Addy Osmani and written to work in Claude Code and Claude. Values in lime are placeholders.

Prompt0 variables
For this change, first tell me what could go wrong and whether a person or an automated test is better placed to catch each risk. Then run our tests and build, and show me the output rather than saying it passed. Have a separate reviewer pass over the change with clean eyes, hunting bugs and simplifying where possible. Summarize what still needs human judgment before I review.

Inspired by Addy Osmani: How the Claude Code team does code review / claude.dev Blog. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Cutting review time only helps if reverts and incidents do not rise; watch both.
  • Fewer human eyes is fine for routine changes, but reserve human attention for the risky ones.

Our take

The sharpest idea in Addy Osmani's piece is treating review as something that happens while work is produced, not a final checkpoint, combined with requiring the agent to demonstrate its work instead of asserting it. If changes arrive already tested, explained and corrected once, the human reviewer can spend scarce attention on design, risk and intent rather than typos and missing tests. A fresh-context reviewer, an agent session that did not write the code, catches the blind spots an author misses, much as a colleague does. The honest part is the guardrail: reverts and incidents are the real measure. Cutting review time is easy; cutting it without shipping more breakage is the goal, and if those numbers climb, the process has simply moved cost downstream. Start by listing the risks of a change before any review happens, and track revert rates before and after adopting the process. Keep human review mandatory for security, data migrations and anything customer-facing, regardless of how confident the agent sounds.

Where the time goes back: Teams drowning in agent-written code reclaim human attention for the problems only people can solve, without more bugs slipping through.

FAQ

What is the goal?
Most pull requests ship with a single human reviewer, without a climb in reverts or incidents.
How is review done before a PR?
Tests, builds and screenshots the agent must show, plus a subagent reading the change with clean eyes.

Source and credit

Inspired by Addy Osmani. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
How the Claude Code team does code review / claude.dev Blog
Creator
Addy Osmani
Published on
claude.dev
Original date
Oct 15, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityPrompt✓ AI dry run

Question an agent's pull request instead of skimming reviews

Have a fresh agent list every concrete change in an agent-written pull request (schema, scheduled jobs, features, new services, settings, endpoints and removals) without judging it, then press it on each item you cannot explain, give it the product context it lacks, and cut whatever nobody can justify before you merge.

Credit: u/EstablishmentGood414 on r/codex

Minutes
IT & SecurityWorkflow✓ AI dry run

Hack an 8 kB Atari ROM by talking to Ghidra through Claude

Use an AI assistant to drive a reverse-engineering suite you do not know, identify an unlabelled binary and find the one-byte patch that changes its behavior.

Credit: Rafał Strzaliński

An afternoon+
IT & SecurityWorkflow✓ AI dry run

Hands-free voice loop for a coding agent

Add on-device voice input and spoken replies to your coding agent, with a tap to interrupt, so you can steer it while cooking or cleaning.

Credit: yberreby on Hacker News

An afternoon+