|
| 1 | +Review code changes for quality and correctness. Argument: file path, PR number, or "staged" for staged changes. |
| 2 | + |
| 3 | +Parse the argument: |
| 4 | +- If a file path: review that file |
| 5 | +- If a PR number: `gh pr diff <number>` |
| 6 | +- If "staged" or empty: `git diff --cached` (or `git diff` if nothing staged) |
| 7 | + |
| 8 | +Review checklist: |
| 9 | + |
| 10 | +1. **Correctness:** |
| 11 | + - Does the logic match the intent? |
| 12 | + - Edge cases handled? |
| 13 | + - Null/undefined safety? |
| 14 | + - Are query results validated before use? |
| 15 | + |
| 16 | +2. **Quality:** |
| 17 | + - Follows existing patterns in the codebase? |
| 18 | + - No duplicated logic (check with grep)? |
| 19 | + - File size within limits (components <300 lines, convex <500 lines)? |
| 20 | + - No hardcoded values that should be constants? |
| 21 | + |
| 22 | +3. **Safety:** |
| 23 | + - No hardcoded secrets or API keys? |
| 24 | + - No raw user input in queries (injection risk)? |
| 25 | + - No `eval()`, `Function()`, or `dangerouslySetInnerHTML` with user data? |
| 26 | + - Convex mutations validate inputs? |
| 27 | + |
| 28 | +4. **EVOX Architecture Rules:** |
| 29 | + - Design System V2 tokens used (no raw zinc-*, gray-*, slate-*)? |
| 30 | + - Agent identity via string names, not Convex IDs? |
| 31 | + - Single source of truth (agentRegistry, messageStatus)? |
| 32 | + - New messages → unifiedMessages table? |
| 33 | + |
| 34 | +5. **Maintainability:** |
| 35 | + - Would another agent understand this code? |
| 36 | + - Dead code removed (no commented-out blocks)? |
| 37 | + - Imports clean (no unused)? |
| 38 | + |
| 39 | +6. **Verdict:** |
| 40 | + |
| 41 | + | Category | Status | Issues | |
| 42 | + |----------|--------|--------| |
| 43 | + | Correctness | PASS/WARN/FAIL | details | |
| 44 | + | Quality | PASS/WARN/FAIL | details | |
| 45 | + | Safety | PASS/WARN/FAIL | details | |
| 46 | + | Architecture | PASS/WARN/FAIL | details | |
| 47 | + | Maintainability | PASS/WARN/FAIL | details | |
| 48 | + |
| 49 | + **Issues found:** (list each as `file:line — description`) |
| 50 | + **Verdict:** SHIP / FIX REQUIRED / NEEDS DISCUSSION |
0 commit comments