AI Coding Review Template

Use this template before merging AI-generated code. It makes the reviewer compare the diff against the spec instead of judging whether the output merely looks reasonable.

ai-coding-review.md
# AI Coding Review

Spec:
Agent or tool:
Reviewer:
Date:

## Scope Check
- Allowed files:
- Files changed:
- Out-of-scope changes:

## Spec Alignment
- Acceptance criteria satisfied:
- Criteria missing:
- Behavior added outside the spec:

## Evidence
- Tests added or updated:
- Test command:
- Manual check:
- Logs or screenshots:

## Review Decision
- Approve | Request changes | Split PR
- Follow-up owner:
- Notes:

When to use this template

What a filled version looks like

The template becomes useful after it carries a real decision, owner, and evidence. This is the level of specificity to aim for.

## Scope Check
- Allowed files: services/refunds/*, tests/refunds/*
- Files changed: services/refunds/retry.ts, tests/refunds/retry.test.ts
- Out-of-scope changes: none

## Spec Alignment
- AC-2 replay idempotency: satisfied
- Added behavior outside spec: none

Review before implementation

Weak vs strong wording

Weak

The AI code looks good and tests pass.

Strong

The diff only touches allowed files, AC-2 maps to retry.test.ts, no new provider behavior was added outside the spec, and npm run test -- refunds passes locally.

FAQ

Should reviewers trust AI test summaries?

No. The template asks for the command and evidence so reviewers can reproduce or inspect the result.

What should happen to extra behavior?

Remove it, split it into a new spec, or explicitly update the current spec before merge.

Can this be used without AI?

Yes. It is also a useful checklist for any large or risky PR, but it is written for AI drift control.

Related resources

Editorial note

This template is written for spec-driven development workflows. The example is illustrative and should be adapted to your domain.

Tip: keep it under /docs/specs/ or /.specs/, then update it in the same pull request as implementation changes. Last updated: May 11, 2026.