diff --git a/ai-reviewer.sh b/ai-reviewer.sh index cb811b9..6578d75 100644 --- a/ai-reviewer.sh +++ b/ai-reviewer.sh @@ -218,7 +218,18 @@ PROMPT="You are an expert code reviewer. Please analyze this code diff and provi Focus on security, performance, code quality, and best practices. -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. +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): +- Default: Skip the issue to avoid spam +- Only ask for clarification if it's critical (security vulnerabilities, breaking bugs, data loss risks): \"Cannot verify [X] from diff - please confirm [specific question]\" +- If making an inference about non-critical issues, explicitly label it: \"Inference (not verified): [observation]\" + +Review Structure: +1. Start with a short overall feedback summary (1-2 sentences) +2. Then provide detailed findings +3. End with one of these verdicts ONLY: + - \"✅ Approved\" (no issues found) + - \"✅ Approved with recommendations\" (minor improvements suggested, but not blocking) + - \"❌ Request changes\" (critical issues that must be fixed before merge) Required JSON format: { @@ -231,6 +242,7 @@ Instructions: 1. Respond with a single valid JSON object 2. Include the Friendly AI Reviewer footer with heart emoji at the end of the review field 3. For labels_added, prefer existing repository labels when possible +4. Always end your review with one of the three verdict options listed above before the footer Code to review: $PROMPT_PREFIX