|
| 1 | +--- |
| 2 | +name: feature-planner |
| 3 | +description: >- |
| 4 | + Decompose the product vision into a prioritized backlog of GitHub Issues. |
| 5 | + Reads the product spec, creates issues with acceptance criteria and |
| 6 | + dependency chains, and sets up labels for the autonomous Feature Builder. |
| 7 | + Use when starting a new product, adding a new feature area, or |
| 8 | + re-planning after a scope change. |
| 9 | + Triggers on "plan features", "create backlog", "decompose spec", |
| 10 | + "what should we build", "create issues", "plan the product". |
| 11 | +--- |
| 12 | + |
| 13 | +# Feature Planner |
| 14 | + |
| 15 | +## When to Use |
| 16 | + |
| 17 | +- Starting a new product from a spec |
| 18 | +- Adding a new feature area to an existing product |
| 19 | +- Re-planning after scope changes or user feedback |
| 20 | + |
| 21 | +## Workflow |
| 22 | + |
| 23 | +### Step 1: Read Context |
| 24 | + |
| 25 | +1. Read `AGENTS.md` for tech stack and conventions. |
| 26 | +2. Read `docs/product-spec.md` for the product vision, scope boundaries, and feature priority. |
| 27 | +3. Read `.agents/architecture.md` for the data model and system design. |
| 28 | +4. List existing GitHub Issues: `gh issue list --state all --json number,title,state,labels` |
| 29 | +5. Identify what's already planned, in progress, or done. |
| 30 | + |
| 31 | +### Step 2: Ensure Labels Exist |
| 32 | + |
| 33 | +Create these labels if they don't exist: |
| 34 | + |
| 35 | +```bash |
| 36 | +gh label create "status:backlog" --color 0E8A16 --force |
| 37 | +gh label create "status:in-progress" --color 1D76DB --force |
| 38 | +gh label create "status:in-review" --color FBCA04 --force |
| 39 | +gh label create "status:done" --color 6F42C1 --force |
| 40 | +gh label create "priority:1" --color B60205 --force |
| 41 | +gh label create "priority:2" --color FF9F1C --force |
| 42 | +gh label create "priority:3" --color 0E8A16 --force |
| 43 | +gh label create "feature" --color A2EEEF --force |
| 44 | +gh label create "enhancement" --color A2EEEF --force |
| 45 | +gh label create "chore" --color FEF2C0 --force |
| 46 | +gh label create "bug" --color D73A4A --force |
| 47 | +gh label create "performance" --color F9D0C4 --force |
| 48 | +``` |
| 49 | + |
| 50 | +### Step 3: Decompose into Issues |
| 51 | + |
| 52 | +For each feature, create a GitHub Issue. Each issue must be: |
| 53 | +- **Single-concern**: one independently implementable feature, resulting in one PR |
| 54 | +- **Ordered by dependency**: foundational features first (auth, DB schema, layout) |
| 55 | +- **Sized for one session**: an agent should be able to implement it in a single run |
| 56 | + |
| 57 | +#### Issue Template |
| 58 | + |
| 59 | +```markdown |
| 60 | +## Description |
| 61 | +One paragraph: what this feature does and why a user cares. |
| 62 | + |
| 63 | +## Acceptance Criteria |
| 64 | +- [ ] Criterion 1 (user-visible behavior) |
| 65 | +- [ ] Criterion 2 |
| 66 | +- [ ] Criterion 3 |
| 67 | + |
| 68 | +## Dependencies |
| 69 | +Depends on #N, #M (or "None") |
| 70 | + |
| 71 | +## Technical Notes |
| 72 | +- Implementation hints, relevant files, patterns to follow |
| 73 | +- Reference .agents/conventions.md for component patterns |
| 74 | +- Reference .agents/architecture.md for data model |
| 75 | +``` |
| 76 | + |
| 77 | +#### Labels |
| 78 | + |
| 79 | +Each issue gets exactly 3 labels: |
| 80 | +- **Status**: `status:backlog` |
| 81 | +- **Priority**: `priority:1` (foundation), `priority:2` (core features), `priority:3` (polish/stretch) |
| 82 | +- **Type**: `feature`, `enhancement`, or `chore` |
| 83 | + |
| 84 | +#### Priority Guidelines |
| 85 | + |
| 86 | +| Priority | What belongs here | Examples | |
| 87 | +|---|---|---| |
| 88 | +| `priority:1` | Foundation — nothing else works without this | Auth, workspace CRUD, page CRUD, DB schema, app layout/navigation | |
| 89 | +| `priority:2` | Core features — the product's value | Block editor, slash commands, nested pages, search, realtime | |
| 90 | +| `priority:3` | Polish and stretch goals | Dark mode, responsive design, markdown import/export, member management | |
| 91 | + |
| 92 | +### Step 4: Present the Plan |
| 93 | + |
| 94 | +After creating all issues, present a summary to the user: |
| 95 | + |
| 96 | +```markdown |
| 97 | +## Feature Plan Summary |
| 98 | + |
| 99 | +**Total issues created**: N |
| 100 | +**By priority**: P1: X, P2: Y, P3: Z |
| 101 | + |
| 102 | +### Suggested Implementation Order |
| 103 | +1. #N — Title (P1, no deps) |
| 104 | +2. #M — Title (P1, depends on #N) |
| 105 | +3. ... |
| 106 | + |
| 107 | +### Ambiguities / Questions for Human |
| 108 | +- [Any unclear requirements from the spec] |
| 109 | +- [Any scope decisions that need human input] |
| 110 | +``` |
| 111 | + |
| 112 | +Wait for the user to review, reorder, or adjust before the Feature Builder starts picking up issues. |
| 113 | + |
| 114 | +## Anti-patterns |
| 115 | + |
| 116 | +- Do NOT create issues that bundle multiple unrelated changes |
| 117 | +- Do NOT create issues for infrastructure that already exists (check the codebase) |
| 118 | +- Do NOT create overly granular issues (e.g., "add import statement") — each should be a meaningful feature |
| 119 | +- Do NOT create issues without acceptance criteria — the Feature Builder needs them to know when it's done |
| 120 | +- Do NOT assign priority:1 to non-foundational features — P1 means "blocks other work" |
0 commit comments