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.
Files changed (34) hide show
  1. package/README.md +186 -68
  2. package/commands/specd/blueprint.md +64 -0
  3. package/commands/specd/{discuss-feature.md → feature/discuss.md} +1 -1
  4. package/commands/specd/{new-feature.md → feature/new.md} +3 -3
  5. package/commands/specd/{plan-feature.md → feature/plan.md} +15 -18
  6. package/commands/specd/{research-feature.md → feature/research.md} +5 -5
  7. package/commands/specd/help.md +51 -29
  8. package/commands/specd/{execute-plan.md → phase/execute.md} +4 -4
  9. package/commands/specd/phase/insert.md +62 -0
  10. package/commands/specd/phase/plan.md +73 -0
  11. package/commands/specd/{discuss-phase.md → phase/prepare.md} +21 -9
  12. package/commands/specd/phase/renumber.md +66 -0
  13. package/commands/specd/{research-phase.md → phase/research.md} +3 -1
  14. package/commands/specd/status.md +20 -0
  15. package/package.json +1 -1
  16. package/specdacular/agents/feature-researcher.md +4 -2
  17. package/specdacular/templates/blueprint/index.html +110 -0
  18. package/specdacular/templates/blueprint/scripts.js +71 -0
  19. package/specdacular/templates/blueprint/styles.css +429 -0
  20. package/specdacular/templates/features/STATE.md +6 -4
  21. package/specdacular/workflows/blueprint-diagrams.md +273 -0
  22. package/specdacular/workflows/blueprint-wireframes.md +312 -0
  23. package/specdacular/workflows/blueprint.md +372 -0
  24. package/specdacular/workflows/discuss-feature.md +4 -4
  25. package/specdacular/workflows/execute-plan.md +4 -4
  26. package/specdacular/workflows/insert-phase.md +222 -0
  27. package/specdacular/workflows/new-feature.md +5 -5
  28. package/specdacular/workflows/plan-feature.md +60 -233
  29. package/specdacular/workflows/plan-phase.md +363 -0
  30. package/specdacular/workflows/prepare-phase.md +759 -0
  31. package/specdacular/workflows/renumber-phases.md +273 -0
  32. package/specdacular/workflows/research-phase.md +5 -3
  33. package/specdacular/workflows/status.md +85 -0
  34. package/specdacular/workflows/discuss-phase.md +0 -389
@@ -1,30 +1,20 @@
1
1
  <purpose>
2
- Create executable task plans that an agent can implement without asking clarifying questions.
2
+ Create a roadmap with phase overview and empty phase directories. Detailed PLAN.md files are created later per-phase with `/specd:phase:plan`.
3
3
 
4
4
  **Key principles:**
5
- - Plans are prompts, not documents
6
- - Each task references specific files with exact paths
7
- - Include code patterns from codebase
8
- - Verification is executable commands
9
- - Tasks sized for ~15-60 min agent execution
5
+ - Roadmap defines phases with goals, deliverables, and dependencies
6
+ - Phases follow natural code dependencies (types->API->UI)
7
+ - Empty phase directories are created as scaffolding
8
+ - No PLAN.md files — those are created just-in-time per phase
10
9
 
11
- **Output:** ROADMAP.md + plans/phase-XX/YY-PLAN.md files
10
+ **Output:** ROADMAP.md + empty `plans/phase-XX/` directories
12
11
  </purpose>
13
12
 
14
13
  <philosophy>
15
14
 
16
- ## Plans Are Prompts
15
+ ## Roadmap, Not Plans
17
16
 
18
- Each PLAN.md is literally what you'd send to an implementing agent. It must contain everything needed to implement without asking questions:
19
- - What files to create/modify
20
- - What patterns to follow (with code examples)
21
- - How to verify success
22
- - When the task is done
23
-
24
- ## Specificity Over Abstraction
25
-
26
- **Bad:** "Create a component for displaying items"
27
- **Good:** "Create `src/components/ItemList/index.tsx` following pattern from `src/components/UserList/index.tsx`. Must export `ItemList` component that accepts `items: Item[]` prop..."
17
+ The roadmap defines WHAT each phase does and WHY it's ordered that way. The HOW (detailed plans) comes later, per phase, when context is freshest.
28
18
 
29
19
  ## Dependency-Driven Phases
30
20
 
@@ -36,21 +26,12 @@ Phases follow natural code dependencies:
36
26
 
37
27
  Each phase's output is input for the next.
38
28
 
39
- ## Task Sizing
40
-
41
- Each plan should contain 2-3 tasks. Each task should be:
42
- - Completable in 15-60 minutes of agent execution
43
- - Independently verifiable
44
- - Focused on related files
45
-
46
- Too big = agent loses context. Too small = overhead exceeds value.
47
-
48
- ## Verification Is Executable
29
+ ## Just-in-Time Detail
49
30
 
50
- **Bad:** "Make sure it works"
51
- **Good:** `npx tsc --noEmit && npm test -- --grep "ItemList"`
52
-
53
- Every task has a verification step. If you can't verify it with a command, add a specific manual check.
31
+ Creating detailed plans for all phases upfront means later plans go stale as earlier phases deviate. Instead:
32
+ 1. Create the roadmap (this workflow)
33
+ 2. For each phase: prepare -> plan -> execute
34
+ 3. Each phase's plans use the latest context
54
35
 
55
36
  </philosophy>
56
37
 
@@ -76,7 +57,7 @@ Validate feature exists and has required context.
76
57
  ```
77
58
  Feature '{name}' not found.
78
59
 
79
- Run /specd:new-feature {name} to create it.
60
+ Run /specd:feature:new {name} to create it.
80
61
  ```
81
62
 
82
63
  **If missing required files:**
@@ -84,7 +65,7 @@ Run /specd:new-feature {name} to create it.
84
65
  Feature '{name}' is missing required context for planning:
85
66
  - {missing file}
86
67
 
87
- Run /specd:discuss-feature {name} to build more context.
68
+ Run /specd:feature:discuss {name} to build more context.
88
69
  ```
89
70
 
90
71
  Continue to load_context.
@@ -115,7 +96,7 @@ Continue to assess_readiness.
115
96
  </step>
116
97
 
117
98
  <step name="assess_readiness">
118
- Check if there's enough context to create good plans.
99
+ Check if there's enough context to create a good roadmap.
119
100
 
120
101
  **Required for planning:**
121
102
  - [ ] Clear list of files to create
@@ -139,19 +120,19 @@ Feature '{name}' might benefit from more discussion before planning.
139
120
  - Gray areas remaining: {count}
140
121
 
141
122
  **Recommendation:**
142
- /specd:discuss-feature {name} — Resolve remaining gray areas
143
- /specd:research-feature {name} — Research implementation approach
123
+ /specd:feature:discuss {name} — Resolve remaining gray areas
124
+ /specd:feature:research {name} — Research implementation approach
144
125
 
145
- Continue anyway? (Plans may need revision)
126
+ Continue anyway? (Roadmap may need revision)
146
127
  ```
147
128
 
148
129
  Use AskUserQuestion:
149
130
  - header: "Plan Readiness"
150
131
  - question: "How would you like to proceed?"
151
132
  - options:
152
- - "Continue planning" — Create plans with current context
153
- - "Discuss first" — Run discuss-feature
154
- - "Research first" — Run research-feature
133
+ - "Continue planning" — Create roadmap with current context
134
+ - "Discuss first" — Run feature:discuss
135
+ - "Research first" — Run feature:research
155
136
 
156
137
  **If sufficient or user chooses to continue:**
157
138
  Continue to derive_phases.
@@ -204,139 +185,6 @@ Depends on: Phase 1
204
185
  Does this phasing make sense? Any adjustments?
