specdacular 0.7.1 → 0.8.0

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.
Files changed (63) hide show
  1. package/README.md +72 -74
  2. package/commands/specd/continue.md +59 -0
  3. package/commands/specd/new.md +65 -0
  4. package/commands/specd/status.md +1 -1
  5. package/commands/specd/toolbox.md +59 -0
  6. package/package.json +1 -1
  7. package/specdacular/HELP.md +19 -16
  8. package/specdacular/agents/feature-researcher.md +4 -4
  9. package/specdacular/references/load-context.md +83 -0
  10. package/specdacular/references/record-decision.md +61 -0
  11. package/specdacular/references/select-feature.md +20 -20
  12. package/specdacular/references/select-phase.md +3 -3
  13. package/specdacular/references/spawn-research-agents.md +180 -0
  14. package/specdacular/references/synthesize-research.md +127 -0
  15. package/specdacular/references/validate-task.md +64 -0
  16. package/specdacular/templates/{features → tasks}/CHANGELOG.md +2 -8
  17. package/specdacular/templates/{features → tasks}/CONTEXT.md +6 -17
  18. package/specdacular/templates/tasks/DECISIONS.md +46 -0
  19. package/specdacular/templates/{features → tasks}/FEATURE.md +3 -3
  20. package/specdacular/templates/tasks/PLAN.md +91 -0
  21. package/specdacular/templates/tasks/RESEARCH.md +121 -0
  22. package/specdacular/templates/{features → tasks}/ROADMAP.md +6 -43
  23. package/specdacular/templates/tasks/STATE.md +93 -0
  24. package/specdacular/templates/tasks/config.json +15 -0
  25. package/specdacular/workflows/continue.md +275 -0
  26. package/specdacular/workflows/discuss.md +184 -0
  27. package/specdacular/workflows/execute.md +174 -0
  28. package/specdacular/workflows/new.md +299 -0
  29. package/specdacular/workflows/orchestrator/new.md +265 -0
  30. package/specdacular/workflows/orchestrator/plan.md +169 -0
  31. package/specdacular/workflows/plan.md +201 -0
  32. package/specdacular/workflows/research.md +166 -0
  33. package/specdacular/workflows/review.md +289 -0
  34. package/specdacular/workflows/status.md +17 -17
  35. package/commands/specd/blueprint.md +0 -64
  36. package/commands/specd/feature/continue.md +0 -84
  37. package/commands/specd/feature/new.md +0 -67
  38. package/commands/specd/feature/toolbox.md +0 -49
  39. package/specdacular/templates/blueprint/index.html +0 -110
  40. package/specdacular/templates/blueprint/scripts.js +0 -71
  41. package/specdacular/templates/blueprint/styles.css +0 -429
  42. package/specdacular/templates/features/DECISIONS.md +0 -109
  43. package/specdacular/templates/features/DEPENDENCIES.md +0 -47
  44. package/specdacular/templates/features/PLAN.md +0 -180
  45. package/specdacular/templates/features/RESEARCH.md +0 -183
  46. package/specdacular/templates/features/STATE.md +0 -110
  47. package/specdacular/templates/features/config.json +0 -20
  48. package/specdacular/workflows/blueprint-diagrams.md +0 -273
  49. package/specdacular/workflows/blueprint-wireframes.md +0 -312
  50. package/specdacular/workflows/blueprint.md +0 -372
  51. package/specdacular/workflows/continue-feature.md +0 -621
  52. package/specdacular/workflows/discuss-feature.md +0 -382
  53. package/specdacular/workflows/execute-plan.md +0 -636
  54. package/specdacular/workflows/insert-phase.md +0 -246
  55. package/specdacular/workflows/new-feature.md +0 -760
  56. package/specdacular/workflows/plan-feature.md +0 -691
  57. package/specdacular/workflows/plan-phase.md +0 -355
  58. package/specdacular/workflows/prepare-phase.md +0 -745
  59. package/specdacular/workflows/renumber-phases.md +0 -273
  60. package/specdacular/workflows/research-feature.md +0 -252
  61. package/specdacular/workflows/research-phase.md +0 -576
  62. package/specdacular/workflows/review-feature.md +0 -316
  63. package/specdacular/workflows/review-phase.md +0 -545
