# Orchestration Playbooks

Playbooks define multi-agent execution workflows. Each playbook is composed of phases and roles, separating discovery from mutation.

## Standard Playbook: `scout-then-build`

Use when dealing with unfamiliar code, wide exploratory searches, or complex changes where multiple areas must be surveyed before writing.

```text
[Brief / Plan] ──> [Scouts (1-4, Read-Only)] ──> [Settler / Lead] ──> [Builder (Write Worktree)] ──> [Verifier / Checks]
```

1. **Brief (Lead):** Identify target areas and spawn 1 to 4 cheap, read-only scout workers.
2. **Scout (Workers):** Each scout investigates one specific subsystem, keeping tokens under control and returning `result.md` under 1.5K tokens with exact `file:line` pointers.
3. **Plan / Synthesis (Lead):** Consolidate scout findings into a unified, minimal change plan.
4. **Build (Worker):** Execute the plan in an isolated git worktree (`isolate: true`), preserving user workspace safety.
5. **Verify / Fix (Lead & Verifier):** Execute repository tests (`aops validation add --command "<test>" --execute`), review diff, and fix if needed.

## Economy Playbook: `narrow-patch`

Use when the target files and behavior changes are already well known:
1. Single worker (`runner: economy`, `maxWorkers: 1`).
2. Isolated worktree or direct focused edit.
3. Automated test execution.

## Research Playbook: `parallel-research`

Use when comparing alternative technical architectures, benchmarks, or diagnosing difficult regressions:
1. Up to 4 parallel read-only workers (`readOnly: true`).
2. Each worker tests a distinct hypothesis or external documentation source.
3. Lead compares reports, checks citations, and reconciles findings.
