specdacular 0.5.1 → 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 +190 -130
- package/commands/specd/feature/discuss.md +2 -0
- package/commands/specd/feature/new.md +3 -3
- package/commands/specd/feature/next.md +84 -0
- package/commands/specd/feature/plan.md +2 -0
- package/commands/specd/feature/research.md +2 -0
- package/commands/specd/help.md +4 -1
- package/commands/specd/phase/review.md +80 -0
- package/package.json +1 -1
- package/specdacular/templates/features/STATE.md +8 -7
- package/specdacular/workflows/new-feature.md +39 -11
- package/specdacular/workflows/next-feature.md +497 -0
- package/specdacular/workflows/review-phase.md +555 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specd:phase:review
|
|
3
|
+
description: Review executed plans against actual code and identify deviations
|
|
4
|
+
argument-hint: "[feature-name] [phase-number]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<objective>
|
|
16
|
+
Review executed plans for a phase, comparing intended changes against actual code. Surfaces deviations, captures decisions, and generates corrective plans when needed.
|
|
17
|
+
|
|
18
|
+
**What it does:**
|
|
19
|
+
1. Load context — STATE.md, plans, DECISIONS.md, codebase docs
|
|
20
|
+
2. Filter plans — Only review plans with status Complete (DEC-006)
|
|
21
|
+
3. Inspect each plan — Compare creates/modifies frontmatter against actual files
|
|
22
|
+
4. Present findings — Per-plan status table with expandable details (DEC-005)
|
|
23
|
+
5. Gather user input — Ask about satisfaction, additional issues (DEC-001)
|
|
24
|
+
6. Record decisions — New decisions to DECISIONS.md
|
|
25
|
+
7. Generate correctives — Corrective plans if issues found (DEC-003)
|
|
26
|
+
8. Update state — Review Cycles in STATE.md (DEC-004)
|
|
27
|
+
9. Commit and suggest next steps
|
|
28
|
+
</objective>
|
|
29
|
+
|
|
30
|
+
<execution_context>
|
|
31
|
+
@~/.claude/specdacular/workflows/review-phase.md
|
|
32
|
+
</execution_context>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
Feature name: $ARGUMENTS (first argument)
|
|
36
|
+
Phase number: $ARGUMENTS (second argument)
|
|
37
|
+
|
|
38
|
+
**Load ALL feature context:**
|
|
39
|
+
@.specd/features/{name}/STATE.md — Progress tracking, completed plans
|
|
40
|
+
@.specd/features/{name}/DECISIONS.md — Existing decisions
|
|
41
|
+
@.specd/features/{name}/RESEARCH.md — Implementation notes (if exists)
|
|
42
|
+
@.specd/features/{name}/ROADMAP.md — Phase overview
|
|
43
|
+
@.specd/features/{name}/CHANGELOG.md — Existing deviations (if exists)
|
|
44
|
+
|
|
45
|
+
**Load plan files for the phase:**
|
|
46
|
+
@.specd/features/{name}/plans/phase-{NN}/*.md — All plan files
|
|
47
|
+
|
|
48
|
+
**Load codebase context:**
|
|
49
|
+
@.specd/codebase/PATTERNS.md — Code patterns
|
|
50
|
+
@.specd/codebase/STRUCTURE.md — File locations
|
|
51
|
+
@.specd/codebase/MAP.md — System overview
|
|
52
|
+
</context>
|
|
53
|
+
|
|
54
|
+
<process>
|
|
55
|
+
1. **Validate** — Feature exists, phase exists, has execution history
|
|
56
|
+
2. **Load Context** — Read all feature, plan, and codebase docs
|
|
57
|
+
3. **Filter Plans** — Get only completed plans for this phase
|
|
58
|
+
4. **Inspect Phase** — Compare each plan's intent against actual code
|
|
59
|
+
5. **Present Findings** — Per-plan status table + deviation details
|
|
60
|
+
6. **Gather User Input** — Ask about satisfaction, additional issues
|
|
61
|
+
7. **Record Decisions** — Save new decisions to DECISIONS.md
|
|
62
|
+
8. **Generate Correctives** — Create corrective plans if needed
|
|
63
|
+
9. **Update State** — Update Review Cycles section in STATE.md
|
|
64
|
+
10. **Update Changelog** — Log deviations to CHANGELOG.md
|
|
65
|
+
11. **Commit and Next** — Commit changes, suggest next steps
|
|
66
|
+
</process>
|
|
67
|
+
|
|
68
|
+
<success_criteria>
|
|
69
|
+
- [ ] Feature and phase validated with execution history
|
|
70
|
+
- [ ] All completed plans inspected against actual code
|
|
71
|
+
- [ ] Per-plan status table displayed (✅/⚠️/❌/⏸️)
|
|
72
|
+
- [ ] Deviations surfaced with planned vs actual comparison
|
|
73
|
+
- [ ] User input captured (satisfaction, additional issues)
|
|
74
|
+
- [ ] New decisions recorded in DECISIONS.md
|
|
75
|
+
- [ ] Corrective plans generated if issues identified
|
|
76
|
+
- [ ] Review Cycles section updated in STATE.md
|
|
77
|
+
- [ ] Deviations logged in CHANGELOG.md
|
|
78
|
+
- [ ] Changes committed
|
|
79
|
+
- [ ] Next steps suggested
|
|
80
|
+
</success_criteria>
|
package/package.json
CHANGED
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
+
## Review Cycles
|
|
45
|
+
|
|
46
|
+
| Phase | Cycle | Date | Findings | Corrective Plans | Status |
|
|
47
|
+
|-------|-------|------|----------|------------------|--------|
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
44
51
|
## Discussion Sessions
|
|
45
52
|
|
|
46
53
|
| Date | Focus | Outcome |
|
|
@@ -74,13 +81,7 @@
|
|
|
74
81
|
|
|
75
82
|
{What the user should do next based on current state.}
|
|
76
83
|
|
|
77
|
-
**
|
|
78
|
-
- `/specd:feature:discuss {feature-name}` — Continue refining understanding
|
|
79
|
-
- `/specd:feature:research {feature-name}` — Research implementation approach
|
|
80
|
-
- `/specd:feature:plan {feature-name}` — Create roadmap with phase overview (when ready)
|
|
81
|
-
- `/specd:phase:prepare {feature-name} {N}` — Prepare a specific phase
|
|
82
|
-
- `/specd:phase:plan {feature-name} {N}` — Create detailed plans for a phase
|
|
83
|
-
- `/specd:phase:execute {feature-name}` — Execute plans with progress tracking
|
|
84
|
+
**Resume:** `/specd:feature:next {feature-name}` — Picks up where you left off and guides the next step automatically.
|
|
84
85
|
|
|
85
86
|
---
|
|
86
87
|
|
|
@@ -288,7 +288,7 @@ Continue to completion.
|
|
|
288
288
|
</step>
|
|
289
289
|
|
|
290
290
|
<step name="completion">
|
|
291
|
-
Present what was created and
|
|
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
|
-
|
|
335
|
+
**If Keep discussing:**
|
|
336
|
+
Execute the discuss-feature workflow logic:
|
|
337
|
+
@~/.claude/specdacular/workflows/discuss-feature.md
|
|
322
338
|
|
|
323
|
-
|
|
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
|
-
|
|
326
|
-
{Suggested if gray areas remain}
|
|
341
|
+
**If no gray areas remain:**
|
|
327
342
|
|
|
328
|
-
|
|
329
|
-
|
|
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
|
-
|
|
332
|
-
{Only when discussion + research are sufficient}
|
|
360
|
+
Progress saved. Pick up where you left off anytime:
|
|
333
361
|
|
|
334
|
-
|
|
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>
|