specdacular 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,48 @@
1
1
  # Specdacular
2
2
 
3
- **AI-optimized codebase documentation and feature planning for Claude.**
3
+ **AI-optimized feature planning and codebase documentation for [Claude Code](https://docs.anthropic.com/en/docs/claude-code).**
4
4
 
5
- A Claude Code extension that helps you understand codebases and plan features specific enough that an agent can implement without asking questions.
5
+ Plan features specific enough that an agent can implement without asking questions.
6
6
 
7
7
  ```bash
8
8
  npx specdacular
9
9
  ```
10
10
 
11
+ > [!CAUTION]
12
+ > **Early Discovery Phase.** This project is actively evolving as we explore workflow patterns for AI-assisted feature planning. Commands, file formats, and conventions change frequently between versions. We aim to provide backwards-compatible migrations, but breaking changes may occur. Pin to a specific version if stability matters to you.
13
+
14
+ > [!WARNING]
15
+ > **Open Source Software.** This is maintained by a small team in their free time. It installs slash commands and workflow files into your `.claude/` directory. Always use version control. Review what gets installed. Back up your work. The software is provided "as is" without warranty of any kind. By using this tool, you accept full responsibility for any changes it makes to your project.
16
+
17
+ ---
18
+
19
+ ## Table of Contents
20
+
21
+ - [What It Does](#what-it-does)
22
+ - [Requirements](#requirements)
23
+ - [Installation](#installation)
24
+ - [Quick Start](#quick-start)
25
+ - [Commands](#commands)
26
+ - [Feature Commands](#feature-commands-feature)
27
+ - [Phase Commands](#phase-commands-phase)
28
+ - [Codebase Documentation](#codebase-documentation)
29
+ - [Utilities](#utilities)
30
+ - [The Flow in Detail](#the-flow-in-detail)
31
+ - [Feature-Level Commands](#feature-level-commands)
32
+ - [Phase-Level Commands](#phase-level-commands)
33
+ - [How It Works](#how-it-works)
34
+ - [Parallel Agents](#parallel-agents)
35
+ - [Feature Flow](#feature-flow)
36
+ - [Project Structure](#project-structure)
37
+ - [Philosophy](#philosophy)
38
+ - [Migration Guides](#migration-guides)
39
+ - [From v0.5](#migrating-from-v05)
40
+ - [From v0.4](#migrating-from-v04)
41
+ - [Updating](#updating)
42
+ - [Uninstalling](#uninstalling)
43
+ - [Contributing](#contributing)
44
+ - [License](#license)
45
+
11
46
  ---
12
47
 
13
48
  ## What It Does
@@ -25,15 +60,23 @@ Spawns 4 parallel agents to analyze your codebase and generate AI-optimized docu
25
60
 
26
61
  ### 2. Plan Features
27
62
 
28
- A structured flow for planning features with enough detail for agent implementation:
63
+ Two commands drive the entire feature lifecycle:
29
64
 
30
65
  ```
31
- feature:new -> feature:discuss -> feature:research -> feature:plan (roadmap) ->
32
- [for each phase]
33
- phase:prepare? -> phase:plan -> phase:execute -> phase:review?
34
- phase:insert? -> phase:renumber? <- mid-flight adjustments
66
+ /specd:feature:new my-feature # Initialize + first discussion
67
+ /specd:feature:next my-feature # Everything else — discussion, research, planning, execution, review
35
68
  ```
36
69
 
70
+ `feature:next` reads your feature's current state and offers the natural next step. You never need to remember which command comes next.
71
+
72
+ ---
73
+
74
+ ## Requirements
75
+
76
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI installed and working
77
+ - Node.js >= 16.7.0
78
+ - Git (recommended — Specdacular commits progress automatically)
79
+
37
80
  ---
38
81
 
39
82
  ## Installation
@@ -55,52 +98,6 @@ In Claude Code:
55
98
 
56
99
  ---
57
100
 
58
- ## Commands
59
-
60
- Commands are organized into **feature** and **phase** namespaces.
61
-
62
- ### Codebase Documentation
63
-
64
- | Command | Description |
65
- |---------|-------------|
66
- | `/specd:map-codebase` | Analyze codebase with parallel agents |
67
-
68
- ### Feature Commands (`feature:`)
69
-
70
- Work with a feature as a whole — discuss, research, and create a roadmap.
71
-
72
- | Command | Description |
73
- |---------|-------------|
74
- | `/specd:feature:new [name]` | Initialize a feature, start first discussion |
75
- | `/specd:feature:discuss [name]` | Continue/deepen discussion (call many times) |
76
- | `/specd:feature:research [name]` | Research implementation with parallel agents |
77
- | `/specd:feature:plan [name]` | Create roadmap with phase overview |
78
-
79
- ### Phase Commands (`phase:`)
80
-
81
- Work with individual phases — prepare, plan, and execute one at a time.
82
-
83
- | Command | Description |
84
- |---------|-------------|
85
- | `/specd:phase:prepare [feature] [phase]` | Discuss gray areas + optionally research patterns |
86
- | `/specd:phase:research [feature] [phase]` | Research patterns for a phase (standalone) |
87
- | `/specd:phase:plan [feature] [phase]` | Create detailed PLAN.md files for one phase |
88
- | `/specd:phase:execute [feature]` | Execute plans with progress tracking |
89
- | `/specd:phase:review [feature] [phase]` | Review executed plans against actual code |
90
- | `/specd:phase:insert [feature] [after] [desc]` | Insert a new phase after an existing one |
91
- | `/specd:phase:renumber [feature]` | Renumber phases to clean integer sequence |
92
-
93
- ### Utilities
94
-
95
- | Command | Description |
96
- |---------|-------------|
97
- | `/specd:status [--all]` | Show feature status dashboard |
98
- | `/specd:blueprint [name] [sub]` | Generate visual blueprint (wireframes, diagrams) |
99
- | `/specd:help` | Show available commands |
100
- | `/specd:update` | Update to latest version |
101
-
102
- ---
103
-
104
101
  ## Quick Start
105
102
 
106
103
  ### Map a Codebase
@@ -113,41 +110,39 @@ Creates `.specd/codebase/` with 4 AI-optimized documents. This gives Claude cont
113
110
 
114
111
  ### Plan a Feature
115
112
 
116
- **Step 1: Initialize and discuss**
113
+ **Step 1: Initialize**
117
114
 
118
115
  ```
119
116
  /specd:feature:new user-dashboard
120
117
  ```
121
118
 
122
- Creates `.specd/features/user-dashboard/` and starts the first discussion. Claude asks what you're building, follows the thread, and captures technical requirements.
119
+ Creates `.specd/features/user-dashboard/` and starts the first discussion. Claude asks what you're building, follows the thread, and captures technical requirements. When done, offers to continue discussing or stop.
123
120
 
124
- **Step 2: Refine understanding**
121
+ **Step 2: Drive the lifecycle**
125
122
 
126
123
  ```
127
- /specd:feature:discuss user-dashboard # Clarify gray areas (call many times)
128
- /specd:feature:research user-dashboard # Research implementation approaches
124
+ /specd:feature:next user-dashboard
129
125
  ```
130
126
 
131
- Discussion and research are iterative call them as many times as you need. Context accumulates across sessions.
132
-
133
- **Step 3: Create a roadmap**
127
+ That's it. `feature:next` reads the current state and guides you through each stage:
134
128
 
135
- ```
136
- /specd:feature:plan user-dashboard
137
- ```
129
+ 1. **Discussion** — Probes gray areas until clear
130
+ 2. **Research** — Spawns parallel agents for patterns/pitfalls
131
+ 3. **Planning** — Creates roadmap with phases
132
+ 4. **Phase preparation** — Discusses phase-specific gray areas
133
+ 5. **Phase planning** — Creates detailed PLAN.md files
134
+ 6. **Phase execution** — Implements with progress tracking
135
+ 7. **Phase review** — Compares plans against actual code
138
136
 
139
- Creates `ROADMAP.md` with phases derived from dependency analysis (types -> API -> UI), plus empty phase directories. No detailed plans yet — those come next, per phase.
137
+ After each step, you can continue or stop. Resume anytime with `/specd:feature:next`.
140
138
 
141
- **Step 4: Prepare, plan, and execute each phase**
139
+ **No argument? It picks for you:**
142
140
 
143
141
  ```
144
- /specd:phase:prepare user-dashboard 1 # Discuss phase gray areas + optional research
145
- /specd:phase:plan user-dashboard 1 # Create detailed PLAN.md files
146
- /specd:phase:execute user-dashboard # Execute with progress tracking
147
- /specd:phase:review user-dashboard 1 # Review phase against actual code
142
+ /specd:feature:next
148
143
  ```
149
144
 
150
- Repeat for each phase. Plans are created just-in-time so they stay fresh.
145
+ Scans for in-progress features and shows a picker.
151
146
 
152
147
  **Mid-flight adjustments:**
153
148
 
@@ -158,27 +153,66 @@ Repeat for each phase. Plans are created just-in-time so they stay fresh.
158
153
 
159
154
  ---
160
155
 
156
+ ## Commands
157
+
158
+ Commands are organized into **feature** and **phase** namespaces.
159
+
160
+ ### Feature Commands (`feature:`)
161
+
162
+ Work with a feature as a whole — discuss, research, and create a roadmap.
163
+
164
+ | Command | Description |
165
+ |---------|-------------|
166
+ | `/specd:feature:new [name]` | Initialize a feature, start first discussion |
167
+ | `/specd:feature:next [name]` | **Drive the entire lifecycle** — picks up where you left off |
168
+
169
+ ### Phase Commands (`phase:`)
170
+
171
+ Work with individual phases — prepare, plan, and execute one at a time.
172
+
173
+ | Command | Description |
174
+ |---------|-------------|
175
+ | `/specd:phase:prepare [feature] [phase]` | Discuss gray areas + optionally research patterns |
176
+ | `/specd:phase:research [feature] [phase]` | Research patterns for a phase (standalone) |
177
+ | `/specd:phase:plan [feature] [phase]` | Create detailed PLAN.md files for one phase |
178
+ | `/specd:phase:execute [feature]` | Execute plans with progress tracking |
179
+ | `/specd:phase:review [feature] [phase]` | Review executed plans against actual code |
180
+ | `/specd:phase:insert [feature] [after] [desc]` | Insert a new phase after an existing one |
181
+ | `/specd:phase:renumber [feature]` | Renumber phases to clean integer sequence |
182
+
183
+ ### Codebase Documentation
184
+
185
+ | Command | Description |
186
+ |---------|-------------|
187
+ | `/specd:map-codebase` | Analyze codebase with parallel agents |
188
+
189
+ ### Utilities
190
+
191
+ | Command | Description |
192
+ |---------|-------------|
193
+ | `/specd:status [--all]` | Show feature status dashboard |
194
+ | `/specd:blueprint [name] [sub]` | Generate visual blueprint (wireframes, diagrams) |
195
+ | `/specd:help` | Show available commands |
196
+ | `/specd:update` | Update to latest version |
197
+
198
+ ---
199
+
161
200
  ## The Flow in Detail
162
201
 
163
202
  ### Feature-Level Commands
164
203
 
165
- **`feature:new`** creates the feature folder and starts the first discussion. Output:
204
+ **`feature:new`** creates the feature folder and starts the first discussion. After initialization, offers to continue discussing or come back later with `feature:next`. Output:
166
205
  - `FEATURE.md` — Technical requirements from the conversation
167
206
  - `CONTEXT.md` — Discussion context (accumulates over time)
168
207
  - `DECISIONS.md` — Decisions with dates, rationale, and implications
169
208
  - `STATE.md` — Progress tracking
170
209
  - `config.json` — Feature configuration
171
210
 
172
- **`feature:discuss`** continues the conversation. Can be called many times each session adds to `CONTEXT.md` and `DECISIONS.md`. Claude identifies gray areas based on what's been discussed so far and probes until clear.
173
-
174
- **`feature:research`** spawns 3 parallel agents to investigate:
175
- 1. **Codebase integration** — How does this fit with existing code?
176
- 2. **External patterns** — What libraries/approaches are standard?
177
- 3. **Pitfalls** — What commonly goes wrong?
211
+ **`feature:next`** is the smart state machine. It reads `config.json` and `STATE.md` to determine where the feature is, shows a status summary, and offers the natural next step. After each action it loops back you keep going until you choose to stop. Under the hood it delegates to these stages:
178
212
 
179
- Output: `RESEARCH.md` with prescriptive guidance.
180
-
181
- **`feature:plan`** creates a roadmap with phases. Each phase has a goal, deliverables, and dependencies. Creates `ROADMAP.md` and empty `plans/phase-{NN}/` directories. Does **not** create detailed PLAN.md files — that happens per-phase with `phase:plan`.
213
+ - **Discussion** — Probes gray areas, records decisions. Context accumulates across sessions.
214
+ - **Research** — Spawns 3 parallel agents: codebase integration, external patterns, and pitfalls. Output: `RESEARCH.md`.
215
+ - **Planning** Creates `ROADMAP.md` with phases derived from dependency analysis, plus empty `plans/phase-{NN}/` directories.
182
216
 
183
217
  ### Phase-Level Commands
184
218
 
@@ -190,8 +224,6 @@ Output: `RESEARCH.md` with prescriptive guidance.
190
224
  5. **Offers research** — "Would you like to research implementation patterns?"
191
225
  6. If yes, spawns 3 parallel research agents focused on the phase
192
226
 
193
- This replaces the old two-step of discuss-phase then research-phase.
194
-
195
227
  **`phase:research`** is the standalone research command. Use it when you want to research a phase without discussing first. Same research agents as `phase:prepare`, just without the discussion step.
196
228
 
197
229
  **`phase:plan`** creates detailed PLAN.md files for one phase. Each plan is a self-contained prompt for an implementing agent with:
@@ -211,7 +243,7 @@ Plans are created just-in-time — right before execution — so they incorporat
211
243
 
212
244
  **`phase:review`** reviews executed plans against actual code:
213
245
  - Claude inspects each plan's `creates`/`modifies` against actual files
214
- - Per-plan status table with ✅/⚠️/❌/⏸️ icons
246
+ - Per-plan status table with pass/warn/fail/skip icons
215
247
  - User conversation captures additional issues
216
248
  - Generates corrective plans if needed (fed back into `phase:execute`)
217
249
  - Review cycle tracked in `STATE.md`
@@ -251,53 +283,46 @@ Specdacular spawns specialized agents that run simultaneously:
251
283
 
252
284
  ### Feature Flow
253
285
 
286
+ **The simple way** — two commands:
287
+
254
288
  ```
255
- ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
256
- feature:new ──▶ │ feature: │ ◀─▶ │ feature: │
257
- │ │ │ discuss │ │ research │
258
- └──────────────┘ └──────────────┘ └──────────────┘
259
-
260
-
261
- ┌──────────────┐
262
- feature:plan│ (creates roadmap)
263
- └──────────────┘
264
-
265
-
266
- ┌─────────────────────────────┐
267
- For each phase:
268
- ┌──────────┐
269
- phase:
270
- prepare
271
- └──────────┘
272
-
273
-
274
- ┌──────────┐
275
- phase: │ │
276
- │ plan │ │
277
- └──────────┘ │
278
- │ │
279
- │ ▼ │
280
- │ ┌──────────┐ │
281
- │ │ phase: │ │
282
- │ │ execute │ │
283
- │ └──────────┘ │
284
- │ │ │
285
- │ ▼ │
286
- │ ┌──────────┐ │
287
- │ │ phase: │ │
288
- │ review │ │
289
- └──────────┘ │
290
- │ │
291
- │ Mid-flight adjustments: │
292
- │ ┌──────────┐ │
293
- │ │ phase: │ ──┐ │
294
- │ │ insert │ │ │
295
- │ └──────────┘ │ │
296
- │ ┌──────▼────────┐ │
297
- │ │ phase: │ │
298
- │ │ renumber │ │
299
- │ └──────────────┘ │
300
- └─────────────────────────────┘
289
+ /specd:feature:new /specd:feature:next
290
+
291
+ ▼ ▼
292
+ Create feature ┌─── Read state ◀──────────────┐
293
+ First discussion Show status │
294
+ Offer to continue │ Offer next step │
295
+ │ │ │
296
+ ▼ │ ▼
297
+ "Keep discussing?" │ ┌──────────────┐ │
298
+ Yes → discuss loop │ Execute the │ │
299
+ No → feature:next │ │ next action │ │
300
+ │ └──────────────┘ │
301
+ │ │
302
+ ┌────┴────┐
303
+ Discuss Research
304
+ Plan │ Prepare phase
305
+ Execute │ Review phase │
306
+ └────┬────┘
307
+
308
+
309
+ "Continue or stop?"
310
+ Continue ──────────────────┘
311
+ Stop → clean exit
312
+
313
+ └─── No features? → feature:new
314
+ ```
315
+
316
+ **Under the hood,** `feature:next` delegates to the same workflows as the individual commands:
317
+
318
+ ```
319
+ discussion → discuss-feature workflow
320
+ research → research-feature workflow (3 parallel agents)
321
+ planning → plan-feature workflow
322
+ phase prep → prepare-phase workflow
323
+ phase plan → plan-phase workflow
324
+ execution → execute-plan workflow
325
+ review → review-phase workflow
301
326
  ```
302
327
 
303
328
  ---
@@ -325,9 +350,9 @@ your-project/
325
350
  │ ├── ROADMAP.md # Phase overview (from feature:plan)
326
351
  │ └── plans/
327
352
  │ ├── phase-01/
328
- │ │ ├── CONTEXT.md # Phase discussion (from phase:prepare)
329
- │ │ ├── RESEARCH.md # Phase research (from phase:prepare or phase:research)
330
- │ │ ├── 01-PLAN.md # Detailed plans (from phase:plan)
353
+ │ │ ├── CONTEXT.md # Phase discussion
354
+ │ │ ├── RESEARCH.md # Phase research
355
+ │ │ ├── 01-PLAN.md # Detailed plans
331
356
  │ │ └── 02-PLAN.md
332
357
  │ └── phase-02/
333
358
  │ ├── CONTEXT.md
@@ -364,11 +389,22 @@ Once recorded in `DECISIONS.md`, decisions aren't re-litigated. Each has date, c
364
389
 
365
390
  ---
366
391
 
367
- ## Migrating from v0.4
392
+ ## Migration Guides
393
+
394
+ ### Migrating from v0.5
395
+
396
+ **New command: `/specd:feature:next`** — Drives the entire feature lifecycle from a single command. Reads current state and offers the next step automatically.
397
+
398
+ | Before (v0.5) | After (v0.6) |
399
+ |----------------|--------------|
400
+ | Remember command sequence: `discuss` → `research` → `plan` → `phase:prepare` → `phase:plan` → `phase:execute` → `phase:review` | Just run `/specd:feature:next` — it figures out what's next |
401
+ | `feature:new` ends with list of commands to try | `feature:new` offers to continue discussing or stop with `feature:next` |
368
402
 
369
- If you're upgrading from v0.4, here's what changed:
403
+ **Existing `.specd/` data is fully compatible.** `feature:next` reads the same `config.json`, `STATE.md`, and other files.
370
404
 
371
- **Commands were renamed** into `feature:` and `phase:` namespaces:
405
+ ### Migrating from v0.4
406
+
407
+ Commands were renamed into `feature:` and `phase:` namespaces:
372
408
 
373
409
  | v0.4 | v0.5 |
374
410
  |------|------|
@@ -382,14 +418,14 @@ If you're upgrading from v0.4, here's what changed:
382
418
  | `/specd:insert-phase` | `/specd:phase:insert` |
383
419
  | `/specd:renumber-phases` | `/specd:phase:renumber` |
384
420
 
385
- **New commands:**
421
+ **New commands in v0.5:**
386
422
  - `/specd:phase:prepare` — Replaces `discuss-phase`, adds optional research at the end
387
423
  - `/specd:phase:plan` — Creates detailed plans for **one phase** (new command)
388
424
 
389
- **Behavior changes:**
425
+ **Behavior changes in v0.5:**
390
426
  - `feature:plan` now creates only `ROADMAP.md` + empty phase directories. It no longer creates `PLAN.md` files for all phases upfront.
391
- - Detailed `PLAN.md` files are created per-phase with `phase:plan`, right before execution. This prevents plans from going stale.
392
- - `phase:prepare` combines the old discuss-phase + research-phase into a single command. Discussion always happens; research is offered as an optional step at the end.
427
+ - Detailed `PLAN.md` files are created per-phase with `phase:plan`, right before execution.
428
+ - `phase:prepare` combines the old discuss-phase + research-phase into a single command.
393
429
 
394
430
  **Existing `.specd/` data is fully compatible.** Your feature files, decisions, and roadmaps work with the new commands.
395
431
 
@@ -406,6 +442,8 @@ Or in Claude Code:
406
442
  /specd:update
407
443
  ```
408
444
 
445
+ ---
446
+
409
447
  ## Uninstalling
410
448
 
411
449
  ```bash
@@ -416,6 +454,12 @@ npx specdacular --local --uninstall
416
454
 
417
455
  ---
418
456
 
457
+ ## Contributing
458
+
459
+ Issues and pull requests are welcome at [github.com/victorbalan/specdacular](https://github.com/victorbalan/specdacular).
460
+
461
+ ---
462
+
419
463
  ## License
420
464
 
421
465
  MIT
@@ -12,6 +12,8 @@ allowed-tools:
12
12
  ---
13
13
 
14
14
  <objective>
15
+ > **Note:** Consider using `/specd:feature:next` instead — it guides you through the entire feature lifecycle automatically, including discussion.
16
+
15
17
  Continue or deepen understanding of a feature through targeted discussion. Can be called **many times** — context accumulates.
16
18
 
17
19
  **Updates:**
@@ -12,7 +12,7 @@ allowed-tools:
12
12
  ---
13
13
 
14
14
  <objective>
15
- Initialize a feature folder and start the first discussion. Creates structure, asks initial questions about what's being built, and writes technical requirements.
15
+ Initialize a feature folder and start the first discussion. Creates structure, asks initial questions about what's being built, and writes technical requirements. After initialization, offers to continue discussing or stop.
16
16
 
17
17
  **Creates:**
18
18
  - `.specd/features/{name}/FEATURE.md` — Technical requirements from discussion
@@ -21,7 +21,7 @@ Initialize a feature folder and start the first discussion. Creates structure, a
21
21
  - `.specd/features/{name}/STATE.md` — Progress tracking
22
22
  - `.specd/features/{name}/config.json` — Feature configuration
23
23
 
24
- **This is the entry point.** After this, user controls the loop with discuss/research/plan.
24
+ **This is the entry point.** After this, continue with `/specd:feature:next` to drive the entire lifecycle.
25
25
  </objective>
26
26
 
27
27
  <execution_context>
@@ -63,5 +63,5 @@ Feature name: $ARGUMENTS
63
63
  - [ ] STATE.md tracks current position
64
64
  - [ ] config.json created
65
65
  - [ ] Committed to git
66
- - [ ] User knows next options: `/specd:feature:discuss`, `/specd:feature:research`, or continue talking
66
+ - [ ] User offered to continue discussing or stop with `/specd:feature:next`
67
67
  </success_criteria>
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: specd:feature:next
3
+ description: Drive feature lifecycle — picks up where you left off and guides next steps
4
+ argument-hint: "[feature-name]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Task
13
+ - AskUserQuestion
14
+ ---
15
+
16
+ <objective>
17
+ Smart state machine that reads current feature state and drives the entire lifecycle. One command from discussion through phase execution.
18
+
19
+ **How it works:**
20
+ 1. Select feature (from argument or picker)
21
+ 2. Read current state (STATE.md, config.json, CONTEXT.md, ROADMAP.md)
22
+ 3. Show status summary
23
+ 4. Offer the natural next step
24
+ 5. Execute it (delegating to existing workflows)
25
+ 6. Loop back — offer the next step or stop
26
+
27
+ **Covers the full lifecycle:**
28
+ - Discussion (gray areas, decisions)
29
+ - Research (parallel agents for patterns/pitfalls)
30
+ - Planning (roadmap with phases)
31
+ - Phase preparation (phase-specific discussion + research)
32
+ - Phase planning (detailed PLAN.md files)
33
+ - Phase execution (with progress tracking)
34
+ - Phase review (compare plans vs actual code)
35
+
36
+ **No need to remember individual commands.** This one command figures out what's next.
37
+ </objective>
38
+
39
+ <execution_context>
40
+ @~/.claude/specdacular/workflows/next-feature.md
41
+ </execution_context>
42
+
43
+ <context>
44
+ Feature name: $ARGUMENTS
45
+
46
+ **Scans for features:**
47
+ @.specd/features/*/config.json
48
+
49
+ **Loads feature context (once selected):**
50
+ @.specd/features/{name}/config.json
51
+ @.specd/features/{name}/STATE.md
52
+ @.specd/features/{name}/CONTEXT.md
53
+ @.specd/features/{name}/FEATURE.md
54
+ @.specd/features/{name}/ROADMAP.md (if exists)
55
+ @.specd/features/{name}/RESEARCH.md (if exists)
56
+
57
+ **Delegates to existing workflows:**
58
+ @~/.claude/specdacular/workflows/discuss-feature.md
59
+ @~/.claude/specdacular/workflows/research-feature.md
60
+ @~/.claude/specdacular/workflows/plan-feature.md
61
+ @~/.claude/specdacular/workflows/prepare-phase.md
62
+ @~/.claude/specdacular/workflows/plan-phase.md
63
+ @~/.claude/specdacular/workflows/execute-plan.md
64
+ @~/.claude/specdacular/workflows/review-phase.md
65
+ </context>
66
+
67
+ <process>
68
+ 1. **Select Feature** — From argument or scan .specd/features/*/config.json
69
+ 2. **Read State** — Load config.json, STATE.md, CONTEXT.md, ROADMAP.md
70
+ 3. **Show Status** — Concise summary of where things stand
71
+ 4. **Determine Next** — Based on stage + phase status
72
+ 5. **Offer Choice** — Next step + alternatives + "stop for now"
73
+ 6. **Execute** — Delegate to appropriate workflow
74
+ 7. **Loop** — Back to step 2 after each action
75
+ </process>
76
+
77
+ <success_criteria>
78
+ - [ ] Feature selected (from argument or picker)
79
+ - [ ] Current state accurately displayed
80
+ - [ ] Correct next action offered
81
+ - [ ] User can stop at any natural boundary
82
+ - [ ] Delegated to correct workflow for execution
83
+ - [ ] Looped back after completion
84
+ </success_criteria>
@@ -12,6 +12,8 @@ allowed-tools:
12
12
  ---
13
13
 
14
14
  <objective>
15
+ > **Note:** Consider using `/specd:feature:next` instead — it guides you through the entire feature lifecycle automatically, including planning.
16
+
15
17
  Create a roadmap with phase overview and empty phase directories. Detailed PLAN.md files are created later per-phase with `/specd:phase:plan`.
16
18
 
17
19
  **Creates:**
@@ -13,6 +13,8 @@ allowed-tools:
13
13
  ---
14
14
 
15
15
  <objective>
16
+ > **Note:** Consider using `/specd:feature:next` instead — it guides you through the entire feature lifecycle automatically, including research.
17
+
16
18
  Research how to implement a feature before planning. Spawns parallel research agents to investigate:
17
19
 
18
20
  1. **Codebase Integration** - How does this fit with existing code? (uses Claude Code Explore agent)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specdacular",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Feature planning system for existing codebases. Map, understand, and plan features in large projects.",
5
5
  "bin": {
6
6
  "specdacular": "bin/install.js"
@@ -81,14 +81,7 @@
81
81
 
82
82
  {What the user should do next based on current state.}
83
83
 
84
- **Options:**
85
- - `/specd:feature:discuss {feature-name}` — Continue refining understanding
86
- - `/specd:feature:research {feature-name}` — Research implementation approach
87
- - `/specd:feature:plan {feature-name}` — Create roadmap with phase overview (when ready)
88
- - `/specd:phase:prepare {feature-name} {N}` — Prepare a specific phase
89
- - `/specd:phase:plan {feature-name} {N}` — Create detailed plans for a phase
90
- - `/specd:phase:execute {feature-name}` — Execute plans with progress tracking
91
- - `/specd:phase:review {feature-name} {N}` — Review executed plans against actual code
84
+ **Resume:** `/specd:feature:next {feature-name}` — Picks up where you left off and guides the next step automatically.
92
85
 
93
86
  ---
94
87
 
@@ -288,7 +288,7 @@ Continue to completion.
288
288
  </step>
289
289
 
290
290
  <step name="completion">
291
- Present what was created and next options.
291
+ Present what was created and offer to continue.
292
292
 
293
293
  **Output:**
294
294
  ```
@@ -315,23 +315,51 @@ Present what was created and next options.
315
315
  **Open areas to discuss:**
316
316
  - {Gray area 1}
317
317
  - {Gray area 2}
318
+ ```
318
319
 
319
- ───────────────────────────────────────────────────────
320
+ Continue to continuation_offer.
321
+ </step>
322
+
323
+ <step name="continuation_offer">
324
+ Offer to continue discussing or stop.
325
+
326
+ **If gray areas remain:**
327
+
328
+ Use AskUserQuestion:
329
+ - header: "Continue?"
330
+ - question: "Want to keep discussing the open areas, or come back later?"
331
+ - options:
332
+ - "Keep discussing" — Dive into the gray areas now
333
+ - "Stop for now" — Come back with /specd:feature:next {feature-name}
320
334
 
321
- ## What's Next
335
+ **If Keep discussing:**
336
+ Execute the discuss-feature workflow logic:
337
+ @~/.claude/specdacular/workflows/discuss-feature.md
322
338
 
323
- You control the rhythm. Options:
339
+ After discussion completes (commit done), return to this step (continuation_offer) — re-read CONTEXT.md to check if gray areas remain, and offer again.
324
340
 
325
- **/specd:feature:discuss {feature-name}** Dive deeper into specific areas
326
- {Suggested if gray areas remain}
341
+ **If no gray areas remain:**
327
342
 
328
- **/specd:feature:research {feature-name}** — Research implementation approach
329
- {Suggested if technology choices are unclear}
343
+ Use AskUserQuestion:
344
+ - header: "Continue?"
345
+ - question: "Discussion looks solid. Want to keep going or come back later?"
346
+ - options:
347
+ - "Continue" — Move to the next step (research or planning)
348
+ - "Stop for now" — Come back with /specd:feature:next {feature-name}
349
+
350
+ **If Continue:**
351
+ Hand off to the next-feature workflow logic to determine next action:
352
+ @~/.claude/specdacular/workflows/next-feature.md
353
+
354
+ Start from the read_state step with the current feature.
355
+
356
+ **If Stop for now:**
357
+ ```
358
+ ───────────────────────────────────────────────────────
330
359
 
331
- **/specd:feature:plan {feature-name}** Create roadmap with phase overview
332
- {Only when discussion + research are sufficient}
360
+ Progress saved. Pick up where you left off anytime:
333
361
 
334
- Or just **keep talking** — this conversation continues naturally.
362
+ /specd:feature:next {feature-name}
335
363
  ```
336
364
 
337
365
  End workflow.
@@ -0,0 +1,497 @@
1
+ <purpose>
2
+ Smart state machine that reads current feature state and drives the entire lifecycle. After each action, loops back and offers the next step. User can stop at any natural boundary.
3
+
4
+ **One command for the entire lifecycle:** discussion, research, planning, phase preparation, phase planning, phase execution, phase review.
5
+
6
+ **Core loop:**
7
+ ```
8
+ read state → show status → determine next action → execute → loop
9
+ ```
10
+
11
+ The user only needs to remember `/specd:feature:next`. The state machine figures out what to do.
12
+ </purpose>
13
+
14
+ <philosophy>
15
+
16
+ ## Guide, Don't Force
17
+
18
+ Show the user where they are and what the natural next step is. Always offer alternatives and a "stop for now" option. The user controls the rhythm.
19
+
20
+ ## DRY — Delegate to Existing Workflows
21
+
22
+ This workflow is a dispatcher. It reads state, determines the next action, then delegates to existing workflow files for the actual work. It does NOT duplicate logic from other workflows.
23
+
24
+ ## Natural Boundaries
25
+
26
+ After each significant action (discussion session, research, planning, phase completion), offer the user a chance to stop. These are natural context-window boundaries too.
27
+
28
+ ## Feature Selection
29
+
30
+ When no argument is given, scan for in-progress features and let the user pick. Always show the picker, even for a single feature — it confirms intent.
31
+
32
+ </philosophy>
33
+
34
+ <process>
35
+
36
+ <step name="select_feature">
37
+ Determine which feature to work on.
38
+
39
+ **If $ARGUMENTS provided:**
40
+ Use as feature name. Normalize to kebab-case.
41
+
42
+ ```bash
43
+ [ -d ".specd/features/$ARGUMENTS" ] || { echo "not found"; exit 1; }
44
+ ```
45
+
46
+ **If no arguments:**
47
+ Scan for in-progress features:
48
+
49
+ ```bash
50
+ # List feature directories with config.json
51
+ for dir in .specd/features/*/config.json; do
52
+ [ -f "$dir" ] && echo "$dir"
53
+ done
54
+ ```
55
+
56
+ Read each `config.json` and filter where `stage != "complete"`.
57
+
58
+ **If no features found:**
59
+ ```
60
+ No features in progress.
61
+
62
+ Start one with /specd:feature:new
63
+ ```
64
+ End workflow.
65
+
66
+ **If features found:**
67
+ Use AskUserQuestion:
68
+ - header: "Feature"
69
+ - question: "Which feature would you like to work on?"
70
+ - options: List each feature with its current stage (e.g., "my-feature (discussion)", "other-feature (execution)")
71
+
72
+ Use the selected feature name.
73
+
74
+ Continue to read_state.
75
+ </step>
76
+
77
+ <step name="read_state">
78
+ Load all feature context to determine current position.
79
+
80
+ **Read:**
81
+ - `.specd/features/{name}/config.json` — Stage, phases info
82
+ - `.specd/features/{name}/STATE.md` — Detailed progress
83
+ - `.specd/features/{name}/CONTEXT.md` — Discussion context, gray areas
84
+ - `.specd/features/{name}/ROADMAP.md` — If exists, phase overview
85
+ - `.specd/features/{name}/FEATURE.md` — Requirements summary
86
+
87
+ **Parse from config.json:**
88
+ - `stage` — discussion | research | planned | execution | complete
89
+ - `phases.total` — Number of phases (if planned)
90
+ - `phases.current` — Current phase number (if in execution)
91
+ - `phases.completed` — Number of completed phases
92
+
93
+ **Parse from CONTEXT.md:**
94
+ - Gray areas remaining (from "Gray Areas Remaining" section)
95
+
96
+ **Parse from ROADMAP.md (if exists):**
97
+ - Phase list with status
98
+
99
+ **Parse from STATE.md:**
100
+ - Execution progress (which plans are complete)
101
+ - Review cycles
102
+
103
+ **Determine phase status (if in planned/execution stage):**
104
+ For the current/next phase, check:
105
+ ```bash
106
+ # Check if phase directory has CONTEXT.md (prepared)
107
+ [ -f ".specd/features/{name}/plans/phase-{NN}/CONTEXT.md" ] && echo "prepared"
108
+
109
+ # Check if phase has PLAN.md files (planned)
110
+ ls .specd/features/{name}/plans/phase-{NN}/*-PLAN.md 2>/dev/null | head -1
111
+
112
+ # Check STATE.md for completed plans in this phase
113
+ ```
114
+
115
+ Continue to show_status.
116
+ </step>
117
+
118
+ <step name="show_status">
119
+ Present a concise status summary.
120
+
121
+ ```
122
+ ## {feature-name}
123
+
124
+ **Stage:** {stage}
125
+ **Last updated:** {date}
126
+
127
+ {Stage-specific summary — see below}
128
+ ```
129
+
130
+ **If stage=discussion:**
131
+ ```
132
+ **Discussion sessions:** {N}
133
+ **Decisions made:** {N}
134
+ **Gray areas remaining:** {count}
135
+ {If count > 0: list them}
136
+ ```
137
+
138
+ **If stage=research:**
139
+ ```
140
+ **Research:** Complete
141
+ **Key findings:** {2-3 bullet points from RESEARCH.md}
142
+ ```
143
+
144
+ **If stage=planned:**
145
+ ```
146
+ **Phases:** {total}
147
+ {List phases with one-liner goals}
148
+ ```
149
+
150
+ **If stage=execution:**
151
+ ```
152
+ **Phases:** {completed}/{total}
153
+ **Current phase:** {N} — {name}
154
+ **Phase status:** {prepared | planned | executing | executed}
155
+ ```
156
+
157
+ Continue to determine_action.
158
+ </step>
159
+
160
+ <step name="determine_action">
161
+ Based on current state, determine and offer the next action.
162
+
163
+ Route to the appropriate sub-step based on state:
164
+
165
+ **stage=discussion, gray areas remain:**
166
+ → Go to action_discuss
167
+
168
+ **stage=discussion, no gray areas (or user wants to skip):**
169
+ → Go to action_research_offer
170
+
171
+ **stage=research (RESEARCH.md exists):**
172
+ → Go to action_plan_offer
173
+
174
+ **stage=planned, no phases started:**
175
+ → Go to action_phase_prepare
176
+
177
+ **stage=planned or stage=execution, current phase prepared but not planned:**
178
+ → Go to action_phase_plan
179
+
180
+ **stage=execution, current phase planned but not all plans executed:**
181
+ → Go to action_phase_execute
182
+
183
+ **stage=execution, current phase all plans executed:**
184
+ → Go to action_phase_review
185
+
186
+ **stage=execution, all phases done:**
187
+ → Go to action_complete
188
+
189
+ </step>
190
+
191
+ <step name="action_discuss">
192
+ Offer discussion when gray areas remain.
193
+
194
+ ```
195
+ ### Open Areas
196
+
197
+ These areas could use more clarity:
198
+
199
+ {List gray areas from CONTEXT.md}
200
+ ```
201
+
202
+ Use AskUserQuestion:
203
+ - header: "Next Step"
204
+ - question: "Want to discuss these areas, or skip ahead?"
205
+ - options:
206
+ - "Discuss" — Probe open areas (recommended if gray areas exist)
207
+ - "Skip to research" — Move to researching implementation patterns
208
+ - "Skip to planning" — Jump to creating the roadmap (only if enough context)
209
+ - "Stop for now" — Save progress, come back with /specd:feature:next
210
+
211
+ **If Discuss:**
212
+ Execute the discuss-feature workflow logic:
213
+ @~/.claude/specdacular/workflows/discuss-feature.md
214
+
215
+ After discussion completes (commit done), loop back to read_state.
216
+
217
+ **If Skip to research:**
218
+ → Go to action_research_offer
219
+
220
+ **If Skip to planning:**
221
+ → Go to action_plan_execute
222
+
223
+ **If Stop for now:**
224
+ → Go to action_stop
225
+ </step>
226
+
227
+ <step name="action_research_offer">
228
+ Offer research when discussion is sufficient.
229
+
230
+ **If RESEARCH.md already exists:**
231
+ ```
232
+ Research has already been conducted.
233
+ ```
234
+ → Go to action_plan_offer
235
+
236
+ **If no RESEARCH.md:**
237
+ ```
238
+ ### Discussion Looks Solid
239
+
240
+ You've resolved the key gray areas. Next step is usually research — investigating implementation patterns, libraries, and pitfalls.
241
+ ```
242
+
243
+ Use AskUserQuestion:
244
+ - header: "Next Step"
245
+ - question: "Research implementation patterns?"
246
+ - options:
247
+ - "Research" — Spawn parallel agents to investigate patterns (recommended)
248
+ - "Skip to planning" — Jump straight to roadmap creation
249
+ - "Discuss more" — Go back to discussion
250
+ - "Stop for now" — Come back with /specd:feature:next
251
+
252
+ **If Research:**
253
+ Execute the research-feature workflow logic:
254
+ @~/.claude/specdacular/workflows/research-feature.md
255
+
256
+ After research completes (commit done), loop back to read_state.
257
+
258
+ **If Skip to planning:**
259
+ → Go to action_plan_offer
260
+
261
+ **If Discuss more:**
262
+ → Go to action_discuss
263
+
264
+ **If Stop for now:**
265
+ → Go to action_stop
266
+ </step>
267
+
268
+ <step name="action_plan_offer">
269
+ Offer roadmap creation.
270
+
271
+ ```
272
+ ### Ready to Plan
273
+
274
+ {If RESEARCH.md exists: "Research is complete. "}Time to create the roadmap — breaking the feature into ordered phases.
275
+ ```
276
+
277
+ Use AskUserQuestion:
278
+ - header: "Next Step"
279
+ - question: "Create the roadmap?"
280
+ - options:
281
+ - "Create roadmap" — Derive phases and write ROADMAP.md (recommended)
282
+ - "Discuss more" — Go back to discussion
283
+ - "Stop for now" — Come back with /specd:feature:next
284
+
285
+ **If Create roadmap:**
286
+ → Go to action_plan_execute
287
+
288
+ **If Discuss more:**
289
+ → Go to action_discuss
290
+
291
+ **If Stop for now:**
292
+ → Go to action_stop
293
+ </step>
294
+
295
+ <step name="action_plan_execute">
296
+ Execute the plan-feature workflow.
297
+
298
+ Execute the plan-feature workflow logic:
299
+ @~/.claude/specdacular/workflows/plan-feature.md
300
+
301
+ After planning completes (commit done), loop back to read_state.
302
+ </step>
303
+
304
+ <step name="action_phase_prepare">
305
+ Offer to prepare the next phase.
306
+
307
+ **Determine next phase:** First phase without a CONTEXT.md in its directory (not yet prepared), or phase 1 if none started.
308
+
309
+ ```
310
+ ### Roadmap Ready
311
+
312
+ {total} phases planned. Time to prepare Phase {N}: {phase-name}.
313
+
314
+ Phase preparation involves discussing phase-specific gray areas and optionally researching implementation patterns.
315
+ ```
316
+
317
+ Use AskUserQuestion:
318
+ - header: "Next Step"
319
+ - question: "Prepare Phase {N}?"
320
+ - options:
321
+ - "Prepare phase" — Discuss gray areas + optional research (recommended)
322
+ - "Skip to planning" — Jump to creating detailed plans
323
+ - "Stop for now" — Come back with /specd:feature:next
324
+
325
+ **If Prepare phase:**
326
+ Execute the prepare-phase workflow logic:
327
+ @~/.claude/specdacular/workflows/prepare-phase.md
328
+
329
+ Pass feature name and phase number as arguments.
330
+
331
+ After preparation completes (commit done), loop back to read_state.
332
+
333
+ **If Skip to planning:**
334
+ → Go to action_phase_plan
335
+
336
+ **If Stop for now:**
337
+ → Go to action_stop
338
+ </step>
339
+
340
+ <step name="action_phase_plan">
341
+ Offer to create detailed plans for the current phase.
342
+
343
+ **Determine phase:** Current phase that has been prepared (or not) but doesn't have PLAN.md files yet.
344
+
345
+ ```
346
+ ### Phase {N} Ready for Planning
347
+
348
+ Time to create detailed, executable plans for Phase {N}: {phase-name}.
349
+ ```
350
+
351
+ Use AskUserQuestion:
352
+ - header: "Next Step"
353
+ - question: "Create detailed plans for Phase {N}?"
354
+ - options:
355
+ - "Create plans" — Write executable PLAN.md files (recommended)
356
+ - "Prepare first" — Go back to phase preparation
357
+ - "Stop for now" — Come back with /specd:feature:next
358
+
359
+ **If Create plans:**
360
+ Execute the plan-phase workflow logic:
361
+ @~/.claude/specdacular/workflows/plan-phase.md
362
+
363
+ Pass feature name and phase number as arguments.
364
+
365
+ After planning completes (commit done), loop back to read_state.
366
+
367
+ **If Prepare first:**
368
+ → Go to action_phase_prepare
369
+
370
+ **If Stop for now:**
371
+ → Go to action_stop
372
+ </step>
373
+
374
+ <step name="action_phase_execute">
375
+ Offer to execute plans for the current phase.
376
+
377
+ **Determine:** Which plans exist and which are not yet executed.
378
+
379
+ ```
380
+ ### Phase {N} Has Plans Ready
381
+
382
+ {count} plan(s) ready to execute for Phase {N}: {phase-name}.
383
+ ```
384
+
385
+ Use AskUserQuestion:
386
+ - header: "Next Step"
387
+ - question: "Execute Phase {N} plans?"
388
+ - options:
389
+ - "Execute" — Run the next plan with progress tracking (recommended)
390
+ - "Stop for now" — Come back with /specd:feature:next
391
+
392
+ **If Execute:**
393
+ Execute the execute-plan workflow logic:
394
+ @~/.claude/specdacular/workflows/execute-plan.md
395
+
396
+ Pass feature name as argument (it finds the next incomplete plan).
397
+
398
+ After execution completes (commit done), loop back to read_state.
399
+
400
+ **If Stop for now:**
401
+ → Go to action_stop
402
+ </step>
403
+
404
+ <step name="action_phase_review">
405
+ Offer to review the completed phase.
406
+
407
+ ```
408
+ ### Phase {N} Execution Complete
409
+
410
+ All plans for Phase {N} have been executed. Review compares what was planned against what was actually built.
411
+ ```
412
+
413
+ Use AskUserQuestion:
414
+ - header: "Next Step"
415
+ - question: "Review Phase {N}?"
416
+ - options:
417
+ - "Review" — Compare plans against actual code (recommended)
418
+ - "Skip to next phase" — Move on to Phase {N+1}
419
+ - "Stop for now" — Come back with /specd:feature:next
420
+
421
+ **If Review:**
422
+ Execute the review-phase workflow logic:
423
+ @~/.claude/specdacular/workflows/review-phase.md
424
+
425
+ Pass feature name and phase number as arguments.
426
+
427
+ After review completes (commit done):
428
+
429
+ **If there are more phases:**
430
+ Loop back to read_state (will pick up next phase).
431
+
432
+ **If all phases done:**
433
+ → Go to action_complete
434
+
435
+ **If Skip to next phase:**
436
+ Loop back to read_state (will pick up next phase).
437
+
438
+ **If Stop for now:**
439
+ → Go to action_stop
440
+ </step>
441
+
442
+ <step name="action_complete">
443
+ Feature is complete.
444
+
445
+ ```
446
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
447
+ FEATURE COMPLETE
448
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
449
+
450
+ **Feature:** {feature-name}
451
+ **Phases completed:** {total}
452
+ **Decisions made:** {count}
453
+
454
+ All phases have been executed{and reviewed, if applicable}.
455
+ ```
456
+
457
+ **Update config.json:**
458
+ Set `stage` to `"complete"`.
459
+
460
+ **Update STATE.md:**
461
+ Set stage to `complete`.
462
+
463
+ ```bash
464
+ git add .specd/features/{name}/config.json .specd/features/{name}/STATE.md
465
+ git commit -m "docs({feature-name}): feature complete
466
+
467
+ All {N} phases executed."
468
+ ```
469
+
470
+ End workflow.
471
+ </step>
472
+
473
+ <step name="action_stop">
474
+ Clean exit with resume instructions.
475
+
476
+ ```
477
+ ───────────────────────────────────────────────────────
478
+
479
+ Progress saved. Resume anytime with:
480
+
481
+ /specd:feature:next {feature-name}
482
+ ```
483
+
484
+ End workflow.
485
+ </step>
486
+
487
+ </process>
488
+
489
+ <success_criteria>
490
+ - Feature selected (from argument or picker)
491
+ - Current state accurately read and displayed
492
+ - Correct next action determined from state
493
+ - Delegated to appropriate workflow for execution
494
+ - Looped back after action completion
495
+ - User could stop at any natural boundary
496
+ - Clean exit with resume instructions
497
+ </success_criteria>