@leeovery/claude-technical-workflows 2.0.28 → 2.0.29

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 CHANGED
@@ -183,7 +183,7 @@ When using the full workflow, it progresses through six distinct phases:
183
183
 
184
184
  **Phase 2 - Discussion:** Captures the back-and-forth exploration of a problem. Documents competing solutions, why certain approaches won or lost, edge cases discovered, and the journey to decisions, not just the decisions themselves.
185
185
 
186
- **Phase 3 - Specification:** Transforms discussion documentation into a validated, standalone specification. Filters hallucinations and inaccuracies, enriches gaps through discussion, and builds a document that planning can execute against without referencing other sources.
186
+ **Phase 3 - Specification:** Transforms discussion(s) into validated, standalone specifications. Automatically analyses multiple discussions for natural groupings, filters hallucinations and inaccuracies, enriches gaps, and builds documents that planning can execute against without referencing other sources.
187
187
 
188
188
  **Phase 4 - Planning:** Converts specifications into actionable implementation plans with phases, tasks, and acceptance criteria. Supports multiple output formats (local markdown, Linear, Backlog.md).
189
189
 
@@ -225,19 +225,23 @@ skills/ # Input-agnostic processors
225
225
  └── technical-review/ # Validate against artefacts
226
226
 
227
227
  commands/ # Input layer (gather context → invoke skills)
228
- ├── workflow:start-research.md # Sequential: begin research
229
- ├── workflow:start-discussion.md # Sequential: begin discussions
230
- ├── workflow:start-specification.md # Sequential: begin specification
231
- ├── workflow:start-planning.md # Sequential: begin planning
232
- ├── workflow:start-implementation.md # Sequential: begin implementation
233
- ├── workflow:start-review.md # Sequential: begin review
234
- ├── workflow:status.md # Utility: show workflow status and next steps
235
- ├── workflow:view-plan.md # Utility: view plan tasks and progress
236
228
  ├── start-feature.md # Standalone: spec from inline context
237
- └── link-dependencies.md # Standalone: wire cross-topic deps
229
+ ├── link-dependencies.md # Standalone: wire cross-topic deps
230
+ └── workflow/ # Sequential workflow commands
231
+ ├── start-research.md # Begin research
232
+ ├── start-discussion.md # Begin discussions
233
+ ├── start-specification.md # Begin specification
234
+ ├── start-planning.md # Begin planning
235
+ ├── start-implementation.md # Begin implementation
236
+ ├── start-review.md # Begin review
237
+ ├── status.md # Show workflow status
238
+ └── view-plan.md # View plan tasks
238
239
 
239
240
  agents/
240
241
  └── chain-verifier.md # Parallel task verification for review
