@leeovery/claude-technical-workflows 2.1.41 → 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 (119) hide show
  1. package/README.md +5 -20
  2. package/hooks/workflows/compact-recovery.sh +3 -23
  3. package/hooks/workflows/write-session-state.sh +2 -26
  4. package/package.json +1 -1
  5. package/skills/link-dependencies/SKILL.md +0 -1
  6. package/skills/migrate/SKILL.md +0 -1
  7. package/skills/migrate/scripts/migrations/013-discussion-work-type.sh +76 -0
  8. package/skills/migrate/scripts/migrations/014-specification-work-type.sh +76 -0
  9. package/skills/migrate/scripts/migrations/015-plan-work-type.sh +76 -0
  10. package/skills/start-bugfix/SKILL.md +80 -0
  11. package/skills/start-bugfix/references/gather-bug-context.md +75 -0
  12. package/skills/start-bugfix/references/invoke-investigation.md +46 -0
  13. package/skills/start-bugfix/references/topic-name-check.md +59 -0
  14. package/skills/start-discussion/SKILL.md +51 -46
  15. package/skills/start-discussion/references/gather-context.md +54 -10
  16. package/skills/start-discussion/references/handle-selection.md +14 -4
  17. package/skills/start-discussion/references/invoke-skill.md +71 -3
  18. package/skills/start-discussion/references/research-analysis.md +2 -0
  19. package/skills/start-discussion/references/route-scenario.md +39 -0
  20. package/skills/start-discussion/references/validate-topic.md +46 -0
  21. package/skills/start-discussion/scripts/discovery.sh +3 -0
  22. package/skills/start-feature/SKILL.md +28 -84
  23. package/skills/start-feature/references/invoke-discussion.md +8 -4
  24. package/skills/start-feature/references/invoke-research.md +29 -0
  25. package/skills/start-feature/references/invoke-skill.md +35 -0
  26. package/skills/start-feature/references/research-gating.md +65 -0
  27. package/skills/start-feature/references/topic-name-check.md +61 -0
  28. package/skills/start-implementation/SKILL.md +35 -289
  29. package/skills/start-implementation/references/check-dependencies.md +65 -0
  30. package/skills/start-implementation/references/display-plans.md +159 -0
  31. package/skills/start-implementation/references/environment-check.md +45 -0
  32. package/skills/start-implementation/references/invoke-skill.md +42 -0
  33. package/skills/start-implementation/references/route-scenario.md +32 -0
  34. package/skills/start-implementation/references/validate-plan.md +45 -0
  35. package/skills/start-implementation/scripts/discovery.sh +3 -0
  36. package/skills/start-investigation/SKILL.md +145 -0
  37. package/skills/start-investigation/references/gather-context-fresh.md +72 -0
  38. package/skills/start-investigation/references/gather-context.md +31 -0
  39. package/skills/start-investigation/references/invoke-skill.md +54 -0
  40. package/skills/start-investigation/references/route-scenario.md +69 -0
  41. package/skills/start-investigation/references/validate-investigation.md +46 -0
  42. package/skills/start-investigation/scripts/discovery.sh +92 -0
  43. package/skills/start-planning/SKILL.md +32 -72
  44. package/skills/start-planning/references/cross-cutting-context.md +5 -5
  45. package/skills/start-planning/references/invoke-skill.md +27 -4
  46. package/skills/start-planning/references/route-plan-state.md +30 -0
  47. package/skills/start-planning/references/route-scenario.md +38 -0
  48. package/skills/start-planning/references/validate-spec.md +47 -0
  49. package/skills/start-planning/scripts/discovery.sh +7 -0
  50. package/skills/start-research/SKILL.md +17 -6
  51. package/skills/start-research/references/invoke-skill.md +3 -0
  52. package/skills/start-review/SKILL.md +32 -60
  53. package/skills/start-review/references/determine-review-version.md +24 -0
  54. package/skills/start-review/references/display-plans.md +2 -2
  55. package/skills/start-review/references/route-scenario.md +74 -0
  56. package/skills/start-review/references/select-plans.md +8 -6
  57. package/skills/start-review/references/validate-artifacts.md +63 -0
  58. package/skills/start-review/scripts/discovery.sh +3 -0
  59. package/skills/start-specification/SKILL.md +44 -20
  60. package/skills/start-specification/references/check-existing-spec.md +57 -0
  61. package/skills/start-specification/references/check-prerequisites.md +15 -0
  62. package/skills/start-specification/references/handoffs/continue-concluded.md +3 -0
  63. package/skills/start-specification/references/handoffs/continue.md +3 -0
  64. package/skills/start-specification/references/handoffs/create-with-incorporation.md +3 -0
  65. package/skills/start-specification/references/handoffs/create.md +3 -0
  66. package/skills/start-specification/references/handoffs/unify-with-incorporation.md +3 -0
  67. package/skills/start-specification/references/handoffs/unify.md +3 -0
  68. package/skills/start-specification/references/invoke-skill-bridge.md +74 -0
  69. package/skills/start-specification/references/route-scenario.md +23 -0
  70. package/skills/start-specification/references/validate-source.md +91 -0
  71. package/skills/start-specification/scripts/discovery.sh +6 -0
  72. package/skills/status/SKILL.md +6 -3
  73. package/skills/status/scripts/discovery.sh +9 -0
  74. package/skills/technical-discussion/SKILL.md +15 -4
  75. package/skills/technical-discussion/references/template.md +9 -1
  76. package/skills/technical-implementation/SKILL.md +24 -1
  77. package/skills/technical-implementation/references/analysis-loop.md +4 -4
  78. package/skills/technical-implementation/references/task-loop.md +2 -2
  79. package/skills/technical-investigation/SKILL.md +239 -0
  80. package/skills/technical-investigation/references/analysis-patterns.md +181 -0
  81. package/skills/technical-investigation/references/symptom-gathering.md +164 -0
  82. package/skills/technical-investigation/references/template.md +164 -0
  83. package/skills/technical-planning/SKILL.md +24 -1
  84. package/skills/technical-planning/references/author-tasks.md +16 -16
  85. package/skills/technical-planning/references/define-tasks.md +2 -2
  86. package/skills/technical-planning/references/output-formats/tick/authoring.md +3 -15
  87. package/skills/technical-planning/references/plan-construction.md +11 -30
  88. package/skills/technical-planning/references/plan-review.md +3 -3
  89. package/skills/technical-research/SKILL.md +38 -2
  90. package/skills/technical-review/SKILL.md +1 -2
  91. package/skills/technical-review/references/review-actions-loop.md +43 -1
  92. package/skills/technical-specification/SKILL.md +1 -2
  93. package/skills/technical-specification/references/spec-completion.md +34 -6
  94. package/skills/technical-specification/references/spec-construction.md +1 -1
  95. package/skills/technical-specification/references/spec-review.md +5 -5
  96. package/skills/view-plan/SKILL.md +0 -1
  97. package/skills/workflow/bridge/SKILL.md +82 -0
  98. package/skills/workflow/bridge/references/bugfix-continuation.md +59 -0
  99. package/skills/workflow/bridge/references/feature-continuation.md +60 -0
  100. package/skills/workflow/bridge/references/greenfield-continuation.md +224 -0
  101. package/skills/workflow/bridge/scripts/discovery.sh +512 -0
  102. package/skills/workflow/start/SKILL.md +97 -0
  103. package/skills/workflow/start/references/bugfix-routing.md +117 -0
  104. package/skills/workflow/start/references/feature-routing.md +117 -0
  105. package/skills/workflow/start/references/greenfield-routing.md +140 -0
  106. package/skills/workflow/start/references/work-type-selection.md +83 -0
  107. package/skills/workflow/start/scripts/discovery.sh +577 -0
  108. package/skills/begin-implementation/SKILL.md +0 -162
  109. package/skills/begin-planning/SKILL.md +0 -92
  110. package/skills/begin-review/SKILL.md +0 -90
  111. package/skills/continue-feature/SKILL.md +0 -186
  112. package/skills/continue-feature/references/detect-phase.md +0 -99
  113. package/skills/continue-feature/references/invoke-implementation.md +0 -43
  114. package/skills/continue-feature/references/invoke-planning.md +0 -43
  115. package/skills/continue-feature/references/invoke-review.md +0 -43
  116. package/skills/continue-feature/references/invoke-specification.md +0 -55
  117. package/skills/continue-feature/references/phase-bridge.md +0 -57
  118. package/skills/continue-feature/scripts/discovery.sh +0 -233
  119. package/skills/start-feature/references/phase-bridge.md +0 -37
