|
| 1 | +# Review PR |
| 2 | + |
| 3 | +Review a pull request with parallel subagents for comprehensive analysis. |
| 4 | + |
| 5 | +## Context |
| 6 | + |
| 7 | +```bash |
| 8 | +# Get PR info if number provided |
| 9 | +if [ -n "$ARGUMENTS" ]; then |
| 10 | + gh pr view "$ARGUMENTS" --json title,body,files,additions,deletions 2>/dev/null || echo "PR not found" |
| 11 | +fi |
| 12 | + |
| 13 | +# Current branch diff if no PR number |
| 14 | +git diff main...HEAD --stat 2>/dev/null || git diff origin/main...HEAD --stat |
| 15 | +``` |
| 16 | + |
| 17 | +## Instructions |
| 18 | + |
| 19 | +Review the PR using multiple perspectives: |
| 20 | + |
| 21 | +1. **Style Check**: Verify code follows CONTRIBUTING.md guidelines |
| 22 | + - Naming conventions (flow_vibyy_*, task_*, UPPER_SNAKE_CASE) |
| 23 | + - Import style (absolute imports, isort grouping) |
| 24 | + - Line length (120 chars), quote style (single quotes) |
| 25 | + - Type hints on all functions |
| 26 | + |
| 27 | +2. **Bug Hunt**: Look for common issues |
| 28 | + - Unhandled exceptions |
| 29 | + - Resource leaks (unclosed files/connections) |
| 30 | + - Missing null checks |
| 31 | + - Logic errors in conditionals |
| 32 | + |
| 33 | +3. **Security Review**: Check for vulnerabilities |
| 34 | + - Hardcoded credentials or secrets |
| 35 | + - SQL/command injection risks |
| 36 | + - Unsafe deserialization |
| 37 | + - Missing input validation |
| 38 | + |
| 39 | +4. **Architecture**: Evaluate design |
| 40 | + - Does it follow existing patterns? |
| 41 | + - Is it over-engineered? |
| 42 | + - Are there simpler alternatives? |
| 43 | + |
| 44 | +5. **Tests**: Verify test coverage |
| 45 | + - Are new functions tested? |
| 46 | + - Are edge cases covered? |
| 47 | + - Do tests follow naming conventions? |
| 48 | + |
| 49 | +## Arguments |
| 50 | + |
| 51 | +- `$ARGUMENTS` - Optional: PR number to review |
| 52 | + - Example: `42` |
| 53 | + |
| 54 | +If no PR number, review the current branch's diff against main. |
| 55 | + |
| 56 | +## Output Format |
| 57 | + |
| 58 | +Provide findings grouped by severity: |
| 59 | +- **Critical**: Must fix before merge |
| 60 | +- **Major**: Should fix, can discuss |
| 61 | +- **Minor**: Nice to have improvements |
| 62 | +- **Praise**: Things done well |
0 commit comments