242
+
243
+ scripts/ # Helper scripts for commands
244
+ └── specification-discovery.sh # Discovery for specification command
241
245
  ```
242
246
 
243
247
  ## Skills
@@ -263,12 +267,12 @@ Sequential commands prefixed with `workflow:`. They expect files from previous p
263
267
 
264
268
  | Command | Description |
265
269
  |--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
266
- | [**/workflow:start-research**](commands/workflow:start-research.md) | Begin research exploration. For early-stage ideas, feasibility checks, and broad exploration before formal discussion. |
267
- | [**/workflow:start-discussion**](commands/workflow:start-discussion.md) | Begin a new technical discussion. Gathers topic, context, background information, and relevant codebase areas before starting documentation. |
268
- | [**/workflow:start-specification**](commands/workflow:start-specification.md) | Start a specification session from an existing discussion. Validates and refines discussion content into a standalone specification. |
269
- | [**/workflow:start-planning**](commands/workflow:start-planning.md) | Start a planning session from an existing specification. Creates implementation plans with phases, tasks, and acceptance criteria. Supports multiple output formats (markdown, Linear, Backlog.md, Beads). |
270
- | [**/workflow:start-implementation**](commands/workflow:start-implementation.md) | Start implementing a plan. Executes tasks via strict TDD, committing after each passing test. |
271
- | [**/workflow:start-review**](commands/workflow:start-review.md) | Start reviewing completed work. Validates implementation against plan tasks and acceptance criteria. |
270
+ | [**/workflow:start-research**](commands/workflow/start-research.md) | Begin research exploration. For early-stage ideas, feasibility checks, and broad exploration before formal discussion. |
271
+ | [**/workflow:start-discussion**](commands/workflow/start-discussion.md) | Begin a new technical discussion. Gathers topic, context, background information, and relevant codebase areas before starting documentation. |
272
+ | [**/workflow:start-specification**](commands/workflow/start-specification.md) | Start a specification session from existing discussion(s). Automatically analyses multiple discussions for natural groupings and consolidates them into unified specifications. |
273
+ | [**/workflow:start-planning**](commands/workflow/start-planning.md) | Start a planning session from an existing specification. Creates implementation plans with phases, tasks, and acceptance criteria. Supports multiple output formats (markdown, Linear, Backlog.md, Beads). |
274
+ | [**/workflow:start-implementation**](commands/workflow/start-implementation.md) | Start implementing a plan. Executes tasks via strict TDD, committing after each passing test. |
275
+ | [**/workflow:start-review**](commands/workflow/start-review.md) | Start reviewing completed work. Validates implementation against plan tasks and acceptance criteria. |
272
276
 
273
277
  ### Utility Commands
274
278
 
@@ -276,8 +280,8 @@ Helpers for navigating and understanding the workflow.
276
280
 
277
281
  | Command | Description |
278
282
  |--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
279
- | [**/workflow:status**](commands/workflow:status.md) | Show workflow status - what topics exist at each phase, and suggested next steps. |
280
- | [**/workflow:view-plan**](commands/workflow:view-plan.md) | View a plan's tasks and progress, regardless of output format. |
283
+ | [**/workflow:status**](commands/workflow/status.md) | Show workflow status - what topics exist at each phase, and suggested next steps. |
284
+ | [**/workflow:view-plan**](commands/workflow/view-plan.md) | View a plan's tasks and progress, regardless of output format. |
281
285
 
282
286
  ### Standalone Commands
283
287
 
@@ -296,7 +296,7 @@ Wait for response before proceeding.
296
296
 
297
297
  After completing the steps above, this command's purpose is fulfilled.
298
298
 
299
- Invoke the [technical-discussion](../skills/technical-discussion/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.
299
+ Invoke the [technical-discussion](../../skills/technical-discussion/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.
300
300
 
301
301
  **Example handoff (from research):**
302
302
  ```
@@ -70,7 +70,7 @@ Which plan would you like to implement?
70
70
 
71
71
  **This step is a gate.** Implementation cannot proceed if dependencies are not satisfied.
72
72
 
73
- See **[dependencies.md](../skills/technical-planning/references/dependencies.md)** for dependency format and states.
73
+ See **[dependencies.md](../../skills/technical-planning/references/dependencies.md)** for dependency format and states.
74
74
 
75
75
  After the user selects a plan:
76
76
 
@@ -161,7 +161,7 @@ If they choose a specific phase or task, ask them to specify which one.
161
161
 
162
162
  After completing the steps above, this command's purpose is fulfilled.
163
163
 
