AI System Prompt for a Code Review Bot That Only Flags Blocking Issues
This system prompt configures an AI code review bot to comment only on issues serious enough to block a merge — security flaws, correctness bugs, broken tests — while staying silent on style nitpicks and personal preference. It's built for engineering teams running an AI reviewer on pull requests who are tired of the bot burying real problems under dozens of low-value formatting comments.
The prompt works by giving the model an explicit severity scale and a strict rule: if an issue doesn't meet the "blocking" bar, it either stays unsaid or gets grouped into a single optional note at the end, never mixed in with the real findings. This keeps the bot's output short enough that developers actually read it, instead of learning to skim past it.
Because the hardest part of a prompt like this is defining exactly where the "blocking vs. not blocking" line sits, it's worth stress-testing that definition before deploying it. Running the system prompt through Cuelara's Prompt Debugger can surface the edge cases it doesn't yet cover, like a performance issue that's only blocking in a hot path.
Prompt template
Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.
Example input
When to use it
- You're setting up an AI reviewer on pull requests and want it to stop drowning real bugs in style comments.
- Your team already has a linter and formatter, so you need the AI reviewer to focus only on what those tools can't catch.
- You're onboarding a bot into a repo with strict release gates and need it to clearly separate blocking issues from suggestions.
- You want a consistent review bar across PRs regardless of which engineer is reviewing or which model generates the comments.
Best practices
- Give the model concrete examples of what counts as blocking versus non-blocking for your specific codebase, not just abstract categories.
- Have the bot state its confidence on each flagged issue, since a confidently wrong blocking comment does more damage than a missed one.
- Ask the bot to quote the exact line or diff hunk it's commenting on, so reviewers don't have to hunt for context.
- Review and tune the severity boundary after the first week of real PRs — the initial line almost always needs adjusting.
Common mistakes
- Leaving "blocking" undefined, which lets the model apply its own judgment and drift back toward commenting on style.
- Not telling the bot what to do when it finds zero blocking issues, so it invents minor nitpicks just to have something to say.
- Letting the bot comment on generated code, vendored dependencies, or test fixtures that shouldn't be reviewed the same way.
- Skipping a severity scale entirely and asking the model to just "focus on important stuff," which it interprets inconsistently across runs.
FAQs
Why does my AI code review bot comment on style instead of real bugs?
Most models default to listing everything they notice, including style, unless the prompt explicitly ranks issues by severity and tells the model what to omit. Defining a clear "blocking vs. not blocking" line, like in this prompt, is what fixes that.
Should this replace human code review entirely?
No. It's meant to catch a specific class of issue before a human reviewer looks at the PR, not to replace judgment calls about architecture, trade-offs, or team conventions that a bot can't fully evaluate.
How do I stop the bot from flagging issues in generated or vendored code?
Tell it explicitly in the context section which paths or file patterns to skip (for example, build output, vendored dependencies, or auto-generated client code), since the model has no way to know your repo's conventions unless you state them.
How can I check this system prompt's quality before deploying it on real pull requests?
Prompt Debugger — it's built to catch vague constraints and missing edge cases in exactly this kind of rules-based system prompt, and Prompt Formatter can tighten the output structure so the bot's comments post consistently to your PR tool every time.