@@ -0,0 +1,69 @@
1
+ # Route Based on Scenario
2
+
3
+ *Reference for **[start-investigation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Use `state.scenario` from the discovery output to determine the path.
8
+
9
+ #### If scenario is "has_investigations"
10
+
11
+ > *Output the next fenced block as a code block:*
12
+
13
+ ```
14
+ Investigations Overview
15
+
16
+ @if(investigations.counts.in_progress > 0)
17
+ In Progress:
18
+ @foreach(inv in investigations.files where status is in-progress)
19
+ • {inv.topic}
20
+ @endforeach
21
+ @endif
22
+
23
+ @if(investigations.counts.concluded > 0)
24
+ Concluded:
25
+ @foreach(inv in investigations.files where status is concluded)
26
+ • {inv.topic}
27
+ @endforeach
28
+ @endif
29
+ ```
30
+
31
+ > *Output the next fenced block as markdown (not a code block):*
32
+
33
+ ```
34
+ · · · · · · · · · · · ·
35
+ What would you like to do?
36
+
37
+ @if(in_progress investigations exist)
38
+ {N}. Resume "{topic}" investigation
39
+ @endforeach
40
+ @endif
41
+ {N}. Start new investigation
42
+ · · · · · · · · · · · ·
43
+ ```
44
+
45
+ **STOP.** Wait for user response.
46
+
47
+ #### If resuming
48
+
49
+ Set source="continue".
50
+
51
+ → Return to **[the skill](../SKILL.md)** for **Step 6** with that topic.
52
+
53
+ #### If new
54
+
55
+ Set source="fresh".
56
+
57
+ → Return to **[the skill](../SKILL.md)** for **Step 5**.
58
+
59
+ #### If scenario is "fresh"
60
+
61
+ Set source="fresh".
62
+
63
+ > *Output the next fenced block as a code block:*
64
+
65
+ ```
66
+ No existing investigations found.
67
+ ```
68
+
69
+ → Return to **[the skill](../SKILL.md)** for **Step 5**.
@@ -0,0 +1,46 @@
1
+ # Validate Investigation
2
+
3
+ *Reference for **[start-investigation](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if investigation already exists for this topic.
8
+
9
+ ```bash
10
+ ls .workflows/investigation/
11
+ ```
12
+
13
+ #### If investigation exists for this topic
14
+
15
+ Read `.workflows/investigation/{topic}/investigation.md` frontmatter to check status.
16
+
17
+ #### If status is "in-progress"
18
+
19
+ > *Output the next fenced block as a code block:*
20
+
21
+ ```
22
+ Resuming investigation: {topic:(titlecase)}
23
+ ```
24
+
25
+ Set source="continue".
26
+
27
+ → Return to **[the skill](../SKILL.md)** for **Step 6**.
28
+
29
+ #### If status is "concluded"
30
+
31
+ > *Output the next fenced block as a code block:*
32
+
33
+ ```
34
+ Investigation Concluded
35
+
36
+ The investigation for "{topic:(titlecase)}" has already concluded.
37
+ Run /start-specification bugfix {topic} to continue to spec.
38
+ ```
39
+
40
+ **STOP.** Do not proceed — terminal condition.
41
+
42
+ #### If no collision
43
+
44
+ Set source="bridge".
45
+
46
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,92 @@
1
+ #!/bin/bash
2
+ #
3
+ # Discovery script for /start-investigation.
4
+ #
5
+ # Scans the investigation directory for existing investigations.
6
+ #
7
+ # Outputs structured YAML that the skill can consume directly.
8
+ #
9
+
10
+ set -eo pipefail
11
+
12
+ INVESTIGATION_DIR=".workflows/investigation"
13
+
14
+ # Helper: Extract a frontmatter field value from a file
15
+ # Usage: extract_field <file> <field_name>
16
+ extract_field() {
17
+ local file="$1"
18
+ local field="$2"
19
+ local value=""
20
+
21
+ if head -1 "$file" 2>/dev/null | grep -q "^---$"; then
22
+ value=$(sed -n '2,/^---$/p' "$file" 2>/dev/null | \
23
+ grep -i -m1 "^${field}:" | \
24
+ sed -E "s/^${field}:[[:space:]]*//i" || true)
25
+ fi
26
+
27
+ echo "$value"
28
+ }
29
+
30
+ # Start YAML output
31
+ echo "# Start-Investigation Discovery"
32
+ echo "# Generated: $(date -Iseconds)"
33
+ echo ""
34
+
35
+ #
36
+ # INVESTIGATIONS
37
+ #
38
+ echo "investigations:"
39
+
40
+ inv_count=0
41
+ inv_in_progress=0
42
+ inv_concluded=0
43
+
44
+ if [ -d "$INVESTIGATION_DIR" ] && [ -n "$(ls -A "$INVESTIGATION_DIR" 2>/dev/null)" ]; then
45
+ echo " exists: true"
46
+ echo " files:"
47
+ for dir in "$INVESTIGATION_DIR"/*/; do
48
+ [ -d "$dir" ] || continue
49
+ file="${dir}investigation.md"
50
+ [ -f "$file" ] || continue
51
+
52
+ topic=$(basename "$dir")
53
+ status=$(extract_field "$file" "status")
54
+ status=${status:-"in-progress"}
55
+ date=$(extract_field "$file" "date")
56
+ work_type=$(extract_field "$file" "work_type")
57
+ work_type=${work_type:-"bugfix"}
58
+
59
+ echo " - topic: \"$topic\""
60
+ echo " status: \"$status\""
61
+ echo " work_type: \"$work_type\""
62
+ [ -n "$date" ] && echo " date: \"$date\""
63
+
64
+ inv_count=$((inv_count + 1))
65
+ [ "$status" = "concluded" ] && inv_concluded=$((inv_concluded + 1))
66
+ [ "$status" = "in-progress" ] && inv_in_progress=$((inv_in_progress + 1))
67
+ done
68
+ echo " counts:"
69
+ echo " total: $inv_count"
70
+ echo " in_progress: $inv_in_progress"
71
+ echo " concluded: $inv_concluded"
72
+ else
73
+ echo " exists: false"
74
+ echo " files: []"
75
+ echo " counts:"
76
+ echo " total: 0"
77
+ echo " in_progress: 0"
78
+ echo " concluded: 0"
79
+ fi
80
+
81
+ echo ""
82
+
83
+ #
84
+ # STATE SUMMARY
85
+ #
86
+ echo "state:"
87
+
88
+ if [ "$inv_count" -eq 0 ]; then
89
+ echo " scenario: \"fresh\""
90
+ else
91
+ echo " scenario: \"has_investigations\""
92
+ fi
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  name: start-planning
3
- description: "Start a planning session from an existing specification. Discovers available specifications, gathers context, and invokes the technical-planning skill."
4
3
  disable-model-invocation: true
5
- allowed-tools: Bash(.claude/skills/start-planning/scripts/discovery.sh), Bash(.claude/hooks/workflows/write-session-state.sh)
4
+ allowed-tools: Bash(.claude/skills/start-planning/scripts/discovery.sh), Bash(.claude/hooks/workflows/write-session-state.sh), Bash(ls .workflows/specification/)
6
5
  hooks:
7
6
  PreToolUse:
8
7
  - hooks:
@@ -52,9 +51,13 @@ Follow these steps EXACTLY as written. Do not skip steps or combine them. Presen
52
51
 
53
52
  Invoke the `/migrate` skill and assess its output.
54
53
 
55
- **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.
54
+ #### If files were updated
56
55
 
57
- **If no updates needed**: Proceed to Step 1.
56
+ **STOP.** Wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding.
57
+
58
+ #### If no updates needed
59
+
60
+ → Proceed to **Step 1**.
58
61
 
59
62
  ---
60
63
 
@@ -91,113 +94,70 @@ Parse the discovery output to understand:
91
94
  **From `state` section:**
92
95
  - `scenario` - one of: `"no_specs"`, `"nothing_actionable"`, `"has_options"`
93
96
 
94
- **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.
97
+ **IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state.
95
98
 
96
99
  → Proceed to **Step 2**.
97
100
 
98
101
  ---
99
102
 
100
- ## Step 2: Route Based on Scenario
101
-
102
- Use `state.scenario` from the discovery output to determine the path:
103
-
104
- #### If scenario is "no_specs"
105
-
106
- No specifications exist yet.
103
+ ## Step 2: Determine Mode
107
104
 
108
- > *Output the next fenced block as a code block:*
105
+ Check for arguments: work_type = `$0`, topic = `$1`
109
106
 
110
- ```
111
- Planning Overview
112
-
113
- No specifications found in .workflows/specification/
114
-
115
- The planning phase requires a concluded specification.
116
- Run /start-specification first.
117
- ```
107
+ #### If work_type and topic are both provided
118
108
 
119
- **STOP.** Do not proceed — terminal condition.
109
+ Proceed to **Step 3**.
120
110
 
121
- #### If scenario is "nothing_actionable"
111
+ #### If work_type is provided without topic
122
112
 
123
- Specifications exist but none are actionable — all are still in-progress and no plans exist to continue.
113
+ Store work_type for the handoff.
124
114
 
125
- → Proceed to **Step 3** to show the state.
126
-
127
- #### If scenario is "has_options"
128
-
129
- At least one specification is ready for planning, or an existing plan can be continued or reviewed.
130
-
131
- → Proceed to **Step 3** to present options.
132
-
133
- ---
134
-
135
- ## Step 3: Present Workflow State and Options
115
+ → Proceed to **Step 4**.
136
116
 
137
- Load **[display-state.md](references/display-state.md)** and follow its instructions as written.
117
+ #### If neither is provided
138
118
 
139
119
  → Proceed to **Step 4**.
140
120
 
141
121
  ---
142
122
 
143
- ## Step 4: Route by Plan State
123
+ ## Step 3: Validate Specification
144
124
 
145
- Check whether the selected specification already has a plan (from `has_plan` in discovery output).
125
+ Load **[validate-spec.md](references/validate-spec.md)** and follow its instructions as written.
146
126
 
147
- #### If no existing plan (fresh start)
127
+ Proceed to **Step 7**.
148
128
 
149
- → Proceed to **Step 5** to gather context before invoking the skill.
129
+ ---
150
130
 
151
- #### If existing plan (continue or review)
131
+ ## Step 4: Route Based on Scenario
152
132
 
153
- The plan already has its context from when it was created. Skip context gathering.
133
+ Load **[route-scenario.md](references/route-scenario.md)** and follow its instructions as written.
154
134
 
155
- Go directly to **Step 7** to invoke the skill.
135
+ Proceed to **Step 5**.
156
136
 
157
137
  ---
158
138
 
159
- ## Step 5: Gather Additional Context
160
-
161
- > *Output the next fenced block as markdown (not a code block):*
162
-
163
- ```
164
- · · · · · · · · · · · ·
165
- Any additional context since the specification was concluded?
139
+ ## Step 5: Present State and Options
166
140
 
167
- - **`c`/`continue`** Continue with the specification as-is
168
- - Or provide additional context (priorities, constraints, new considerations)
169
- · · · · · · · · · · · ·
170
- ```
171
-
172
- **STOP.** Wait for user response.
141
+ Load **[display-state.md](references/display-state.md)** and follow its instructions as written.
173
142
 
174
143
  → Proceed to **Step 6**.
175
144
 
176
145
  ---
177
146
 
178
- ## Step 6: Surface Cross-Cutting Context
147
+ ## Step 6: Route by Plan State
179
148
 
180
- Load **[cross-cutting-context.md](references/cross-cutting-context.md)** and follow its instructions as written.
181
-
182
- → Proceed to **Step 7**.
149
+ Load **[route-plan-state.md](references/route-plan-state.md)** and follow its instructions as written.
183
150
 
184
151
  ---
185
152
 
186
- ## Step 7: Invoke the Skill
153
+ ## Step 7: Cross-Cutting Context
187
154
 
188
- Before invoking the processing skill, save a session bookmark.
155
+ Load **[cross-cutting-context.md](references/cross-cutting-context.md)** and follow its instructions as written.
189
156
 
190
- > *Output the next fenced block as a code block:*
157
+ Proceed to **Step 8**.
191
158
 
192
- ```
193
- Saving session state so Claude can pick up where it left off if the conversation is compacted.
194
- ```
159
+ ---
195
160
 
196
- ```bash
197
- .claude/hooks/workflows/write-session-state.sh \
198
- "{topic}" \
199
- "skills/technical-planning/SKILL.md" \
200
- ".workflows/planning/{topic}/plan.md"
201
- ```
161
+ ## Step 8: Invoke the Skill
202
162
 
203
163
  Load **[invoke-skill.md](references/invoke-skill.md)** and follow its instructions as written.
@@ -4,15 +4,15 @@
4
4
 
5
5
  ---
6
6
 
7
- **If no cross-cutting specifications exist**:
7
+ #### If no cross-cutting specifications exist
8
8
 
9
- Skip this step.
9
+ Return to **[the skill](../SKILL.md)**.
10
10
 
11
- Proceed to **Step 7**.
11
+ #### If cross-cutting specifications exist
12
12
 
13
13
  Read each cross-cutting specification from `specifications.crosscutting` in the discovery output.
14
14
 
15
- ### 6a: Warn about in-progress cross-cutting specs
15
+ ### Warn about in-progress cross-cutting specs
16
16
 
17
17
  If any **in-progress** cross-cutting specifications exist, check whether they could be relevant to the feature being planned (by topic overlap — e.g., a caching strategy is relevant if the feature involves data retrieval or API calls).
18
18
 
@@ -36,7 +36,7 @@ These may contain architectural decisions relevant to this plan.
36
36
 
37
37
  If the user chooses to stop, end here. If they choose to continue, proceed.
38
38
 
39
- ### 6b: Summarize concluded cross-cutting specs
39
+ ### Summarize concluded cross-cutting specs
40
40
 
41
41
  If any **concluded** cross-cutting specifications exist, identify which are relevant to the feature being planned and summarize for handoff:
42
42
 
@@ -4,22 +4,45 @@
4
4
 
5
5
  ---
6
6
 
7
- After completing the steps above, this skill's purpose is fulfilled.
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-planning/SKILL.md" \
19
+ ".workflows/planning/{topic}/plan.md"
20
+ ```
21
+
22
+ This skill's purpose is now fulfilled.
8
23
 
9
24
  Invoke the [technical-planning](../../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.
10
25
 
11
- **Example handoff (fresh plan):**
26
+ ---
27
+
28
+ ## Handoff
29
+
30
+ Construct the handoff based on the plan state.
31
+
32
+ #### If creating fresh plan (no existing plan)
33
+
12
34
  ```
13
35
  Planning session for: {topic}
14
36
  Specification: .workflows/specification/{topic}/specification.md
15
- Additional context: {summary of user's answers from Step 5}
37
+ Additional context: {summary of user's additional context, or "none"}
16
38
  Cross-cutting references: {list of applicable cross-cutting specs with brief summaries, or "none"}
17
39
  Recommended output format: {common_format from discovery if non-empty, otherwise "none"}
18
40
 
19
41
  Invoke the technical-planning skill.
20
42
  ```
21
43
 
22
- **Example handoff (continue/review existing plan):**
44
+ #### If continuing or reviewing existing plan
45
+
23
46
  ```
24
47
  Planning session for: {topic}
25
48
  Specification: .workflows/specification/{topic}/specification.md
@@ -0,0 +1,30 @@
1
+ # Route by Plan State
2
+
3
+ *Reference for **[start-planning](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check whether the selected specification already has a plan (from `has_plan` in discovery output).
8
+
9
+ #### If existing plan (continue or review)
10
+
11
+ The plan already has its context from when it was created. Skip context gathering.
12
+
13
+ → Return to **[the skill](../SKILL.md)** for **Step 8**.
14
+
15
+ #### If no existing plan (fresh start)
16
+
17
+ > *Output the next fenced block as markdown (not a code block):*
18
+
19
+ ```
20
+ · · · · · · · · · · · ·
21
+ Any additional context since the specification was concluded?
22
+
23
+ - **`c`/`continue`** — Continue with the specification as-is
24
+ - Or provide additional context (priorities, constraints, new considerations)
25
+ · · · · · · · · · · · ·
26
+ ```
27
+
28
+ **STOP.** Wait for user response.
29
+
30
+ → Return to **[the skill](../SKILL.md)** for **Step 7**.
@@ -0,0 +1,38 @@
1
+ # Route Based on Scenario
2
+
3
+ *Reference for **[start-planning](../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_specs"
12
+
13
+ No specifications exist yet.
14
+
15
+ > *Output the next fenced block as a code block:*
16
+
17
+ ```
18
+ Planning Overview
19
+
20
+ No specifications found in .workflows/specification/
21
+
22
+ The planning phase requires a concluded specification.
23
+ Run /start-specification first.
24
+ ```
25
+
26
+ **STOP.** Do not proceed — terminal condition.
27
+
28
+ #### If scenario is "nothing_actionable"
29
+
30
+ Specifications exist but none are actionable — all are still in-progress and no plans exist to continue.
31
+
32
+ → Return to **[the skill](../SKILL.md)**.
33
+
34
+ #### If scenario is "has_options"
35
+
36
+ At least one specification is ready for planning, or an existing plan can be continued or reviewed.
37
+
38
+ → Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,47 @@
1
+ # Validate Specification
2
+
3
+ *Reference for **[start-planning](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if specification exists and is ready.
8
+
9
+ ```bash
10
+ ls .workflows/specification/
11
+ ```
12
+
13
+ Read `.workflows/specification/{topic}/specification.md` frontmatter.
14
+
15
+ #### If specification doesn't exist
16
+
17
+ > *Output the next fenced block as a code block:*
18
+
19
+ ```
20
+ Specification Missing
21
+
22
+ No specification found for "{topic:(titlecase)}".
23
+
24
+ A concluded specification is required for planning.
25
+ Run /start-specification {work_type} {topic} to create one.
26
+ ```
27
+
28
+ **STOP.** Do not proceed — terminal condition.
29
+
30
+ #### If specification exists but status is "in-progress"
31
+
32
+ > *Output the next fenced block as a code block:*
33
+
34
+ ```
35
+ Specification In Progress
36
+
37
+ The specification for "{topic:(titlecase)}" is not yet concluded.
38
+ Run /start-specification {work_type} {topic} to continue.
39
+ ```
40
+
41
+ **STOP.** Do not proceed — terminal condition.
42
+
43
+ #### If specification exists and status is "concluded"
44
+
45
+ Parse cross-cutting specs from `specifications.crosscutting` in the discovery output.
46
+
47
+ → Return to **[the skill](../SKILL.md)**.
@@ -81,8 +81,12 @@ if [ -d "$SPEC_DIR" ] && [ -n "$(ls -A "$SPEC_DIR" 2>/dev/null)" ]; then
81
81
  impl_status=${impl_status:-"unknown"}
82
82
  fi
83
83
 
84
+ work_type=$(extract_field "$file" "work_type")
85
+ work_type=${work_type:-"greenfield"}
86
+
84
87
  echo " - name: \"$name\""
85
88
  echo " status: \"$status\""
89
+ echo " work_type: \"$work_type\""
86
90
  echo " has_plan: $has_plan"
87
91
  if [ "$has_plan" = "true" ]; then
88
92
  echo " plan_status: \"$plan_status\""
@@ -192,10 +196,13 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
192
196
  status=$(extract_field "$file" "status")
193
197
  status=${status:-"unknown"}
194
198
  plan_id=$(extract_field "$file" "plan_id")
199
+ work_type=$(extract_field "$file" "work_type")
200
+ work_type=${work_type:-"greenfield"}
195
201
 
196
202
  echo " - name: \"$name\""
197
203
  echo " format: \"$format\""
198
204
  echo " status: \"$status\""
205
+ echo " work_type: \"$work_type\""
199
206
  if [ -n "$plan_id" ]; then
200
207
  echo " plan_id: \"$plan_id\""
201
208
  fi
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  name: start-research
3
- description: "Start a research exploration using the technical-research skill. For early-stage ideas, feasibility checks, and broad exploration before formal discussion."
4
3
  disable-model-invocation: true
5
4
  allowed-tools: Bash(.claude/hooks/workflows/write-session-state.sh)
6
5
  hooks:
@@ -50,21 +49,33 @@ Follow these steps EXACTLY as written. Do not skip steps or combine them. Presen
50
49
 
51
50
  Invoke the `/migrate` skill and assess its output.
52
51
 
53
- **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.
52
+ #### If files were updated
54
53
 
55
- **If no updates needed**: Proceed to Step 1.
54
+ **STOP.** Wait for the user to review the changes (e.g., via `git diff`) and confirm before proceeding.
55
+
56
+ #### If no updates needed
57
+
58
+ → Proceed to **Step 1**.
56
59
 
57
60
  ---
58
61
 
59
- ## Step 1: Gather Context
62
+ ## Step 1: Check Arguments
60
63
 
61
- Load **[gather-context.md](references/gather-context.md)** and follow its instructions as written.
64
+ Check for arguments: work_type = `$0`. If provided, store for the handoff.
62
65
 
63
66
  → Proceed to **Step 2**.
64
67
 
65
68
  ---
66
69
 
67
- ## Step 2: Invoke the Skill
70
+ ## Step 2: Gather Context
71
+
72
+ Load **[gather-context.md](references/gather-context.md)** and follow its instructions as written.
73
+
74
+ → Proceed to **Step 3**.
75
+
76
+ ---
77
+
78
+ ## Step 3: Invoke the Skill
68
79
 
69
80
  Before invoking the processing skill, save a session bookmark.
70
81
 
@@ -8,9 +8,12 @@ This skill's purpose is now fulfilled.
8
8
 
9
9
  Invoke the [technical-research](../../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.
10
10
 
11
+ **If work_type is available** (from Step 1), add the Work type line in the handoff.
12
+
11
13
  **Example handoff:**
12
14
  ```
13
15
  Research session for: {topic}
16
+ Work type: {work_type}
14
17
  Output: .workflows/research/exploration.md
15
18
 
16
19
  Context: