AI-Assisted Code Review

The series finale — where LLM reviewers genuinely help on every pull request, where they quietly fail, and how to build a human-plus-AI workflow that speeds review up without letting judgment or accountability leak away.

Every post in this series has argued the same point from a different angle: code review is a human practice. It is a conversation about design, a negotiation about risk, and a slow-drip transfer of context between people who will maintain the code long after the pull request merges. So the arrival of AI reviewers that comment on a diff in seconds is worth being precise about. Used well, an LLM reviewer removes the drudgery that makes human reviewers slow and grumpy. Used carelessly, it manufactures noise, invites rubber-stamping, and lets a team ship code that no human ever actually read.

This post is the capstone: what AI review is genuinely good at today, where it falls short and needs a person, and the division of labor that gets you the speed without giving up the judgment. I’ll talk about capabilities by category — LLM-based reviewers, IDE assistants, and PR-review bots — rather than naming products, because the categories are stable and the specific tools change every quarter.


What AI review is genuinely good at

Start with the honest wins, because there are real ones. An LLM reviewer is tireless, instant, and unbothered by the hundredth pull request of the day — which changes the economics of the mechanical layer of review. An AI first pass is good at:

Notice the shape of all of these: they are the cheap, high-volume, low-context parts of review — precisely the work that, when a human does it, crowds out the expensive thinking. Offloading them is the point.


Where it falls short and needs a human

The failures cluster in the areas this series has spent the most time on, which is no coincidence. The hard parts of review are hard because they require context the model doesn’t have.

Deep design and architecture judgment. The highest-value questions from post 2 — is this the right abstraction, will this boundary hold as the system grows, is this coupling going to hurt in six months — depend on where the codebase is heading and what the team has decided not to do. An LLM sees the diff, not the roadmap or the two prior design debates. It can tell you a function is long; it cannot tell you the whole feature is a mistake.

Whether the change should exist at all. This is the highest-leverage review question and the one AI is worst at. Approving a well-formed change that solves the wrong problem is worse than blocking a scrappy one that solves the right problem. That call is about intent and priorities, and it lives with a human.

Correctness against business intent. A function can be flawless and still be wrong, because “correct” means “matches what the business needed” — and that spec lives in a person’s head, a ticket, and three Slack threads, not in the diff. The model has no way to know that net_amount is supposed to exclude tax in your domain.

Cross-file and system-level reasoning. AI reviewers work best on the diff in front of them. They are weakest at reasoning that spans the change and the twelve call sites it affects, the migration that has to land first, or an invariant maintained in a file that isn’t in the PR.

Security bugs that need context. Post 6 covered this: the dangerous vulnerabilities are the contextual ones. A broken-object-level-authorization (BOLA) bug — where an endpoint fetches a record by ID but never checks that the caller may see that record — looks like completely ordinary code. Nothing in the diff is syntactically wrong. Catching it requires knowing the authorization model, and that knowledge is a human’s.

Confident, plausible, wrong. LLMs hallucinate. A reviewer bot will occasionally tell you, in a calm authoritative tone, that your code has a race condition it does not have, or cite an API that does not exist. The wrongness is not flagged as uncertain — it reads exactly like the correct comments do.

It cannot own accountability. When a change breaks production at 2 a.m., “the AI approved it” is not an answer. Sign-off is a person putting their name on a judgment. A model can advise; it cannot be accountable.

The gotcha: an AI reviewer is confidently wrong sometimes, and its wrong comments look identical to its right ones. An unverified AI comment is a suggestion, not a verdict. Treat every one as “a smart colleague thinks maybe” and check it before you act — especially before you make the author act on it.


The workflow: AI clears the noise, humans spend attention on judgment

The mistake is framing this as “AI review versus human review.” The frame that works is AI as the first-pass reviewer whose job is to clear the mechanical layer so human attention — the scarce, expensive resource — is spent entirely on design and correctness.

Here’s the flow that holds up in practice:

1. Author opens PR (having already self-reviewed — see below).
2. AI bot posts a first pass within a minute:
     - a diff summary
     - mechanical nits and likely-missing tests
     - questions about edge cases
3. Author triages the AI pass BEFORE a human looks:
     - fixes the real nits
     - dismisses the false positives (with a one-line why)
4. Human reviewer arrives to a cleaned-up PR and spends
   their whole budget on: should this exist? is the design
   right? is it correct against intent? any contextual risk?
5. Human owns the approve/block decision.

The value is in steps 3 and 4. By the time a person opens the PR, the trivial stuff is already resolved, so their limited attention goes to the questions only they can answer. The AI didn’t replace the reviewer — it removed the reasons reviewers procrastinate and skim. You make human review better by making it cheaper to focus.


Calibrating trust: treat a noisy bot like a mis-tuned linter

The failure mode that kills AI review adoption is noise. A bot that posts fifteen comments per PR, ten of them wrong or trivial, trains everyone to stop reading it — the same way a linter with a hundred false positives gets globally disabled and takes its five real warnings down with it.

So calibrate deliberately:

  // An AI comment worth keeping — specific, checkable, right:
- results := make([]Item, len(rows))
- for i := range rows {
-     results = append(results, convert(rows[i]))   // bug: double-length slice
- }
+ results := make([]Item, 0, len(rows))
+ for i := range rows {
+     results = append(results, convert(rows[i]))
+ }

  // An AI comment worth dismissing — confident and wrong:
  // "This map access is a data race."   (the map is local to the
  //  goroutine; no other goroutine can see it. False positive.)

The gotcha: a noisy AI reviewer decays exactly like a mis-tuned linter — people don’t argue with it, they mute it, and then it catches nothing. Tune for precision and prune false positives aggressively, or the whole tool quietly becomes decoration.


Use AI as the author, too — self-review before you ask for a human

Post 5 was about the author’s craft: the small PR, the clean history, the honest description, the self-review pass before you spend another person’s time. AI is a genuine multiplier on every one of those. Before you request human review, run the diff through an AI pass yourself and act on it:

This is the highest-return use of AI in the whole loop, because the author has the most context and can instantly tell a real comment from a hallucinated one — you’re using the model where verification is cheapest. The human reviewer then receives a PR that already survived a first pass, which is exactly the courtesy post 5 argued for, now automated.


The risks, named plainly

The upside is real, and so are these. Each is a way a team can adopt AI review and end up worse off than before.

Automation bias. People trust an authoritative-looking machine verdict more than they should. A reviewer who sees “AI review passed ✓” is tempted to skim and approve — the failure that erases the entire point, since the human is there precisely to do the reading the AI can’t.

The gotcha: automation bias makes reviewers rubber-stamp an AI-approved PR — “the bot’s happy, ship it.” The AI pass clears the noise; it does not discharge the human’s duty to read. If nobody with context actually read the change, it wasn’t reviewed.

AI approving AI-written code. More and more PRs are AI-authored. If an AI reviewer then approves them with no human in the loop, you have a closed loop with no judgment anywhere in it — and errors compound instead of getting caught. Two models sharing the same blind spots do not check each other; they agree.

The gotcha: AI reviewing AI-written code with no human in the loop is not review — it’s two systems with correlated blind spots nodding at each other. Keep a person on the approve decision, especially for machine-authored changes.

Privacy and IP. Sending source code to an external model means your proprietary code left your building. Depending on the tool and the contract, it may be logged, retained, or used for training. For some code — regulated, secret, or contractually restricted — that’s a real problem, not a hypothetical one.

The gotcha: sending proprietary code to an external model has privacy and IP implications. Know your tool’s data-handling terms — retention, training use, region — before you point it at a private repo. “It’s just a review bot” is not a data-governance policy.

Gaming. Any metric becomes a target. If AI review coverage becomes a number someone reports, people will optimize the number — auto-approving, suppressing comments, or configuring the bot to be toothless — rather than the underlying quality. Measure outcomes (escaped defects, review latency), not review-tool activity.


A healthy division of labor

Put it together and the split is clean — give each side the work it’s actually good at.

A healthy division of labor
Concern Best owner Why
Mechanical nits, style, boilerplate AI first pass High volume, low context, tireless
Missing tests / edge cases surfaced AI first pass Strong pattern-matching against similar code
Diff summary, PR description draft AI Fast orientation; author corrects
Explaining unfamiliar code AI (then verify) Instant plain-language map
Should this change exist? Human Needs intent and priorities
Is this the right design? Human Needs the roadmap and system context
Correctness against business intent Human The spec lives in people, not the diff
Contextual security (e.g. BOLA) Human Needs the authorization model
The approve / block decision Human Only a person can own accountability

The line is not “simple versus complex” — it’s context. Where the judgment needs context the model doesn’t have (intent, architecture, authorization, priorities), a human owns it. Everywhere else, let the machine take the load off.


The series, tied together

This has been an eight-post arc telling one story:

The throughline is the thing to keep. Code review is a human communication and judgment practice. Every tool in this post makes it faster, cheaper, and less tedious — none makes it not-human. AI is the best assistant the reviewer has ever had; it is not the reviewer. Keep a person on design, correctness, and accountability, let the machine clear everything else, and you get review that’s fast and thoughtful. That was the goal from post 1 — and it’s more achievable now, because for the first time the tedious half is genuinely optional.


Key takeaways


Further reading