# Work Routing

How the engine decides who handles what. Parsed by engine.js — keep the table format exact.

## Routing Table

<!-- FORMAT: | work_type | preferred_agent | fallback | -->
| Work Type | Preferred | Fallback |
|-----------|-----------|----------|
| implement | dallas | ralph |
| implement:large | rebecca | dallas |
| review | ripley | lambert |
| fix | _author_ | _any_ |
| plan | ripley | rebecca |
| plan-to-prd | lambert | rebecca |
| explore | ripley | rebecca |
| test | dallas | ralph |
| ask | ripley | rebecca |
| verify | dallas | ralph |
| decompose | ripley | rebecca |
| meeting | ripley | lambert |
| docs | lambert | _any_ |
| setup | dallas | _any_ |
| qa-validate | dallas | ralph |
| qa-session-setup | dallas | ralph |
| qa-session-draft | dallas | ralph |
| qa-session-execute | dallas | ralph |

Notes:
- `_author_` means route to the PR author
- `_any_` means route to any available idle agent (lowest error rate first)
- `implement:large` is for items with `estimated_complexity: "large"`
- Engine falls back to any idle agent if both preferred and fallback are busy
- Routing selects an owner; it should not narrow the user's task contract. The assigned agent should behave like the user typed the same task directly into a CLI, with Minions adding only safety, status, and review guardrails.
- `fix` review-feedback routing sends work to the PR author for context, but the author must still validate review comments as claims before editing and push back with evidence when the comment is invalid, stale, already addressed, out of scope, or harmful.

## Rules

1. **Eager by default** — spawn all agents who can start work, not one at a time
2. **Self-review is forbidden** — auto review dispatch must always pick an agent other than the PR author. When no non-author reviewer is available, the dispatch waits in `dispatch.pending` with `_pendingReason: 'no_non_author_reviewer'` and is re-evaluated each tick (it promotes to active automatically once a non-author becomes idle). Explicit operator dispatch (e.g. a work item with `agent: <author>`) is honored as an override but is logged as a warning.
3. **Exploration gates implementation** — when exploring, finish before implementing
4. **Implementation informs PRD** — Lambert reads build summaries before writing PRD
5. **All rules in `notes.md` apply** — engine injects them into every playbook
