Create a bash prototype for the orchestrator that runs the coder/reviewer loop.
Usage
pi-orchestrate t-123 # Run coder+reviewer loop
pi-orchestrate t-123 --max=3 # Max 3 iterations
Behavior
1. Run pi-code on the task
2. Run pi-review on the task
3. Check task status:
- Done: exit success, print summary
- NeedsHelp: exit failure, print feedback
- Still open (REQUEST_CHANGES): loop back to step 1
4. Respect max iterations (default 3)
5. Print progress at each step
Output
- Show which phase is running (coder/reviewer)
- Show iteration count
- On completion: show final status and commit hash
- On failure: show feedback from reviewer
Options
- --max=N: maximum iterations (default 3)
- --dry-run: pass through to pi-review
- -h/--help: usage info
Notes
- Keep it simple - just orchestrates the existing scripts
- This is a prototype for testing before Haskell implementation
- Captures what Ava will need to do
CHANGES REQUESTED: ## Review Summary
The script
pi-orchestrate.shhas been created but is untracked (not staged/added to git). This is why the diff appears empty.Requirements Check:
| Requirement | Status | |------------|--------| |
pi-orchestrate t-123usage | ✅ Works | |--max=Noption | ✅ Implemented | | Run pi-code on task | ✅ Step 1 in loop | | Run pi-review on task | ✅ Step 2 in loop | | Check task status (Done → exit success) | ✅ Shows summary & commit hash | | Check task status (NeedsHelp → exit failure) | ✅ Shows feedback | | Check task status (open → loop) | ✅ Continues to next iteration | | Default max 3 iterations | ✅MAX_ITERATIONS=3| | Show phase (coder/reviewer) | ✅ Usesstatusfunction | | Show iteration count | ✅ Shows "Iteration X/Y" | |--dry-runoption | ✅ Passed to pi-review | |-h/--helpoption | ✅ Implemented |Code Quality:
set -eIssue:
The file is untracked - it needs to be
git added for the changes to appear in the diff and be committed.The code itself looks good and meets all requirements, but the workflow is incomplete because the file hasn't been added to version control.