Code Review Checklist
A structured, non-bloated code review checklist for software teams, senior engineers, and AI-generated code reviews. Covers correctness, security, performance, architecture, data safety, and AI audit gates.
1. Functional Correctness & Logic
Ensure the code satisfies business requirements and handles boundary conditions cleanly without unexpected side effects.
2. PR Scope & Change Containment
Keep changes focused on the specific feature or fix to simplify review and prevent regression risks.
3. Readability & Maintainability
Write code for humans first. Ensure future engineers can understand and modify this code easily.
4. Architecture & Modular Design
Maintain clean boundary separation, proper dependency flow, and consistency with existing codebase patterns.
5. Error Handling & Resilience
Gracefully handle failures, clean up resources, and provide clear error diagnostic messages.
6. Security & Sensitive Data Protection
Identify authorization flaws, injection risks, secret exposures, and improper data logging proportional to the change risk.
7. Performance & Resource Allocation
Prevent query degradation, N+1 loops, memory leaks, and thread-blocking operations.
8. Concurrency, State & Transactions
Prevent race conditions, thread deadlocks, duplicate execution, and corrupted shared mutable state.
9. API Contracts & Backward Compatibility
Protect public interfaces, prevent breaking schema changes, and manage API evolution safely.
10. Data Integrity & Database Safety
Safeguard database migrations, indexes, foreign keys, and data integrity under production loads.
11. Automated Testing & Verification
Ensure test coverage actually verifies behavior rather than just inflating line coverage metrics.
12. Observability & Production Diagnostics
Ensure failures in production leave enough diagnostic log traces and telemetry metrics to debug effectively.
13. Documentation & Knowledge Transfer
Keep documentation, API specs, inline code comments, and changelogs up to date with implementation changes.
14. Audit Gate: AI-Generated Code Review
Specialized sanity checks for PRs written or assisted by AI agents (Cursor, Claude Code, GitHub Copilot).
Classifying Review Findings by Severity
Not all review comments carry equal weight. Clearly prefixing your feedback helps PR authors prioritize changes and avoids blocking minor style preferences.
Critical Defect
Broken requirements, security vulnerabilities (SQLi/IDOR), memory leaks, data corruption, or failing tests.
blocking: Tenant ID check missing in DB queryHigh Risk / Tech Debt
N+1 query performance risks, missing error bounds, unhandled async rejections, or missing edge case tests.
important: Loop triggers HTTP call per itemImprovement
Cleaner abstractions, better intent-revealing names, guard clause flattening, or minor DRY refactoring.
suggestion: Extract guard clause to flatten loopMinor Preference
Typo in JSDoc comment, minor formatting preference, or non-functional polish. Author may ignore.
nit: Typo in function comment ('retreive')Context-Aware Reviewing: Match Depth to Change Risk
A 10-line CSS spacing fix does not require database transaction analysis. Conversely, a zero-downtime database migration warrants deep concurrency, locking, and index inspection. Adjust your focus using context presets:
Focus on visual correctness, responsive layouts, accessibility (a11y), and clean component prop interfaces. Skip DB & backend checks.
Focus on correctness, authentication, tenant isolation (IDOR), input sanitization, error propagation, and non-blocking I/O.
Focus on zero-downtime safety, non-null column defaults, index coverage, transaction rollbacks, and locking implications under load.
Best Practices for Reviewing AI-Generated Code
AI agents (Claude Code, Cursor, Copilot) write plausible code quickly, but introduce distinct failure modes. Keep these 5 rules in mind during AI code audits:
Verify Library & API Existence
AI models frequently hallucinate non-existent package methods or pass deprecated parameter schemas. Cross-check imported helper calls.
Inspect Off-By-One & Boundary Logic
AI models optimize for happy path outputs. Pay strict attention to loop bounds (< vs <=), negative array offsets, and zero-value limits.
Audit Security Assumptions
Verify the AI hasn't disabled CORS, bypassed authorization middleware, or hardcoded dummy secrets (`'secret-key'`) to make code pass tests.
Strip Verbose Dead Boilerplate
AI output often includes excessive try/catch wrappers, redundant logging, and unused helper functions. Demand clean, lean code.
How to Avoid Reviewing Only Style Instead of Correctness
The most common mistake in engineering teams is spending 80% of code review time arguing over formatting, quote styles, and variable naming while missing race conditions or authorization bypasses.
Automate Formatting via CI
Enforce Prettier, ESLint, or Biome formatting rules in pre-commit hooks and CI pipelines. Never comment on formatting in PRs manually.
Focus Human Attention on Intent
Use human review time exclusively for business logic correctness, data integrity, architecture boundaries, and edge case resilience.
When to Use This Checklist
- Before approving non-trivial Pull Requests or Merge Requests in GitHub/GitLab.
- During peer code review sessions to enforce consistent engineering quality standards across team members.
- As a pre-review self-check before requesting peer or tech lead reviews.
- When reviewing AI-generated code (Claude Code, Cursor, Copilot) to catch hallucinated APIs and subtle logical edge cases.
Common Pitfalls to Avoid
- Bikeshedding on syntax formatting, indentation, and variable naming while missing concurrency deadlocks or data corruption risks.
- Treating every minor PR like a full security audit or database architecture redesign instead of sizing review depth to risk.
- Rubber-stamping PRs without running tests or verifying that assertions actually exercise failure paths.
- Accepting AI-generated code blindly without inspecting unvetted security assumptions or missing boundary checks.
Connected Workflows & Tools
Complementary prompts, agent skills, and interactive tools in SprintKit.
Production Deployment Checklist
Pre-flight readiness and live telemetry verification checklist.
PR Review Queue
Streamlined workflow tool for prioritizing and tracking team pull request reviews.
Code Review Agent Skill
Standardized AI agent review rules covering security, performance, and idiomatic syntax.
Pull Request Review Prompt
Deep, multi-pass PR review prompt for Claude Code, Cursor, and Copilot.