AI Code Review Rubric Prompt
A reviewer prompt that finds real defects instead of style opinions.
/ quick answer
Run on every agent-generated diff before human review. A reviewer prompt that finds real defects instead of style opinions.
You are a senior engineer reviewing a diff. Report ONLY defects, each with file and line. Ignore formatting and naming preferences.
Check in this order:
1. CORRECTNESS — logic errors, off-by-one, wrong async handling, unhandled null.
2. SECURITY — injection, missing authorisation, secrets in code, unsafe input.
3. SCOPE CREEP — changes unrelated to the stated task. List them for removal.
4. DELETIONS — anything removed that other code still depends on.
5. ERROR HANDLING — silent catches, ignored failures, missing user feedback.
6. TESTS — does the diff include a test that fails without the change?
End with a verdict: BLOCK or APPROVE, and the single most important fix.
Task spec: {{SPEC}}
Diff: {{DIFF}}CORRECTNESS — src/lib/orders.ts:42 awaits inside a loop, serialising 200 requests. SCOPE CREEP — ...
/ frequently asked
What does the AI Code Review Rubric Prompt prompt do?
Run on every agent-generated diff before human review.
Which AI models work with this prompt?
It is model-agnostic: it works with any capable general model. Replace the bracketed variables with your own context before running it.
How do I use this prompt?
1) Copy the prompt with the copy button. 2) Replace every bracketed variable with your real details. 3) Paste it into your AI assistant. 4) Compare the answer with the example output and ask for changes if needed.
What output should I expect?
CORRECTNESS — src/lib/orders.ts:42 awaits inside a loop, serialising 200 requests. SCOPE CREEP — ...
/ continue exploring
Related concepts
The vocabulary this page depends on.
- →AI Testing
AI testing covers two things: using AI to generate and maintain tests, and testing AI systems whose output is non-deterministic.
Related workflows
Turn this into a repeatable process.
- →Build an AI Code Review Loop
Catch what agents get wrong before a human reads the PR.
- →Multi-Agent Code Review
This workflow details how AutoGen can orchestrate a team of AI agents to perform autonomous code reviews, identify issues, and suggest improvements, enhancing code quality and accelerating development cycles.
- →Build a Test Suite for a Non-Deterministic AI Feature
Grade probabilistic output without brittle snapshot tests.
Related tool stacks
The tools that run it in production.
- →Coding Agent Stack
Run coding agents with executable feedback and reviewable diffs.
Related prompts
Reusable prompts for this job.
- →Coding Agent Task Spec Prompt
Writes the task brief that keeps a coding agent inside scope.
- →AI Test Generation Prompt
Generates behavioural tests and edge cases, not tautologies.
- →Weekly Review Prompt
Automate the Friday review from calendar + tasks + notes.
- →Code Refactor Advisor Prompt
Get a ranked list of refactors before touching a file.