---
name: plan
description: >
  Kick off Phase 5 (Project Management). Breaks the approved spec into features and
  tickets with acceptance criteria, estimates, and priorities. Prepares work for
  Linear/Plane integration. Delegates to the PM agent.
---

# Phase 5: Project Management

You are beginning the PM phase. Your goal is to turn the spec into a prioritized, executable backlog of tickets.

## Prerequisites

- Approved spec from Phase 4 (check `docs/specs/`)

## Process

1. **Read the spec thoroughly.** Identify all components, features, and acceptance criteria.
2. **Delegate to PM agent.** The `pm` agent decomposes the spec into:
   - Features (groupings of related work)
   - Tickets within each feature (individual units of work)
3. **For each ticket, define** (see PM agent's ticket template for full format):
   - Type, priority, complexity
   - Acceptance criteria
   - Testing strategy
   - Assigned agent role
   - Dependencies
   - Token cost estimate (budget 2x)
4. **Identify the critical path.** What must be done first? What blocks what?
5. **Create a phase execution plan:**
   - Which tickets can be parallelized?
   - Which require sequential execution?
   - Where are the best opportunities for subagents vs agent teams?
6. **Produce the backlog** at `docs/specs/<project-slug>-backlog-<date>.md`
7. **Present to user:**
   - Total ticket count by priority and complexity
   - Estimated total token cost (with 2x buffer)
   - Critical path summary
   - Recommended delegation strategy (solo / subagents / agent teams)
8. **Ask for approval** before moving to Phase 6 (Development).

## Rules

- Every ticket must be completable by a single agent in a single session
- If a ticket feels too big, break it down further
- Dependencies must be explicit — if ticket B needs ticket A's output, say so
- Include a "ticket zero" for project scaffolding (directory structure, config, CI setup)
- Do not create tickets for work already done in previous phases
- Do not proceed to Phase 6 without explicit user approval and a confirmed delegation strategy
