EngineeringLead

Code review

Reviewing AI-generated code: a checklist for leads

AI-assisted changes often look finished: consistent style, tidy names, passing tests. That polish is exactly why they need a different kind of attention in review. This guide sets out what to check, in what order, and how to keep review from becoming the team's bottleneck.

Why AI-assisted changes need adjusted review

Traditional review habits evolved around changes written by a colleague who understood them. Reviewers learned to trust certain signals: clean formatting suggests care, passing tests suggest correctness, a confident description suggests the author checked. AI tools produce those signals whether or not the change is right. The reviewer's job shifts toward questions the polish cannot answer: is this the right change, does it fit the system, and does the author understand it?

GitHub's own documentation on reviewing AI-generated code makes the same point in practical terms: run tests and static analysis first, confirm the change fits the project's requirements and architecture, scrutinize new dependencies, and watch for fabricated APIs, ignored constraints and deleted tests.

Set the ground rules before the review

The review checklist, in order

1. Is this the right change?

2. Dependencies and imports

3. Correctness

4. Tests

5. Security

6. Fit and maintainability

7. Understanding

Divide the work between tools and people

Let automation checkKeep for human reviewers
Formatting, style, lint rulesWhether this is the right change at all
Type errors, compile failures, failing testsWhether the tests prove the right behavior
Known vulnerable dependencies, license flags, secretsArchitecture fit and long-term cost
Obvious bugs an AI review bot can flagBusiness rules, domain edge cases, safety
Consistency with existing patternsThe author's understanding, and the call to merge

AI review bots can be useful as a first pass. Treat their comments as suggestions from another tool, not as an approval. A person still makes the final decision.

Keeping review from becoming the bottleneck

  1. Watch review load. If change volume rises faster than review capacity, quality will fall. Track time to first review and open pull request age at team level. See measuring engineering work.
  2. Limit work in progress. Finishing reviews comes before starting new generated work.
  3. Grow reviewers. Pair junior engineers with senior reviewers. Reviewing is how people learn to recognize what the tool gets wrong.
  4. Review design earlier. A short design note before implementation prevents the expensive review comment: "this is the wrong approach."

How to write review comments

Warning signs in a team's review culture

Common questions

Should AI-generated code be reviewed more strictly than human code?

It should meet the same standard. In practice that means reading it more slowly, because the usual signals of care are present whether or not the change is correct.

Can an AI tool approve a pull request?

It can comment. Most teams keep approval and merge with a named person, and many repository settings can enforce that. Decide explicitly rather than by default.

How do I review a change I suspect the author does not understand?

Ask open questions about behavior and failure modes. Make it a normal part of every review so it never feels like an accusation.

Do reviewers need to know which lines were AI-generated?

Usually the approach and intent matter more than line-level origin. Regulated teams may need a record of AI assistance; see AI in regulated engineering.

Last reviewed 2026-09-17