|
| 1 | +--- |
| 2 | +name: plan-feature |
| 3 | +description: >- |
| 4 | + Plan and build features as researched, phased, atomic work. Use when the user |
| 5 | + brain-dumps a feature idea, asks to come up with a plan, wants clarifying |
| 6 | + questions / gap analysis / competitive research baked into a plan, or wants |
| 7 | + implementation broken into smallest testable slices on a clean branch with |
| 8 | + See → Work → Deepen phase groups. Invoke for /plan-feature, "plan this", |
| 9 | + "come up with a plan", or starting a new feature from a rough dump. |
| 10 | +icon: map |
| 11 | +color: blue |
| 12 | +--- |
| 13 | + |
| 14 | +# Plan Feature |
| 15 | + |
| 16 | +Turn a rough feature dump into a researched plan, then execute it as a linear |
| 17 | +sequence of tiny, finishable slices. Never scaffold a whole feature up front. |
| 18 | + |
| 19 | +Read `references/phase-model.md` before writing phases. |
| 20 | +Read `references/plan-template.md` when drafting the plan document. |
| 21 | +Read `references/competitive-research.md` when doing competitor / peer research. |
| 22 | + |
| 23 | +## Modes |
| 24 | + |
| 25 | +This skill has two modes. Default to **Plan** until the user explicitly says to |
| 26 | +build / implement / start / go. |
| 27 | + |
| 28 | +| Mode | Trigger | Output | |
| 29 | +| --- | --- | --- | |
| 30 | +| **Plan** | Brain dump, "come up with a plan", `/plan-feature` | Questions + full plan (no code) | |
| 31 | +| **Build** | "Build it", "start", "go", approve a plan | Atomic slices on a clean branch | |
| 32 | + |
| 33 | +Do not mix modes. In Plan mode: no implementation. In Build mode: follow the |
| 34 | +approved plan slice-by-slice; do not re-litigate the plan unless blocked. |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Plan mode |
| 39 | + |
| 40 | +### 1. Ingest the dump |
| 41 | + |
| 42 | +Treat the user's message(s) as raw material, not a finished spec. |
| 43 | + |
| 44 | +- Extract goals, constraints, non-goals, named UI/UX beats, tech hunches, and open worries. |
| 45 | +- Do **not** start coding. |
| 46 | +- Do **not** ask one question at a time mid-ingest. Gather context first. |
| 47 | + |
| 48 | +### 2. Ground in this repo |
| 49 | + |
| 50 | +Before proposing anything: |
| 51 | + |
| 52 | +- Find existing related code, fieldtypes, CP patterns, APIs, config, and tests. |
| 53 | +- Prefer extending established patterns over inventing parallel systems. |
| 54 | +- Note Eloquent / Stache / GraphQL / REST / CP / frontend touchpoints that may matter later (often Deepen-phase work). |
| 55 | + |
| 56 | +### 3. Gap analysis (things they forgot) |
| 57 | + |
| 58 | +Actively hunt for omissions. Typical Statamic/CMS gaps: |
| 59 | + |
| 60 | +- Permissions, roles, and Pro vs free boundaries |
| 61 | +- Multisite, localization, and publish states |
| 62 | +- Revisions, blueprints, and default config |
| 63 | +- Stache vs Eloquent driver parity |
| 64 | +- API / GraphQL exposure |
| 65 | +- Upgrade path, migrations, and backward compatibility |
| 66 | +- Empty states, errors, loading, and keyboard/a11y in CP |
| 67 | +- Docs, changelog, and translation strings |
| 68 | +- Performance, caching, and large-site behavior |
| 69 | +- Addon extension points / events / tags / modifiers |
| 70 | + |
| 71 | +List forgotten items as either **must decide**, **defer to Deepen**, or **out of scope**. |
| 72 | + |
| 73 | +### 4. Competitive / peer research |
| 74 | + |
| 75 | +Do lightweight but real research. Use web search / docs fetch when available. |
| 76 | + |
| 77 | +- Compare how peer products solve the same job (not feature checklists for vanity). |
| 78 | +- Capture: interaction model, naming, defaults, killer detail worth stealing, traps to avoid. |
| 79 | +- Prefer primary docs and recent product UI over random blogs. |
| 80 | +- Fold findings into the plan as **recommendations**, not a separate essay. |
| 81 | + |
| 82 | +See `references/competitive-research.md` for who to check by domain. |
| 83 | + |
| 84 | +### 5. Clarifying questions |
| 85 | + |
| 86 | +After research + gap analysis, ask a **single batched** set of questions. |
| 87 | + |
| 88 | +Rules: |
| 89 | + |
| 90 | +- Only ask what changes the plan or sequencing. |
| 91 | +- Prefer multiple-choice / opinionated defaults when possible ("Default: X — override?"). |
| 92 | +- Separate **blockers** (need answer before planning further) from **nice-to-know**. |
| 93 | +- If the user said "just plan" and leftovers are non-blocking, state assumptions and continue. |
| 94 | + |
| 95 | +Wait for answers on blockers before finalizing the plan (unless they explicitly want a draft plan with assumptions called out). |
| 96 | + |
| 97 | +### 6. Produce the plan |
| 98 | + |
| 99 | +Write the plan using `references/plan-template.md`. |
| 100 | + |
| 101 | +Hard requirements for every plan: |
| 102 | + |
| 103 | +1. **Phase groups** — organize work into groups the human can pause and explore: |
| 104 | + - **See** — visible presence / spike. OK if incomplete or broken. Goal: *I can see it.* |
| 105 | + - **Work** — core path actually works. Goal: *I can use it.* |
| 106 | + - **Deepen** — integrations, parity, polish, edge cases (Eloquent, APIs, a11y, docs, etc.). Goal: *It belongs in the product.* |
| 107 | +2. **Phases inside groups** — as many as needed (2 or 10). Each phase ends in something the user can open, click, run, or otherwise inspect. |
| 108 | +3. **Atomic slices** — every phase is broken into the **smallest** finishable pieces. One concern per slice. No "set up the whole feature" slices. |
| 109 | +4. **Linear dependency** — slices build on prior slices. No parallel mega-scaffolding. |
| 110 | +5. **Per-slice contract** — each slice lists: intent, files/areas touched (best guess), how to verify, and commit message intent. |
| 111 | +6. **Stop points** — explicit "pause for Jack to explore" markers after See phases and after Work phases (and anytime a phase changes what can be demoed). |
| 112 | + |
| 113 | +Anti-patterns (reject these in your own draft): |
| 114 | + |
| 115 | +- "Phase 1: scaffold models, CP Vue, API, and tests" |
| 116 | +- Big-bang branches with everything half-wired |
| 117 | +- Deepen work (Eloquent, GraphQL, …) blocking the first visible spike |
| 118 | +- Vague slices ("improve UX", "handle edge cases") without a verify step |
| 119 | + |
| 120 | +Present the plan. Ask for approval or edits. Do not build yet. |
| 121 | + |
| 122 | +--- |
| 123 | + |
| 124 | +## Build mode |
| 125 | + |
| 126 | +Only after explicit go-ahead on a plan (or a clearly scoped subset). |
| 127 | + |
| 128 | +### 0. Clean branch first |
| 129 | + |
| 130 | +Always start from a fresh branch off the current base (usually `6.x`): |
| 131 | + |
| 132 | +```bash |
| 133 | +git fetch origin |
| 134 | +git checkout <base> |
| 135 | +git pull origin <base> |
| 136 | +git checkout -b <type>/<short-feature-name> |
| 137 | +``` |
| 138 | + |
| 139 | +- Never pile a new feature onto a dirty mixed-purpose branch. |
| 140 | +- If the working tree already has unrelated changes, stop and sort that out before building. |
| 141 | +- One feature effort → one branch (or stacked branches only if the plan says so). |
| 142 | + |
| 143 | +### 1. One slice at a time |
| 144 | + |
| 145 | +For each slice, in order: |
| 146 | + |
| 147 | +1. **Implement only that slice** — nothing speculative for later slices. |
| 148 | +2. **Verify** — run the slice's stated checks (PHPUnit/Vitest/manual CP poke as applicable). |
| 149 | +3. **Describe** — short note of what changed and how to see it (for the user / PR body). |
| 150 | +4. **Commit** — focused commit message matching the slice intent. |
| 151 | +5. **Stop if the plan says to** — especially after See / Work phase boundaries. Tell the user what to open/click/run next. Wait for "continue" unless they pre-approved running through a phase group. |
| 152 | + |
| 153 | +### 2. Progression rules |
| 154 | + |
| 155 | +- Each commit should leave the project **coherent** — not necessarily feature-complete, but not a landmine. Prefer vertical thin slices over horizontal layers. |
| 156 | +- See-phase code may be ugly or partial; still keep it runnable enough to inspect. |
| 157 | +- Work-phase slices must make the happy path actually work before Deepen starts. |
| 158 | +- If a slice reveals the plan is wrong, pause, propose a plan amendment, and get a nod before rewriting the roadmap. |
| 159 | + |
| 160 | +### 3. Testing bar |
| 161 | + |
| 162 | +- Prefer adding/adjusting tests in the same slice that introduces behavior. |
| 163 | +- Don't defer all tests to a final "Phase N: tests" dump. |
| 164 | +- Manual CP verification counts when UI-only; say exactly where to look. |
| 165 | + |
| 166 | +### 4. Done |
| 167 | + |
| 168 | +When the agreed phases are complete (or the user stops at a pause point): |
| 169 | + |
| 170 | +- Summarize what shipped per phase. |
| 171 | +- List what remains (deferred Deepen items). |
| 172 | +- Note how to try it. |
| 173 | + |
| 174 | +--- |
| 175 | + |
| 176 | +## Communication style |
| 177 | + |
| 178 | +- Treat the user as an expert. Be terse and opinionated. |
| 179 | +- Lead with the plan / questions, not process narration. |
| 180 | +- Competitive notes: sharp takeaways only. |
| 181 | +- During Build: say which slice you're on, then do it — no giant status essays. |
0 commit comments