CC-301g · Module 1

Review Scope Customization

3 min read

A generic "review this PR" instruction produces generic feedback. Customized review instructions produce targeted, high-value feedback. The customization mechanism is your CLAUDE.md — the same file that governs local Claude Code sessions also governs CI reviews. Add a review section that specifies what the reviewer should focus on, what it should ignore, and what severity levels to use.

The highest-value customizations are project-specific anti-patterns. "Flag any React component that manages more than 3 pieces of state — it should use a reducer." "Flag any API endpoint that does not validate input parameters." "Flag any database query inside a loop — it should be batched." These rules encode your team's hard-won lessons into the automated review. Each rule added to CLAUDE.md is checked on every future PR — the compound effect is significant.

## Automated Review Focus Areas
- Flag components with >3 useState calls (suggest useReducer)
- Flag API routes without input validation (zod, joi, or manual)
- Flag database queries inside loops (suggest batch operations)
- Flag catch blocks that swallow errors silently
- Ignore: formatting, import ordering, comment style
- Severity: CRITICAL (security/data), WARNING (bugs), INFO (style/cleanup)