Agent-Assisted Code Review · ~8 min
Stop reviewing every PR as if it could take down production. Route depth by risk, dial effort to the runs that pay for it, and calibrate the cutoff instead of guessing it.
Three dials sit on top of each other, each at a different grain. Tiers route by static path criticality, per-PR effort dials thoroughness on one run, and threshold calibration decides whether human review happens at all. They compose — they do not substitute.
Tiered review treats review as a risk-routing problem: classify code by criticality, then match review effort to risk. AI runs the first pass on everything; human depth is reserved for the costly or irreversible.
| Tier | Code types | Merge gate |
|---|---|---|
| Automated | Tests, docs, config, CSS, reversible migrations | AI review only, CI green |
| AI + Human | Business logic, API contracts, data models | AI first pass + CODEOWNERS approval |
| Human-only | Auth, payments, crypto, PII handling | Mandatory human / security sign-off |
GitHub offers no native path-based routing, so you approximate it: enable automatic AI review on all PRs, define
CODEOWNERS for the critical paths, and require CODEOWNERS approval in branch protection. A PR touching only
Tier-1 paths matches no owner and merges on AI + CI alone.
Tiered review fails exactly when classification is wrong: a migration that adds a PII column, a
config change that broadens CORS, or a utility called from an auth path — none match
/src/auth/, so they route to Tier 1 and merge unreviewed. Cross-cutting PRs that touch both a Tier-1 and a
Tier-2 path can under-escalate if the logic stops at the first match.
Tiers route who reviews; the effort dial sets how hard the agent looks on one PR. A tunable review agent ships named effort levels, each pinned to a point on a published bug-discovery curve. Cursor's Bugbot externalized exactly this:
| Level | Bug-discovery rate | Trade-off |
|---|---|---|
| Default | 0.7 bugs/run | Optimised for efficiency and speed |
| High | 0.95 bugs/run | More reasoning, more expensive, finds more bugs |
| Custom | Operator-defined | Natural-language routing policy, evaluated per PR |
The dial composes with structured routing across four axes — file-path criticality (auth, payments, crypto), change size (LOC over threshold), author trust (first-time contributors, external forks), and historical defect rate (dirs with elevated post-merge bugs). Pin Default at the team level and let a Custom policy escalate — opt-in by policy, not by per-PR clicking.
The 35%-more-bugs figure counts both "developer fixed it" and "developer made it go away" — it does not rule out more false positives that authors muted. And pinning High on every PR burns the premium and accumulates the alert fatigue the dial existed to avoid, collapsing it back to a fixed-pipeline calibration.
The third dial is organization-wide. A learned diff-risk model scores each diff by its likelihood of revert or production incident, and a single percentile threshold separates auto-approved diffs from those routed to a human. Where you set that point is an operator choice, not a property of the model.
Meta's RADAR is the documented industrial case — a six-stage pipeline (classification → eligibility gates → static heuristics → ML risk score → LLM review → deterministic validation) where the risk score is the knob. Diffs at or below the chosen percentile proceed; the rest go to a human.
| Threshold | Auto-approve rate | Safety vs. baseline |
|---|---|---|
| 25th percentile | not reported | revert ~1/3, incident ~1/50 |
| 50th percentile | 60.31% | revert ~1/3, incident ~1/50 |
| Non-RADAR baseline | — | reference |
Small or low-telemetry teams cannot measure revert rate per percentile — the threshold becomes an unverifiable guess, so use static path-tiering instead. Regulated domains may mandate human sign-off regardless of empirical safety. And a calibration-aware adversary can structure a malicious diff to land in the auto-approved tier — a single knob optimizes for the average diff, not the worst case.
Retrieval practice — recall, don't peek
Question 1In tiered review, the reserved-for-humans tier covers…
Question 2What makes a named effort level more than a hedge word?
Question 3Pinning High effort on every PR collapses the dial because it…
Question 4A risk-score auto-approval threshold stays measurable only with…
Question 5 · spaced recall from an earlier lessonAn agentic review is best understood as…