Prompt Engineering Code Review AI Code Review

Code Review Prompt — the Review Contract

"Review this code" gets shallow comments. The review contract gets findings with severities, a checklist, and a verdict.

Overview

The difference between a useless AI review and a useful one is the contract: what to look for, how to report it, and what verdict to end with. This setup loads the baseline contract — a correctness review of a complete file with the twelve-check correctness checklist, the four-level severity standard ([CRITICAL] through [NIT], severity reflecting impact not effort), findings-only output with exact locations, and a verdict rule. It's the template every other review on this site specializes from.

Workflow

  1. Generate once, reuse per review

    The contract is the standard; paste each file or diff into the code slot and every review comes back in the same shape.

  2. Read findings by severity

    CRITICAL first — the grouping rule means the things that block merge are always at the top.

  3. Hold the AI to the verdict rule

    "Base the verdict only on the findings listed" — no vibes-based approvals.

Why This Works

  • A checklist the AI must work through beats an open-ended "look for problems"
  • Severity tagging turns prose into a triageable review
  • Findings-only output cuts the praise padding that hides real issues

Best for

  • Developers using chat AIs as a second reviewer
  • Teams that want review consistency across members and models
  • Anyone tired of "looks good, consider adding comments" reviews

Not for

  • Making the AI rewrite the code — that's the Refactor Prompt Builder (review judges, refactor changes)
  • A persistent reviewer persona — that's a System Prompt (SPG); this is a per-review task contract

Use cases

  • Getting findings with severities instead of vague observations
  • Standardizing what every AI review must check and report
  • Ending every review with a defensible verdict

Tip: Save time by exploring related resources and tools that integrate with this workflow.

Explore all resources