@leeovery/claude-technical-workflows 2.1.42 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/hooks/workflows/compact-recovery.sh +3 -23
  2. package/hooks/workflows/write-session-state.sh +2 -26
  3. package/package.json +1 -1
  4. package/skills/link-dependencies/SKILL.md +0 -1
  5. package/skills/migrate/SKILL.md +0 -1
  6. package/skills/migrate/scripts/migrations/013-discussion-work-type.sh +76 -0
  7. package/skills/migrate/scripts/migrations/014-specification-work-type.sh +76 -0
  8. package/skills/migrate/scripts/migrations/015-plan-work-type.sh +76 -0
  9. package/skills/start-bugfix/SKILL.md +80 -0
  10. package/skills/start-bugfix/references/gather-bug-context.md +75 -0
  11. package/skills/start-bugfix/references/invoke-investigation.md +46 -0
  12. package/skills/start-bugfix/references/topic-name-check.md +59 -0
  13. package/skills/start-discussion/SKILL.md +51 -46
  14. package/skills/start-discussion/references/gather-context.md +54 -10
  15. package/skills/start-discussion/references/handle-selection.md +14 -4
  16. package/skills/start-discussion/references/invoke-skill.md +71 -3
  17. package/skills/start-discussion/references/research-analysis.md +2 -0
  18. package/skills/start-discussion/references/route-scenario.md +39 -0
  19. package/skills/start-discussion/references/validate-topic.md +46 -0
  20. package/skills/start-discussion/scripts/discovery.sh +3 -0
  21. package/skills/start-feature/SKILL.md +28 -84
  22. package/skills/start-feature/references/invoke-discussion.md +8 -4
  23. package/skills/start-feature/references/invoke-research.md +29 -0
  24. package/skills/start-feature/references/invoke-skill.md +35 -0
  25. package/skills/start-feature/references/research-gating.md +65 -0
  26. package/skills/start-feature/references/topic-name-check.md +61 -0
  27. package/skills/start-implementation/SKILL.md +35 -289
  28. package/skills/start-implementation/references/check-dependencies.md +65 -0
  29. package/skills/start-implementation/references/display-plans.md +159 -0
  30. package/skills/start-implementation/references/environment-check.md +45 -0
  31. package/skills/start-implementation/references/invoke-skill.md +42 -0
  32. package/skills/start-implementation/references/route-scenario.md +32 -0
  33. package/skills/start-implementation/references/validate-plan.md +45 -0
  34. package/skills/start-implementation/scripts/discovery.sh +3 -0
  35. package/skills/start-investigation/SKILL.md +145 -0
  36. package/skills/start-investigation/references/gather-context-fresh.md +72 -0
  37. package/skills/start-investigation/references/gather-context.md +31 -0
  38. package/skills/start-investigation/references/invoke-skill.md +54 -0
  39. package/skills/start-investigation/references/route-scenario.md +69 -0
  40. package/skills/start-investigation/references/validate-investigation.md +46 -0
  41. package/skills/start-investigation/scripts/discovery.sh +92 -0
  42. package/skills/start-planning/SKILL.md +32 -72
  43. package/skills/start-planning/references/cross-cutting-context.md +5 -5
  44. package/skills/start-planning/references/invoke-skill.md +27 -4
  45. package/skills/start-planning/references/route-plan-state.md +30 -0
  46. package/skills/start-planning/references/route-scenario.md +38 -0
  47. package/skills/start-planning/references/validate-spec.md +47 -0
  48. package/skills/start-planning/scripts/discovery.sh +7 -0
  49. package/skills/start-research/SKILL.md +17 -6
  50. package/skills/start-research/references/invoke-skill.md +3 -0
  51. package/skills/start-review/SKILL.md +32 -60
  52. package/skills/start-review/references/determine-review-version.md +24 -0
  53. package/skills/start-review/references/display-plans.md +2 -2
  54. package/skills/start-review/references/route-scenario.md +74 -0
  55. package/skills/start-review/references/select-plans.md +8 -6
  56. package/skills/start-review/references/validate-artifacts.md +63 -0
  57. package/skills/start-review/scripts/discovery.sh +3 -0
  58. package/skills/start-specification/SKILL.md +44 -20
  59. package/skills/start-specification/references/check-existing-spec.md +57 -0
  60. package/skills/start-specification/references/check-prerequisites.md +15 -0
  61. package/skills/start-specification/references/handoffs/continue-concluded.md +3 -0
  62. package/skills/start-specification/references/handoffs/continue.md +3 -0
  63. package/skills/start-specification/references/handoffs/create-with-incorporation.md +3 -0
  64. package/skills/start-specification/references/handoffs/create.md +3 -0
  65. package/skills/start-specification/references/handoffs/unify-with-incorporation.md +3 -0
  66. package/skills/start-specification/references/handoffs/unify.md +3 -0
  67. package/skills/start-specification/references/invoke-skill-bridge.md +74 -0
  68. package/skills/start-specification/references/route-scenario.md +23 -0
  69. package/skills/start-specification/references/validate-source.md +91 -0
  70. package/skills/start-specification/scripts/discovery.sh +6 -0
  71. package/skills/status/SKILL.md +6 -3
  72. package/skills/status/scripts/discovery.sh +9 -0
  73. package/skills/technical-discussion/SKILL.md +15 -4
  74. package/skills/technical-discussion/references/template.md +9 -1
  75. package/skills/technical-implementation/SKILL.md +24 -1
  76. package/skills/technical-implementation/references/analysis-loop.md +4 -4
  77. package/skills/technical-implementation/references/task-loop.md +2 -2
  78. package/skills/technical-investigation/SKILL.md +239 -0
  79. package/skills/technical-investigation/references/analysis-patterns.md +181 -0
  80. package/skills/technical-investigation/references/symptom-gathering.md +164 -0
  81. package/skills/technical-investigation/references/template.md +164 -0
  82. package/skills/technical-planning/SKILL.md +24 -1
  83. package/skills/technical-planning/references/author-tasks.md +16 -16
  84. package/skills/technical-planning/references/define-tasks.md +2 -2
  85. package/skills/technical-planning/references/plan-construction.md +11 -30
  86. package/skills/technical-planning/references/plan-review.md +3 -3
  87. package/skills/technical-research/SKILL.md +38 -2
  88. package/skills/technical-review/SKILL.md +1 -2
  89. package/skills/technical-review/references/review-actions-loop.md +43 -1
  90. package/skills/technical-specification/SKILL.md +1 -2
  91. package/skills/technical-specification/references/spec-completion.md +34 -6
  92. package/skills/technical-specification/references/spec-construction.md +1 -1
  93. package/skills/technical-specification/references/spec-review.md +5 -5
  94. package/skills/view-plan/SKILL.md +0 -1
  95. package/skills/workflow/bridge/SKILL.md +82 -0
  96. package/skills/workflow/bridge/references/bugfix-continuation.md +59 -0
  97. package/skills/workflow/bridge/references/feature-continuation.md +60 -0
  98. package/skills/workflow/bridge/references/greenfield-continuation.md +224 -0
  99. package/skills/workflow/bridge/scripts/discovery.sh +512 -0
  100. package/skills/workflow/start/SKILL.md +97 -0
  101. package/skills/workflow/start/references/bugfix-routing.md +117 -0
  102. package/skills/workflow/start/references/feature-routing.md +117 -0
  103. package/skills/workflow/start/references/greenfield-routing.md +140 -0
  104. package/skills/workflow/start/references/work-type-selection.md +83 -0
  105. package/skills/workflow/start/scripts/discovery.sh +577 -0
  106. package/skills/begin-implementation/SKILL.md +0 -162
  107. package/skills/begin-planning/SKILL.md +0 -92
  108. package/skills/begin-review/SKILL.md +0 -90
  109. package/skills/continue-feature/SKILL.md +0 -186
  110. package/skills/continue-feature/references/detect-phase.md +0 -99
  111. package/skills/continue-feature/references/invoke-implementation.md +0 -43
  112. package/skills/continue-feature/references/invoke-planning.md +0 -43
  113. package/skills/continue-feature/references/invoke-review.md +0 -43
  114. package/skills/continue-feature/references/invoke-specification.md +0 -55
  115. package/skills/continue-feature/references/phase-bridge.md +0 -57
  116. package/skills/continue-feature/scripts/discovery.sh +0 -233
  117. package/skills/start-feature/references/phase-bridge.md +0 -37