205
186
  ```
206
187
 
207
- Continue to break_into_tasks.
208
- </step>
209
-
210
- <step name="break_into_tasks">
211
- Break each phase into tasks.
212
-
213
- **For each phase:**
214
-
215
- 1. Group related files into tasks (2-3 tasks per phase)
216
- 2. Order tasks by internal dependencies
217
- 3. Define clear boundaries
218
-
219
- **Task structure:**
220
- - Files: Specific paths (1-3 files per task)
221
- - Action: What to create/modify
222
- - Pattern: Code pattern to follow (with example)
223
- - Verify: Command to verify completion
224
- - Done: Completion criteria checklist
225
-
226
- **Example task breakdown:**
227
-
228
- Phase 1: Types & Schema
229
- - Task 1: Create type definitions
230
- - Task 2: Create database schema
231
-
232
- Phase 2: API Layer
233
- - Task 1: Create API route handlers
234
- - Task 2: Create API client functions
235
-
236
- Phase 3: UI Components
237
- - Task 1: Create core component
238
- - Task 2: Create supporting components
239
- - Task 3: Create styles/tests
240
-
241
- Continue to write_plans.
242
- </step>
243
-
244
- <step name="write_plans">
245
- Write PLAN.md files for each task.
246
-
247
- **Create plans directory:**
248
- ```bash
249
- mkdir -p .specd/features/{feature-name}/plans/phase-01
250
- mkdir -p .specd/features/{feature-name}/plans/phase-02
251
- # ... for each phase
252
- ```
253
-
254
- **For each plan, use template at `~/.claude/specdacular/templates/features/PLAN.md`**
255
-
256
- **Fill in plan content:**
257
-
258
- **Frontmatter:**
259
- ```yaml
260
- ---
261
- feature: {feature-name}
262
- phase: {N}
263
- plan: {NN}
264
- depends_on: [list of previous plan IDs]
265
- creates:
266
- - {exact/path/to/file.ts}
267
- modifies:
268
- - {exact/path/to/existing.ts}
269
- ---
270
- ```
271
-
272
- **Objective:**
273
- One sentence: what this accomplishes and why.
274
-
275
- **Context:**
276
- ```markdown
277
- **Reference these files:**
278
- - `@.specd/codebase/PATTERNS.md` — Code patterns
279
- - `@{path/to/pattern/file}` — Pattern to follow
280
-
281
- **Relevant Decisions:**
282
- - DEC-XXX: {Decision affecting this plan}
283
-
284
- **From Research:** (if RESEARCH.md exists)
285
- - {Key finding}
286
- - {Pitfall to avoid}
287
- ```
288
-
289
- **Tasks:**
290
- For each task:
291
- ```markdown
292
- ### Task N: {Title}
293
-
294
- **Files:** `{path/to/file}`
295
-
296
- **Action:**
297
- {Clear description with enough detail to implement}
298
-
299
- Follow pattern from `{path/to/example}`:
300
- ```{language}
301
- // Pattern to follow
302
- {actual code from codebase}
303
- ```
304
-
305
- Create:
306
- ```{language}
307
- // What to create (scaffold or full example)
308
- {code example}
309
- ```
310
-
311
- **Verify:**
312
- ```bash
313
- {verification command}
314
- ```
315
-
316
- **Done when:**
317
- - [ ] {Specific criterion}
318
- - [ ] {Specific criterion}
319
- ```
320
-
321
- **Verification section:**
322
- ```markdown
323
- ## Verification
324
-
325
- After all tasks complete:
326
-
327
- ```bash
328
- # Type check
329
- npx tsc --noEmit
330
-
331
- # Run tests
332
- npm test -- --grep "{pattern}"
333
- ```
334
-
335
- **Plan complete when:**
336
- - [ ] All tasks done
337
- - [ ] All verifications pass
338
- ```
339
-
340
188
  Continue to write_roadmap.
341
189
  </step>
342
190
 
@@ -349,7 +197,6 @@ Write ROADMAP.md with phase overview.
349
197
 
350
198
  **Overview table:**
351
199
  - Total phases
352
- - Total plans
353
200
  - Current phase: 1
354
201
  - Status: Not Started
355
202
 
@@ -359,7 +206,6 @@ Write ROADMAP.md with phase overview.
359
206
  - Goal
360
207
  - Creates (file list)
361
208
  - Modifies (file list)
362
- - Plans (with summaries)
363
209
  - Success criteria
364
210
  - Dependencies
365
211
 
@@ -368,6 +214,18 @@ Write ROADMAP.md with phase overview.
368
214
  **Key decisions affecting roadmap:**
369
215
  Reference decisions from DECISIONS.md that affect phase ordering
370
216
 
217
+ Continue to create_directories.
218
+ </step>
219
+
220
+ <step name="create_directories">
221
+ Create empty phase directories.
222
+
223
+ ```bash
224
+ mkdir -p .specd/features/{feature-name}/plans/phase-01
225
+ mkdir -p .specd/features/{feature-name}/plans/phase-02
226
+ # ... for each phase
227
+ ```
228
+
371
229
  Continue to update_state.
372
230
  </step>
373
231
 
@@ -375,22 +233,18 @@ Continue to update_state.
375
233
  Update STATE.md with planning status.
376
234
 
377
235
  **Update STATE.md:**
378
- - Stage: planning execution (ready)
379
- - Planning complete: yes
236
+ - Stage: discussion -> planned
237
+ - Roadmap created: yes
380
238
  - Add planning session to history
381
239
 
382
240
  **Update config.json:**
383
241
  ```json
384
242
  {
385
- "stage": "execution",
243
+ "stage": "planned",
386
244
  "phases": {
387
245
  "total": {N},
388
246
  "completed": 0,
389
247
  "current": 1
390
- },
391
- "plans": {
392
- "total": {N},
393
- "completed": 0
394
248
  }
395
249
  }
396
250
  ```
@@ -399,14 +253,13 @@ Continue to commit.
399
253
  </step>
400
254
 
401
255
  <step name="commit">
402
- Commit the plans.
256
+ Commit the roadmap.
403
257
 
404
258
  ```bash
