Create pi-orchestrate.sh prototype

t-285·WorkTask·
·
·
·Omni/Ide.hs
Created1 month ago·Updated1 month ago

Description

Edit

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

Timeline (3)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

CHANGES REQUESTED: ## Review Summary

The script pi-orchestrate.sh has been created but is untracked (not staged/added to git). This is why the diff appears empty.

Requirements Check:

| Requirement | Status | |------------|--------| | pi-orchestrate t-123 usage | ✅ Works | | --max=N option | ✅ 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) | ✅ Uses status function | | Show iteration count | ✅ Shows "Iteration X/Y" | | --dry-run option | ✅ Passed to pi-review | | -h/--help option | ✅ Implemented |

Code Quality:

  • Clean bash structure with proper option parsing
  • Good use of colored output helpers
  • Proper error handling with set -e
  • Dependencies (pi-code.sh, pi-review.sh) exist

Issue:

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.

🔄[human]InProgress → Done1 month ago