@leeovery/claude-technical-workflows 2.0.37 → 2.0.39

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.
@@ -56,12 +56,13 @@ This outputs structured YAML. Parse it to understand:
56
56
  - Specifications with `status: superseded` should be noted but excluded from active counts
57
57
 
58
58
  **From `cache` section:**
59
- - Whether a consolidation analysis cache exists
60
- - The `anchored_names` list - these are grouping names that have existing specifications and MUST be preserved in any regeneration
61
-
62
- **From `cache_validity` section:**
63
- - Whether the cache is still valid (`is_valid: true/false`)
64
- - The reason if invalid
59
+ - `status` - one of three values:
60
+ - `"valid"` - cache exists and checksums match (safe to load)
61
+ - `"stale"` - cache exists but discussions have changed (needs re-analysis)
62
+ - `"none"` - no cache file exists
63
+ - `reason` - explanation of the status
64
+ - `generated` - when the cache was created (null if none)
65
+ - `anchored_names` - grouping names that have existing specifications and MUST be preserved in any regeneration
65
66
 
66
67
  **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.
67
68
 
@@ -145,7 +146,31 @@ Proceeding with this discussion.
145
146
 
146
147
  #### If MULTIPLE concluded discussions exist with NO existing specifications
147
148
 
148
- No existing specs to continue - proceed directly to analysis.
149
+ Check `cache.status` from discovery.
150
+
151
+ ##### If `cache.status: "valid"`
152
+
153
+ ```
154
+ {N} concluded discussions found.
155
+
156
+ Previous analysis available from {cache.generated}. Loading groupings...
157
+ ```
158
+
159
+ → Skip directly to **Step 7: Present Grouping Options**.
160
+
161
+ ##### If `cache.status: "stale"`
162
+
163
+ ```
164
+ {N} concluded discussions found.
165
+
166
+ Note: A previous grouping analysis exists but is now outdated - discussion documents have changed since it was created. Re-analysis is required, but existing specification names will be preserved where groupings overlap.
167
+
168
+ Analyzing discussions for natural groupings...
169
+ ```
170
+
171
+ → Proceed to **Step 4: Gather Analysis Context**.
172
+
173
+ ##### If `cache.status: "none"`
149
174
 
150
175
  ```
151
176
  {N} concluded discussions found.
@@ -157,6 +182,39 @@ Analyzing discussions for natural groupings...
157
182
 
158
183
  #### If MULTIPLE concluded discussions exist WITH existing specifications
159
184
 
185
+ Check `cache.status` from discovery to determine which options to present.
186
+
187
+ ##### If `cache.status: "valid"`
188
+
189
+ ```
190
+ What would you like to do?
191
+
192
+ 1. **Continue an existing specification** - Resume work on a spec in progress
193
+ 2. **Select from groupings** - Choose from previously analyzed groupings ({cache.generated})
194
+ 3. **Re-analyze groupings** - Fresh analysis of discussion relationships
195
+
196
+ Which approach?
197
+ ```
198
+
199
+ **STOP.** Wait for user response.
200
+
201
+ ##### If `cache.status: "stale"`
202
+
203
+ ```
204
+ What would you like to do?
205
+
206
+ Note: A previous grouping analysis exists but is now outdated - discussion documents have changed since it was created. Re-analysis is required, but existing specification names will be preserved where groupings overlap.
207
+
208
+ 1. **Continue an existing specification** - Resume work on a spec in progress
209
+ 2. **Assess for groupings** - Re-analyze discussions for combinations
210
+
211
+ Which approach?
212
+ ```
213
+
214
+ **STOP.** Wait for user response.
215
+
216
+ ##### If `cache.status: "none"`
217
+
160
218
  ```
161
219
  What would you like to do?
162
220
 
@@ -179,7 +237,22 @@ Which specification would you like to continue?
179
237
 
180
238
  **STOP.** Wait for user to pick, then skip to **Step 9**.
181
239
 
182
- #### If "Assess for groupings"
240
+ #### If "Select from groupings" (valid cache path)
241
+
242
+ Load groupings from cache and → Skip directly to **Step 7: Present Grouping Options**.
243
+
244
+ (Context was already gathered when the analysis was created - no need to ask again.)
245
+
246
+ #### If "Re-analyze groupings"
247
+
248
+ Delete the existing cache to force regeneration:
249
+ ```bash
250
+ rm docs/workflow/.cache/discussion-consolidation-analysis.md
251
+ ```
252
+
253
+ → Proceed to **Step 4: Gather Analysis Context**.
254
+
255
+ #### If "Assess for groupings" (no valid cache path)
183
256
 
184
257
  → Proceed to **Step 4: Gather Analysis Context**.
185
258
 
@@ -202,25 +275,25 @@ For example:
202
275
 
203
276
  ---
204
277
 
205
- ## Step 5: Check Cache Validity
278
+ ## Step 5: Check Cache Status
206
279
 
207
- Check the `cache_validity.is_valid` value from the discovery state.
280
+ Check `cache.status` from discovery.
208
281
 
209
- #### If cache is valid
282
+ #### If `cache.status: "valid"`
210
283
 
