Orchestrator PR Workflow Skill
Overview
Orchestrator workflow for delegating PR reviews to subagents, verifying completion, and reporting to user.
Prerequisites
- GitHub CLI (
gh) authenticated - Python 3.8+ and AI Maestro configured
- Subagent spawning capability
Instructions
- Poll -- Run
amia_orchestrator_pr_poll.pyto get open PRs - Classify -- Human PR = escalate; AI/bot PR = delegate directly
- Delegate -- Spawn subagent for review/changes (never do work yourself)
- Monitor -- Poll progress via background tasks (never block)
- Verify -- Run
amia_verify_pr_completion.pybefore reporting
Checklist
Copy this checklist and track your progress:
- Poll PRs using
amia_orchestrator_pr_poll.py - Classify author type and work needed
- Delegate to subagent
- Monitor and verify using
amia_verify_pr_completion.py - Surface status up the chain, await the MANAGER's merge decision
- Handle failures by delegating fixes
Critical Rules
- Never block, write code, or merge without MANAGER approval (via the chain)
- Always verify before reporting status
- Escalate human PRs up the chain (to the MANAGER / MAESTRO)
Output
| Output Type | Format | Description |
|---|---|---|
| Subagent Delegation | Task spawn | Spawned subagent with PR review/fix instructions |
| Status Report | Text/JSON | Current PR status and action recommendations |
| Verification Result | JSON | Pass/fail status for all completion criteria |
| User Notification | Text | Human-readable summary of PR readiness |
Output discipline: All scripts support
--output-file <path>. Use it to minimize token consumption.
Error Handling
Script failures return non-zero exit codes. See the detailed guide in Resources for details.
Examples
python scripts/amia_orchestrator_pr_poll.py --repo owner/repo
python scripts/amia_verify_pr_completion.py --repo owner/repo --pr 123
# Output: {"complete": true, "recommendation": "ready_to_merge"}
Resources
Full index in detailed-guide:
- Decision Tree
- Scripts Reference
- amia_orchestrator_pr_poll.py
- amia_verify_pr_completion.py
- Section Index
- Orchestrator Responsibilities
- Delegation Rules
- Verification Workflow
- Worktree Coordination
- Human vs AI PR Assignment
- Completion Criteria
- Polling Schedule
- Merge Failure Recovery
- Error Handling
- Subagent not returning results
- PR status appears stale
- Completion verification fails intermittently
- Multiple subagents conflicting
- User not receiving status updates
- Extended Examples
- Example 1: Standard PR Review Coordination
- Example 2: Verify PR is Ready to Merge
- Full Reference Documents Index