@@ -1,745 +0,0 @@
1
- <purpose>
2
- Prepare a phase for execution by discussing gray areas and optionally researching implementation patterns.
3
-
4
- **Key behaviors:**
5
- - Discussion always happens — phase-specific gray areas based on phase type
6
- - Research offered as optional at the end
7
- - Builds on feature-level context but focuses narrowly on this phase
8
- - Single command replaces the discuss-then-research two-step
9
-
10
- **Output:** `plans/phase-{NN}/CONTEXT.md` with resolved questions, updated DECISIONS.md, optionally `plans/phase-{NN}/RESEARCH.md`
11
- </purpose>
12
-
13
- <philosophy>
14
-
15
- ## Just-in-Time Clarification
16
-
17
- Don't try to clarify everything upfront. Discuss each phase right before executing it, when the context is freshest and questions are most concrete.
18
-
19
- ## Phase-Type Specific
20
-
21
- 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.
22
-
23
- ## Focused Context
24
-
25
- Unlike feature-level discussion which covers everything, phase discussion is narrow. Only discuss what's relevant to THIS phase's deliverables.
26
-
27
- ## Natural Flow
28
-
29
- Discussion often reveals what needs researching. Instead of two separate commands, offer research as a natural next step after discussion.
30
-
31
- </philosophy>
32
-
33
- <phase_type_gray_areas>
34
-
35
- ## Types/Schema Phase
36
- - Data model completeness — Are all fields defined?
37
- - Naming conventions — Consistent with codebase?
38
- - Relationships — How do types relate to each other?
39
- - Validation rules — What constraints apply?
40
- - Nullable fields — What can be undefined/null?
41
-
42
- ## API/Data Phase
43
- - Endpoint design — REST conventions, URL structure
44
- - Error responses — Format, status codes, messages
45
- - Pagination approach — Cursor vs offset, page size
46
- - Auth requirements — What auth is needed?
47
- - Rate limiting — Any throttling needed?
48
-
49
- ## Business Logic Phase
50
- - Edge cases — What unusual inputs can occur?
51
- - Validation rules — What makes data valid/invalid?
52
- - Error handling — How to handle failures?
53
- - Transaction boundaries — What operations are atomic?
54
-
55
- ## UI/Components Phase
56
- - Component hierarchy — How do components nest?
57
- - State management — Local vs global state
58
- - Loading states — What to show while loading?
59
- - Error states — How to display errors?
60
- - Accessibility — ARIA, keyboard navigation
61
-
62
- ## Integration Phase
63
- - Wiring points — Where does this connect?
64
- - Initialization order — What depends on what?
65
- - Dependency injection — How are deps provided?
66
- - Entry points — Where is this invoked from?
67
-
68
- </phase_type_gray_areas>
69
-
70
- <process>
71
-
72
- <step name="validate">
73
- Validate feature exists and phase exists.
74
-
75
- **Parse arguments:**
76
- Split $ARGUMENTS into feature-name and phase-number.
77
- - First word: feature-name
78
- - Second word: phase-number (numeric, e.g., "1", "2")
79
-
80
- ```bash
81
- # Check feature exists
82
- [ -d ".specd/features/$FEATURE_NAME" ] || { echo "Feature not found"; exit 1; }
83
-
84
- # Check ROADMAP.md exists
85
- [ -f ".specd/features/$FEATURE_NAME/ROADMAP.md" ] || { echo "No roadmap"; exit 1; }
86
-
87
- # Check phase directory exists
88
- PHASE_DIR=".specd/features/$FEATURE_NAME/plans/phase-$(printf '%02d' $PHASE_NUMBER)"
89
- [ -d "$PHASE_DIR" ] || { echo "Phase not found"; exit 1; }
90
- ```
91
-
92
- **If feature not found:**
93
- ```
94
- Feature '{name}' not found.
95
-
96
- Run /specd:feature:new {name} to create it.
97
- ```
98
-
99
- **If phase not found:**
100
- ```
101
- Phase {N} not found for feature '{name}'.
102
-
103
- Available phases in ROADMAP.md:
104
- {list phases from ROADMAP.md}
105
- ```
106
-
107
- Continue to load_context.
108
- </step>
109
-
110
- <step name="load_context">
111
- Load all context needed for phase preparation.
112
-
113
- **Read feature context:**
114
- - `FEATURE.md` — Overall feature requirements
115
- - `CONTEXT.md` — Feature-level resolutions (already discussed)
116
- - `DECISIONS.md` — All decisions so far
117
- - `ROADMAP.md` — Phase overview, understand this phase's role
118
-
119
- **Read phase context:**
120
- - All plan files in `plans/phase-{NN}/`
121
- - Existing `plans/phase-{NN}/CONTEXT.md` if it exists (prior phase discussion)
122
- - Existing `plans/phase-{NN}/RESEARCH.md` if it exists
123
-
124
- **Extract from ROADMAP.md:**
125
- - Phase title and goal
126
- - Phase type (Types, API, UI, Integration, Business Logic, etc.)
127
- - Files to be created/modified
128
- - Dependencies on other phases
129
-
130
- **Extract from plan files:**
131
- - Specific tasks
132
- - Files and changes
133
- - Verification criteria
134
-
135
- Continue to show_phase_state.
136
- </step>
137
-
138
- <step name="show_phase_state">
139
- Present phase context to user.
140
-
141
- ```
142
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
143
- PREPARE PHASE {N}
144
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
145
-
146
- **Feature:** {feature-name}
147
- **Phase:** {N} — {Phase Title}
148
- **Type:** {Phase Type}
149
-
150
- ## Phase Goal
151
-
152
- {Goal from ROADMAP.md}
153
-
154
- ## Deliverables
155
-
156
- Files to create:
157
- - {file 1}
158
- - {file 2}
159
-
160
- Files to modify:
161
- - {file 3}
162
-
163
- ## Plans in This Phase
164
-
165
- - {plan 1 title}
166
- - {plan 2 title}
167
-
168
- {If phase CONTEXT.md exists:}
169
- ## Previously Discussed
170
-
171
- {Summary from existing phase CONTEXT.md}
172
-
173
- {If feature CONTEXT.md has relevant resolutions:}
174
- ## Relevant Feature Decisions
175
-
176
- {Decisions from feature-level that affect this phase}
177
- ```
178
-
179
- Continue to identify_gray_areas.
180
- </step>
181
-
182
- <step name="identify_gray_areas">
183
- Identify gray areas based on phase type.
184
-
185
- **Determine phase type** from ROADMAP.md or infer from:
186
- - "types", "schema", "models" -> Types/Schema
187
- - "api", "endpoint", "route" -> API/Data
188
- - "component", "ui", "page" -> UI/Components
189
- - "logic", "service", "util" -> Business Logic
190
- - "integration", "wiring", "setup" -> Integration
191
-
192
- **Select gray areas** from phase_type_gray_areas section based on type.
193
-
194
- **Filter out already-resolved:**
195
- - Check feature CONTEXT.md for resolutions that apply
196
- - Check phase CONTEXT.md if it exists
197
- - Remove any gray areas that are already clear
198
-
199
- **Present:**
200
- ```
201
- ## Areas to Discuss
202
-
203
- Based on this {Phase Type} phase, these areas could use clarity:
204
-
205
- 1. **{Gray area}** — {Why it matters for this phase}
206
- 2. **{Gray area}** — {Why it matters for this phase}
207
- 3. **{Gray area}** — {Why it matters for this phase}
208
- 4. **{Gray area}** — {Why it matters for this phase}
209
-
210
- Which would you like to discuss? (Or describe something else)
211
- ```
212
-
213
- Use AskUserQuestion:
214
- - header: "Phase Discussion"
215
- - question: "Which area would you like to discuss for this phase?"
216
- - options: List identified gray areas (up to 4)
217
- - Add "Something else" as final option
218
-
219
- Continue to probe_area.
220
- </step>
221
-
222
- <step name="probe_area">
223
- Probe selected gray area until clear.
224
-
225
- **For each selected area, ask up to 4 questions:**
226
-
227
- **Question 1:** Open-ended
228
- "For this phase's {area}, how do you see this working?"
229
-
230
- **Question 2:** Clarify specifics
231
- "When you say X, do you mean Y or Z?"
232
-
233
- **Question 3:** Edge cases
234
- "What should happen when {edge case specific to this phase}?"
235
-
236
- **Question 4:** Confirm
237
- "So for phase {N}, the approach would be {summary}. Correct?"
238
-
239
- **After 4 questions (or earlier if clear):**
240
- ```
241
- Let me capture what we've resolved for phase {N}:
242
-
243
- **{Area}:**
244
- - {Key point 1}
245
- - {Key point 2}
246
- - {Any code pattern implied}
247
-
248
- Does that capture it?
249
- ```
250
-
251
- **If user confirms:** Continue to record_discussion
252
- **If user corrects:** Adjust and confirm again
253
- **If user wants another area:** Return to identify_gray_areas
254
-
255
- Continue to record_discussion.
256
- </step>
257
-
258
- <step name="record_discussion">
259
- Record phase discussion to CONTEXT.md and DECISIONS.md.
260
-
261
- **Create/Update plans/phase-{NN}/CONTEXT.md:**
262
-
263
- ```markdown
264
- # Phase {N} Context: {Phase Title}
265
-
266
- **Feature:** {feature-name}
267
- **Phase Type:** {type}
268
- **Discussed:** {today}
269
-
270
- ## Phase Overview
271
-
272
- {Brief description of what this phase accomplishes}
273
-
274
- ## Resolved Questions
275
-
276
- ### {Question title}
277
-
278
- **Question:** {What was unclear}
279
- **Resolution:** {The answer/decision}
280
- **Details:**
281
- - {Detail 1}
282
- - {Detail 2}
283
-
284
- {If code pattern implied:}
285
- **Code Pattern:**
286
- ```{language}
287
- {code example}
288
- ```
289
-
290
- **Related Decisions:** DEC-XXX
291
-
292
- ---
293
-
294
- {Repeat for each resolved question}
295
-
296
- ## Gray Areas Remaining
297
-
298
- {Any areas still unclear, or "None" if all resolved}
299
-
300
- ## Implications for Plans
301
-
302
- {How these resolutions affect the plan execution}
303
- ```
304
-
305
- **Update DECISIONS.md:**
306
-
307
- For any new decisions made during phase discussion:
308
-
309
- ```markdown
310
- ### DEC-{NNN}: {Title}
311
-
312
- **Date:** {today}
313
- **Status:** Active
314
- **Phase:** {N} — {Phase Title}
315
- **Context:** {What situation required this decision — from phase discussion}
316
- **Decision:** {What was decided}
317
- **Rationale:**
318
- - {Why this choice}
319
- **Implications:**
320
- - {What this means for phase implementation}
321
- ```
322
-
323
- Continue to offer_research.
324
- </step>
325
-
326
- <step name="offer_research">
327
- Offer research as an optional next step.
328
-
329
- ```
330
- ───────────────────────────────────────────────────────
331
-
332
- Discussion captured. Would you like to research implementation patterns for this phase?
333
-
334
- Research spawns 3 parallel agents to investigate:
335
- 1. **Codebase Integration** — How phase files fit with existing code
336
- 2. **{Phase Type} Patterns** — Standard approaches
337
- 3. **{Phase Type} Pitfalls** — What goes wrong
338
-
339
- This takes a few minutes but produces targeted guidance.
340
- ```
341
-
342
- Use AskUserQuestion:
343
- - header: "Research?"
344
- - question: "Research implementation patterns for this phase?"
345
- - options:
346
- - "Yes, research" — Continue to spawn_agents
347
- - "Skip research" — Continue to commit
348
-
349
- **If skip:** Continue to commit.
350
- **If yes:** Continue to spawn_agents.
351
- </step>
352
-
353
- <step name="spawn_agents">
354
- Spawn three parallel research agents (same as research-phase workflow).
355
-
356
- ### Agent 1: Codebase Integration (using Explore agent)
357
-
358
- ```
359
- Task(
360
- prompt="Research how phase {N} of {feature-name} should integrate with the existing codebase.
361
-
362
- <phase_context>
363
- Phase: {N} — {Phase Title}
364
- Type: {Phase Type}
365
- Goal: {Phase goal from ROADMAP.md}
366
-
367
- Files to create:
368
- {list of files}
369
-
370
- Files to modify:
371
- {list of files}
372
- </phase_context>
373
-
374
- <locked_decisions>
375
- {Relevant decisions from DECISIONS.md}
376
- </locked_decisions>
377
-
378
- <research_questions>
379
- 1. What existing files/modules will this phase's files need to import from?
380
- 2. What patterns do similar {phase type} files in this codebase follow?
381
- 3. Where exactly should new files be created?
382
- 4. What types/interfaces already exist that should be reused?
383
- 5. What utility functions or hooks can be leveraged?
384
- </research_questions>
385
-
386
- <output_format>
387
- Return findings as structured markdown:
388
-
389
- ## Codebase Integration for Phase {N}
390
-
391
- ### Import Dependencies
392
- - `path/to/file` — what it provides, why needed
393
-
394
- ### Patterns to Follow
395
- - Pattern name: description, example file reference
396
-
397
- ### File Locations
398
- - Exactly where each new file should go
399
-
400
- ### Reusable Code
401
- - Types: list with paths
402
- - Utilities: list with paths
403
-
404
- ### Integration Points
405
- - Where this phase's code connects to existing code
406
- </output_format>
407
- ",
408
- subagent_type="Explore",
409
- description="Phase codebase integration"
410
- )
411
- ```
412
-
413
- ### Agent 2: Phase-Type Patterns Research
414
-
415
- ```
416
- Task(
417
- prompt="First, read ~/.claude/specdacular/agents/feature-researcher.md for your role.
418
-
419
- <research_type>
420
- {Phase Type} patterns research for phase {N} of {feature-name}.
421
- </research_type>
422
-
423
- <phase_context>
424
- Phase: {N} — {Phase Title}
425
- Type: {Phase Type}
426
- Goal: {Phase goal}
427
-
428
- Files to create:
429
- {list of files}
430
- </phase_context>
431
-
432
- <codebase_stack>
433
- {From .specd/codebase/ if available}
434
- </codebase_stack>
435
-
436
- <research_questions>
437
- 1. What's the standard approach for {phase type} in this stack?
438
- 2. What libraries are commonly used for {phase type}?
439
- 3. What code patterns work well for {phase type}?
440
- 4. What should NOT be hand-rolled?
441
- </research_questions>
442
-
443
- <tool_strategy>
444
- 1. Context7 first for any library questions
445
- 2. Official docs via WebFetch for gaps
446
- 3. WebSearch for patterns (include current year)
447
- 4. Verify all findings
448
- </tool_strategy>
449
-
450
- <output_format>
451
- Return findings as structured markdown with confidence levels.
452
-
453
- ## {Phase Type} Patterns
454
-
455
- ### Standard Approach
456
- {Recommended approach with rationale}
457
-
458
- ### Libraries
459
- | Library | Version | Purpose | Confidence |
460
-
461
- ### Code Patterns
462
- {Code examples with sources}
463
-
464
- ### Don't Hand-Roll
465
- | Problem | Use Instead | Why |
466
- </output_format>
467
- ",
468
- subagent_type="general-purpose",
469
- model="sonnet",
470
- description="Phase type patterns"
471
- )
472
- ```
473
-
474
- ### Agent 3: Phase-Type Pitfalls Research
475
-
476
- ```
477
- Task(
478
- prompt="First, read ~/.claude/specdacular/agents/feature-researcher.md for your role.
479
-
480
- <research_type>
481
- Pitfalls research for {Phase Type} work in phase {N} of {feature-name}.
482
- </research_type>
483
-
484
- <phase_context>
485
- Phase: {N} — {Phase Title}
486
- Type: {Phase Type}
487
- Goal: {Phase goal}
488
-
489
- Files to create:
490
- {list of files}
491
- </phase_context>
492
-
493
- <research_questions>
494
- 1. What do developers commonly get wrong with {phase type}?
495
- 2. What are the performance pitfalls for {phase type}?
496
- 3. What security issues should be avoided?
497
- 4. What integration mistakes happen with {phase type}?
498
- </research_questions>
499
-
500
- <tool_strategy>
501
- 1. WebSearch for common mistakes (include current year)
502
- 2. Look for post-mortems, issue discussions
503
- 3. Check official docs for warnings/caveats
504
- </tool_strategy>
505
-
506
- <output_format>
507
- Return pitfalls as structured markdown:
508
-
509
- ## {Phase Type} Pitfalls
510
-
511
- ### Critical (causes failures/rewrites)
512
- - Pitfall: description
513
- - Why it happens
514
- - Prevention
515
- - Detection
516
-
517
- ### Moderate (causes bugs/debt)
518
- - Pitfall: description
519
- - Prevention
520
-
521
- ### Minor (causes friction)
522
- - Pitfall: description
523
- - Prevention
524
- </output_format>
525
- ",
526
- subagent_type="general-purpose",
527
- model="sonnet",
528
- description="Phase type pitfalls"
529
- )
530
- ```
531
-
532
- Wait for all agents to complete.
533
-
534
- Continue to synthesize.
535
- </step>
536
-
537
- <step name="synthesize">
538
- Combine agent results into single RESEARCH.md.
539
-
540
- **Create plans/phase-{NN}/RESEARCH.md:**
541
-
542
- ```markdown
543
- # Phase {N} Research: {Phase Title}
544
-
545
- **Feature:** {feature-name}
546
- **Phase Type:** {Phase Type}
547
- **Researched:** {today}
548
-
549
- ## Summary
550
-
551
- {2-3 paragraphs synthesizing all findings for this phase}
552
-
553
- **Key recommendation:** {One-liner actionable guidance}
554
-
555
- ---
556
-
557
- ## Codebase Integration
558
-
559
- {From Agent 1 — Explore findings}
560
-
561
- ### Import From
562
- | Module | Provides | Path |
563
- |--------|----------|------|
564
- | ... | ... | ... |
565
-
566
- ### Patterns to Follow
567
- {Patterns with file references}
568
-
569
- ### File Locations
570
- ```
571
- {exact paths for new files}
572
- ```
573
-
574
- ### Reusable Code
575
- - **Types:** {list with @paths}
576
- - **Utilities:** {list with @paths}
577
-
578
- ### Integration Points
579
- {Where this phase connects to existing code}
580
-
581
- ---
582
-
583
- ## {Phase Type} Patterns
584
-
585
- {From Agent 2 — Pattern findings}
586
-
587
- ### Standard Approach
588
- {Recommended approach with rationale}
589
-
590
- ### Libraries
591
- | Library | Version | Purpose | Confidence |
592
- |---------|---------|---------|------------|
593
- | ... | ... | ... | HIGH/MED |
594
-
595
- ### Code Patterns
596
- ```typescript
597
- // Pattern name - source: {Context7/docs URL}
598
- {code example}
599
- ```
600
-
601
- ### Don't Hand-Roll
602
- | Problem | Use Instead | Why |
603
- |---------|-------------|-----|
604
- | ... | ... | ... |
605
-
606
- ---
607
-
608
- ## Pitfalls
609
-
610
- {From Agent 3 — Pitfalls findings}
611
-
612
- ### Critical
613
- {List with prevention strategies}
614
-
615
- ### Moderate
616
- {List with prevention strategies}
617
-
618
- ### Phase-Specific Warnings
619
- | When Implementing | Watch Out For | Prevention |
620
- |-------------------|---------------|------------|
621
- | ... | ... | ... |
622
-
623
- ---
624
-
625
- ## Confidence Assessment
626
-
627
- | Area | Level | Reason |
628
- |------|-------|--------|
629
- | Codebase integration | {level} | {reason} |
630
- | {Phase type} patterns | {level} | {reason} |
631
- | Pitfalls | {level} | {reason} |
632
-
633
- ## Open Questions
634
-
635
- {Anything that couldn't be resolved}
636
-
637
- ## Sources
638
-
639
- ### Codebase (from Explore)
640
- - {file references used}
641
-
642
- ### External (verified)
643
- - {Context7 queries}
644
- - {Official docs URLs}
645
- ```
646
-
647
- Continue to record_research_decisions.
648
- </step>
649
-
650
- <step name="record_research_decisions">
651
- Record any technology choices from research.
652
-
653
- **Identify decisions from synthesis:**
654
- - Library choices
655
- - Pattern choices
656
- - Approach choices
657
-
658
- **For each new decision, add to DECISIONS.md:**
659
-
660
- ```markdown
661
- ### DEC-{NNN}: {Title}
662
-
663
- **Date:** {today}
664
- **Status:** Active
665
- **Phase:** {N} — {Phase Title}
666
- **Context:** Identified during phase research
667
- **Decision:** {What was decided}
668
- **Rationale:** {From research findings}
669
- **Implications:** {What this means for implementation}
670
- **References:** {Sources}
671
- ```
672
-
673
- Continue to commit.
674
- </step>
675
-
676
- <step name="commit">
677
- Commit the phase preparation.
678
-
679
- @~/.claude/specdacular/references/commit-docs.md
680
-
681
- - **$FILES:** `.specd/features/{feature}/plans/phase-{NN}/CONTEXT.md .specd/features/{feature}/plans/phase-{NN}/RESEARCH.md .specd/features/{feature}/DECISIONS.md` (skip RESEARCH.md if not created)
682
- - **$MESSAGE:** `docs({feature}): prepare phase {N} - {phase title}` with resolved areas and decision count
683
- - **$LABEL:** `phase preparation`
684
-
685
- Continue to completion.
686
- </step>
687
-
688
- <step name="completion">
689
- Present summary and next options.
690
-
691
- ```
692
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
693
- PHASE PREPARATION COMPLETE
694
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
695
-
696
- **Feature:** {feature-name}
697
- **Phase:** {N} — {Phase Title}
698
-
699
- ## Resolved
700
-
701
- - **{Area 1}:** {Brief resolution}
702
- - **{Area 2}:** {Brief resolution}
703
-
704
- {If research:}
705
- ## Research
706
-
707
- - Codebase integration patterns identified
708
- - {Phase Type} patterns documented
709
- - Pitfalls catalogued with prevention strategies
710
-
711
- ## Files Created/Updated
712
-
713
- - `plans/phase-{NN}/CONTEXT.md`
714
- {If research:}- `plans/phase-{NN}/RESEARCH.md`
715
- - `DECISIONS.md` ({count} new decisions)
716
-
717
- ───────────────────────────────────────────────────────
718
-
719
- ## What's Next
720
-
721
- {If no PLAN.md files exist for this phase:}
722
- **/specd:phase:plan {feature} {N}** — Create detailed plans for this phase
723
-
724
- {If PLAN.md files already exist:}
725
- **/specd:phase:execute {feature}** — Execute this phase
726
-
727
- <sub>/clear first — fresh context window</sub>
728
- ```
729
-
730
- End workflow.
731
- </step>
732
-
733
- </process>
734
-
735
- <success_criteria>
736
- - Feature and phase validated
737
- - Phase context loaded (plans, goals, type)
738
- - Phase-type-specific gray areas identified
739
- - User-selected areas probed (4 questions max)
740
- - Phase CONTEXT.md created/updated
741
- - DECISIONS.md updated with phase-specific decisions
742
- - Research completed (if user opted in)
743
- - Committed to git
744
- - User knows next steps (phase:plan or phase:execute)
745
- </success_criteria>