164
- Invoke the [technical-implementation](../skills/technical-implementation/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.
164
+ Invoke the [technical-implementation](../../skills/technical-implementation/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.
165
165
 
166
166
  **Example handoff:**
167
167
  ```
@@ -94,7 +94,7 @@ Ask: **Which feature specification would you like to plan?**
94
94
 
95
95
  Ask: **Where should this plan live?**
96
96
 
97
- Load **[output-formats.md](../skills/technical-planning/references/output-formats.md)** and present the available formats to help the user choose. Then load the corresponding output adapter for that format's setup requirements.
97
+ Load **[output-formats.md](../../skills/technical-planning/references/output-formats.md)** and present the available formats to help the user choose. Then load the corresponding output adapter for that format's setup requirements.
98
98
 
99
99
  ## Step 5: Gather Additional Context
100
100
 
@@ -125,7 +125,7 @@ These specifications contain validated architectural decisions that should infor
125
125
 
126
126
  After completing the steps above, this command's purpose is fulfilled.
127
127
 
128
- Invoke the [technical-planning](../skills/technical-planning/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.
128
+ Invoke the [technical-planning](../../skills/technical-planning/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.
129
129
 
130
130
  **Example handoff:**
131
131
  ```
@@ -43,4 +43,4 @@ Ask these questions clearly and wait for responses before proceeding.
43
43
 
44
44
  After completing the steps above, this command's purpose is fulfilled.
45
45
 
46
- Invoke the [technical-research](../skills/technical-research/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.
46
+ Invoke the [technical-research](../../skills/technical-research/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.
@@ -90,7 +90,7 @@ Check if a specification exists:
90
90
 
91
91
  After completing the steps above, this command's purpose is fulfilled.
92
92
 
93
- Invoke the [technical-review](../skills/technical-review/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.
93
+ Invoke the [technical-review](../../skills/technical-review/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.
94
94
 
95
95
  **Example handoff:**
96
96
  ```
@@ -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.29",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -38,6 +38,18 @@ Either way: Transform unvalidated reference material into a specification that's
38
38
 
39
39
  **When complete**: User signs off on the specification.
40
40
 
41
+ ### Post-Completion: Handle Source Specifications
42
+
43
+ If any of your sources were **existing specifications** (as opposed to discussions, research, or other reference material), these have now been consolidated into the new specification.
44
+
45
+ After user signs off:
46
+ 1. Mark each source specification as superseded by updating its frontmatter:
47
+ ```yaml
48
+ status: superseded
49
+ superseded_by: {new-specification-name}
50
+ ```
51
+ 2. Inform the user which files were updated
52
+
41
53
  ## CRITICAL: You Do NOT Create or Update the Specification Autonomously
42
54
 
43
55
  **This is a collaborative, interactive process. You MUST wait for explicit user approval before writing ANYTHING to the specification file.**
@@ -1,15 +0,0 @@
1
- ---
2
- description: "[DEPRECATED] Use /workflow:start-discussion instead"
3
- ---
4
-
5
- # Deprecated Command
6
-
7
- ⚠️ **`/start-discussion` is deprecated.** Use `/workflow:start-discussion` instead.
8
-
9
- The command has been renamed to use the `workflow:` prefix to distinguish workflow commands from standalone commands.
10
-
11
- ---
12
-
13
- **Forwarding to `/workflow:start-discussion`...**
14
-
15
- Run the `/workflow:start-discussion` command now.
@@ -1,15 +0,0 @@
1
- ---
2
- description: "[DEPRECATED] Use /workflow:start-implementation instead"
3
- ---
4
-
5
- # Deprecated Command
6
-
7
- ⚠️ **`/start-implementation` is deprecated.** Use `/workflow:start-implementation` instead.
8
-
9
- The command has been renamed to use the `workflow:` prefix to distinguish workflow commands from standalone commands.
10
-
11
- ---
12
-
13
- **Forwarding to `/workflow:start-implementation`...**
14
-
15
- Run the `/workflow:start-implementation` command now.
@@ -1,15 +0,0 @@
1
- ---
2
- description: "[DEPRECATED] Use /workflow:start-planning instead"
3
- ---
4
-
5
- # Deprecated Command
6
-
7
- ⚠️ **`/start-planning` is deprecated.** Use `/workflow:start-planning` instead.
8
-
9
- The command has been renamed to use the `workflow:` prefix to distinguish workflow commands from standalone commands.
10
-
11
- ---
12
-
13
- **Forwarding to `/workflow:start-planning`...**
14
-
15
- Run the `/workflow:start-planning` command now.
@@ -1,15 +0,0 @@
1
- ---
2
- description: "[DEPRECATED] Use /workflow:start-research instead"
3
- ---
4
-
5
- # Deprecated Command
6
-
7
- ⚠️ **`/start-research` is deprecated.** Use `/workflow:start-research` instead.
8
-
9
- The command has been renamed to use the `workflow:` prefix to distinguish workflow commands from standalone commands.
10
-
11
- ---
12
-
13
- **Forwarding to `/workflow:start-research`...**
14
-
15
- Run the `/workflow:start-research` command now.
@@ -1,15 +0,0 @@
1
- ---
2
- description: "[DEPRECATED] Use /workflow:start-specification instead"
3
- ---
4
-
5
- # Deprecated Command
6
-
7
- ⚠️ **`/start-specification` is deprecated.** Use `/workflow:start-specification` instead.
8
-
9
- The command has been renamed to use the `workflow:` prefix to distinguish workflow commands from standalone commands.
10
-
11
- ---
12
-
13
- **Forwarding to `/workflow:start-specification`...**
14
-
15
- Run the `/workflow:start-specification` command now.
@@ -1,304 +0,0 @@
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
- ---
4
-
5
- Invoke the **technical-specification** skill for this conversation.
6
-
7
- ## Workflow Context
8
-
9
- This is **Phase 3** of the six-phase workflow:
10
-
11
- | Phase | Focus | You |
12
- |-------|-------|-----|
13
- | 1. Research | EXPLORE - ideas, feasibility, market, business | |
14
- | 2. Discussion | WHAT and WHY - decisions, architecture, edge cases | |
15
- | **3. Specification** | REFINE - validate into standalone spec | ◀ HERE |
16
- | 4. Planning | HOW - phases, tasks, acceptance criteria | |
17
- | 5. Implementation | DOING - tests first, then code | |
18
- | 6. Review | VALIDATING - check work against artifacts | |
19
-
20
- **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.
21
-
22
- ---
23
-
24
- ## Instructions
25
-
26
- 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.
27
-
28
- Before beginning, discover existing work and gather necessary information.
29
-
30
- ## Important
31
-
32
- Use simple, individual commands. Never combine multiple operations into bash loops or one-liners. Execute commands one at a time.
33
-
34
- ## Step 1: Discover Existing Work
35
-
36
- Scan the codebase for discussions and specifications:
37
-
38
- 1. **Find discussions**: Look in `docs/workflow/discussion/`
39
- - Run `ls docs/workflow/discussion/` to list discussion files
40
- - Each file is named `{topic}.md`
41
-
42
- 2. **Check discussion status**: For each discussion file
43
- - Run `head -20 docs/workflow/discussion/{topic}.md` to read the frontmatter and extract the `status:` field
44
- - Do NOT use bash loops - run separate `head` commands for each topic
45
-
46
- 3. **Check for existing specifications**: Look in `docs/workflow/specification/`
47
- - Identify discussions that don't have corresponding specifications
48
-
49
- 4. **Check for cached consolidation analysis** (if multiple discussions):
50
- - Check if `docs/workflow/.cache/discussion-consolidation-analysis.md` exists
51
- - If it exists, read it to get the stored checksum from the frontmatter
52
-
53
- 5. **Compute current discussions checksum** (if multiple concluded discussions):
54
- - Run exactly: `cat docs/workflow/discussion/*.md 2>/dev/null | md5sum | cut -d' ' -f1`
55
- - IMPORTANT: Use this exact command - glob expansion is alphabetically sorted by default
56
- - Do NOT modify or "simplify" this command - checksum must be deterministic
57
- - Store this value to compare with the cached checksum
58
-
59
- ## Step 2: Check Prerequisites
60
-
61
- **If no discussions exist:**
62
-
63
- ```
64
- No discussions found in docs/workflow/discussion/
65
-
66
- 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.
67
- ```
68
-
69
- Stop here and wait for the user to acknowledge.
70
-
71
- ## Step 3: Present Options
72
-
73
- Show what you found:
74
-
75
- ```
76
- Discussions found:
77
- {topic-1} - Concluded - ready for specification
78
- {topic-2} - Exploring - not ready for specification
79
- {topic-3} - Concluded - specification exists
80
- ```
81
-
82
- **Important:** Only concluded discussions should proceed to specification. If a discussion is still exploring, advise the user to complete the discussion phase first.
83
-
84
- **If only ONE concluded discussion is ready:** Skip to Step 4 (single-source path).
85
-
86
- **If MORE THAN ONE concluded discussion is ready:** Proceed to Step 3A (consolidation assessment).
87
-
88
- ---
89
-
90
- ## Step 3A: Consolidation Assessment (Multiple Discussions)
91
-
92
- When multiple concluded discussions exist, offer to assess how they should be organized into specifications.
93
-
94
- ```
95
- You have {N} concluded discussions ready for specification.
96
-
97
- Would you like me to assess how these might be combined into specifications?
98
-
99
- 1. **Yes, assess them** - I'll analyze all discussions for natural groupings
100
- 2. **No, proceed individually** - Create specifications 1:1 with discussions
101
-
102
- Which approach?
103
- ```
104
-
105
- **If user chooses individual:** Skip to Step 4 and ask which discussion to specify.
106
-
107
- **If user chooses assessment:** Proceed to Step 3A.1.
108
-
109
- ### Step 3A.1: Gather Context for Analysis
110
-
111
- Before analyzing, ask:
112
-
113
- ```
114
- Before I analyze the discussions, is there anything about your project structure or how these topics relate that would help me group them appropriately?
115
- ```
116
-
117
- Wait for response.
118
-
119
- ### Step 3A.2: Check Cache Validity
120
-
121
- Compare the current discussions checksum (computed in Step 1.5) with the cached checksum:
122
-
123
- **If cache exists AND checksums match:**
124
- ```
125
- Using cached analysis
126
-
127
- Discussion documents unchanged since last analysis ({date from cache}).
128
- Loading previously identified groupings...
129
-
130
- To force a fresh analysis, enter: refresh
131
- ```
132
-
133
- Then load the groupings from the cache file and skip to Step 3A.4 (Present Options).
134
-
135
- **If cache missing OR checksums differ:**
136
- ```
137
- Analyzing discussions...
138
- ```
139
-
140
- Proceed to Step 3A.3 (Full Analysis).
141
-
142
- ### Step 3A.3: Full Analysis (when cache invalid)
143
-
144
- **This step is critical. You MUST read every concluded discussion document thoroughly.**
145
-
146
- For each concluded discussion:
147
- 1. Read the ENTIRE document (not just frontmatter)
148
- 2. Understand the decisions, systems, and concepts it defines
149
- 3. Note dependencies on or references to other discussions
150
- 4. Identify shared data structures, entities, or behaviors
151
-
152
- Then analyze coupling between discussions:
153
- - **Data coupling**: Discussions that define or depend on the same data structures
154
- - **Behavioral coupling**: Discussions where one's implementation requires another
155
- - **Conceptual coupling**: Discussions that address different facets of the same problem
156
-
157
- Group discussions that are tightly coupled - they should become a single specification because their decisions are inseparable.
158
-
159
- **Save to cache:**
160
- After analysis, ensure `.cache` directory exists: `mkdir -p docs/workflow/.cache`
161
-
162
- Create/update `docs/workflow/.cache/discussion-consolidation-analysis.md`:
163
-
164
- ```markdown
165
- ---
166
- checksum: {computed_checksum}
167
- generated: {ISO date}
168
- discussion_files:
169
- - {topic1}.md
170
- - {topic2}.md
171
- ---
172
-
173
- # Discussion Consolidation Analysis
174
-
175
- ## Recommended Groupings
176
-
177
- ### {Suggested Specification Name}
178
- - **{topic-a}**: {why it belongs in this group}
179
- - **{topic-b}**: {why it belongs in this group}
180
- - **{topic-c}**: {why it belongs in this group}
181
-
182
- **Coupling**: {Brief explanation of what binds these together - shared data, dependencies, etc.}
183
-
184
- ### {Another Specification Name}
185
- - **{topic-d}**: {why it belongs}
186
- - **{topic-e}**: {why it belongs}
187
-
188
- **Coupling**: {Brief explanation}
189
-
190
- ## Independent Discussions
191
- - **{topic-f}**: {Why this stands alone - no strong coupling to others}
192
-
193
- ## Analysis Notes
194
- {Any additional context about the relationships discovered}
195
- ```
196
-
197
- ### Step 3A.4: Present Options
198
-
199
- Present the analysis and options:
200
-
201
- **If using cached analysis:**
202
- ```
203
- Cached analysis (discussions unchanged since {date})
204
-
205
- {Display the Recommended Groupings section from cache}
206
-
207
- How would you like to proceed?
208
-
209
- 1. **Combine as recommended** - Create specifications per the groupings above
210
- 2. **Combine differently** - Tell me your preferred groupings
211
- 3. **Single specification** - Consolidate all discussions into one spec
212
- 4. **Individual specifications** - Create 1:1 (I'll ask which to start with)
213
-
214
- (Or enter 'refresh' to re-analyze)
215
- ```
216
-
217
- **If fresh analysis:**
218
- ```
219
- Analysis complete (cached for future sessions)
220
-
221
- {Display the Recommended Groupings section}
222
-
223
- How would you like to proceed?
224
-
225
- 1. **Combine as recommended** - Create specifications per the groupings above
226
- 2. **Combine differently** - Tell me your preferred groupings
227
- 3. **Single specification** - Consolidate all discussions into one spec
228
- 4. **Individual specifications** - Create 1:1 (I'll ask which to start with)
229
- ```
230
-
231
- Wait for user to choose.
232
-
233
- ### Step 3A.5: Handle Choices
234
-
235
- **If "Combine as recommended":**
236
- - Confirm the first specification to create
237
- - Proceed to Step 4 with the grouped sources
238
-
239
- **If "Combine differently":**
240
- - Ask user to describe their preferred groupings
241
- - Confirm understanding
242
- - Proceed to Step 4 with user-specified sources
243
-
244
- **If "Single specification":**
245
- - Use "unified" as the specification name (output: `docs/workflow/specification/unified.md`)
246
- - Proceed to Step 4 with all discussions as sources
247
-
248
- **If "Individual specifications":**
249
- - Ask which discussion to specify first
250
- - Proceed to Step 4 with single source
251
-
252
- **If "refresh":**
253
- - Delete the cache file: `rm docs/workflow/.cache/discussion-consolidation-analysis.md`
254
- - Return to Step 3A.3 (Full Analysis)
255
- - Inform user: "Refreshing analysis..."
256
-
257
- ---
258
-
259
- ## Step 4: Gather Additional Context
260
-
261
- Ask:
262
- - Any additional context or priorities to consider?
263
- - Any constraints or changes since the discussion(s) concluded?
264
- - Are there any existing partial plans or related documentation I should review?
265
-
266
- ## Step 5: Invoke the Skill
267
-
268
- After completing the steps above, this command's purpose is fulfilled.
269
-
270
- 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.
271
-
272
- **Example handoff (single source):**
273
- ```
274
- Specification session for: {topic}
275
- Source: docs/workflow/discussion/{topic}.md
276
- Output: docs/workflow/specification/{topic}.md
277
- Additional context: {summary of user's answers from Step 4}
278
-
279
- Invoke the technical-specification skill.
280
- ```
281
-
282
- **Example handoff (multiple sources):**
283
- ```
284
- Specification session for: {specification-name}
285
-
286
- Sources:
287
- - docs/workflow/discussion/{topic-1}.md
288
- - docs/workflow/discussion/{topic-2}.md
289
- - docs/workflow/discussion/{topic-3}.md
290
-
291
- Output: docs/workflow/specification/{specification-name}.md
292
- Additional context: {summary of user's answers from Step 4}
293
-
294
- Invoke the technical-specification skill.
295
- ```
296
-
297
- ---
298
-
299
- ## Notes
300
-
301
- - Ask questions clearly and wait for responses before proceeding
302
- - The specification phase validates and refines discussion content into standalone documents
303
- - When multiple sources are provided, the skill will extract exhaustively from ALL of them
304
- - Attribution in the specification should trace content back to its source discussion(s)