405
259
  git add .specd/features/{feature-name}/ROADMAP.md .specd/features/{feature-name}/plans/ .specd/features/{feature-name}/STATE.md .specd/features/{feature-name}/config.json
406
- git commit -m "docs({feature-name}): create implementation plans
260
+ git commit -m "docs({feature-name}): create roadmap
407
261
 
408
262
  Phases: {N}
409
- Plans: {N}
410
263
 
411
264
  Phase structure:
412
265
  - Phase 1: {name}
@@ -418,69 +271,43 @@ Continue to completion.
418
271
  </step>
419
272
 
420
273
  <step name="completion">
421
- Present what was created and how to execute.
274
+ Present what was created and how to proceed.
422
275
 
423
276
  ```
424
277
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
425
- PLANS CREATED
426
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
278
+ ROADMAP CREATED
279
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
427
280
 
428
281
  **Feature:** {feature-name}
429
282
 
430
- ## Structure
431
-
432
- **Phases:** {N}
433
- **Plans:** {N total}
434
-
435
- ### Phase 1: {Name}
436
- - `plans/phase-01/01-PLAN.md` — {Summary}
437
- - `plans/phase-01/02-PLAN.md` — {Summary}
438
-
439
- ### Phase 2: {Name}
440
- - `plans/phase-02/01-PLAN.md` — {Summary}
283
+ ## Phases
441
284
 
285
+ **Phase 1:** {Name} — {Goal}
286
+ **Phase 2:** {Name} — {Goal}
442
287
  ...
443
288
 
444
289
  ## Files Created
445
290
 
446
291
  - `.specd/features/{feature-name}/ROADMAP.md`
447
- - `.specd/features/{feature-name}/plans/phase-01/01-PLAN.md`
448
- - `.specd/features/{feature-name}/plans/phase-01/02-PLAN.md`
292
+ - `.specd/features/{feature-name}/plans/phase-01/`
293
+ - `.specd/features/{feature-name}/plans/phase-02/`
449
294
  ...
450
295
 
451
296
  ───────────────────────────────────────────────────────
452
297
 
453
- ## How to Execute
298
+ ## What's Next — Phase by Phase
454
299
 
455
- Each plan is a self-contained prompt. To execute:
300
+ For each phase, the flow is:
456
301
 
457
- **Option 1: Sequential execution**
458
- Read each plan and implement:
459
- ```
460
- cat .specd/features/{feature-name}/plans/phase-01/01-PLAN.md
461
- ```
462
- Then implement what it describes.
463
-
464
- **Option 2: Agent execution**
465
- Give a plan to an implementing agent:
466
- "Implement the plan in `.specd/features/{feature-name}/plans/phase-01/01-PLAN.md`"
467
-
468
- **Start with Phase 1, Plan 01.**
469
-
470
- ───────────────────────────────────────────────────────
302
+ 1. `/specd:phase:prepare {feature} {N}` — Discuss gray areas + optional research
303
+ 2. `/specd:phase:plan {feature} {N}` — Create detailed task plans
304
+ 3. `/specd:phase:execute {feature}` — Execute with progress tracking
471
305
 
472
- ## Verification
306
+ **Start with Phase 1:**
473
307
 
474
- After each plan:
475
- 1. Run the plan's verification commands
476
- 2. Commit the changes
477
- 3. Update STATE.md (or let agent do it)
478
- 4. Move to next plan
308
+ /specd:phase:prepare {feature} 1 — Prepare the first phase
479
309
 
480
- After all plans in a phase:
481
- 1. Run phase success criteria checks
482
- 2. Mark phase complete in STATE.md
483
- 3. Move to next phase
310
+ <sub>/clear first fresh context window</sub>
484
311
  ```
485
312
 
486
313
  End workflow.
@@ -492,10 +319,10 @@ End workflow.
492
319
  - Feature validated with sufficient context
493
320
  - All context loaded and analyzed
494
321
  - Phases derived from dependency analysis
495
- - Tasks are specific (exact files, patterns, verification)
496
- - Each PLAN.md is a self-contained agent prompt
497
- - ROADMAP.md provides clear execution path
498
- - STATE.md updated to execution stage
322
+ - ROADMAP.md provides clear phase overview
323
+ - Empty phase directories created
324
+ - No PLAN.md files created
325
+ - STATE.md updated to "planned" stage
499
326
  - Committed to git
500
- - User knows how to execute plans
327
+ - User knows the per-phase flow: prepare -> plan -> execute
501
328
  </success_criteria>