| name | goap-orchestrator |
| description | GOAP-based orchestrator for managing GitHub issues, creating action plans, and executing workspace operations with branch/PR workflow. |
GOAP Orchestrator
Orchestrate complex multi-issue tasks using GOAP planning with GitHub integration and parallel swarm agents.
Workflow
- Scan Issues: Read all open GitHub issues via
gh issue list
- Build Dependency Graph: Analyze issue relationships and prerequisites
- Create GOAP Plan: Generate ordered action list with preconditions/effects
- Execute Actions: Implement changes in dependency order using swarm agents
- Branch & PR: Create feature branches, atomic commits, PRs
- Verify CI: Ensure all GitHub Actions pass before merging
Commands
./scripts/goap-orchestrator.sh scan
./scripts/goap-orchestrator.sh plan
./scripts/goap-orchestrator.sh status
./scripts/goap-orchestrator.sh wave <N>
./scripts/goap-orchestrator.sh execute [action]
./scripts/goap-orchestrator.sh verify
./scripts/goap-orchestrator.sh complete [action]
Wave-Based Execution
Work is organized into waves — groups of independent actions that can execute in parallel via swarm agents.
Wave Lifecycle
Wave N: [action-a, action-b, action-c] ← parallel via swarm
├─ agent-1 → feat/action-a → PR #X
├─ agent-2 → feat/action-b → PR #Y
└─ agent-3 → feat/action-c → PR #Z
→ Merge order: independent first, then dependency-aware
Swarm Dispatch Pattern
For each wave, dispatch agents using the actor tool:
- Explore agents (read-only): audit codebase, find patterns, identify affected files
- General agents (read-write): implement changes, create branches, commit
# Phase 1: Parallel exploration
explore-1 → audit action-a affected files
explore-2 → audit action-b affected files
# Phase 2: Parallel implementation
general-1 → implement action-a on feat/action-a
general-2 → implement action-b on feat/action-b
# Phase 3: Sequential merge
merge action-a PR → rebase action-b → merge action-b PR
Merge Order Rules
- Merge independent green PRs first
- Never use
gh pr merge --auto on stacked PRs (rebase cancellation loop)
- Rebase remaining PRs after each merge
- Foundation PRs (config, lints) before dependent PRs
State Management
| File | Purpose |
|---|
plans/GOAP_STATE.md | Canonical world state (YAML) |
plans/ACTIONS.md | Action queue with preconditions/effects |
plans/GOAP_ORCHESTRATOR.md | Per-session orchestrator state |
progress/LEARNINGS.md | Cross-session learnings |
progress/PROGRESS.md | Chronological progress notes |
After each action completes:
- Mark action
status: complete in ACTIONS.md
- Update
action_last_completed in GOAP_STATE.md (exactly once)
- Add learnings to
progress/LEARNINGS.md if new patterns discovered
PR Triage
Before merging, run ./scripts/pr-triage.sh to check:
- Merge conflict status (fix CONFLICTING first)
- CI pass/fail/pending counts
- Recommended merge order
References
references/dependency-graph.md — Issue dependency analysis
references/action-templates.md — Reusable action patterns
references/wave-execution.md — Multi-agent wave execution template