@@ -0,0 +1,74 @@
1
+ # Invoke the Skill (Bridge Mode)
2
+
3
+ *Reference for **[start-specification](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Before invoking the processing skill, save a session bookmark.
8
+
9
+ > *Output the next fenced block as a code block:*
10
+
11
+ ```
12
+ Saving session state so Claude can pick up where it left off if the conversation is compacted.
13
+ ```
14
+
15
+ ```bash
16
+ .claude/hooks/workflows/write-session-state.sh \
17
+ "{topic}" \
18
+ "skills/technical-specification/SKILL.md" \
19
+ ".workflows/specification/{topic}/specification.md"
20
+ ```
21
+
22
+ This skill's purpose is now fulfilled.
23
+
24
+ Invoke the [technical-specification](../../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.
25
+
26
+ ---
27
+
28
+ ## Handoff
29
+
30
+ Construct the handoff based on the work type and verb.
31
+
32
+ #### If work_type is feature
33
+
34
+ ```
35
+ Specification session for: {topic}
36
+ Work type: {work_type}
37
+
38
+ Source material:
39
+ - Discussion: .workflows/discussion/{topic}.md
40
+
41
+ Topic name: {topic}
42
+ Action: {verb} specification
43
+
44
+ The specification frontmatter should include:
45
+ - topic: {topic}
46
+ - status: in-progress
47
+ - type: feature
48
+ - work_type: {work_type}
49
+ - date: {today}
50
+
51
+ Invoke the technical-specification skill.
52
+ ```
53
+
54
+ #### If work_type is bugfix
55
+
56
+ ```
57
+ Specification session for: {topic}
58
+ Work type: {work_type}
59
+
60
+ Source material:
61
+ - Investigation: .workflows/investigation/{topic}/investigation.md
62
+
63
+ Topic name: {topic}
64
+ Action: {verb} specification
65
+
66
+ The specification frontmatter should include:
67
+ - topic: {topic}
68
+ - status: in-progress
69
+ - type: feature
70
+ - work_type: {work_type}
71
+ - date: {today}
72
+
73
+ Invoke the technical-specification skill.
74
+ ```
@@ -0,0 +1,23 @@
1
+ # Route Based on State
2
+
3
+ *Reference for **[start-specification](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Based on discovery state, load exactly ONE reference file:
8
+
9
+ #### If concluded_count == 1
10
+
11
+ → Load **[display-single.md](display-single.md)** and follow its instructions.
12
+
13
+ #### If cache status is "valid"
14
+
15
+ → Load **[display-groupings.md](display-groupings.md)** and follow its instructions.
16
+
17
+ #### If spec_count == 0 and cache is "none" or "stale"
18
+
19
+ → Load **[display-analyze.md](display-analyze.md)** and follow its instructions.
20
+
21
+ #### Otherwise
22
+
23
+ → Load **[display-specs-menu.md](display-specs-menu.md)** and follow its instructions.
@@ -0,0 +1,91 @@
1
+ # Validate Source Material
2
+
3
+ *Reference for **[start-specification](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if source material exists and is ready.
8
+
9
+ #### If work_type is feature
10
+
11
+ Check if discussion exists and is concluded:
12
+
13
+ ```bash
14
+ ls .workflows/discussion/
15
+ ```
16
+
17
+ Read `.workflows/discussion/{topic}.md` frontmatter.
18
+
19
+ **If discussion doesn't exist:**
20
+
21
+ > *Output the next fenced block as a code block:*
22
+
23
+ ```
24
+ Source Material Missing
25
+
26
+ No discussion found for "{topic:(titlecase)}".
27
+
28
+ A concluded discussion is required before specification.
29
+ Run /start-discussion feature {topic} to start one.
30
+ ```
31
+
32
+ **STOP.** Do not proceed — terminal condition.
33
+
34
+ **If discussion exists but status is "in-progress":**
35
+
36
+ > *Output the next fenced block as a code block:*
37
+
38
+ ```
39
+ Discussion In Progress
40
+
41
+ The discussion for "{topic:(titlecase)}" is not yet concluded.
42
+ Run /start-discussion feature {topic} to continue.
43
+ ```
44
+
45
+ **STOP.** Do not proceed — terminal condition.
46
+
47
+ **If discussion exists and status is "concluded":**
48
+
49
+ → Return to **[the skill](../SKILL.md)**.
50
+
51
+ #### If work_type is bugfix
52
+
53
+ Check if investigation exists and is concluded:
54
+
55
+ ```bash
56
+ ls .workflows/investigation/
57
+ ```
58
+
59
+ Read `.workflows/investigation/{topic}/investigation.md` frontmatter.
60
+
61
+ **If investigation doesn't exist:**
62
+
63
+ > *Output the next fenced block as a code block:*
64
+
65
+ ```
66
+ Source Material Missing
67
+
68
+ No investigation found for "{topic:(titlecase)}".
69
+
70
+ A concluded investigation is required before specification.
71
+ Run /start-investigation bugfix {topic} to start one.
72
+ ```
73
+
74
+ **STOP.** Do not proceed — terminal condition.
75
+
76
+ **If investigation exists but status is "in-progress":**
77
+
78
+ > *Output the next fenced block as a code block:*
79
+
80
+ ```
81
+ Investigation In Progress
82
+
83
+ The investigation for "{topic:(titlecase)}" is not yet concluded.
84
+ Run /start-investigation bugfix {topic} to continue.
85
+ ```
86
+
87
+ **STOP.** Do not proceed — terminal condition.
88
+
89
+ **If investigation exists and status is "concluded":**
90
+
91
+ → Return to **[the skill](../SKILL.md)**.
@@ -133,6 +133,8 @@ if [ -d "$DISCUSSION_DIR" ] && [ -n "$(ls -A "$DISCUSSION_DIR" 2>/dev/null)" ];
133
133
  name=$(basename "$file" .md)
134
134
  status=$(extract_field "$file" "status")
135
135
  status=${status:-"unknown"}
136
+ work_type=$(extract_field "$file" "work_type")
137
+ work_type=${work_type:-"greenfield"}
136
138
 
137
139
  # Check if this discussion has a corresponding individual spec
138
140
  has_individual_spec="false"
@@ -146,6 +148,7 @@ if [ -d "$DISCUSSION_DIR" ] && [ -n "$(ls -A "$DISCUSSION_DIR" 2>/dev/null)" ];
146
148
 
147
149
  echo " - name: \"$name\""
148
150
  echo " status: \"$status\""
151
+ echo " work_type: \"$work_type\""
149
152
  echo " has_individual_spec: $has_individual_spec"
150
153
  if [ "$has_individual_spec" = "true" ]; then
151
154
  echo " spec_status: \"$spec_status\""
@@ -169,11 +172,14 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
169
172
  name=$(basename "$(dirname "$file")")
170
173
  status=$(extract_field "$file" "status")
171
174
  status=${status:-"active"}
175
+ work_type=$(extract_field "$file" "work_type")
176
+ work_type=${work_type:-"greenfield"}
172
177
 
173
178
  superseded_by=$(extract_field "$file" "superseded_by")
174
179
 
175
180
  echo " - name: \"$name\""
176
181
  echo " status: \"$status\""
182
+ echo " work_type: \"$work_type\""
177
183
 
178
184
  if [ -n "$superseded_by" ]; then
179
185
  echo " superseded_by: \"$superseded_by\""
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  name: status
3
- description: "Show workflow status - what exists, where you are, and what to do next."
4
3
  disable-model-invocation: true
5
4
  allowed-tools: Bash(.claude/skills/status/scripts/discovery.sh)
6
5
  hooks:
@@ -19,9 +18,13 @@ Show the current state of the workflow for this project.
19
18
 
20
19
  Invoke the `/migrate` skill and assess its output.
21
20
 
22
- **If files were updated**: STOP and wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding to Step 1. Do not continue automatically.
21
+ #### If files were updated
23
22
 
24
- **If no updates needed**: Proceed to Step 1.
23
+ **STOP.** Wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding.
24
+
25
+ #### If no updates needed
26
+
27
+ → Proceed to **Step 1**.
25
28
 
26
29
  ---
27
30
 
@@ -216,9 +216,12 @@ if [ -d "$DISCUSSION_DIR" ] && [ -n "$(ls -A "$DISCUSSION_DIR" 2>/dev/null)" ];
216
216
  name=$(basename "$file" .md)
217
217
  status=$(extract_field "$file" "status")
218
218
  status=${status:-"unknown"}
219
+ work_type=$(extract_field "$file" "work_type")
220
+ work_type=${work_type:-"greenfield"}
219
221
 
220
222
  echo " - name: \"$name\""
221
223
  echo " status: \"$status\""
224
+ echo " work_type: \"$work_type\""
222
225
 
223
226
  disc_count=$((disc_count + 1))
224
227
  [ "$status" = "concluded" ] && disc_concluded=$((disc_concluded + 1))
@@ -258,11 +261,14 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
258
261
  status=${status:-"in-progress"}
259
262
  spec_type=$(extract_field "$file" "type")
260
263
  spec_type=${spec_type:-"feature"}
264
+ work_type=$(extract_field "$file" "work_type")
265
+ work_type=${work_type:-"greenfield"}
261
266
  superseded_by=$(extract_field "$file" "superseded_by")
262
267
 
263
268
  echo " - name: \"$name\""
264
269
  echo " status: \"$status\""
265
270
  echo " type: \"$spec_type\""
271
+ echo " work_type: \"$work_type\""
266
272
  [ -n "$superseded_by" ] && echo " superseded_by: \"$superseded_by\""
267
273
 
268
274
  # Sources
@@ -323,12 +329,15 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
323
329
  status=${status:-"unknown"}
324
330
  format=$(extract_field "$file" "format")
325
331
  format=${format:-"unknown"}
332
+ work_type=$(extract_field "$file" "work_type")
333
+ work_type=${work_type:-"greenfield"}
326
334
  specification=$(extract_field "$file" "specification")
327
335
  specification=${specification:-"${name}/specification.md"}
328
336
 
329
337
  echo " - name: \"$name\""
330
338
  echo " status: \"$status\""
331
339
  echo " format: \"$format\""
340
+ echo " work_type: \"$work_type\""
332
341
  echo " specification: \"$specification\""
333
342
 
334
343
  # External dependencies
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  name: technical-discussion
3
- description: "Document technical discussions as expert architect and meeting assistant. Capture context, decisions, edge cases, debates, and rationale without jumping to specification or implementation. Use when: (1) Users discuss/explore/debate architecture or design, (2) Working through edge cases before specification, (3) Need to document technical decisions and their rationale, (4) Capturing competing solutions and why choices were made. Creates documentation in .workflows/discussion/{topic}.md that can be used to build validated specifications."
4
3
  user-invocable: false
5
4
  ---
6
5
 
@@ -135,9 +134,21 @@ Incorporate the user's context into the discussion, commit, then re-present the
135
134
 
136
135
  1. Update frontmatter `status: concluded`
137
136
  2. Final commit
138
- 3. Check for remaining in-progress discussions in `.workflows/discussion/`
137
+ 3. Check the artifact frontmatter for `work_type`
139
138
 
140
- **If other in-progress discussions exist:**
139
+ **If work_type is set** (feature, bugfix, or greenfield):
140
+
141
+ This discussion is part of a pipeline. Invoke the `/workflow:bridge` skill:
142
+
143
+ ```
144
+ Pipeline bridge for: {topic}
145
+ Work type: {work_type from artifact frontmatter}
146
+ Completed phase: discussion
147
+
148
+ Invoke the workflow:bridge skill to enter plan mode with continuation instructions.
149
+ ```
150
+
151
+ **If work_type is not set and other in-progress discussions exist:**
141
152
 
142
153
  > *Output the next fenced block as a code block:*
143
154
 
@@ -151,7 +162,7 @@ Remaining in-progress discussions:
151
162
  To continue, clear your context and run /start-discussion to pick up the next topic.
152
163
  ```
153
164
 
154
- **If no in-progress discussions remain:**
165
+ **If work_type is not set and no in-progress discussions remain:**
155
166
 
156
167
  > *Output the next fenced block as a code block:*
157
168
 
@@ -17,6 +17,7 @@ This is a single file per topic.
17
17
  topic: {topic-name}
18
18
  status: in-progress
19
19
  date: YYYY-MM-DD # Use today's actual date
20
+ research_source: {filename}.md # Optional — only when handoff includes research source
20
21
  ---
21
22
 
22
23
  # Discussion: {Topic}
@@ -95,12 +96,19 @@ What we chose, why, the deciding factor, trade-offs accepted, confidence level.
95
96
  - [ ] Validate Y
96
97
  ```
97
98
 
99
+ ## Field Notes
100
+
101
+ - `topic`: The discussion topic. Should match the filename (e.g., `auth-flow` for `auth-flow.md`).
102
+ - `status`: Lifecycle state — `in-progress` or `concluded`.
103
+ - `date`: Today's date when creating the document.
104
+ - `research_source`: (optional) The research file this discussion originated from. Include only when the handoff provides a research source. Feature pipeline only — greenfield discussions may draw from multiple research files.
105
+
98
106
  ## Usage Notes
99
107
 
100
108
  **When creating**:
101
109
  1. Ensure discussion directory exists: `.workflows/discussion/`
102
110
  2. Create file: `{topic}.md`
103
- 3. Fill frontmatter: topic, status, date
111
+ 3. Fill frontmatter: topic, status, date, and research_source if provided in handoff
104
112
  4. Start with context: why discussing?
105
113
  5. List questions: what needs deciding?
106
114
 
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  name: technical-implementation
3
- description: "Orchestrate implementation of plans using agent-based TDD workflow with per-task review and approval gate (auto mode available). Use when: (1) Implementing a plan from .workflows/planning/{topic}/plan.md, (2) User says 'implement', 'build', or 'code this' with a plan available, (3) Ad hoc coding that should follow TDD and quality standards, (4) Bug fixes or features benefiting from structured implementation. Dispatches executor and reviewer agents per task, commits after review approval."
4
3
  user-invocable: false
5
4
  ---
6
5
 
@@ -333,4 +332,28 @@ Update the tracking file (`.workflows/implementation/{topic}/tracking.md`):
333
332
 
334
333
  Commit: `impl({topic}): complete implementation`
335
334
 
335
+ **Check for pipeline continuation** — Read the plan file (`.workflows/planning/{topic}/plan.md`) and check for `work_type`
336
+
337
+ **If work_type is set** (feature, bugfix, or greenfield):
338
+
339
+ This implementation is part of a pipeline. Invoke the `/workflow:bridge` skill:
340
+
341
+ ```
342
+ Pipeline bridge for: {topic}
343
+ Work type: {work_type from plan frontmatter}
344
+ Completed phase: implementation
345
+
346
+ Invoke the workflow:bridge skill to enter plan mode with continuation instructions.
347
+ ```
348
+
349
+ **If work_type is not set:**
350
+
351
+ > *Output the next fenced block as a code block:*
352
+
353
+ ```
354
+ Implementation completed: {topic}
355
+
356
+ The implementation is ready for review. Run /start-review to begin.
357
+ ```
358
+
336
359
 
@@ -22,7 +22,7 @@ F. Create tasks in plan → invoke-task-writer.md
22
22
 
23
23
  Increment `analysis_cycle` in the implementation tracking file.
24
24
 
25
- → If `analysis_cycle <= 3`, proceed directly to **B. Git Checkpoint**.
25
+ → If `analysis_cycle <= 3`, proceed to **B. Git Checkpoint**.
26
26
 
27
27
  If `analysis_cycle > 3`:
28
28
 
@@ -43,8 +43,8 @@ Analysis has run {N-1} times so far. You can continue (recommended if issues wer
43
43
 
44
44
  **STOP.** Wait for user choice. You MUST NOT choose on the user's behalf.
45
45
 
46
- - **`proceed`**: → Continue to **B. Git Checkpoint**.
47
- - **`skip`**: → Return to the skill for **Step 8**.
46
+ - **`proceed`**: → Proceed to **B. Git Checkpoint**.
47
+ - **`skip`**: → Return to **[the skill](../SKILL.md)** for **Step 8**.
48
48
 
49
49
  ---
50
50
 
@@ -243,4 +243,4 @@ Commit all analysis and plan changes (staging file, plan tasks, Plan Index File,
243
243
  impl({topic}): add analysis phase {N} ({K} tasks)
244
244
  ```
245
245
 
246
- → Return to the skill. New tasks are now in the plan.
246
+ → Return to **[the skill](../SKILL.md)**. New tasks are now in the plan.
@@ -70,7 +70,7 @@ Task {id}: {Task Name} — {blocked/failed}
70
70
 
71
71
  #### If `stop`
72
72
 
73
- → Return to the skill for **Step 7**.
73
+ → Return to **[the skill](../SKILL.md)** for **Step 7**.
74
74
 
75
75
  ---
76
76
 
@@ -211,4 +211,4 @@ This is the end of this iteration.
211
211
  All tasks complete. {M} tasks implemented.
212
212
  ```
213
213
 
214
- → Return to the skill for **Step 7**.
214
+ → Return to **[the skill](../SKILL.md)** for **Step 7**.
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: technical-investigation
3
+ user-invocable: false
4
+ ---
5
+
6
+ # Technical Investigation
7
+
8
+ Act as **expert debugger** tracing through code AND **documentation assistant** capturing findings. These are equally important — the investigation drives understanding, the documentation preserves it. Dig deep: trace code paths, challenge assumptions, explore related areas. Then capture what you found.
9
+
10
+ ## Purpose in the Workflow
11
+
12
+ This skill is the first phase of the **bugfix pipeline**:
13
+ Investigation → Specification → Planning → Implementation → Review
14
+
15
+ Investigation combines:
16
+ - **Symptom gathering**: What's broken, how it manifests, reproduction steps
17
+ - **Code analysis**: Tracing paths, finding root cause, understanding blast radius
18
+
19
+ The output becomes source material for a specification focused on the fix approach.
20
+
21
+ ### What This Skill Needs
22
+
23
+ - **Topic** (required) - Bug identifier or short description
24
+ - **Bug context** (optional) - Initial symptoms, error messages, reproduction steps
25
+ - **Work type** - Always "bugfix" for investigation
26
+
27
+ **Before proceeding**, confirm the required input is clear. If anything is missing or unclear, **STOP** and resolve with the user.
28
+
29
+ #### If no topic provided
30
+
31
+ > *Output the next fenced block as a code block:*
32
+
33
+ ```
34
+ What bug would you like to investigate? Provide:
35
+ - A short identifier or name for tracking
36
+ - What's broken (expected vs actual behavior)
37
+ - Any error messages or symptoms observed
38
+ ```
39
+
40
+ **STOP.** Wait for user response.
41
+
42
+ ---
43
+
44
+ ## Resuming After Context Refresh
45
+
46
+ Context refresh (compaction) summarizes the conversation, losing procedural detail. When you detect a context refresh has occurred — the conversation feels abruptly shorter, you lack memory of recent steps, or a summary precedes this message — follow this recovery protocol:
47
+
48
+ 1. **Re-read this skill file completely.** Do not rely on your summary of it. The full process, steps, and rules must be reloaded.
49
+ 2. **Read the investigation file** at `.workflows/investigation/{topic}/investigation.md` — this is your source of truth for what's been discovered.
50
+ 3. **Check git state.** Run `git status` and `git log --oneline -10` to see recent commits. Commit messages follow a conventional pattern that reveals what was completed.
51
+ 4. **Announce your position** to the user before continuing: what you've found so far, what's still to investigate, and what comes next. Wait for confirmation.
52
+
53
+ Do not guess at progress or continue from memory. The files on disk and git history are authoritative — your recollection is not.
54
+
55
+ ---
56
+
57
+ ## Investigation Process
58
+
59
+ ### Phase 1: Symptom Gathering
60
+
61
+ Start by understanding the bug from the user's perspective:
62
+
63
+ 1. **Problem description**: What's the expected vs actual behavior?
64
+ 2. **Manifestation**: How is it surfacing? (errors, UI issues, data corruption)
65
+ 3. **Reproduction steps**: Can it be reproduced? What triggers it?
66
+ 4. **Environment**: Where does it occur? (production, staging, specific browsers)
67
+ 5. **Links**: Error tracking (Sentry), logs, support tickets
68
+ 6. **Impact**: How severe? How many users affected?
69
+ 7. **Initial hypotheses**: What does the user suspect?
70
+
71
+ Document symptoms in the investigation file as you gather them.
72
+
73
+ ### Phase 2: Code Analysis
74
+
75
+ With symptoms understood, trace through the code:
76
+
77
+ 1. **Reproduce the issue**: If possible, confirm the bug exists
78
+ 2. **Identify entry points**: Where does the problematic flow start?
79
+ 3. **Trace code paths**: Follow the execution through the codebase
80
+ 4. **Isolate root cause**: What specific code/condition causes the bug?
81
+ 5. **Assess blast radius**: What else might be affected by a fix?
82
+ 6. **Identify related code**: Are there similar patterns elsewhere?
83
+
84
+ Document findings in the investigation file as you analyze.
85
+
86
+ ### Phase 3: Root Cause Analysis
87
+
88
+ Synthesize findings into a clear root cause:
89
+
90
+ 1. **Root cause statement**: Clear, precise description of the bug's cause
91
+ 2. **Contributing factors**: What conditions enable the bug?
92
+ 3. **Why it wasn't caught**: Testing gaps, edge cases, etc.
93
+ 4. **Fix direction**: High-level approach (detailed in specification)
94
+
95
+ ---
96
+
97
+ ## What to Capture
98
+
99
+ - **Symptom details**: Error messages, screenshots, logs
100
+ - **Reproduction steps**: Precise steps to trigger the bug
101
+ - **Code traces**: Which files/functions are involved
102
+ - **Root cause**: The specific issue and why it occurs
103
+ - **Blast radius**: What else might be affected
104
+ - **Initial fix ideas**: Rough approaches to consider in specification
105
+
106
+ **On length**: Investigations can vary widely. Capture what's needed to fully understand the bug. Don't summarize prematurely — document the trail.
107
+
108
+ ## Structure
109
+
110
+ **Output**: `.workflows/investigation/{topic}/investigation.md`
111
+
112
+ Use **[template.md](references/template.md)** for structure:
113
+
114
+ ```markdown
115
+ ---
116
+ topic: {topic}
117
+ status: in-progress
118
+ work_type: bugfix
119
+ date: {YYYY-MM-DD}
120
+ ---
121
+
122
+ # Investigation: {Topic}
123
+
124
+ ## Symptoms
125
+
126
+ ### Problem Description
127
+ {Expected vs actual behavior}
128
+
129
+ ### Manifestation
130
+ {How the bug surfaces - errors, UI issues, etc.}
131
+
132
+ ### Reproduction Steps
133
+ 1. {Step}
134
+ 2. {Step}
135
+ ...
136
+
137
+ ### Environment
138
+ {Where it occurs, conditions}
139
+
140
+ ### Impact
141
+ {Severity, affected users}
142
+
143
+ ## Analysis
144
+
145
+ ### Code Trace
146
+ {Entry points, code paths followed}
147
+
148
+ ### Root Cause
149
+ {Clear statement of what causes the bug}
150
+
151
+ ### Contributing Factors
152
+ {Conditions that enable the bug}
153
+
154
+ ### Blast Radius
155
+ {What else might be affected}
156
+
157
+ ## Fix Direction
158
+
159
+ ### Proposed Approach
160
+ {High-level fix direction for specification}
161
+
162
+ ### Alternatives Considered
163
+ {Other approaches, why not chosen}
164
+
165
+ ### Testing Gaps
166
+ {What testing should be added}
167
+ ```
168
+
169
+ ## Write to Disk and Commit Frequently
170
+
171
+ The investigation file is your memory. Context compaction is lossy — what's not on disk is lost.
172
+
173
+ **Write to the file at natural moments:**
174
+
175
+ - Symptoms are gathered
176
+ - A code path is traced
177
+ - Root cause is identified
178
+ - Each significant finding
179
+
180
+ **After writing, git commit.** Commits let you track and recover after compaction. Don't batch — commit each time you write.
181
+
182
+ **Create the file early.** After understanding the initial symptoms, create the investigation file with frontmatter and symptoms section.
183
+
184
+ ## Concluding an Investigation
185
+
186
+ When the root cause is identified and documented:
187
+
188
+ > *Output the next fenced block as markdown (not a code block):*
189
+
190
+ ```
191
+ · · · · · · · · · · · ·
192
+ Root cause identified. Ready to conclude?
193
+
194
+ - **`y`/`yes`** — Conclude investigation and proceed to specification
195
+ - **`m`/`more`** — Continue investigating (more analysis needed)
196
+ · · · · · · · · · · · ·
197
+ ```
198
+
199
+ **STOP.** Wait for user response.
200
+
201
+ #### If more
202
+
203
+ Continue investigation. Ask what aspects need more analysis.
204
+
205
+ #### If yes
206
+
207
+ 1. Update frontmatter `status: concluded`
208
+ 2. Final commit
209
+ 3. Display conclusion:
210
+
211
+ > *Output the next fenced block as a code block:*
212
+
213
+ ```
214
+ Investigation concluded: {topic}
215
+
216
+ Root cause: {brief summary}
217
+ Fix direction: {proposed approach}
218
+
219
+ The investigation is ready for specification. The specification will
220
+ detail the exact fix approach, acceptance criteria, and testing plan.
221
+ ```
222
+
223
+ 4. Check the investigation frontmatter for `work_type`
224
+
225
+ **If work_type is set** (bugfix):
226
+
227
+ This investigation is part of a pipeline. Invoke the `/workflow:bridge` skill:
228
+
229
+ ```
230
+ Pipeline bridge for: {topic}
231
+ Work type: bugfix
232
+ Completed phase: investigation
233
+
234
+ Invoke the workflow:bridge skill to enter plan mode with continuation instructions.
235
+ ```
236
+
237
+ **If work_type is not set:**
238
+
239
+ The session ends here. The investigation document can be used as input to `/start-specification`.