Skip to content

Replace "be conservative" with review criteria

Rewrite a vague CI review prompt into explicit criteria (what to report, what to skip, severity with code examples) and judge which instructions will not improve precision.

Scenario

Scenario: Claude Code for Continuous Integration. Your team runs Claude Code in CI to review every pull request on a payments API. Last month it posted 210 findings. Developers closed 130 of them as "not an issue", and some have started resolving the bot's comments without reading them.

The tech lead opens a one-line change to the review prompt: "Be conservative. Only report high-confidence issues." You are the reviewer.

Will that line remove the 130 comments developers didn't want? Almost certainly not. This lesson is about what to write instead.

Explanation

Why "be conservative" fails. A line like "only report high-confidence issues" changes how sure Claude should feel. It doesn't change what counts as an issue. Most unwanted review comments aren't shaky guesses: they are confident findings about things your team doesn't care about, such as a naming preference, or a pattern the codebase uses on purpose. Claude stays confident about those and keeps posting them, while a real bug that looks uncertain may be dropped. Precision comes from defining the scope, not the mood.

Write categorical criteria. Claude follows clear, explicit instructions best, so state:

  1. What to report, as named categories with an observable condition. Not "check error handling" but "flag a catch block that drops the error without logging it, rethrowing it or returning a failure".
  2. What to skip: formatting and lint rules CI already enforces, generated files, style preferences, and patterns already used elsewhere in the repository.
  3. What evidence a finding needs. Claude Code's review docs suggest requiring a file:line citation for behavior claims, which cuts findings inferred from names alone.
  4. What each severity means, with a code example per level. Without examples, "high" and "medium" are whatever the model decides on that run, so the same pattern gets different labels on different pull requests.

False positives cost more than their own comment. Developers judge the bot as a whole. A category that is wrong half the time teaches them to skip every comment, including the accurate security ones. When one category is that noisy, switch it off for now, rewrite its criteria, and turn it back on once its findings hold up. The other categories regain their audience the same day.

Worked example

Before:

Review this pull request. Be conservative and only report high-confidence issues. Focus on code quality.

After:

You review pull requests for our payments API (TypeScript, Node). Developers read every comment, so each one must be worth their time.

Report only:
1. Bugs that change runtime behavior: wrong conditions, unhandled promise rejections, wrong rounding or currency.
2. Security: a route without an authorization check, secrets in code, SQL built from request data, card or account numbers in logs.

Do not report: formatting, naming or import order (ESLint and Prettier run in CI), style preferences, or patterns already used elsewhere in this repository.

Cite file:line and the code each finding is based on. If you can't point to the line, don't report it.

Severity:
- high: moves the wrong amount of money or exposes data. Example: Math.floor(price * 100) on a float, which turns 19.99 into 1998 cents.
- medium: fails in a reachable edge case. Example: cart.items[0].sku when the cart can be empty.
- low: correct today but fragile. Example: a missing await on an audit-log write whose loss nobody would notice.

What changed:

  • The vague goal ("code quality") became two categories with conditions Claude can check against the diff.
  • The skip list removes the classes of comment developers were closing: lint duplicates, style and local conventions.
  • Each severity level has a code example, so the same pattern gets the same label on every pull request.
  • The word "conservative" is gone. It didn't define anything.