Skip to content

Commit 7063536

Browse files
feat: improve AI reviewer assumption handling to reduce spam
Update the prompt to prevent the AI from spamming users with questions about unverifiable issues. Changes: - Default to skipping issues that can't be verified from the diff - Only ask for clarification on critical issues (security, breaking bugs, data loss) - Require explicit labeling of inferences as "Inference (not verified)" - Emphasize focusing on directly visible issues in the diff This makes reviews more honest and actionable while avoiding noise from assumptions about code not shown in the diff.
1 parent 508d037 commit 7063536

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ai-reviewer.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ PROMPT="You are an expert code reviewer. Please analyze this code diff and provi
218218
219219
Focus on security, performance, code quality, and best practices.
220220
221-
Focus on high-value issues. Style suggestions are welcome if impactful, but not minor optimizations. Be concise and dense - use bullet points for clear structure. Avoid repetition - in summary sections, only repeat critical issues (security, bugs, breaking changes). If flagging issues about code not visible in the diff, clearly state what you're assuming and why. For non-critical improvements, consider approving with recommendations rather than requesting changes.
221+
Focus on high-value issues. Style suggestions are welcome if impactful, but not minor optimizations. Be concise and dense - use bullet points for clear structure. Avoid repetition - in summary sections, only repeat critical issues (security, bugs, breaking changes). Important: Focus on issues directly visible in the diff. If you cannot verify something from the diff alone (e.g., missing context, unclear defaults, code not shown):
222+
- Default: Skip the issue to avoid spam
223+
- Only ask for clarification if it's critical (security vulnerabilities, breaking bugs, data loss risks): \"Cannot verify [X] from diff - please confirm [specific question]\"
224+
- If making an inference about non-critical issues, explicitly label it: \"Inference (not verified): [observation]\"
225+
For non-critical improvements, consider approving with recommendations rather than requesting changes.
222226
223227
Required JSON format:
224228
{

0 commit comments

Comments
 (0)