specdacular 0.2.5 → 0.5.1
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 +186 -68
- package/commands/specd/blueprint.md +64 -0
- package/commands/specd/{discuss-feature.md → feature/discuss.md} +1 -1
- package/commands/specd/{new-feature.md → feature/new.md} +3 -3
- package/commands/specd/{plan-feature.md → feature/plan.md} +15 -18
- package/commands/specd/{research-feature.md → feature/research.md} +5 -5
- package/commands/specd/help.md +51 -29
- package/commands/specd/{execute-plan.md → phase/execute.md} +4 -4
- package/commands/specd/phase/insert.md +62 -0
- package/commands/specd/phase/plan.md +73 -0
- package/commands/specd/{discuss-phase.md → phase/prepare.md} +21 -9
- package/commands/specd/phase/renumber.md +66 -0
- package/commands/specd/{research-phase.md → phase/research.md} +3 -1
- package/commands/specd/status.md +20 -0
- package/package.json +1 -1
- package/specdacular/agents/feature-researcher.md +4 -2
- package/specdacular/templates/blueprint/index.html +110 -0
- package/specdacular/templates/blueprint/scripts.js +71 -0
- package/specdacular/templates/blueprint/styles.css +429 -0
- package/specdacular/templates/features/STATE.md +6 -4
- package/specdacular/workflows/blueprint-diagrams.md +273 -0
- package/specdacular/workflows/blueprint-wireframes.md +312 -0
- package/specdacular/workflows/blueprint.md +372 -0
- package/specdacular/workflows/discuss-feature.md +4 -4
- package/specdacular/workflows/execute-plan.md +4 -4
- package/specdacular/workflows/insert-phase.md +222 -0
- package/specdacular/workflows/new-feature.md +5 -5
- package/specdacular/workflows/plan-feature.md +60 -233
- package/specdacular/workflows/plan-phase.md +363 -0
- package/specdacular/workflows/prepare-phase.md +759 -0
- package/specdacular/workflows/renumber-phases.md +273 -0
- package/specdacular/workflows/research-phase.md +5 -3
- package/specdacular/workflows/status.md +85 -0
- package/specdacular/workflows/discuss-phase.md +0 -389
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Discuss a specific phase before executing it. Enables just-in-time clarification focused on the phase's scope.
|
|
3
|
-
|
|
4
|
-
**Key behaviors:**
|
|
5
|
-
- Phase-specific gray areas based on phase type (Types, API, UI, Integration, etc.)
|
|
6
|
-
- Builds on feature-level context but focuses narrowly
|
|
7
|
-
- Output lives alongside phase plans for easy reference during execution
|
|
8
|
-
|
|
9
|
-
**Output:** `plans/phase-{NN}/CONTEXT.md` with resolved questions, updated DECISIONS.md
|
|
10
|
-
</purpose>
|
|
11
|
-
|
|
12
|
-
<philosophy>
|
|
13
|
-
|
|
14
|
-
## Just-in-Time Clarification
|
|
15
|
-
|
|
16
|
-
Don't try to clarify everything upfront. Discuss each phase right before executing it, when the context is freshest and questions are most concrete.
|
|
17
|
-
|
|
18
|
-
## Phase-Type Specific
|
|
19
|
-
|
|
20
|
-
Different phase types have different gray areas. A Types phase has different concerns than a UI phase. Tailor questions to what's actually being built.
|
|
21
|
-
|
|
22
|
-
## Focused Context
|
|
23
|
-
|
|
24
|
-
Unlike feature-level discussion which covers everything, phase discussion is narrow. Only discuss what's relevant to THIS phase's deliverables.
|
|
25
|
-
|
|
26
|
-
</philosophy>
|
|
27
|
-
|
|
28
|
-
<phase_type_gray_areas>
|
|
29
|
-
|
|
30
|
-
## Types/Schema Phase
|
|
31
|
-
- Data model completeness — Are all fields defined?
|
|
32
|
-
- Naming conventions — Consistent with codebase?
|
|
33
|
-
- Relationships — How do types relate to each other?
|
|
34
|
-
- Validation rules — What constraints apply?
|
|
35
|
-
- Nullable fields — What can be undefined/null?
|
|
36
|
-
|
|
37
|
-
## API/Data Phase
|
|
38
|
-
- Endpoint design — REST conventions, URL structure
|
|
39
|
-
- Error responses — Format, status codes, messages
|
|
40
|
-
- Pagination approach — Cursor vs offset, page size
|
|
41
|
-
- Auth requirements — What auth is needed?
|
|
42
|
-
- Rate limiting — Any throttling needed?
|
|
43
|
-
|
|
44
|
-
## Business Logic Phase
|
|
45
|
-
- Edge cases — What unusual inputs can occur?
|
|
46
|
-
- Validation rules — What makes data valid/invalid?
|
|
47
|
-
- Error handling — How to handle failures?
|
|
48
|
-
- Transaction boundaries — What operations are atomic?
|
|
49
|
-
|
|
50
|
-
## UI/Components Phase
|
|
51
|
-
- Component hierarchy — How do components nest?
|
|
52
|
-
- State management — Local vs global state
|
|
53
|
-
- Loading states — What to show while loading?
|
|
54
|
-
- Error states — How to display errors?
|
|
55
|
-
- Accessibility — ARIA, keyboard navigation
|
|
56
|
-
|
|
57
|
-
## Integration Phase
|
|
58
|
-
- Wiring points — Where does this connect?
|
|
59
|
-
- Initialization order — What depends on what?
|
|
60
|
-
- Dependency injection — How are deps provided?
|
|
61
|
-
- Entry points — Where is this invoked from?
|
|
62
|
-
|
|
63
|
-
</phase_type_gray_areas>
|
|
64
|
-
|
|
65
|
-
<process>
|
|
66
|
-
|
|
67
|
-
<step name="validate">
|
|
68
|
-
Validate feature exists and phase exists.
|
|
69
|
-
|
|
70
|
-
**Parse arguments:**
|
|
71
|
-
Split $ARGUMENTS into feature-name and phase-number.
|
|
72
|
-
- First word: feature-name
|
|
73
|
-
- Second word: phase-number (numeric, e.g., "1", "2")
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# Check feature exists
|
|
77
|
-
[ -d ".specd/features/$FEATURE_NAME" ] || { echo "Feature not found"; exit 1; }
|
|
78
|
-
|
|
79
|
-
# Check ROADMAP.md exists
|
|
80
|
-
[ -f ".specd/features/$FEATURE_NAME/ROADMAP.md" ] || { echo "No roadmap"; exit 1; }
|
|
81
|
-
|
|
82
|
-
# Check phase directory exists
|
|
83
|
-
PHASE_DIR=".specd/features/$FEATURE_NAME/plans/phase-$(printf '%02d' $PHASE_NUMBER)"
|
|
84
|
-
[ -d "$PHASE_DIR" ] || { echo "Phase not found"; exit 1; }
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**If feature not found:**
|
|
88
|
-
```
|
|
89
|
-
Feature '{name}' not found.
|
|
90
|
-
|
|
91
|
-
Run /specd:new-feature {name} to create it.
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**If phase not found:**
|
|
95
|
-
```
|
|
96
|
-
Phase {N} not found for feature '{name}'.
|
|
97
|
-
|
|
98
|
-
Available phases in ROADMAP.md:
|
|
99
|
-
{list phases from ROADMAP.md}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Continue to load_context.
|
|
103
|
-
</step>
|
|
104
|
-
|
|
105
|
-
<step name="load_context">
|
|
106
|
-
Load all context needed for phase discussion.
|
|
107
|
-
|
|
108
|
-
**Read feature context:**
|
|
109
|
-
- `FEATURE.md` — Overall feature requirements
|
|
110
|
-
- `CONTEXT.md` — Feature-level resolutions (already discussed)
|
|
111
|
-
- `DECISIONS.md` — All decisions so far
|
|
112
|
-
- `ROADMAP.md` — Phase overview, understand this phase's role
|
|
113
|
-
|
|
114
|
-
**Read phase context:**
|
|
115
|
-
- All plan files in `plans/phase-{NN}/`
|
|
116
|
-
- Existing `plans/phase-{NN}/CONTEXT.md` if it exists (prior phase discussion)
|
|
117
|
-
- Existing `plans/phase-{NN}/RESEARCH.md` if it exists
|
|
118
|
-
|
|
119
|
-
**Extract from ROADMAP.md:**
|
|
120
|
-
- Phase title and goal
|
|
121
|
-
- Phase type (Types, API, UI, Integration, Business Logic, etc.)
|
|
122
|
-
- Files to be created/modified
|
|
123
|
-
- Dependencies on other phases
|
|
124
|
-
|
|
125
|
-
**Extract from plan files:**
|
|
126
|
-
- Specific tasks
|
|
127
|
-
- Files and changes
|
|
128
|
-
- Verification criteria
|
|
129
|
-
|
|
130
|
-
Continue to show_phase_state.
|
|
131
|
-
</step>
|
|
132
|
-
|
|
133
|
-
<step name="show_phase_state">
|
|
134
|
-
Present phase context to user.
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
138
|
-
DISCUSS PHASE {N}
|
|
139
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
140
|
-
|
|
141
|
-
**Feature:** {feature-name}
|
|
142
|
-
**Phase:** {N} — {Phase Title}
|
|
143
|
-
**Type:** {Phase Type}
|
|
144
|
-
|
|
145
|
-
## Phase Goal
|
|
146
|
-
|
|
147
|
-
{Goal from ROADMAP.md}
|
|
148
|
-
|
|
149
|
-
## Deliverables
|
|
150
|
-
|
|
151
|
-
Files to create:
|
|
152
|
-
- {file 1}
|
|
153
|
-
- {file 2}
|
|
154
|
-
|
|
155
|
-
Files to modify:
|
|
156
|
-
- {file 3}
|
|
157
|
-
|
|
158
|
-
## Plans in This Phase
|
|
159
|
-
|
|
160
|
-
- {plan 1 title}
|
|
161
|
-
- {plan 2 title}
|
|
162
|
-
|
|
163
|
-
{If phase CONTEXT.md exists:}
|
|
164
|
-
## Previously Discussed
|
|
165
|
-
|
|
166
|
-
{Summary from existing phase CONTEXT.md}
|
|
167
|
-
|
|
168
|
-
{If feature CONTEXT.md has relevant resolutions:}
|
|
169
|
-
## Relevant Feature Decisions
|
|
170
|
-
|
|
171
|
-
{Decisions from feature-level that affect this phase}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
Continue to identify_gray_areas.
|
|
175
|
-
</step>
|
|
176
|
-
|
|
177
|
-
<step name="identify_gray_areas">
|
|
178
|
-
Identify gray areas based on phase type.
|
|
179
|
-
|
|
180
|
-
**Determine phase type** from ROADMAP.md or infer from:
|
|
181
|
-
- "types", "schema", "models" → Types/Schema
|
|
182
|
-
- "api", "endpoint", "route" → API/Data
|
|
183
|
-
- "component", "ui", "page" → UI/Components
|
|
184
|
-
- "logic", "service", "util" → Business Logic
|
|
185
|
-
- "integration", "wiring", "setup" → Integration
|
|
186
|
-
|
|
187
|
-
**Select gray areas** from phase_type_gray_areas section based on type.
|
|
188
|
-
|
|
189
|
-
**Filter out already-resolved:**
|
|
190
|
-
- Check feature CONTEXT.md for resolutions that apply
|
|
191
|
-
- Check phase CONTEXT.md if it exists
|
|
192
|
-
- Remove any gray areas that are already clear
|
|
193
|
-
|
|
194
|
-
**Present:**
|
|
195
|
-
```
|
|
196
|
-
## Areas to Discuss
|
|
197
|
-
|
|
198
|
-
Based on this {Phase Type} phase, these areas could use clarity:
|
|
199
|
-
|
|
200
|
-
1. **{Gray area}** — {Why it matters for this phase}
|
|
201
|
-
2. **{Gray area}** — {Why it matters for this phase}
|
|
202
|
-
3. **{Gray area}** — {Why it matters for this phase}
|
|
203
|
-
4. **{Gray area}** — {Why it matters for this phase}
|
|
204
|
-
|
|
205
|
-
Which would you like to discuss? (Or describe something else)
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Use AskUserQuestion:
|
|
209
|
-
- header: "Phase Discussion"
|
|
210
|
-
- question: "Which area would you like to discuss for this phase?"
|
|
211
|
-
- options: List identified gray areas (up to 4)
|
|
212
|
-
- Add "Something else" as final option
|
|
213
|
-
|
|
214
|
-
Continue to probe_area.
|
|
215
|
-
</step>
|
|
216
|
-
|
|
217
|
-
<step name="probe_area">
|
|
218
|
-
Probe selected gray area until clear.
|
|
219
|
-
|
|
220
|
-
**For each selected area, ask up to 4 questions:**
|
|
221
|
-
|
|
222
|
-
**Question 1:** Open-ended
|
|
223
|
-
"For this phase's {area}, how do you see this working?"
|
|
224
|
-
|
|
225
|
-
**Question 2:** Clarify specifics
|
|
226
|
-
"When you say X, do you mean Y or Z?"
|
|
227
|
-
|
|
228
|
-
**Question 3:** Edge cases
|
|
229
|
-
"What should happen when {edge case specific to this phase}?"
|
|
230
|
-
|
|
231
|
-
**Question 4:** Confirm
|
|
232
|
-
"So for phase {N}, the approach would be {summary}. Correct?"
|
|
233
|
-
|
|
234
|
-
**After 4 questions (or earlier if clear):**
|
|
235
|
-
```
|
|
236
|
-
Let me capture what we've resolved for phase {N}:
|
|
237
|
-
|
|
238
|
-
**{Area}:**
|
|
239
|
-
- {Key point 1}
|
|
240
|
-
- {Key point 2}
|
|
241
|
-
- {Any code pattern implied}
|
|
242
|
-
|
|
243
|
-
Does that capture it?
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**If user confirms:** Continue to record
|
|
247
|
-
**If user corrects:** Adjust and confirm again
|
|
248
|
-
**If user wants another area:** Return to identify_gray_areas
|
|
249
|
-
|
|
250
|
-
Continue to record.
|
|
251
|
-
</step>
|
|
252
|
-
|
|
253
|
-
<step name="record">
|
|
254
|
-
Record phase discussion to CONTEXT.md and DECISIONS.md.
|
|
255
|
-
|
|
256
|
-
**Create/Update plans/phase-{NN}/CONTEXT.md:**
|
|
257
|
-
|
|
258
|
-
```markdown
|
|
259
|
-
# Phase {N} Context: {Phase Title}
|
|
260
|
-
|
|
261
|
-
**Feature:** {feature-name}
|
|
262
|
-
**Phase Type:** {type}
|
|
263
|
-
**Discussed:** {today}
|
|
264
|
-
|
|
265
|
-
## Phase Overview
|
|
266
|
-
|
|
267
|
-
{Brief description of what this phase accomplishes}
|
|
268
|
-
|
|
269
|
-
## Resolved Questions
|
|
270
|
-
|
|
271
|
-
### {Question title}
|
|
272
|
-
|
|
273
|
-
**Question:** {What was unclear}
|
|
274
|
-
**Resolution:** {The answer/decision}
|
|
275
|
-
**Details:**
|
|
276
|
-
- {Detail 1}
|
|
277
|
-
- {Detail 2}
|
|
278
|
-
|
|
279
|
-
{If code pattern implied:}
|
|
280
|
-
**Code Pattern:**
|
|
281
|
-
```{language}
|
|
282
|
-
{code example}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
**Related Decisions:** DEC-XXX
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
{Repeat for each resolved question}
|
|
290
|
-
|
|
291
|
-
## Gray Areas Remaining
|
|
292
|
-
|
|
293
|
-
{Any areas still unclear, or "None" if all resolved}
|
|
294
|
-
|
|
295
|
-
## Implications for Plans
|
|
296
|
-
|
|
297
|
-
{How these resolutions affect the plan execution}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**Update DECISIONS.md:**
|
|
301
|
-
|
|
302
|
-
For any new decisions made during phase discussion:
|
|
303
|
-
|
|
304
|
-
```markdown
|
|
305
|
-
### DEC-{NNN}: {Title}
|
|
306
|
-
|
|
307
|
-
**Date:** {today}
|
|
308
|
-
**Status:** Active
|
|
309
|
-
**Phase:** {N} — {Phase Title}
|
|
310
|
-
**Context:** {What situation required this decision — from phase discussion}
|
|
311
|
-
**Decision:** {What was decided}
|
|
312
|
-
**Rationale:**
|
|
313
|
-
- {Why this choice}
|
|
314
|
-
**Implications:**
|
|
315
|
-
- {What this means for phase implementation}
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
Continue to commit.
|
|
319
|
-
</step>
|
|
320
|
-
|
|
321
|
-
<step name="commit">
|
|
322
|
-
Commit the phase discussion.
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
# Add phase CONTEXT.md
|
|
326
|
-
git add ".specd/features/{feature}/plans/phase-{NN}/CONTEXT.md"
|
|
327
|
-
|
|
328
|
-
# Add updated DECISIONS.md if modified
|
|
329
|
-
git add ".specd/features/{feature}/DECISIONS.md"
|
|
330
|
-
|
|
331
|
-
git commit -m "docs({feature}): discuss phase {N} - {phase title}
|
|
332
|
-
|
|
333
|
-
Resolved:
|
|
334
|
-
- {Area 1}
|
|
335
|
-
- {Area 2}
|
|
336
|
-
|
|
337
|
-
New decisions: {count}"
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
Continue to completion.
|
|
341
|
-
</step>
|
|
342
|
-
|
|
343
|
-
<step name="completion">
|
|
344
|
-
Present summary and next options.
|
|
345
|
-
|
|
346
|
-
```
|
|
347
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
348
|
-
PHASE DISCUSSION COMPLETE
|
|
349
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
350
|
-
|
|
351
|
-
**Feature:** {feature-name}
|
|
352
|
-
**Phase:** {N} — {Phase Title}
|
|
353
|
-
|
|
354
|
-
## Resolved
|
|
355
|
-
|
|
356
|
-
- **{Area 1}:** {Brief resolution}
|
|
357
|
-
- **{Area 2}:** {Brief resolution}
|
|
358
|
-
|
|
359
|
-
## Files Created/Updated
|
|
360
|
-
|
|
361
|
-
- `plans/phase-{NN}/CONTEXT.md`
|
|
362
|
-
- `DECISIONS.md` ({count} new decisions)
|
|
363
|
-
|
|
364
|
-
───────────────────────────────────────────────────────
|
|
365
|
-
|
|
366
|
-
## What's Next
|
|
367
|
-
|
|
368
|
-
**/specd:research-phase {feature} {N}** — Research implementation patterns for this phase
|
|
369
|
-
|
|
370
|
-
**/specd:execute-plan {feature}** — Execute this phase (will load phase context)
|
|
371
|
-
|
|
372
|
-
**/specd:discuss-phase {feature} {N}** — Continue discussing this phase
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
End workflow.
|
|
376
|
-
</step>
|
|
377
|
-
|
|
378
|
-
</process>
|
|
379
|
-
|
|
380
|
-
<success_criteria>
|
|
381
|
-
- Feature and phase validated
|
|
382
|
-
- Phase context loaded (plans, goals, type)
|
|
383
|
-
- Phase-type-specific gray areas identified
|
|
384
|
-
- User-selected areas probed (4 questions max)
|
|
385
|
-
- Phase CONTEXT.md created/updated
|
|
386
|
-
- DECISIONS.md updated with phase-specific decisions
|
|
387
|
-
- Committed to git
|
|
388
|
-
- User knows next steps (research-phase or execute-plan)
|
|
389
|
-
</success_criteria>
|