Nguyen Le Phong

Keep AI Changes Small Enough to Actually Review

AI makes big diffs cheap to write, not cheap to review.

You ask an AI assistant to fix a null check. It comes back with a diff across nine files. The bug is fixed. Along the way, a helper got renamed, a type got loosened, a test was rewritten and a nearby module was reformatted. It all looks very productive, right up until a reviewer opens it and asks which of those changes actually matter.

AI made big changes cheap to write. It didn't make them cheap to understand. This post is about keeping AI-assisted changes small enough that a person can really review them, and why that ends up faster than it sounds.

Two developers look over a short set of AI-generated changes, shown as diff cards on a large screen.
AI output is easier to trust when the change is small enough for someone to read all of it.

Review is where the time goes now

Google's engineering practices guide was written with human authors in mind, yet its case for small changes fits AI-assisted work almost word for word (Small CLs). Small changes get reviewed more quickly and more thoroughly, are less likely to introduce bugs, waste less work if they're rejected and are simpler to roll back. Its rule of thumb: 100 lines is usually a reasonable size and 1,000 lines is usually too large. File count matters too. The same 200 lines can be fine in one file and too much spread across 50.

DORA's research hints at what can happen when teams let that slide. In the 2024 report, as AI adoption increased, it came with an estimated 1.5% decrease in delivery throughput and a 7.2% reduction in delivery stability (Announcing the 2024 DORA Report). The researchers' reading was that a faster development process doesn't improve delivery on its own, at least not without basics like small batch sizes and robust testing.

The 2025 report, still DORA's latest State of AI-assisted Software Development report as of November 2026, shifts the picture a bit. AI adoption now goes with higher throughput, but it still has a negative relationship with delivery stability. The authors put it this way: without strong automated testing, mature version control and fast feedback loops, more change volume leads to instability (Announcing the 2025 DORA Report). Small, reviewable changes are one of the cheapest controls you have.

One change, one claim

A good AI-assisted change makes one claim you can check: this guard stops the crash when user is null, and here's the test that fails without it. The model can draft the patch. The person reviewing it can still follow the whole story: the failing case, the changed lines, the test that proves it and the parts deliberately left alone.

Small isn't the same as trivial. A one-line guard can stop a double charge. Adding a tenant ID to one query can close a data leak between customers. A focused regression test can save you an incident. The size of the diff tells you very little about the size of the value.

What hurts is mixed intent. One patch fixes a bug, renames things, reformats a file and updates some copy. People do this too, but AI does it faster and without noticing the mix is risky. Google's guide says it plainly: refactorings usually belong in a separate change from feature work or bug fixes. Separate prompts and separate commits keep each change easy to read and easy to revert.

Ask for small diffs up front

Most oversized AI diffs come from open-ended asks. A few habits in the prompt prevent a lot of scope creep:

Instead of Try
"Fix the checkout bug." "Fix the null user crash in checkout.ts with the smallest diff you can. Don't touch other files."
"Clean this up while you're in there." "List any cleanups you'd suggest as notes. Don't make them in this change."
"Make it work." "Before writing code, list your assumptions about the inputs, separate from the change itself."
"Do the whole feature." "Do step one only, then stop so I can review it before we go on."

None of this is fancy. It just puts the boundary in writing before the model starts, which is a lot easier than pulling unrelated edits out of a diff afterwards. If you want to go further with the assumptions part, Ask the AI to Name Its Assumptions First covers it.

Review AI-assisted changes with evidence

When AI wrote part of a change, both author and reviewer should be a bit more explicit about evidence. AI code isn't worse by default. A fluent diff is just easy to skim. A short note in the PR description goes a long way:

  • Which behavior changes, in one sentence.
  • Which command or test you ran, and what it showed.
  • Which files or docs the model was given as context.
  • Which AI suggestions you rejected, and why.
  • What would fail if this change were reverted.

Asking the model to explain its own diff can help you find your way around, but treat that explanation as another draft. It can describe what it meant to do and miss what the code actually does. The code, the tests and how it behaves when it runs are still the source of truth. Treat AI Suggestions as Draft Evidence goes deeper on that habit, and the tone side of review is in How to Review Code Kindly.

The rhythm that works

The safest AI workflow is pretty unexciting: small request, small diff, real evidence, human review, then the next small request. It can feel slower than asking for everything at once. In practice it's usually faster than debugging a confident 900-line change nobody fully understood, and much nicer for the person reviewing it.

Try this week

  • Add "smallest diff you can, don't touch other files" to your next AI coding prompt and compare the diff size.
  • When the model suggests cleanups, ask for them as a list and ship them in a separate PR.
  • Add a short evidence note (what changed, what you ran, what you rejected) to your next AI-assisted PR.
  • As a reviewer, send back one oversized AI diff with a friendly ask to split it, and see how fast the halves merge.
What did you think?

Frequently asked questions

How big should an AI-assisted code change be?
Use the same bar as any change. Google's engineering practices guide says 100 lines is usually a reasonable size and 1,000 lines is usually too large, and that file count matters too. Aim for one behavior and one claim you can test per change.
Does AI coding make software delivery less stable?
DORA's research found a link. In the 2024 report, rising AI adoption came with an estimated 1.5% decrease in delivery throughput and a 7.2% reduction in delivery stability. The 2025 report found throughput now improves with AI adoption, but stability still goes down, and it points to automated testing, version control and fast feedback as the controls that matter.
How do I stop an AI assistant from changing unrelated code?
Say so in the prompt: ask for the smallest diff, name the files it may touch, ask for suggested cleanups as a list instead of edits and have it stop after one step so you can review. Keep refactors in a separate change from bug fixes, as Google's review guide recommends.
What should reviewers ask for on AI-assisted pull requests?
A one-sentence description of the behavior change, the tests or commands that were run, the context the model was given, the suggestions that were rejected and what would break if the change were reverted. Treat the model's explanation of its own diff as a draft and read the code itself.