1---2name: coordinator3description: Launch the coordinator — a pure-delegation control plane that plans, delegates, reviews, and learns. Use when asked to 'coordinate', 'plan and delegate', 'run the coordinator', 'use the state machine', 'start a structured session', or 'plan this work'.4---56# Coordinator78Launch a structured orchestration session using a 10-phase state machine. The coordinator delegates ALL work to specialized subagents — it never reads or writes files directly.910## Usage1112```13/coordinator [task description]14```1516If invoked with no arguments, the coordinator enters the `intake` phase and asks what you want to work on.1718## Agent Team1920| Agent | Model | Tools | Purpose |21|-------|-------|-------|---------|22| **briefer** | Haiku | Read, Glob, Grep | Reads context files, returns structured briefings |23| **planner** | Sonnet | Read, Glob, Grep, Agent | Produces task breakdowns with behavioral test specs |24| **worker** | Sonnet | Full toolset | Strict TDD implementation (feature/bugfix). Red → green → regression commits. |25| **worker-refactor** | Sonnet | Full toolset | Behavior-preserving refactors. Existing tests must pass before and after. |26| **worker-test** | Sonnet | Full toolset | Adds tests to existing untested code. Mutation-checks its own tests. |27| **worker-investigation** | Sonnet | Read, Bash, Glob, Grep | Read-only research. Returns structured findings. |28| **reviewer** | Opus | Read, Bash, Glob, Grep | Code review with severity ratings. |29| **ui-tester** | Sonnet | Read, Bash, Glob, Grep | Visual quality inspector via browser automation. |30| **ux-tester** | Opus | Read, Bash, Glob, Grep | Usability evaluator via browser automation. |31| **system-tester** | Sonnet | Read, Bash, Glob, Grep | Full test suites, regression coverage, integration. |32| **intent-validator** | Opus | Read, Glob, Grep | Validates work matches user's original intent. Foreground. |33| **learning-extractor** | Opus | Read, Glob, Grep, Bash | Surfaces learnings from task artifacts and transcripts. |34| **scribe** | Haiku | Read, Write | Writes all state files. |35| **issue-implementer** | Opus | Agent | Autonomous groomed-backlog → tested-PR loop. Claims status:ready issues, implements each via TDD workers in dedicated worktrees, opens a PR, then loops to the next ready issue. Started via `--agent issue-implementer`; runs unattended after invocation. See [docs/issue-implementer-runbook.md](docs/issue-implementer-runbook.md) for preconditions, label setup, stop conditions, and first-run guidance. |36| **issue-groomer** | Opus | Agent | Autonomous backlog groomer. Claims open status-less issues, researches each deeply (codebase + product docs + external APIs), fills the target repo's issue template exhaustively with behavior contracts, assumptions, and alternatives, then applies status:ready (clear implementation path) or status:blocked (exhaustively groomed, genuine product/path decision needed). Loops; in WATCH mode re-checks every poll_interval for new issues. Started via `--agent issue-groomer`; runs unattended after invocation. See [docs/issue-groomer-runbook.md](docs/issue-groomer-runbook.md) for preconditions, label setup, stop conditions, and first-run guidance. |37| **researcher** | Sonnet | Read, Bash, Glob, Grep, WebFetch, WebSearch, Write | Deep external research on libraries, frameworks, SDKs, APIs, CLI tools, or cloud services. Reads official docs, source code, examples, runtime probes. Returns structured findings — capability map, mental model, failure modes, expectation gaps. No code commits. |38| **distiller** | Opus | Read, Glob, Grep, Write | Compresses raw evidence (research notes, command/error logs, debug transcripts, code samples) into citable knowledge artifacts: gotchas, patterns, anti-patterns, playbooks, before-you-build guides, decision records. Every claim must cite evidence. Returns a distillation manifest. |39| **knowledge-packager** | Sonnet | Read, Glob, Grep, Write | Assembles distilled knowledge into a navigable, self-contained artifact (skill pack, runbook, onboarding guide, internal wiki). Writes a cross-linked directory with index, quickstart, lessons, labs, recipes, checklists, troubleshooting, and agent instructions. Returns a navigability-verified manifest. |40| **evidence-auditor** | Opus | Read, Bash, Glob, Grep | Read-only auditor of claim-vs-evidence integrity. Verifies documented claims have supporting evidence; evaluates named quality gates (research-quality, distillation-quality, skill-pack-quality). Returns per-gate verdicts and unverified-claim findings with severity ratings. No file modifications. |4142## State Machine4344```45startup → intake → plan → delegate → integrate → review → test → promote-learnings → validate → close46```4748### Hard Gates (require user approval)4950- **intake → plan**: User must confirm the intent document.51- **plan → delegate**: User must approve the plan before work begins.5253## Worker Selection5455| Task type | Agent | TDD enforced? |56|-----------|-------|---------------|57| `feature` | worker | Yes — red/green/regression commits |58| `bugfix` | worker | Yes — red commit reproduces bug |59| `refactor` | worker-refactor | No — existing tests must pass before & after |60| `test` | worker-test | No — tests must be meaningful (mutation-checked) |61| `investigation` | worker-investigation | N/A (no code written) |6263## Task Contract6465Every delegated task includes:6667```json68{69 "title": "Clear task name",70 "type": "feature | bugfix | refactor | test | investigation",71 "scope": "Precise description",72 "allowed_files": ["list of files/directories"],73 "forbidden_files": ["files NOT to touch"],74 "dependencies": ["task IDs"],75 "behavioral_tests": ["When [condition], then [result]"],76 "regression_test_requirements": "What regression tests must exist"77}78```7980## State Layers8182### `.coord/` — Machine State (ephemeral, gitignored)8384| File | Purpose |85|------|---------|86| `task-ledger.json` | All tasks and statuses |87| `learning-inbox.jsonl` | Candidate learnings |88| `context-packet.md` | Session continuity |89| `tasks/TASK-XXX.json` | Per-task artifacts |90| `reviews/REVIEW-XXX.json` | Review artifacts |9192### `docs/` — Durable Human-Readable Memory9394| File | Purpose |95|------|---------|96| `docs/context/command-intent.md` | Captured user intent |97| `docs/context/repo-practices.md` | Conventions and patterns |98| `docs/context/known-issues.md` | Known problems |99| `docs/plans/active-plan.md` | Current plan |100101## Instructions102103When this skill is invoked, load and follow the full coordinator agent definition at `agents/coordinator.md` in this skill's directory. The agent definitions for all subagents are in `agents/`. Output schemas are in `schemas/`.104105## References106107| Reference | Purpose |108|-----------|---------|109| [agents/coordinator.md](agents/coordinator.md) | Full coordinator system prompt |110| [agents/](agents/) | All agent definitions |111| [schemas/](schemas/) | JSON Schema contracts for agent outputs |112| [coordinator-settings.json](coordinator-settings.json) | Permission deny list |113| [templates/.worktreeinclude](templates/.worktreeinclude) | Files to copy into worktrees |