Code review was designed for a world where people wrote every line. When agents write much of the diff, reading every line by hand becomes a bottleneck, and review quality drops as reviewers tire. AI review helps by giving every pull request a consistent first pass within minutes.
The goal is not to remove human review. It is to move human attention up a level: from spotting typos and missing null checks to judging whether the change does what was intended, and whether the risk is acceptable.
What AI review is good at
AI reviewers reliably catch logic errors, missing edge cases, security issues such as injection risks or secrets, performance problems, and departures from your coding standards. They also check whether a change matches its spec and plan, which human reviewers often skip under time pressure.
A review policy
Write down what the AI reviewer should do, in a file in the repository: the passes to run, what counts as important versus a minor nit, how many nits to report at most, and what to skip, such as generated code or anything CI already checks.
- Passes
- Separate checks for bugs, security, and compliance with the spec, plan and design principles.
- Severity
- Important means behaviour breaks, data leaks or a policy is breached. Style issues are nits.
- Nit cap
- A limit on minor comments per review, so important findings aren't buried.
Fixing review comments
AI can also address review comments: a reviewer tags the assistant on a comment, and it pushes a fix to the branch. For changes an agent opened, the agent can keep working through unresolved comments and failing checks until the pull request is green and waiting only for human approval.
Separation of duties
The agent that wrote a change must never approve it. Branch protection should require approval from a human code owner, informed by the AI findings. This preserves accountability and satisfies most audit requirements.
Learning from reviews
When the same issue comes up twice, add the correction to the repository context file so coding agents stop making it. Review the AI reviewer itself every month: rate its findings, tune the policy, and remove noise.
Managed service or your own pipeline
There are two common ways to add AI review: a managed review service that an administrator enables for chosen repositories, or an action in your own CI pipeline that calls a model. The managed route is fastest; the pipeline route gives more control over prompts, data handling and which models are used. Many organisations start managed and move to their own pipeline as needs grow.
Human review, redesigned
With AI handling the first pass, human reviewers can work differently: read the plan and the AI findings first, then focus on intent, design and risk. For larger changes, a short call with the author is often faster than dozens of written comments.
How to put it into practice
- Turn on AI first-pass review for one repository.
- Write a short review policy with passes, severity and a nit cap.
- Keep branch protection with required human code-owner approval.
- Let authors ask the assistant to address review comments.
- Feed repeated findings into the repository context file.
- Tune the policy monthly based on the usefulness of findings.
Common mistakes
- Rubber-stamping agent pull requests because they look tidy.
- Letting AI findings approve or block merges on their own.
- Flooding reviews with minor comments until people ignore them.
- Never tuning the reviewer after the first week.
How to measure progress
- Time to first review.
- Defects and vulnerabilities caught before merge versus after.
- Share of review comments resolved without manual edits.
- Reviewer satisfaction with the usefulness of AI findings.