Review governance
Setting an AI code contribution policy
Most teams adopt coding agents before they write down what agents are allowed to do. The eight clauses below are the minimum an engineering organisation needs so that reviewers, auditors and finance all read the same rules.
- 01
Where agents may write
Name the branches. Agents work on namespaced feature branches only; protected branches are read-only for automation. State which paths are off limits — infrastructure, key management, billing, migrations touching customer data — and require a named human owner for changes there.
- 02
Disclosure on every contribution
Every pull request declares which parts were agent-authored, which model or runtime produced them, and which human is accountable. Undisclosed agent output is a policy breach, not a style issue.
- 03
Evidence required before merge
List the checks that must exist for the exact head commit: unit and integration tests, dependency and secret scanning, a preview deployment and, for sensitive paths, a second reviewer. Stale evidence is rejected rather than explained.
- 04
Licensing and provenance
State that contributions must be original or license-compatible, ban pasting code of unknown provenance, and require attribution records for vendored snippets. Keep an audit trail linking each merged change to the run that produced it.
- 05
Secrets and data handling
Agents never receive production credentials or customer data. Define the allowed context sources, require redaction in prompts and logs, and rotate any credential that appears in an agent transcript.
- 06
Spend limits and stop conditions
Set a cap per ticket, per project and per day across model API, compute and credit spend. Define what happens at the cap: work stops and waits for a human decision instead of continuing quietly.
- 07
Human authority
Approval, budget release and merge belong to a person. Record who approved, on which SHA, and against which acceptance criteria.
- 08
Enforcement and review
Encode what you can as branch protection, required checks and CODEOWNERS; audit the rest monthly. A policy nobody can verify from CI is a memo.
Starter policy, six lines
- Agent branches are namespaced and single-ticket.
- Pull requests disclose agent authorship and the accountable human.
- Required checks must pass on the head SHA being merged.
- No production secrets or customer data in agent context.
- Spend caps per ticket; work halts at the cap.
- Protected paths need a named human author and a second reviewer.
Then make review match the policy
The companion guide turns these clauses into the checks a reviewer actually runs on an agent-authored pull request.

