A city PR bot should flag comments only when claimed behavior contradicts the code. Which prompt approach improves precision?
Select an answer to reveal the explanation.
Short Explanation
Vague "be accurate" is like telling a building inspector to "look carefully" with no checklist. Spell the category: flag only when claimed behavior contradicts the code.
Full Explanation
A city PR bot that should flag comments only when claimed behavior contradicts the code needs precision rules, not vibes. Explicit categorical criteria—flag when documentation, commit message, or PR description asserts behavior that the diff does not implement, or when code contradicts an explicit claim—give Claude a binary check it can apply consistently. That categorical design cuts false positives from style taste and focuses civic reviewers on real claim-versus-code mismatches.
Telling the model only to be accurate without defining what to flag fails because "accurate" is not an operational category; different runs invent different thresholds. Asking it to use best judgment with no categorical rules fails similarly: judgment without categories drifts by file and by day, which is fatal for a shared municipal bot. Relying on a vague please-be-careful instruction fails because caution language does not encode the contradiction test and still produces noisy nits that bury real issues.
Exam caveat: categorical contradiction criteria improve precision; they do not catch every security bug that was never claimed in text—absence of a false claim is not proof of secure code. Operational check: encode the contradiction rule in the review prompt with one positive and one negative example, sample recent PRs, and measure that flagged items cite both the claim and the conflicting code location.