Agent-Assisted Code Review · ~7 min
The cheapest review win happens before review starts — author the PR small, say why it exists, and flag the code that will get deleted.
An agent can ship a feature in one branch and one giant diff. That is convenient for the agent and brutal for the reviewer. Reviewable PRs are authored, not hoped for — and the agent that wrote the code holds exactly the context needed to make them reviewable.
Defect detection drops sharply once a single review crosses 200–400 lines or 60–90 minutes of attention — the SmartBear/Cisco study of about 2,500 reviews across 3.2M lines of code. A 2,000-line branch sliced into four 500-line PRs lands back inside that envelope.
Slice along axes the diff alone does not encode — feature vs. refactor, backend vs. frontend, formatting vs. logic, tests vs. production code, dependency bumps vs. behavior changes — plus the sixth axis only the session knows: which task each edit belonged to. Dependent slices stack (each targets the one before it); independent slices land as parallel PRs against the same base. Skip the partial order and reviewers merge dependent slices out of sequence, breaking intermediate states.
A cross-cutting refactor split by directory becomes four PRs that each touch one layer — reviewing one means opening the others, so everyone holds more context than the monolith forced. Two red flags: no PR is independently mergeable, and reviewers keep asking for the original diff. Don't slice cross-cutting refactors, atomic-revert paths (migrations, feature flags), security-sensitive fixes, or diffs already under ~200 LOC. Keep the stack at 3–4 PRs; beyond that, feedback on an early slice forces a rebase cascade through every downstream one. And keep the author's approval gate — the proposed split is a hypothesis, not a result.
PR description structure is a configurable agent parameter, not a cosmetic default. A study of 5 AI coding agents across the AIDev dataset found description structure varied systematically by agent and correlated with reviewer engagement and merge rates — partly independent of code quality (arXiv:2602.17084).
| Agent | Merge rate | Description signature |
|---|---|---|
| OpenAI Codex | 82.6% | Frequent headers and lists; high clarity |
| Cursor | 65.2% | Politeness markers; moderate structure |
| Claude Code | 59.0% | High text volume; emoji; convention-strict |
| Devin | 53.8% | Frequent commit splits |
| GitHub Copilot | 43.0% | Most reviewer discussion generated |
The mechanism is direct: neither Claude Code nor Copilot enforces description structure by default, so configure it. Put a
template in CLAUDE.md, AGENTS.md, or custom agent instructions, specifying the sections reviewers
actually need.
Make it opt-in where it only adds friction: solo repos, trivial or mechanical PRs (dependency bumps, formatting), and teams with strong ambient context. And remember the binding constraint — description style is a secondary lever; merge value tracks the code, so templating weak code just hides the root problem.
AI PRs ship functions reviewers routinely delete — dead code, over-engineered helpers, spec-mismatched implementations. That deletion is statistically predictable from structure alone: arXiv:2602.17091 reaches AUC 87.1% flagging likely-to-be-deleted functions using only static features — no semantic understanding of the spec required.
The strongest predictors are method name length, lines of code, Halstead volume, and call count — all proxies for "more was generated than the task required." A function with a long descriptive name and high Halstead volume encodes more conceptual surface area than a focused one, and that excess surface is what reviewers remove.
This loops straight back into how you prompt the author: require generated functions be reachable from named entry points, prohibit abstraction beyond the current task, and declare external dependencies explicitly. Fewer generated functions that survive review beats more functions with a higher deletion rate.
A 12.9% error rate leaves roughly 1-in-8 deletable functions unflagged — reviewers who lean on the report skip unflagged code too fast. And a utility called once looks like over-engineering by metrics but may be essential for testability; setup hooks and exported API surface read as dead code to a single-module call graph. Calibrate false-positive rates locally and keep a human fallback before routing regenerations to the agent.
CLAUDE.md or AGENTS.md; defaults vary and leak merge rate.Retrieval practice — recall, don't peek
Question 1The authoring agent's advantage as a PR slicer over a diff-only tool is that it holds…
Question 2Defect detection drops sharply once a single review exceeds roughly…
Question 3Copilot generated the most reviewer discussion yet the lowest merge rate, which means the outcome to optimize is…
Question 4The structural pre-flag for likely-to-be-deleted functions (AUC 87.1%) keys on signals like…
Question 5 · spaced recall from an earlier lessonIn human-AI review synergy, work is split by comparative advantage so that…