Topic 4 of 5 · 4 min read
Review norms for human-agent teams
Goal: Draft team review rules that set approval, size and accountability for agent-authored pull requests.
Write down who may approve, how big a change may be and who is accountable, so that agent-authored pull requests get the same careful review as any other. Without rules, volume wins: agents produce changes faster than people can read them, and review turns into clicking approve.
Check yourself · 1 of 3
Who should be accountable for a pull request written mostly by an agent?
Why it matters
An agent can open ten pull requests before lunch. If the team has no norm, either reviewers drown and rubber-stamp, or the work queues for days. Rules protect the reviewers' attention and make sure a person answers for each merge.
The rules to write
- A named human owns every pull request. The person who started the agent is the author of record. Their name goes on the PR, and they answer review comments.
- No self-approval and no bot-only approval. The author, human or agent, cannot be the approver. At least one human who did not direct the work approves. Bots may comment, never approve alone.
- Code owners for sensitive paths. A
CODEOWNERSfile requires review from the right people for auth, payments, migrations, infrastructure and CI configuration. Agents should not be able to edit the review rules or the CI that enforces them without owner approval. - Size limits. Set a soft cap, for example a few hundred changed lines, and ask for a split above it. Small changes get better reviews; large ones get skimmed. Tell agents the cap in their instructions file.
- Turnaround. Agree on a time, such as one business day for a first response, so authors do not pile up work on top of unreviewed work.
- Disclosure. Mark pull requests as agent-assisted and say what was verified by hand. It sets the reviewer's level of care.
- Enforce with settings. Use branch protection: required approvals, required checks, code-owner review, no direct pushes to main.
Before and after
Weak rule:
Please review AI changes carefully.
Better rule:
Every PR names a human owner. Agent-authored PRs need one human approval from someone other than the owner, and two for paths in CODEOWNERS. PRs over 400 changed lines are split unless the owner explains why not. First response within one business day.
What goes wrong
- Rules nobody enforces. A wiki page does not stop a merge; branch protection does.
- Approving by volume. The tenth large PR of the day gets a quick approve.
- Agents editing their own guardrails. A change to CI or CODEOWNERS slips in with the feature.
- No named owner. When production breaks, nobody can explain the change.
Examples
A short team policy
- A named human owns each PR and answers its comments.
- One human approval from someone other than the owner; two for CODEOWNERS paths.
- Over 400 changed lines: split, or explain.
- Changes to CI, CODEOWNERS and branch rules always need an owner's approval.
- First response within one business day.
The guardrail edit
An agent's feature PR also changes .github/workflows/ci.yml to skip a slow test job. Because CI files are in CODEOWNERS, the platform team is added as a required reviewer and rejects the change.
Key points
- Every pull request needs a named human who is accountable for it, whoever or whatever wrote the code.
- The author, human or agent, never approves their own change, and a bot is never the only approver.
- Code owners should review auth, payments, migrations, infrastructure and the review rules themselves.
- Size limits and turnaround times protect reviewers from rubber-stamping.
- Rules only count when branch protection enforces them.
Common mistakes
- Writing "review carefully" instead of rules the platform can enforce.
- Letting a bot approval or the author's own approval count towards the merge.
- Allowing agents to edit CI, CODEOWNERS or branch rules without an owner.
- Leaving size and turnaround unset, so reviewers drown and approve unread.
Check yourself · 2 of 3
What is the purpose of a CODEOWNERS file?
Check yourself · 3 of 3
Why set a size limit on pull requests, including those from agents?
Practice items, not counted towards your mastery.
Start here
- Google Engineering Practices: code review (opens in a new tab)ArticleFree
The reviewer and author guides, written for teams that review every change.
- How to write code review comments (Google Engineering Practices) (opens in a new tab)ArticleFree
Kind, specific comments that explain why and leave the decision to the author.
- How to handle reviewer comments (Google Engineering Practices) (opens in a new tab)ArticleFree
How an author answers feedback, resolves disagreement and avoids taking it personally.
More for this topic
- About code owners (GitHub Docs) (opens in a new tab)DocsFree
How a CODEOWNERS file routes reviews for sensitive paths to named people or teams.
- About protected branches (GitHub Docs) (opens in a new tab)DocsFree
Required approvals, status checks and code-owner review that make review rules enforceable.