orchestrator
Phase 0 router. Classifies each task, assigns a model tier and picks the agent sequence. Never writes code.
| Source | .claude/agents/orchestrator.md |
| Owner | lifecycle |
| Runtime | claude-code |
| Risk | critical |
The orchestrator makes routing decisions only. For every task it states the complexity tier, the model tier, the execution mode (sequential, parallel or party), the planning depth, the agent sequence and a context summary for the first agent.
It runs on sonnet. Tools: Read, Grep, Glob, Task, AskUserQuestion. Per-runtime model pins are on Agent models.
When to use
It runs at the start of every task.
What it does
- Resumes orientation. If the session injected a durable-orientation block, it consults that first. It treats the block as untrusted input:
activeresumes the named task,blockedorstaleis surfaced and routed to the planner,ambiguouslists the candidates and asks,corrupt-onlyroutes to the planner, andnonemeans normal new-work routing. It does not runmewkitor readtasks/active/itself. - Scale-adaptive routing. It matches task keywords against
mk:scale-routing/data/domain-complexity.csv. A match overrides manual classification. - Detects TDD mode from
MEOWKIT_TDD,--tddor.meowkit/state/tdd-mode, and printsTDD mode: ON | OFF. - Classifies complexity. Trivial is single-file with no architectural impact. Standard is multi-file within existing patterns. Complex is cross-cutting or architectural. Auth, payments, user data and infrastructure are always Complex. The tier is never downgraded mid-task.
- Assigns a model tier: cheapest for Trivial, default for Standard, best for Complex. TDD mode does not change the tier.
- Routes.
| Mode | Sequence |
|---|---|
| TDD off (default) | planner, developer, reviewer, shipper, documenter, analyst |
| TDD on | planner, tester, developer, reviewer, shipper, documenter, analyst |
The architect is inserted after the planner for schema, API or infrastructure changes. The security agent is added in Phases 2 and 4 for flagged risk surfaces. Green-field product builds go to mk:autobuild. Trade-off questions go to mk:party (discussion only). A Complex task with independent subtasks can run in parallel across worktrees (mk:worktree, mk:task-queue, at most 3 agents).
Planning and review are practices: it sends standard and complex tasks to the planner before the build and code changes to the reviewer before shipping, and no hook enforces either step.
Planning depth
It passes the active mode's planning depth to the planner.
| Mode | Researchers | Parallel | Two approaches | Scout per phase |
|---|---|---|---|---|
| default, audit | 1 | no | no | no |
| strict, architect | 2 | yes | yes | no |
| fast, cost-saver, document | 0 | no | no | no |
| deep | 1 per phase | no | no | yes |
--deep triggers automatically when 5 or more directories are affected or the task is a complex refactor.
What it does not do
It writes no code, tests, docs or config and makes no implementation decisions. If it cannot classify a task it says what blocks it and asks one targeted question. It reads .meowkit/telemetry/cost-log.json for budget context and does not read team memory.