@leeovery/claude-technical-workflows 2.0.28 → 2.0.30

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.
@@ -0,0 +1,613 @@
1
+ ---
2
+ description: Start a specification session from existing discussions. Discovers available discussions, offers consolidation assessment for multiple discussions, and invokes the technical-specification skill.
3
+ allowed-tools: Bash(./scripts/specification-discovery.sh), Bash(mkdir -p docs/workflow/.cache), Bash(rm docs/workflow/.cache/discussion-consolidation-analysis.md)
4
+ ---
5
+
6
+ Invoke the **technical-specification** skill for this conversation.
7
+
8
+ ## Workflow Context
9
+
10
+ This is **Phase 3** of the six-phase workflow:
11
+
12
+ | Phase | Focus | You |
13
+ |-------|-------|-----|
14
+ | 1. Research | EXPLORE - ideas, feasibility, market, business | |
15
+ | 2. Discussion | WHAT and WHY - decisions, architecture, edge cases | |
16
+ | **3. Specification** | REFINE - validate into standalone spec | ◀ HERE |
17
+ | 4. Planning | HOW - phases, tasks, acceptance criteria | |
18
+ | 5. Implementation | DOING - tests first, then code | |
19
+ | 6. Review | VALIDATING - check work against artifacts | |
20
+
21
+ **Stay in your lane**: Validate and refine discussion content into standalone specifications. Don't jump to planning, phases, tasks, or code. The specification is the "line in the sand" - everything after this has hard dependencies on it.
22
+
23
+ ---
24
+
25
+ ## Instructions
26
+
27
+ Follow these steps EXACTLY as written. Do not skip steps or combine them. Present output using the EXACT format shown in examples - do not simplify or alter the formatting.
28
+
29
+ **CRITICAL**: After each user interaction, STOP and wait for their response before proceeding. Never assume or anticipate user choices.
30
+
31
+ ---
32
+
33
+ ## Step 1: Run Discovery Script
34
+
35
+ Run the discovery script to gather current state:
36
+
37
+ ```bash
38
+ ./scripts/specification-discovery.sh
39
+ ```
40
+
41
+ This outputs structured YAML. Parse it to understand:
42
+
43
+ **From `discussions` array:**
44
+ - Each discussion's name, status, and whether it has an individual specification
45
+
46
+ **From `specifications` array:**
47
+ - Each specification's name, status, sources, and superseded_by (if applicable)
48
+ - Specifications with `status: superseded` should be noted but excluded from active counts
49
+
50
+ **From `cache` section:**
51
+ - Whether a consolidation analysis cache exists
52
+ - The `anchored_names` list - these are grouping names that have existing specifications and MUST be preserved in any regeneration
53
+
54
+ **From `cache_validity` section:**
55
+ - Whether the cache is still valid (`is_valid: true/false`)
56
+ - The reason if invalid
57
+
58
+ **IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state - the script provides everything needed.
59
+
60
+ → Proceed to **Step 2**.
61
+
62
+ ---
63
+
64
+ ## Step 2: Check Prerequisites
65
+
66
+ #### If no discussions exist
67
+
68
+ ```
69
+ No discussions found in docs/workflow/discussion/
70
+
71
+ The specification phase requires a completed discussion. Please run /workflow:start-discussion first to document the technical decisions, edge cases, and rationale before creating a specification.
72
+ ```
73
+
74
+ **STOP.** Wait for user acknowledgment. Do not proceed.
75
+
76
+ #### If discussions exist but none are concluded
77
+
78
+ ```
79
+ No concluded discussions found.
80
+
81
+ The following discussions are still exploring:
82
+ - {topic-1} (exploring)
83
+ - {topic-2} (exploring)
84
+
85
+ Please complete the discussion phase before creating specifications. Run /workflow:start-discussion to continue a discussion.
86
+ ```
87
+
88
+ **STOP.** Wait for user acknowledgment. Do not proceed.
89
+
90
+ #### Otherwise
91
+
92
+ At least one concluded discussion exists.
93
+
94
+ → Proceed to **Step 3**.
95
+
96
+ ---
97
+
98
+ ## Step 3: Present Status & Route
99
+
100
+ Show the current state clearly. Use this EXACT format:
101
+
102
+ ```
103
+ Workflow Status: Specification Phase
104
+
105
+ Discussions:
106
+ ✓ {topic-1} - concluded - ready
107
+ ✓ {topic-2} - concluded - ready
108
+ ○ {topic-3} - concluded - has individual spec
109
+ · {topic-4} - exploring - not ready
110
+
111
+ Specifications:
112
+ • {spec-1} (active) - sources: {topic-1}
113
+ • {spec-2} (superseded → {other-spec}) - sources: {topic-x}
114
+
115
+ {N} concluded discussions available.
116
+ ```
117
+
118
+ **Legend:**
119
+ - `✓` = concluded, no spec yet (ready to specify)
120
+ - `○` = concluded, has individual spec (can be combined or continued)
121
+ - `·` = not concluded (not ready)
122
+
123
+ #### Routing Based on State
124
+
125
+ #### If only ONE concluded discussion exists
126
+
127
+ This is the simple path - no choices needed.
128
+
129
+ ```
130
+ Single concluded discussion found: {topic}
131
+ {If has spec: "An existing specification will be continued/refined."}
132
+
133
+ Proceeding with this discussion.
134
+ ```
135
+
136
+ → Skip to **Step 9: Confirm Selection** with that discussion as the source.
137
+
138
+ #### If MULTIPLE concluded discussions exist with NO existing specifications
139
+
140
+ No existing specs to continue - proceed directly to analysis.
141
+
142
+ ```
143
+ {N} concluded discussions found.
144
+
145
+ Analyzing discussions for natural groupings...
146
+ ```
147
+
148
+ → Proceed to **Step 4: Gather Analysis Context**.
149
+
150
+ #### If MULTIPLE concluded discussions exist WITH existing specifications
151
+
152
+ ```
153
+ What would you like to do?
154
+
155
+ 1. **Continue an existing specification** - Resume work on a spec in progress
156
+ 2. **Assess for groupings** - Analyze discussions for combinations
157
+
158
+ Which approach?
159
+ ```
160
+
161
+ **STOP.** Wait for user response.
162
+
163
+ #### If "Continue an existing specification"
164
+
165
+ ```
166
+ Which specification would you like to continue?
167
+
168
+ 1. {spec-1} ({status}) - sources: {topics}
169
+ 2. {spec-2} ({status}) - sources: {topics}
170
+ ```
171
+
172
+ **STOP.** Wait for user to pick, then skip to **Step 9**.
173
+
174
+ #### If "Assess for groupings"
175
+
176
+ → Proceed to **Step 4: Gather Analysis Context**.
177
+
178
+ ---
179
+
180
+ ## Step 4: Gather Analysis Context
181
+
182
+ ```
183
+ Before I analyze the discussions, is there anything about your project structure or how these topics relate that would help me group them appropriately?
184
+
185
+ For example:
186
+ - Are certain topics part of the same feature or subsystem?
187
+ - Are there dependencies I should know about?
188
+ - Any topics that MUST stay separate?
189
+ ```
190
+
191
+ **STOP.** Wait for user response. Note their input for the analysis.
192
+
193
+ → Proceed to **Step 5**.
194
+
195
+ ---
196
+
197
+ ## Step 5: Check Cache Validity
198
+
199
+ Check the `cache_validity.is_valid` value from the discovery state.
200
+
201
+ #### If cache is valid
202
+
203
+ ```
204
+ Using cached analysis
205
+
206
+ Discussion documents unchanged since last analysis ({cached_date}).
207
+ Loading previously identified groupings...
208
+ ```
209
+
210
+ Load groupings from cache and → Skip to **Step 7: Present Grouping Options**.
211
+
212
+ #### If cache is invalid or missing
213
+
214
+ ```
215
+ {Reason from cache_validity.reason}
216
+
217
+ Analyzing discussions...
218
+ ```
219
+
220
+ → Proceed to **Step 6: Analyze Discussions**.
221
+
222
+ ---
223
+
224
+ ## Step 6: Analyze Discussions
225
+
226
+ **This step is critical. You MUST read every concluded discussion document thoroughly.**
227
+
228
+ For each concluded discussion:
229
+ 1. Read the ENTIRE document using the Read tool (not just frontmatter)
230
+ 2. Understand the decisions, systems, and concepts it defines
231
+ 3. Note dependencies on or references to other discussions
232
+ 4. Identify shared data structures, entities, or behaviors
233
+
234
+ Then analyze coupling between discussions:
235
+ - **Data coupling**: Discussions that define or depend on the same data structures
236
+ - **Behavioral coupling**: Discussions where one's implementation requires another
237
+ - **Conceptual coupling**: Discussions that address different facets of the same problem
238
+
239
+ Group discussions that are tightly coupled - they should become a single specification because their decisions are inseparable.
240
+
241
+ #### Preserve Anchored Names
242
+
243
+ **CRITICAL**: Check the `cache.anchored_names` from discovery state. These are grouping names that have existing specifications.
244
+
245
+ When forming groupings:
246
+ - If a grouping contains a majority of the same discussions as an anchored name's spec, you MUST reuse that anchored name
247
+ - Only create new names for genuinely new groupings with no overlap
248
+ - If an anchored spec's discussions are now scattered across multiple new groupings, note this as a **naming conflict** to present to the user
249
+
250
+ #### Save to Cache
251
+
252
+ After analysis, create the cache directory if needed:
253
+ ```bash
254
+ mkdir -p docs/workflow/.cache
255
+ ```
256
+
257
+ Write to `docs/workflow/.cache/discussion-consolidation-analysis.md`:
258
+
259
+ ```markdown
260
+ ---
261
+ checksum: {checksum from current_state.discussions_checksum}
262
+ generated: {ISO date}
263
+ discussion_files:
264
+ - {topic1}.md
265
+ - {topic2}.md
266
+ ---
267
+
268
+ # Discussion Consolidation Analysis
269
+
270
+ ## Recommended Groupings
271
+
272
+ ### {Suggested Specification Name}
273
+ - **{topic-a}**: {why it belongs in this group}
274
+ - **{topic-b}**: {why it belongs in this group}
275
+ - **{topic-c}**: {why it belongs in this group}
276
+
277
+ **Coupling**: {Brief explanation of what binds these together}
278
+
279
+ ### {Another Specification Name}
280
+ - **{topic-d}**: {why it belongs}
281
+ - **{topic-e}**: {why it belongs}
282
+
283
+ **Coupling**: {Brief explanation}
284
+
285
+ ## Independent Discussions
286
+ - **{topic-f}**: {Why this stands alone - no strong coupling to others}
287
+
288
+ ## Analysis Notes
289
+ {Any additional context about the relationships discovered}
290
+ {Note any naming conflicts with anchored specs here}
291
+ ```
292
+
293
+ → Proceed to **Step 7**.
294
+
295
+ ---
296
+
297
+ ## Step 7: Present Grouping Options
298
+
299
+ Present the groupings with FULL status information.
300
+
301
+ For each grouping, show:
302
+ - The grouping name
303
+ - Whether a specification already exists for this grouping
304
+ - Each discussion in the grouping and whether it has an individual spec
305
+
306
+ **Format:**
307
+
308
+ ```
309
+ {Fresh analysis / Cached analysis} complete
310
+
311
+ Recommended Groupings:
312
+
313
+ ### 1. {Grouping Name} {if spec exists: "(specification exists)"}
314
+ | Discussion | Status |
315
+ |------------|--------|
316
+ | {topic-a} | discussion only |
317
+ | {topic-b} | has individual spec |
318
+ | {topic-c} | discussion only |
319
+
320
+ Coupling: {explanation}
321
+
322
+ ### 2. {Another Grouping}
323
+ | Discussion | Status |
324
+ |------------|--------|
325
+ | {topic-d} | discussion only |
326
+
327
+ Coupling: {explanation}
328
+
329
+ ### Independent
330
+ - {topic-f}: standalone
331
+
332
+ ---
333
+
334
+ How would you like to proceed?
335
+
336
+ 1. **Combine as recommended** - I'll ask which grouping to start with
337
+ 2. **Combine differently** - Tell me your preferred groupings
338
+ 3. **Single specification** - Consolidate ALL into one unified spec
339
+ 4. **Individual specifications** - Create 1:1 specs (I'll ask which to start)
340
+
341
+ (Enter 'refresh' to re-analyze)
342
+ ```
343
+
344
+ **STOP.** Wait for user to choose.
345
+
346
+ → Based on choice, proceed to **Step 8**.
347
+
348
+ ---
349
+
350
+ ## Step 8: Select Grouping
351
+
352
+ Based on user's choice from Step 7:
353
+
354
+ #### If "Combine as recommended"
355
+
356
+ ```
357
+ Which grouping would you like to start with?
358
+
359
+ 1. {Grouping Name A} - {N} discussions
360
+ 2. {Grouping Name B} - {N} discussions (specification exists)
361
+ 3. {Grouping Name C} - {N} discussions
362
+ ```
363
+
364
+ **STOP.** Wait for user to pick a number, then proceed to **Step 9**.
365
+
366
+ #### If "Combine differently"
367
+
368
+ ```
369
+ Please describe your preferred groupings. Which discussions should be combined together?
370
+ ```
371
+
372
+ **STOP.** Wait for user to describe their groupings.
373
+
374
+ Confirm understanding and present as a numbered list. Check if any grouping names match existing specifications.
375
+
376
+ ```
377
+ Based on your description, here are the groupings:
378
+
379
+ 1. {User's Grouping A} - {topics}
380
+ 2. {User's Grouping B} - {topics}
381
+
382
+ Which grouping would you like to start with?
383
+ ```
384
+
385
+ **STOP.** Wait for user to pick, then proceed to **Step 9**.
386
+
387
+ #### If "Single specification"
388
+
389
+ Use "unified" as the specification name.
390
+ Check if `docs/workflow/specification/unified.md` already exists.
391
+
392
+ ```
393
+ {If exists: "A unified specification already exists. Proceeding will continue/refine it."}
394
+
395
+ This will consolidate ALL {N} concluded discussions into a single specification.
396
+
397
+ Proceed with unified specification? (y/n)
398
+ ```
399
+
400
+ **STOP.** Wait for user to confirm, then proceed to **Step 9** with all discussions as sources.
401
+
402
+ #### If "Individual specifications"
403
+
404
+ ```
405
+ Which discussion would you like to specify?
406
+
407
+ 1. {topic-1}
408
+ 2. {topic-2} (has individual spec - will continue/refine)
409
+ 3. {topic-3}
410
+ ```
411
+
412
+ **STOP.** Wait for user to pick, then proceed to **Step 9**.
413
+
414
+ #### If "refresh"
415
+
416
+ ```
417
+ Refreshing analysis...
418
+ ```
419
+
420
+ Delete the cache file:
421
+ ```bash
422
+ rm docs/workflow/.cache/discussion-consolidation-analysis.md
423
+ ```
424
+
425
+ → Return to **Step 6: Analyze Discussions**.
426
+
427
+ ---
428
+
429
+ ## Step 9: Confirm Selection
430
+
431
+ Present what will happen based on the selection:
432
+
433
+ #### If creating a NEW grouped specification (with individual specs to incorporate)
434
+
435
+ ```
436
+ Creating specification: {grouping-name}
437
+
438
+ Sources:
439
+ | Type | File | Action |
440
+ |------|------|--------|
441
+ | Discussion | {topic-a}.md | Extract content |
442
+ | Discussion | {topic-b}.md | Extract content |
443
+ | Existing Spec | specification/{topic-c}.md | Incorporate and supersede |
444
+
445
+ Output: docs/workflow/specification/{grouping-name}.md
446
+
447
+ After completion:
448
+ - specification/{topic-c}.md will be marked as superseded
449
+
450
+ Proceed? (y/n)
451
+ ```
452
+
453
+ #### If creating a NEW grouped specification (no existing specs)
454
+
455
+ ```
456
+ Creating specification: {grouping-name}
457
+
458
+ Sources:
459
+ - docs/workflow/discussion/{topic-a}.md
460
+ - docs/workflow/discussion/{topic-b}.md
461
+ - docs/workflow/discussion/{topic-c}.md
462
+
463
+ Output: docs/workflow/specification/{grouping-name}.md
464
+
465
+ Proceed? (y/n)
466
+ ```
467
+
468
+ #### If CONTINUING an existing grouped specification
469
+
470
+ ```
471
+ Continuing specification: {grouping-name}
472
+
473
+ Existing: docs/workflow/specification/{grouping-name}.md (will be refined)
474
+
475
+ Sources:
476
+ - docs/workflow/discussion/{topic-a}.md
477
+ - docs/workflow/discussion/{topic-b}.md
478
+
479
+ Proceed? (y/n)
480
+ ```
481
+
482
+ #### If creating/continuing an INDIVIDUAL specification
483
+
484
+ ```
485
+ {Creating / Continuing} specification: {topic}
486
+
487
+ Source: docs/workflow/discussion/{topic}.md
488
+ Output: docs/workflow/specification/{topic}.md
489
+
490
+ Proceed? (y/n)
491
+ ```
492
+
493
+ **STOP.** Wait for user confirmation.
494
+
495
+ **If user confirms (y):** → Proceed to **Step 10**.
496
+ **If user declines (n):** → Return to **Step 8** to select a different grouping or discussion.
497
+
498
+ ---
499
+
500
+ ## Step 10: Gather Additional Context
501
+
502
+ ```
503
+ Before invoking the specification skill:
504
+
505
+ 1. Any additional context or priorities to consider?
506
+ 2. Any constraints or changes since the discussion(s) concluded?
507
+ 3. Are there existing partial implementations or related documentation I should review?
508
+
509
+ (Press enter to skip if none)
510
+ ```
511
+
512
+ **STOP.** Wait for user response.
513
+
514
+ → Proceed to **Step 11**.
515
+
516
+ ---
517
+
518
+ ## Step 11: Invoke the Skill
519
+
520
+ After completing all steps above, this command's purpose is fulfilled.
521
+
522
+ Invoke the [technical-specification](../../skills/technical-specification/SKILL.md) skill for your next instructions. Do not act on the gathered information until the skill is loaded - it contains the instructions for how to proceed.
523
+
524
+ #### Handoff Format
525
+
526
+ **Single source (individual specification):**
527
+
528
+ ```
529
+ Specification session for: {topic}
530
+
531
+ Source: docs/workflow/discussion/{topic}.md
532
+ Output: docs/workflow/specification/{topic}.md
533
+
534
+ Additional context: {summary of user's answers from Step 10}
535
+
536
+ ---
537
+ Invoke the technical-specification skill.
538
+ ```
539
+
540
+ **Multiple sources (grouped specification, no existing specs to incorporate):**
541
+
542
+ ```
543
+ Specification session for: {specification-name}
544
+
545
+ Sources:
546
+ - docs/workflow/discussion/{topic-1}.md
547
+ - docs/workflow/discussion/{topic-2}.md
548
+ - docs/workflow/discussion/{topic-3}.md
549
+
550
+ Output: docs/workflow/specification/{specification-name}.md
551
+
552
+ Additional context: {summary of user's answers from Step 10}
553
+
554
+ ---
555
+ Invoke the technical-specification skill.
556
+ ```
557
+
558
+ **Multiple sources WITH existing specs to incorporate:**
559
+
560
+ ```
561
+ Specification session for: {specification-name}
562
+
563
+ Source discussions:
564
+ - docs/workflow/discussion/{topic-1}.md
565
+ - docs/workflow/discussion/{topic-2}.md
566
+
567
+ Existing specifications to incorporate:
568
+ - docs/workflow/specification/{topic-3}.md (covers: {topic-3} discussion)
569
+
570
+ Output: docs/workflow/specification/{specification-name}.md
571
+
572
+ Context: This consolidates multiple sources. The existing {topic-3}.md specification should be incorporated - extract and adapt its content alongside the discussion material. The result should be a unified specification, not a simple merge.
573
+
574
+ After the {specification-name} specification is complete, mark the incorporated specs as superseded by updating their frontmatter:
575
+
576
+ status: superseded
577
+ superseded_by: {specification-name}
578
+
579
+ Additional context: {summary of user's answers from Step 10}
580
+
581
+ ---
582
+ Invoke the technical-specification skill.
583
+ ```
584
+
585
+ **Continuing an existing specification:**
586
+
587
+ ```
588
+ Specification session for: {specification-name}
589
+
590
+ Continuing existing: docs/workflow/specification/{specification-name}.md
591
+
592
+ Sources for reference:
593
+ - docs/workflow/discussion/{topic-1}.md
594
+ - docs/workflow/discussion/{topic-2}.md
595
+
596
+ Context: This specification already exists. Review and refine it based on the source discussions and any new context provided.
597
+
598
+ Additional context: {summary of user's answers from Step 10}
599
+
600
+ ---
601
+ Invoke the technical-specification skill.
602
+ ```
603
+
604
+ ---
605
+
606
+ ## Notes
607
+
608
+ - Ask questions clearly and STOP after each to wait for responses
609
+ - Only concluded discussions should proceed to specification
610
+ - When multiple sources are provided, the skill will extract exhaustively from ALL of them
611
+ - Attribution in the specification should trace content back to its source discussion(s)
612
+ - Superseded specifications are excluded from future planning phases
613
+ - The specification is the "line in the sand" - be thorough, not hasty
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -20,6 +20,7 @@
20
20
  "skills",
21
21
  "commands",
22
22
  "agents",
23
- "hooks"
23
+ "hooks",
24
+ "scripts"
24
25
  ]
25
26
  }