AI review is worth having because it is good at a specific set of defects, and that set overlaps almost exactly with what human reviewers miss. The overlap is the argument for using it, and knowing which categories they are is what makes a review prompt useful.
What is the common property?
Locality. These tools find bugs that are visible within a few lines: a condition that is wrong, a value that is not checked, a resource that is opened and not closed. All of it is present in the text being read.
Human reviewers are poor at exactly this, because attention degrades over a long file and the errors are boring rather than interesting.
Which categories are reliable?
- Missing checks. A value used without confirming it exists.
- Boundary errors. Off by one at the start or end of a range.
- Unhandled cases. A condition with no branch for one possibility.
- Resource leaks. Files, connections and handles opened and not released.
- Inverted logic. A condition that reads correctly and does the opposite.
- Copy and paste errors. A duplicated block where one variable was not updated.
Why is the last one so well caught?
Because it is a pattern deviation, and pattern matching is the underlying mechanism. Three near-identical blocks where the fourth uses the wrong index stands out immediately to something reading for regularity, and it is close to invisible to a person reading for meaning.
What about type and conversion problems?
Caught well, particularly the implicit ones: text treated as a number, a value that arrives as a string from user input or a file, an integer division where a decimal was intended. These are local, mechanical and exactly the kind of thing that fails quietly.
What else does it do well?
Consistency across a change. Whether every call site was updated, whether an error is handled the same way as similar errors nearby, whether a new function follows the convention of its neighbours. All of it is comparison rather than judgement.
How do you prompt for these specifically?
Check only for these: values used without a null or empty check, off by one errors at range boundaries, conditions where a case is not handled, resources opened without being closed, and duplicated blocks where a variable was not updated consistently. Report the line and what would happen at runtime. Ignore everything else.
A narrow list produces better results than a general request, because it removes the pull towards style commentary.
Does it find real bugs or plausible ones?
Both, which is why verification matters. The categories above have a high proportion of genuine findings; a general review has a much lower one. Narrowing the request improves the ratio considerably.
Does it work on languages with strong type checking?
The value shifts rather than disappearing. In a language where the compiler catches type errors, null safety and unhandled cases, several categories above are already covered before any review happens.
What remains is logic: inverted conditions, boundary errors, duplicated blocks with an unchanged variable and inconsistent handling across similar cases. Those survive any type system, and they are the ones worth prompting for specifically. In a dynamically typed language the full list applies, which is why automated review earns more there.
Why does this pair well with human review?
Because the strengths are complementary rather than overlapping. A person is good at whether the change is a good idea, whether it fits the system and whether the approach is right. A model is good at whether line forty-three checks for an empty list. Running the second before the first means the human is reviewing something already free of mechanical errors.