211
284
  ```
212
285
  Using cached analysis
213
286
 
214
- Discussion documents unchanged since last analysis ({cached_date}).
287
+ Discussion documents unchanged since last analysis ({cache.generated}).
215
288
  Loading previously identified groupings...
216
289
  ```
217
290
 
218
291
  Load groupings from cache and → Skip to **Step 7: Present Grouping Options**.
219
292
 
220
- #### If cache is invalid or missing
293
+ #### If `cache.status: "stale"` or `"none"`
221
294
 
222
295
  ```
223
- {Reason from cache_validity.reason}
296
+ {cache.reason}
224
297
 
225
298
  Analyzing discussions...
226
299
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.37",
3
+ "version": "2.0.39",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -121,16 +121,35 @@ echo ""
121
121
  #
122
122
  # CACHE STATE
123
123
  #
124
+ # status: "valid" | "stale" | "none"
125
+ # - valid: cache exists and checksums match
126
+ # - stale: cache exists but discussions have changed
127
+ # - none: no cache file exists
128
+ #
124
129
  echo "cache:"
125
130
 
126
131
  if [ -f "$CACHE_FILE" ]; then
127
- echo " exists: true"
128
-
129
132
  cached_checksum=$(extract_field "$CACHE_FILE" "checksum")
130
133
  cached_date=$(extract_field "$CACHE_FILE" "generated")
131
134
 
132
- echo " cached_checksum: \"${cached_checksum:-unknown}\""
133
- echo " cached_date: \"${cached_date:-unknown}\""
135
+ # Determine status based on checksum comparison
136
+ if [ -d "$DISCUSSION_DIR" ] && [ -n "$(ls -A "$DISCUSSION_DIR" 2>/dev/null)" ]; then
137
+ current_checksum=$(cat "$DISCUSSION_DIR"/*.md 2>/dev/null | md5sum | cut -d' ' -f1)
138
+
139
+ if [ "$cached_checksum" = "$current_checksum" ]; then
140
+ echo " status: \"valid\""
141
+ echo " reason: \"checksums match\""
142
+ else
143
+ echo " status: \"stale\""
144
+ echo " reason: \"discussions have changed since cache was generated\""
145
+ fi
146
+ else
147
+ echo " status: \"stale\""
148
+ echo " reason: \"no discussions to compare\""
149
+ fi
150
+
151
+ echo " checksum: \"${cached_checksum:-unknown}\""
152
+ echo " generated: \"${cached_date:-unknown}\""
134
153
 
135
154
  # Extract anchored names (groupings that have existing specs)
136
155
  # These are the grouping names from the cache that have corresponding specs
@@ -152,16 +171,17 @@ if [ -f "$CACHE_FILE" ]; then
152
171
  echo " [] # No anchored names found"
153
172
  fi
154
173
  else
155
- echo " exists: false"
156
- echo " cached_checksum: null"
157
- echo " cached_date: null"
174
+ echo " status: \"none\""
175
+ echo " reason: \"no cache exists\""
176
+ echo " checksum: null"
177
+ echo " generated: null"
158
178
  echo " anchored_names: []"
159
179
  fi
160
180
 
161
181
  echo ""
162
182
 
163
183
  #
164
- # CURRENT CHECKSUM
184
+ # CURRENT STATE
165
185
  #
166
186
  echo "current_state:"
167
187
 
@@ -184,32 +204,3 @@ else
184
204
  echo " discussions_checksum: null"
185
205
  echo " concluded_discussion_count: 0"
186
206
  fi
187
-
188
- echo ""
189
-
190
- #
191
- # CHECKSUM COMPARISON
192
- #
193
- echo "cache_validity:"
194
-
195
- if [ -f "$CACHE_FILE" ]; then
196
- cached_checksum=$(extract_field "$CACHE_FILE" "checksum")
197
-
198
- if [ -d "$DISCUSSION_DIR" ] && [ -n "$(ls -A "$DISCUSSION_DIR" 2>/dev/null)" ]; then
199
- current_checksum=$(cat "$DISCUSSION_DIR"/*.md 2>/dev/null | md5sum | cut -d' ' -f1)
200
-
201
- if [ "$cached_checksum" = "$current_checksum" ]; then
202
- echo " is_valid: true"
203
- echo " reason: \"checksums match\""
204
- else
205
- echo " is_valid: false"
206
- echo " reason: \"discussions have changed since cache was generated\""
207
- fi
208
- else
209
- echo " is_valid: false"
210
- echo " reason: \"no discussions to compare\""
211
- fi
212
- else
213
- echo " is_valid: false"
214
- echo " reason: \"no cache exists\""
215
- fi
@@ -344,31 +344,13 @@ After documenting dependencies, perform a **final comprehensive review** of the
344
344
  - Error handling, validation rules, or boundary conditions
345
345
  - Integration points or data flows mentioned but not elaborated
346
346
 
347
- 4. **Flag what you find** - When you discover potentially missed content, present it to the user. **Do NOT add it to the specification without explicit approval.**
347
+ 4. **Collect what you find** - When you discover potentially missed content, note it for your summary. You'll present all findings together after the review is complete (see "Presenting Review Findings" below).
348
348
 
349
- > **CHECKPOINT**: If you found missed content and are about to add it to the specification without presenting it first and receiving explicit approval, **STOP**. Every addition requires the present → approve → log cycle, even during final review.
349
+ Categorize each finding:
350
350
 
351
- There are two cases:
351
+ **Enhancing an existing topic** - Details that belong in an already-documented section. Note which section it would enhance.
352
352
 
353
- **Enhancing an existing topic** - Details that belong in an already-documented section:
354
-
355
- > "During my final review, I found additional detail about [existing topic] that isn't captured. From [source]:
356
- >
357
- > [quote or summary from source material]
358
- >
359
- > I'd add this to the [section name] section. Would you like me to include it, or show you the full section with this addition first?"
360
-
361
- If the user wants to see context, present the entire section with the new content clearly marked (e.g., with a comment like `<!-- NEW -->` or by calling it out before the block).
362
-
363
- **An entirely missed topic** - Something that warrants its own section but was glossed over:
364
-
365
- > "During my final review, I found [topic] discussed in [source] that doesn't have coverage in the specification:
366
- >
367
- > [quote or summary from source material]
368
- >
369
- > This would be a new section. Should I add it?"
370
-
371
- In both cases, you know where the content belongs - existing topics get enhanced in place, new topics get added at the end.
353
+ **An entirely missed topic** - Something that warrants its own section but was glossed over. New topics get added at the end.
372
354
 
373
355
  5. **Never fabricate** - Every item you flag must trace back to specific source material. If you can't point to where it came from, don't suggest it. The goal is to catch missed content, not invent new requirements.
374
356
 
@@ -380,19 +362,56 @@ After documenting dependencies, perform a **final comprehensive review** of the
380
362
  - Integration points that seem implicit but aren't specified
381
363
  - Behaviors that are ambiguous without clarification
382
364
 
383
- Present these as a batch for the user to triage:
365
+ Collect these alongside the missed content from step 4. They'll be presented together in the summary (see below).
366
+
367
+ This should be infrequent - most gaps will be caught from source material. But occasionally the sources themselves have blind spots worth surfacing.
368
+
369
+ ### Presenting Review Findings
370
+
371
+ After completing your review (steps 1-7), present findings to the user in two stages:
384
372
 
385
- > "I've identified some potential gaps that aren't covered in the source material:
373
+ **Stage 1: Summary of All Findings**
374
+
375
+ First, present a numbered summary of everything you found:
376
+
377
+ > "I've completed my final review against all source material. I found [N] items:
378
+ >
379
+ > 1. **[Brief title]**
380
+ > [2-4 line explanation: what was missed, where it came from, what it affects]
381
+ >
382
+ > 2. **[Brief title]**
383
+ > [2-4 line explanation]
384
+ >
385
+ > 3. **[Brief title]**
386
+ > [2-4 line explanation]
387
+ >
388
+ > Let's work through these one at a time, starting with #1."
389
+
390
+ Each item should have enough context that the user understands what they're about to discuss - not just a label, but clarity on what was missed and why it matters.
391
+
392
+ **Stage 2: Process One Item at a Time**
393
+
394
+ For each item, follow the **same workflow as the main specification process**:
395
+
396
+ 1. **Present** the item in detail - what you found, where it came from (source reference), and what you propose to add
397
+ 2. **Discuss** if needed - clarify ambiguities, answer questions, refine the content
398
+ 3. **Present for approval** - show exactly what will be written to the specification:
399
+
400
+ > "Here's what I'll add to the specification:
386
401
  >
387
- > 1. **[Gap A]** - [brief description of what's unclear/missing]
388
- > 2. **[Gap B]** - [brief description]
389
- > 3. **[Gap C]** - [brief description]
402
+ > [content exactly as it would appear]
390
403
  >
391
- > Are any of these areas you'd like to discuss, or are they intentionally out of scope?"
404
+ > **To proceed, choose one:**
405
+ > - **"Log it"** - I'll add the above to the specification **verbatim**
406
+ > - **"Adjust"** - Tell me which part to change
392
407
 
393
- The user can then pick which gaps (if any) need addressing. For those they want to discuss, work through them and add to the specification with standard approval workflow.
408
+ 4. **Wait for explicit approval** - same rules as always: "Log it" or equivalent before writing
409
+ 5. **Log verbatim** when approved
410
+ 6. **Move to the next item**: "Moving to #2: [Brief title]..."
394
411
 
395
- This should be infrequent - most gaps will be caught from source material. But occasionally the sources themselves have blind spots worth surfacing.
412
+ > **CHECKPOINT**: Each review item requires the full present approve log cycle. Do not batch multiple items together. Do not proceed to the next item until the current one is resolved (approved, adjusted, or explicitly skipped by the user).
413
+
414
+ For potential gaps (items not in source material), you're asking questions rather than proposing content. If the user wants to address a gap, discuss it, then present what you'd add for approval.
396
415
 
397
416
  ### What You're NOT Doing
398
417