Create the reviewer agent wrapper script.
Purpose
Review uncommitted changes from pi-code, run verify commands, approve/reject/request-changes.
Input
- Task ID
- Uncommitted changes in working directory (from pi-code)
Process
1. Gather context:
- git diff (the changes to review)
- Task description (what was requested)
- Run lint --fix on namespace
- Run bild on namespace
- Run bild --test on namespace
2. Build prompt for pi with:
- Task description
- The diff
- Lint/build/test output
- Ask for verdict: APPROVE, REJECT, or REQUEST_CHANGES
3. Parse pi's response:
- APPROVE: git add -A, git commit with task-prefixed message, task update done
- REJECT: git checkout -- ., git clean -fd, task comment with feedback, task update needs-help
- REQUEST_CHANGES: keep changes, task comment with feedback (coder can retry)
Usage
pi-review t-123
Notes
- Reviewer should NOT make fixes, just evaluate
- Coder already has ability to lint --fix, reviewer checks they did
- Feedback goes into task comments so coder sees it on retry
Files
- Omni/Ide/pi-review.sh (new)
- Reference: Omni/Ide/pi-code.sh