@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,159 @@
1
+ # Display Plans
2
+
3
+ *Reference for **[start-implementation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Present all discovered plans. Classify each plan into one of three categories based on its state.
8
+
9
+ **Classification logic:**
10
+
11
+ A plan is **Implementable** if:
12
+ - It has `status: concluded` AND all deps are satisfied (`deps_satisfied: true` or no deps) AND no tracking file or tracking `status: not-started`, OR
13
+ - It has an implementation tracking file with `status: in-progress`
14
+
15
+ A plan is **Implemented** if:
16
+ - It has an implementation tracking file with `status: completed`
17
+
18
+ A plan is **Not implementable** if:
19
+ - It has `status: concluded` but deps are NOT satisfied (blocking deps exist)
20
+ - It has `status: planning` or other non-concluded status
21
+ - It has unresolved deps (`has_unresolved_deps: true`)
22
+
23
+ **Present the full state:**
24
+
25
+ Show implementable and implemented plans as numbered tree items.
26
+
27
+ > *Output the next fenced block as a code block:*
28
+
29
+ ```
30
+ Implementation Overview
31
+
32
+ {N} plans found. {M} implementations in progress.
33
+
34
+ 1. {topic:(titlecase)}
35
+ └─ Plan: {plan_status:[concluded]} ({format})
36
+ └─ Implementation: @if(has_implementation) {impl_status:[in-progress|completed]} @else (not started) @endif
37
+
38
+ 2. ...
39
+ ```
40
+
41
+ **Tree rules:**
42
+
43
+ Implementable:
44
+ - Implementation `status: in-progress` → `Implementation: in-progress (Phase N, Task M)`
45
+ - Concluded plan, deps met, not started → `Implementation: (not started)`
46
+
47
+ Implemented:
48
+ - Implementation `status: completed` → `Implementation: completed`
49
+
50
+ **Ordering:**
51
+ 1. Implementable first: in-progress, then new (foundational before dependent)
52
+ 2. Implemented next: completed
53
+ 3. Not implementable last (separate block below)
54
+
55
+ Numbering is sequential across Implementable and Implemented. Omit any section entirely if it has no entries.
56
+
57
+ **If non-implementable plans exist**, show them in a separate code block:
58
+
59
+ > *Output the next fenced block as a code block:*
60
+
61
+ ```
62
+ Plans not ready for implementation:
63
+ These plans are either still in progress or have unresolved
64
+ dependencies that must be addressed first.
65
+
66
+ • advanced-features (blocked by core-features:core-2-3)
67
+ • reporting (in-progress)
68
+ ```
69
+
70
+ > *Output the next fenced block as a code block:*
71
+
72
+ ```
73
+ If a blocked dependency has been resolved outside this workflow,
74
+ name the plan and the dependency to unblock it.
75
+ ```
76
+
77
+ **Key/Legend** — show only statuses that appear in the current display. No `---` separator before this section.
78
+
79
+ > *Output the next fenced block as a code block:*
80
+
81
+ ```
82
+ Key:
83
+
84
+ Implementation status:
85
+ in-progress — work is ongoing
86
+ completed — all tasks implemented
87
+
88
+ Blocking reason:
89
+ blocked — depends on another plan's task
90
+ in-progress — plan not yet concluded
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Selection
96
+
97
+ **If single implementable plan and no implemented plans (auto-select):**
98
+
99
+ > *Output the next fenced block as a code block:*
100
+
101
+ ```
102
+ Automatically proceeding with "{topic:(titlecase)}".
103
+ ```
104
+
105
+ → Return to **[the skill](../SKILL.md)**.
106
+
107
+ **If nothing selectable (no implementable or implemented):**
108
+
109
+ Show "not ready" block only (with unblock hint above).
110
+
111
+ > *Output the next fenced block as a code block:*
112
+
113
+ ```
114
+ Implementation Overview
115
+
116
+ No implementable plans found.
117
+
118
+ Complete blocking dependencies first, or finish plans still
119
+ in progress with /start-planning. Then re-run /start-implementation.
120
+ ```
121
+
122
+ **STOP.** Do not proceed — terminal condition.
123
+
124
+ **If multiple selectable plans (or implemented plans exist):**
125
+
126
+ The verb in the menu depends on the implementation state:
127
+ - Implementation in-progress → **Continue**
128
+ - Not yet started → **Start**
129
+ - Completed → **Re-review**
130
+
131
+ > *Output the next fenced block as markdown (not a code block):*
132
+
133
+ ```
134
+ · · · · · · · · · · · ·
135
+ 1. Continue "Billing" — in-progress (Phase 2, Task 3)
136
+ 2. Start "Core Features" — not yet started
137
+ 3. Re-review "User Auth" — completed
138
+
139
+ Select an option (enter number):
140
+ · · · · · · · · · · · ·
141
+ ```
142
+
143
+ Recreate with actual topics and states from discovery.
144
+
145
+ **STOP.** Wait for user response.
146
+
147
+ ---
148
+
149
+ ## Unblock Request
150
+
151
+ #### If the user requests an unblock
152
+
153
+ 1. Identify the plan and the specific dependency
154
+ 2. Confirm with the user which dependency to mark as satisfied
155
+ 3. Update the plan's `external_dependencies` frontmatter: set `state` to `satisfied_externally`
156
+ 4. Commit the change
157
+ 5. Re-run classification and re-present this display
158
+
159
+ → Return to **[the skill](../SKILL.md)** with selected topic.
@@ -0,0 +1,45 @@
1
+ # Check Environment
2
+
3
+ *Reference for **[start-implementation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ > **IMPORTANT**: This step is for **information gathering only**. Do NOT execute any setup commands at this stage. The processing skill contains instructions for handling environment setup.
8
+
9
+ Use the `environment` section from the discovery output:
10
+
11
+ #### If setup_file_exists is true and requires_setup is false
12
+
13
+ > *Output the next fenced block as a code block:*
14
+
15
+ ```
16
+ Environment: No special setup required.
17
+ ```
18
+
19
+ → Return to **[the skill](../SKILL.md)**.
20
+
21
+ #### If setup_file_exists is true and requires_setup is true
22
+
23
+ > *Output the next fenced block as a code block:*
24
+
25
+ ```
26
+ Environment setup file found: .workflows/environment-setup.md
27
+ ```
28
+
29
+ → Return to **[the skill](../SKILL.md)**.
30
+
31
+ #### If setup_file_exists is false or requires_setup is unknown
32
+
33
+ > *Output the next fenced block as a code block:*
34
+
35
+ ```
36
+ Are there any environment setup instructions I should follow before implementation?
37
+ (Or "none" if no special setup is needed)
38
+ ```
39
+
40
+ **STOP.** Wait for user response.
41
+
42
+ - If the user provides instructions, save them to `.workflows/environment-setup.md`, commit and push
43
+ - If the user says no/none, create `.workflows/environment-setup.md` with "No special setup required." and commit
44
+
45
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,42 @@
1
+ # Invoke the Skill
2
+
3
+ *Reference for **[start-implementation](../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-implementation/SKILL.md" \
19
+ ".workflows/implementation/{topic}/tracking.md"
20
+ ```
21
+
22
+ After completing the steps above, this skill's purpose is fulfilled.
23
+
24
+ Invoke the [technical-implementation](../../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.
25
+
26
+ ---
27
+
28
+ ## Handoff
29
+
30
+ ```
31
+ Implementation session for: {topic}
32
+ Plan: .workflows/planning/{topic}/plan.md
33
+ Format: {format}
34
+ Plan ID: {plan_id} (if applicable)
35
+ Specification: {specification} (exists: {true|false})
36
+ Implementation tracking: {exists | new} (status: {in-progress | not-started | completed})
37
+
38
+ Dependencies: {All satisfied | List any notes}
39
+ Environment: {Setup required | No special setup required}
40
+
41
+ Invoke the technical-implementation skill.
42
+ ```
@@ -0,0 +1,32 @@
1
+ # Route Based on Scenario
2
+
3
+ *Reference for **[start-implementation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Discovery mode — use the discovery output from Step 1.
8
+
9
+ Use `state.scenario` from the discovery output to determine the path:
10
+
11
+ #### If scenario is "no_plans"
12
+
13
+ No plans exist yet.
14
+
15
+ > *Output the next fenced block as a code block:*
16
+
17
+ ```
18
+ Implementation Overview
19
+
20
+ No plans found in .workflows/planning/
21
+
22
+ The implementation phase requires a plan.
23
+ Run /start-planning first to create a plan from a specification.
24
+ ```
25
+
26
+ **STOP.** Do not proceed — terminal condition.
27
+
28
+ #### If scenario is "single_plan" or "multiple_plans"
29
+
30
+ Plans exist.
31
+
32
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,45 @@
1
+ # Validate Plan
2
+
3
+ *Reference for **[start-implementation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if plan exists and is ready.
8
+
9
+ ```bash
10
+ ls .workflows/planning/
11
+ ```
12
+
13
+ Read `.workflows/planning/{topic}/plan.md` frontmatter.
14
+
15
+ #### If plan doesn't exist
16
+
17
+ > *Output the next fenced block as a code block:*
18
+
19
+ ```
20
+ Plan Missing
21
+
22
+ No plan found for "{topic:(titlecase)}".
23
+
24
+ A concluded plan is required for implementation.
25
+ Run /start-planning {work_type} {topic} to create one.
26
+ ```
27
+
28
+ **STOP.** Do not proceed — terminal condition.
29
+
30
+ #### If plan exists but status is not "concluded"
31
+
32
+ > *Output the next fenced block as a code block:*
33
+
34
+ ```
35
+ Plan Not Concluded
36
+
37
+ The plan for "{topic:(titlecase)}" is not yet concluded.
38
+ Run /start-planning {work_type} {topic} to continue.
39
+ ```
40
+
41
+ **STOP.** Do not proceed — terminal condition.
42
+
43
+ #### If plan exists and status is "concluded"
44
+
45
+ → Return to **[the skill](../SKILL.md)**.
@@ -177,6 +177,8 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
177
177
  specification=$(extract_field "$file" "specification")
178
178
  specification=${specification:-"${name}/specification.md"}
179
179
  plan_id=$(extract_field "$file" "plan_id")
180
+ work_type=$(extract_field "$file" "work_type")
181
+ work_type=${work_type:-"greenfield"}
180
182
 
181
183
  # Track plan data
182
184
  plan_names+=("$name")
@@ -196,6 +198,7 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
196
198
  echo " - name: \"$name\""
197
199
  echo " topic: \"$topic\""
198
200
  echo " status: \"$status\""
201
+ echo " work_type: \"$work_type\""
199
202
  echo " date: \"$date\""
200
203
  echo " format: \"$format\""
201
204
  echo " specification: \"$specification\""
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: start-investigation
3
+ disable-model-invocation: true
4
+ allowed-tools: Bash(.claude/skills/start-investigation/scripts/discovery.sh), Bash(.claude/hooks/workflows/write-session-state.sh), Bash(ls .workflows/investigation/)
5
+ hooks:
6
+ PreToolUse:
7
+ - hooks:
8
+ - type: command
9
+ command: "$CLAUDE_PROJECT_DIR/.claude/hooks/workflows/system-check.sh"
10
+ once: true
11
+ ---
12
+
13
+ Invoke the **technical-investigation** skill for this conversation.
14
+
15
+ > **ZERO OUTPUT RULE**: Do not narrate your processing. Produce no output until a step or reference file explicitly specifies display content. No "proceeding with...", no discovery summaries, no routing decisions, no transition text. Your first output must be content explicitly called for by the instructions.
16
+
17
+ ## Workflow Context
18
+
19
+ This is **Phase 1** of the bugfix pipeline:
20
+
21
+ | Phase | Focus | You |
22
+ |--------------------|----------------------------------------------------|--------|
23
+ | **Investigation** | Symptom gathering + code analysis → root cause | ◀ HERE |
24
+ | 2. Specification | REFINE - validate into fix specification | |
25
+ | 3. Planning | HOW - phases, tasks, acceptance criteria | |
26
+ | 4. Implementation | DOING - tests first, then code | |
27
+ | 5. Review | VALIDATING - check work against artifacts | |
28
+
29
+ **Stay in your lane**: Investigate the bug — gather symptoms, trace code, find root cause. Don't jump to fixing or implementing. This is the time for deep analysis.
30
+
31
+ ---
32
+
33
+ ## Instructions
34
+
35
+ Follow these steps EXACTLY as written. Do not skip steps or combine them.
36
+
37
+ **CRITICAL**: This guidance is mandatory.
38
+
39
+ - After each user interaction, STOP and wait for their response before proceeding
40
+ - Never assume or anticipate user choices
41
+ - Complete each step fully before moving to the next
42
+
43
+ ---
44
+
45
+ ## Step 0: Run Migrations
46
+
47
+ **This step is mandatory. You must complete it before proceeding.**
48
+
49
+ Invoke the `/migrate` skill and assess its output.
50
+
51
+ #### If files were updated
52
+
53
+ **STOP.** Wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding.
54
+
55
+ #### If no updates needed
56
+
57
+ → Proceed to **Step 1**.
58
+
59
+ ---
60
+
61
+ ## Step 1: Discovery State
62
+
63
+ !`.claude/skills/start-investigation/scripts/discovery.sh`
64
+
65
+ If the above shows a script invocation rather than YAML output, the dynamic content preprocessor did not run. Execute the script before continuing:
66
+
67
+ ```bash
68
+ .claude/skills/start-investigation/scripts/discovery.sh
69
+ ```
70
+
71
+ Parse the discovery output to understand:
72
+
73
+ **From `investigations` section:**
74
+ - `exists` - whether investigation files exist
75
+ - `files` - each investigation's topic, status, and date
76
+ - `counts.in_progress` and `counts.concluded` - totals for routing
77
+
78
+ **From `state` section:**
79
+ - `scenario` - one of: `"fresh"`, `"has_investigations"`
80
+
81
+ **IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state.
82
+
83
+ → Proceed to **Step 2**.
84
+
85
+ ---
86
+
87
+ ## Step 2: Determine Mode
88
+
89
+ Check for arguments: work_type = `$0`, topic = `$1`
90
+
91
+ Investigation is always bugfix work_type. If work_type is provided, it should be `bugfix`.
92
+
93
+ #### If work_type and topic are both provided
94
+
95
+ → Proceed to **Step 3** (Validate Investigation).
96
+
97
+ #### If work_type is provided without topic
98
+
99
+ → Proceed to **Step 4** (Route Based on Scenario).
100
+
101
+ #### If neither is provided
102
+
103
+ → Proceed to **Step 4** (Route Based on Scenario).
104
+
105
+ ---
106
+
107
+ ## Step 3: Validate Investigation
108
+
109
+ Load **[validate-investigation.md](references/validate-investigation.md)** and follow its instructions as written.
110
+
111
+ #### If resume
112
+
113
+ → Proceed to **Step 6**.
114
+
115
+ #### If no collision
116
+
117
+ → Proceed to **Step 5**.
118
+
119
+ ---
120
+
121
+ ## Step 4: Route Based on Scenario
122
+
123
+ Load **[route-scenario.md](references/route-scenario.md)** and follow its instructions as written.
124
+
125
+ #### If resuming
126
+
127
+ → Proceed to **Step 6**.
128
+
129
+ #### If new or fresh
130
+
131
+ → Proceed to **Step 5**.
132
+
133
+ ---
134
+
135
+ ## Step 5: Gather Bug Context
136
+
137
+ Load **[gather-context.md](references/gather-context.md)** and follow its instructions as written.
138
+
139
+ → Proceed to **Step 6**.
140
+
141
+ ---
142
+
143
+ ## Step 6: Invoke the Skill
144
+
145
+ Load **[invoke-skill.md](references/invoke-skill.md)** and follow its instructions as written.
@@ -0,0 +1,72 @@
1
+ # Gather Bug Context (Fresh)
2
+
3
+ *Reference for **[start-investigation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ > *Output the next fenced block as a code block:*
8
+
9
+ ```
10
+ Starting new investigation.
11
+
12
+ What bug are you investigating? Please provide:
13
+ - A short identifier/name for tracking (e.g., "login-timeout-bug")
14
+ - What's broken (expected vs actual behavior)
15
+ - Any initial context (error messages, how it manifests)
16
+ ```
17
+
18
+ **STOP.** Wait for user response.
19
+
20
+ ---
21
+
22
+ If the user didn't provide a clear topic name, suggest one based on the bug description:
23
+
24
+ > *Output the next fenced block as a code block:*
25
+
26
+ ```
27
+ Suggested topic name: {suggested-topic:(kebabcase)}
28
+
29
+ This will create: .workflows/investigation/{suggested-topic}/investigation.md
30
+ ```
31
+
32
+ > *Output the next fenced block as markdown (not a code block):*
33
+
34
+ ```
35
+ · · · · · · · · · · · ·
36
+ Is this name okay?
37
+
38
+ - **`y`/`yes`** — Use this name
39
+ - **`s`/`something else`** — Suggest a different name
40
+ · · · · · · · · · · · ·
41
+ ```
42
+
43
+ **STOP.** Wait for user response.
44
+
45
+ Once the topic name is confirmed, check for naming conflicts in the discovery output.
46
+
47
+ If an investigation with the same name exists, inform the user:
48
+
49
+ > *Output the next fenced block as markdown (not a code block):*
50
+
51
+ ```
52
+ · · · · · · · · · · · ·
53
+ An investigation named "{topic}" already exists.
54
+
55
+ - **`r`/`resume`** — Resume the existing investigation
56
+ - **`n`/`new`** — Choose a different name
57
+ · · · · · · · · · · · ·
58
+ ```
59
+
60
+ **STOP.** Wait for user response.
61
+
62
+ #### If resuming
63
+
64
+ Set source="continue".
65
+
66
+ Check the investigation status. If concluded → suggest `/start-specification bugfix {topic}`. If in-progress:
67
+
68
+ → Return to **[the skill](../SKILL.md)** for **Step 6**.
69
+
70
+ #### If no conflict
71
+
72
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,31 @@
1
+ # Gather Bug Context
2
+
3
+ *Reference for **[start-investigation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Route based on the `source` variable set in earlier steps.
8
+
9
+ #### If source is "bridge"
10
+
11
+ Bridge mode: topic and work_type were provided by the caller.
12
+
13
+ > *Output the next fenced block as a code block:*
14
+
15
+ ```
16
+ Starting investigation: {topic:(titlecase)}
17
+
18
+ What bug are you investigating? Please provide:
19
+ - What's broken (expected vs actual behavior)
20
+ - Any initial context (error messages, how it manifests)
21
+ ```
22
+
23
+ **STOP.** Wait for user response.
24
+
25
+ → Return to **[the skill](../SKILL.md)**.
26
+
27
+ #### If source is "fresh"
28
+
29
+ Load **[gather-context-fresh.md](gather-context-fresh.md)** and follow its instructions.
30
+
31
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,54 @@
1
+ # Invoke the Skill
2
+
3
+ *Reference for **[start-investigation](../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-investigation/SKILL.md" \
19
+ ".workflows/investigation/{topic}/investigation.md"
20
+ ```
21
+
22
+ This skill's purpose is now fulfilled.
23
+
24
+ Invoke the [technical-investigation](../../technical-investigation/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 how this investigation was initiated.
31
+
32
+ #### If source is "fresh" or "bridge"
33
+
34
+ ```
35
+ Investigation session for: {topic}
36
+ Output: .workflows/investigation/{topic}/investigation.md
37
+
38
+ Bug context:
39
+ - Expected behavior: {from user's description}
40
+ - Actual behavior: {from user's description}
41
+ - Initial context: {error messages, reproduction steps, etc.}
42
+
43
+ Invoke the technical-investigation skill.
44
+ ```
45
+
46
+ #### If source is "continue"
47
+
48
+ ```
49
+ Investigation session for: {topic}
50
+ Source: existing investigation
51
+ Output: .workflows/investigation/{topic}/investigation.md
52
+
53
+ Invoke the technical-investigation skill.
54
+ ```