@leeovery/claude-technical-workflows 2.1.42 → 2.2.1

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 (118) hide show
  1. package/README.md +10 -9
  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/plan-construction.md +11 -30
  87. package/skills/technical-planning/references/plan-review.md +3 -3
  88. package/skills/technical-research/SKILL.md +38 -2
  89. package/skills/technical-review/SKILL.md +1 -2
  90. package/skills/technical-review/references/review-actions-loop.md +43 -1
  91. package/skills/technical-specification/SKILL.md +1 -2
  92. package/skills/technical-specification/references/spec-completion.md +34 -6
  93. package/skills/technical-specification/references/spec-construction.md +1 -1
  94. package/skills/technical-specification/references/spec-review.md +5 -5
  95. package/skills/view-plan/SKILL.md +0 -1
  96. package/skills/workflow-bridge/SKILL.md +82 -0
  97. package/skills/workflow-bridge/references/bugfix-continuation.md +59 -0
  98. package/skills/workflow-bridge/references/feature-continuation.md +60 -0
  99. package/skills/workflow-bridge/references/greenfield-continuation.md +224 -0
  100. package/skills/workflow-bridge/scripts/discovery.sh +512 -0
  101. package/skills/workflow-start/SKILL.md +97 -0
  102. package/skills/workflow-start/references/bugfix-routing.md +117 -0
  103. package/skills/workflow-start/references/feature-routing.md +117 -0
  104. package/skills/workflow-start/references/greenfield-routing.md +140 -0
  105. package/skills/workflow-start/references/work-type-selection.md +83 -0
  106. package/skills/workflow-start/scripts/discovery.sh +577 -0
  107. package/skills/begin-implementation/SKILL.md +0 -162
  108. package/skills/begin-planning/SKILL.md +0 -92
  109. package/skills/begin-review/SKILL.md +0 -90
  110. package/skills/continue-feature/SKILL.md +0 -186
  111. package/skills/continue-feature/references/detect-phase.md +0 -99
  112. package/skills/continue-feature/references/invoke-implementation.md +0 -43
  113. package/skills/continue-feature/references/invoke-planning.md +0 -43
  114. package/skills/continue-feature/references/invoke-review.md +0 -43
  115. package/skills/continue-feature/references/invoke-specification.md +0 -55
  116. package/skills/continue-feature/references/phase-bridge.md +0 -57
  117. package/skills/continue-feature/scripts/discovery.sh +0 -233
  118. package/skills/start-feature/references/phase-bridge.md +0 -37
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  name: start-review
3
- description: "Start a review session from an existing plan and implementation. Discovers available plans, validates implementation exists, and invokes the technical-review skill."
4
3
  disable-model-invocation: true
5
- allowed-tools: Bash(.claude/skills/start-review/scripts/discovery.sh), Bash(.claude/hooks/workflows/write-session-state.sh)
4
+ allowed-tools: Bash(.claude/skills/start-review/scripts/discovery.sh), Bash(.claude/hooks/workflows/write-session-state.sh), Bash(ls .workflows/planning/), Bash(ls .workflows/implementation/)
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
 
@@ -88,99 +91,68 @@ Parse the discovery output to understand:
88
91
  - `reviewed_plan_count` - plans that have been reviewed
89
92
  - `all_reviewed` - whether all implemented plans have reviews
90
93
 
91
- **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.
94
+ **IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state.
92
95
 
93
96
  → Proceed to **Step 2**.
94
97
 
95
98
  ---
96
99
 
97
- ## Step 2: Route Based on Scenario
100
+ ## Step 2: Determine Mode
98
101
 
99
- Use `state.scenario` from the discovery output to determine the path:
102
+ Check for arguments: work_type = `$0`, topic = `$1`
100
103
 
101
- #### If scenario is "no_plans"
104
+ #### If work_type and topic are both provided
102
105
 
103
- No plans exist yet.
106
+ Proceed to **Step 3**.
104
107
 
105
- > *Output the next fenced block as a code block:*
106
-
107
- ```
108
- Review Overview
109
-
110
- No plans found in .workflows/planning/
111
-
112
- The review phase requires a completed implementation based on a plan.
113
- Run /start-planning first to create a plan, then /start-implementation
114
- to build it.
115
- ```
116
-
117
- **STOP.** Do not proceed — terminal condition.
118
-
119
- #### If all_reviewed is true
120
-
121
- All implemented plans have been reviewed.
122
-
123
- > *Output the next fenced block as a code block:*
124
-
125
- ```
126
- Review Overview
108
+ #### If work_type is provided without topic
127
109
 
128
- All {N} implemented plans have been reviewed.
110
+ Store work_type for the handoff.
129
111
 
130
- 1. {topic:(titlecase)}
131
- └─ Review: x{review_count} — r{latest_review_version} ({latest_review_verdict})
132
- └─ Synthesis: @if(has_synthesis) completed @else pending @endif
112
+ Proceed to **Step 4**.
133
113
 
134
- 2. ...
135
- ```
114
+ #### If neither is provided
136
115
 
137
- > *Output the next fenced block as markdown (not a code block):*
116
+ Proceed to **Step 4**.
138
117
 
139
- ```
140
- · · · · · · · · · · · ·
141
- All plans have been reviewed.
118
+ ---
142
119
 
143
- - **`a`/`analysis`** Synthesize findings from existing reviews into tasks
144
- - **`r`/`re-review`** — Re-review a plan (creates new review version)
120
+ ## Step 3: Validate Plan and Implementation
145
121
 
146
- Select an option:
147
- · · · · · · · · · · · ·
148
- ```
122
+ Load **[validate-artifacts.md](references/validate-artifacts.md)** and follow its instructions as written.
149
123
 
150
- **STOP.** Wait for user response.
124
+ Proceed to **Step 5**.
151
125
 
152
- #### If analysis
126
+ ---
153
127
 
154
- Proceed to **Step 4** with scope set to "analysis".
128
+ ## Step 4: Route Based on Scenario
155
129
 
156
- #### If re-review
130
+ Load **[route-scenario.md](references/route-scenario.md)** and follow its instructions as written.
157
131
 
158
- → Proceed to **Step 3**, incrementing the review version for the selected plan.
132
+ ---
159
133
 
160
- #### If scenario is "single_plan" or "multiple_plans"
134
+ ## Step 5: Determine Review Version
161
135
 
162
- Plans exist (some may have reviews, some may not).
136
+ Load **[determine-review-version.md](references/determine-review-version.md)** and follow its instructions as written.
163
137
 
164
- → Proceed to **Step 3** to present options.
138
+ → Proceed to **Step 8**.
165
139
 
166
140
  ---
167
141
 
168
- ## Step 3: Display Plans
142
+ ## Step 6: Display Plans
169
143
 
170
144
  Load **[display-plans.md](references/display-plans.md)** and follow its instructions as written.
171
145
 
172
- → Proceed to **Step 4**.
173
-
174
146
  ---
175
147
 
176
- ## Step 4: Select Plans
148
+ ## Step 7: Select Plans
177
149
 
178
150
  Load **[select-plans.md](references/select-plans.md)** and follow its instructions as written.
179
151
 
180
- → Proceed to **Step 5**.
152
+ → Proceed to **Step 8**.
181
153
 
182
154
  ---
183
155
 
184
- ## Step 5: Invoke the Skill
156
+ ## Step 8: Invoke the Skill
185
157
 
186
158
  Load **[invoke-skill.md](references/invoke-skill.md)** and follow its instructions as written.
@@ -0,0 +1,24 @@
1
+ # Determine Review Version
2
+
3
+ *Reference for **[start-review](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if reviews already exist for this topic from the discovery output.
8
+
9
+ **If no reviews exist:**
10
+
11
+ Set review_version = 1.
12
+
13
+ **If reviews exist:**
14
+
15
+ Find the latest review version for this topic.
16
+ Set review_version = latest_version + 1.
17
+
18
+ > *Output the next fenced block as a code block:*
19
+
20
+ ```
21
+ Starting review r{review_version} for "{topic:(titlecase)}".
22
+ ```
23
+
24
+ → Return to **[the skill](../SKILL.md)**.
@@ -87,7 +87,7 @@ Automatically proceeding with "{topic:(titlecase)}".
87
87
  Scope: single
88
88
  ```
89
89
 
90
- Proceed directly to **Step 5**.
90
+ Return to **[the skill](../SKILL.md)** for **Step 8**.
91
91
 
92
92
  #### If multiple reviewable plans
93
93
 
@@ -108,4 +108,4 @@ Select an option:
108
108
 
109
109
  **STOP.** Wait for user response.
110
110
 
111
- Based on user choice, proceed to **Step 4**.
111
+ Return to **[the skill](../SKILL.md)** for **Step 7**.
@@ -0,0 +1,74 @@
1
+ # Route Based on Scenario
2
+
3
+ *Reference for **[start-review](../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
+ Review Overview
19
+
20
+ No plans found in .workflows/planning/
21
+
22
+ The review phase requires a completed implementation based on a plan.
23
+ Run /start-planning first to create a plan, then /start-implementation
24
+ to build it.
25
+ ```
26
+
27
+ **STOP.** Do not proceed — terminal condition.
28
+
29
+ #### If all_reviewed is true
30
+
31
+ All implemented plans have been reviewed.
32
+
33
+ > *Output the next fenced block as a code block:*
34
+
35
+ ```
36
+ Review Overview
37
+
38
+ All {N} implemented plans have been reviewed.
39
+
40
+ 1. {topic:(titlecase)}
41
+ └─ Review: x{review_count} — r{latest_review_version} ({latest_review_verdict})
42
+ └─ Synthesis: @if(has_synthesis) completed @else pending @endif
43
+
44
+ 2. ...
45
+ ```
46
+
47
+ > *Output the next fenced block as markdown (not a code block):*
48
+
49
+ ```
50
+ · · · · · · · · · · · ·
51
+ All plans have been reviewed.
52
+
53
+ - **`a`/`analysis`** — Synthesize findings from existing reviews into tasks
54
+ - **`r`/`re-review`** — Re-review a plan (creates new review version)
55
+
56
+ Select an option:
57
+ · · · · · · · · · · · ·
58
+ ```
59
+
60
+ **STOP.** Wait for user response.
61
+
62
+ **If analysis:**
63
+
64
+ → Return to **[the skill](../SKILL.md)** for **Step 8**.
65
+
66
+ **If re-review:**
67
+
68
+ → Return to **[the skill](../SKILL.md)** for **Step 6**.
69
+
70
+ #### If scenario is "single_plan" or "multiple_plans"
71
+
72
+ Plans exist (some may have reviews, some may not).
73
+
74
+ → Return to **[the skill](../SKILL.md)** for **Step 6**.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ---
6
6
 
7
- This step only applies for `single`, `multi`, or `all` scope chosen in Step 3.
7
+ This step only applies for `single`, `multi`, or `all` scope chosen in Step 6.
8
8
 
9
9
  #### If scope is "analysis"
10
10
 
@@ -29,17 +29,19 @@ Select an option:
29
29
 
30
30
  If `select`, present numbered list of reviewed plans for the user to choose from (comma-separated numbers).
31
31
 
32
+ → Return to **[the skill](../SKILL.md)**.
33
+
32
34
  #### If single review exists
33
35
 
34
36
  Automatically proceed with the only available review.
35
37
 
36
- Proceed to **Step 5**.
38
+ Return to **[the skill](../SKILL.md)**.
37
39
 
38
40
  #### If scope is "all"
39
41
 
40
42
  All reviewable plans are included. No selection needed. Each plan will be reviewed independently.
41
43
 
42
- Proceed directly to **Step 5**.
44
+ Return to **[the skill](../SKILL.md)**.
43
45
 
44
46
  #### If scope is "single"
45
47
 
@@ -47,13 +49,13 @@ All reviewable plans are included. No selection needed. Each plan will be review
47
49
 
48
50
  ```
49
51
  · · · · · · · · · · · ·
50
- Which plan would you like to review? (Enter a number from Step 3)
52
+ Which plan would you like to review? (Enter a number from Step 6)
51
53
  · · · · · · · · · · · ·
52
54
  ```
53
55
 
54
56
  **STOP.** Wait for user response.
55
57
 
56
- Proceed to **Step 5**.
58
+ Return to **[the skill](../SKILL.md)**.
57
59
 
58
60
  #### If scope is "multi"
59
61
 
@@ -67,4 +69,4 @@ Which plans to include? (Enter numbers separated by commas, e.g. 1,3)
67
69
 
68
70
  **STOP.** Wait for user response.
69
71
 
70
- Proceed to **Step 5**.
72
+ Return to **[the skill](../SKILL.md)**.
@@ -0,0 +1,63 @@
1
+ # Validate Plan and Implementation
2
+
3
+ *Reference for **[start-review](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if plan and implementation exist and are ready.
8
+
9
+ ```bash
10
+ ls .workflows/planning/
11
+ ls .workflows/implementation/
12
+ ```
13
+
14
+ Read `.workflows/planning/{topic}/plan.md` frontmatter.
15
+
16
+ #### If plan doesn't exist
17
+
18
+ > *Output the next fenced block as a code block:*
19
+
20
+ ```
21
+ Plan Missing
22
+
23
+ No plan found for "{topic:(titlecase)}".
24
+
25
+ A concluded plan and implementation are required for review.
26
+ Run /start-planning {work_type} {topic} to create one.
27
+ ```
28
+
29
+ **STOP.** Do not proceed — terminal condition.
30
+
31
+ Read `.workflows/implementation/{topic}/tracking.md` frontmatter.
32
+
33
+ #### If implementation tracking doesn't exist
34
+
35
+ > *Output the next fenced block as a code block:*
36
+
37
+ ```
38
+ Implementation Missing
39
+
40
+ No implementation found for "{topic:(titlecase)}".
41
+
42
+ A completed implementation is required for review.
43
+ Run /start-implementation {work_type} {topic} to start one.
44
+ ```
45
+
46
+ **STOP.** Do not proceed — terminal condition.
47
+
48
+ #### If implementation status is not "completed"
49
+
50
+ > *Output the next fenced block as a code block:*
51
+
52
+ ```
53
+ Implementation Not Complete
54
+
55
+ The implementation for "{topic:(titlecase)}" is not yet completed.
56
+ Run /start-implementation {work_type} {topic} to continue.
57
+ ```
58
+
59
+ **STOP.** Do not proceed — terminal condition.
60
+
61
+ #### If plan and implementation are both ready
62
+
63
+ → Return to **[the skill](../SKILL.md)**.
@@ -69,6 +69,8 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
69
69
  specification=$(extract_field "$file" "specification")
70
70
  specification=${specification:-"${name}/specification.md"}
71
71
  plan_id=$(extract_field "$file" "plan_id")
72
+ work_type=$(extract_field "$file" "work_type")
73
+ work_type=${work_type:-"greenfield"}
72
74
 
73
75
  # Check if linked specification exists
74
76
  spec_exists="false"
@@ -107,6 +109,7 @@ if [ -d "$PLAN_DIR" ] && [ -n "$(ls -A "$PLAN_DIR" 2>/dev/null)" ]; then
107
109
  echo " - name: \"$name\""
108
110
  echo " topic: \"$topic\""
109
111
  echo " status: \"$status\""
112
+ echo " work_type: \"$work_type\""
110
113
  echo " date: \"$date\""
111
114
  echo " format: \"$format\""
112
115
  echo " specification: \"$specification\""
@@ -1,8 +1,7 @@
1
1
  ---
2
2
  name: start-specification
3
- description: "Start a specification session from concluded discussions. Discovers available discussions, offers consolidation assessment for multiple discussions, and invokes the technical-specification skill."
4
3
  disable-model-invocation: true
5
- allowed-tools: Bash(.claude/skills/start-specification/scripts/discovery.sh), Bash(mkdir -p .workflows/.state), Bash(rm .workflows/.state/discussion-consolidation-analysis.md), Bash(.claude/hooks/workflows/write-session-state.sh)
4
+ allowed-tools: Bash(.claude/skills/start-specification/scripts/discovery.sh), Bash(mkdir -p .workflows/.state), Bash(rm .workflows/.state/discussion-consolidation-analysis.md), Bash(.claude/hooks/workflows/write-session-state.sh), Bash(ls .workflows/discussion/), Bash(ls .workflows/investigation/)
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
 
@@ -80,41 +83,62 @@ Parse the discovery output to understand:
80
83
 
81
84
  **From `current_state`:** `concluded_count`, `spec_count`, `has_discussions`, `has_concluded`, `has_specs`, and other counts/booleans for routing.
82
85
 
83
- **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.
86
+ **IMPORTANT**: Use ONLY this script for discovery. Do NOT run additional bash commands (ls, head, cat, etc.) to gather state.
84
87
 
85
88
  → Proceed to **Step 2**.
86
89
 
87
90
  ---
88
91
 
89
- ## Step 2: Check Prerequisites
90
-
91
- #### If has_discussions is false or has_concluded is false
92
+ ## Step 2: Determine Mode
92
93
 
93
- Load **[display-blocks.md](references/display-blocks.md)** and follow its instructions. **STOP.**
94
+ Check for arguments: work_type = `$0`, topic = `$1`
94
95
 
95
- #### Otherwise
96
+ #### If work_type and topic are both provided
96
97
 
97
98
  → Proceed to **Step 3**.
98
99
 
100
+ #### If work_type is provided without topic
101
+
102
+ Store work_type for the handoff.
103
+
104
+ → Proceed to **Step 6**.
105
+
106
+ #### If neither is provided
107
+
108
+ → Proceed to **Step 6**.
109
+
110
+ ---
111
+
112
+ ## Step 3: Validate Source Material
113
+
114
+ Load **[validate-source.md](references/validate-source.md)** and follow its instructions as written.
115
+
116
+ → Proceed to **Step 4**.
117
+
99
118
  ---
100
119
 
101
- ## Step 3: Route
120
+ ## Step 4: Check Existing Specification
102
121
 
103
- Based on discovery state, load exactly ONE reference file:
122
+ Load **[check-existing-spec.md](references/check-existing-spec.md)** and follow its instructions as written.
104
123
 
105
- #### If concluded_count == 1
124
+ Proceed to **Step 5**.
106
125
 
107
- → Load **[display-single.md](references/display-single.md)** and follow its instructions.
126
+ ---
108
127
 
109
- #### If cache status is "valid"
128
+ ## Step 5: Invoke the Skill (Bridge Mode)
110
129
 
111
- Load **[display-groupings.md](references/display-groupings.md)** and follow its instructions.
130
+ Load **[invoke-skill-bridge.md](references/invoke-skill-bridge.md)** and follow its instructions as written.
112
131
 
113
- #### If spec_count == 0 and cache is "none" or "stale"
132
+ ---
133
+
134
+ ## Step 6: Check Prerequisites
114
135
 
115
- Load **[display-analyze.md](references/display-analyze.md)** and follow its instructions.
136
+ Load **[check-prerequisites.md](references/check-prerequisites.md)** and follow its instructions as written.
116
137
 
117
- #### Otherwise
138
+ Proceed to **Step 7**.
139
+
140
+ ---
118
141
 
119
- Load **[display-specs-menu.md](references/display-specs-menu.md)** and follow its instructions.
142
+ ## Step 7: Route Based on State
120
143
 
144
+ Load **[route-scenario.md](references/route-scenario.md)** and follow its instructions as written.
@@ -0,0 +1,57 @@
1
+ # Check Existing Specification
2
+
3
+ *Reference for **[start-specification](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Check if a specification already exists for this topic.
8
+
9
+ Read `.workflows/specification/{topic}/specification.md` if it exists.
10
+
11
+ #### If specification doesn't exist
12
+
13
+ → Return to **[the skill](../SKILL.md)** with verb="Creating".
14
+
15
+ #### If specification exists with status "in-progress"
16
+
17
+ > *Output the next fenced block as a code block:*
18
+
19
+ ```
20
+ Specification In Progress
21
+
22
+ A specification for "{topic:(titlecase)}" already exists and is in progress.
23
+ ```
24
+
25
+ > *Output the next fenced block as markdown (not a code block):*
26
+
27
+ ```
28
+ · · · · · · · · · · · ·
29
+ - **`r`/`resume`** — Resume the existing specification
30
+ - **`s`/`start-fresh`** — Archive and start fresh
31
+ · · · · · · · · · · · ·
32
+ ```
33
+
34
+ **STOP.** Wait for user response.
35
+
36
+ #### If resume
37
+
38
+ → Return to **[the skill](../SKILL.md)** with verb="Continuing".
39
+
40
+ #### If start-fresh
41
+
42
+ Archive the existing spec.
43
+
44
+ → Return to **[the skill](../SKILL.md)** with verb="Creating".
45
+
46
+ #### If specification exists with status "concluded"
47
+
48
+ > *Output the next fenced block as a code block:*
49
+
50
+ ```
51
+ Specification Concluded
52
+
53
+ The specification for "{topic:(titlecase)}" has already concluded.
54
+ Run /start-planning {work_type} {topic} to continue to planning.
55
+ ```
56
+
57
+ **STOP.** Do not proceed — terminal condition.
@@ -0,0 +1,15 @@
1
+ # Check Prerequisites
2
+
3
+ *Reference for **[start-specification](../SKILL.md)***
4
+
5
+ ---
6
+
7
+ Discovery mode — use the discovery output from Step 1 to check prerequisites.
8
+
9
+ #### If has_discussions is false or has_concluded is false
10
+
11
+ → Load **[display-blocks.md](display-blocks.md)** and follow its instructions.
12
+
13
+ #### Otherwise
14
+
15
+ → Return to **[the skill](../SKILL.md)**.
@@ -23,8 +23,11 @@ Saving session state so Claude can pick up where it left off if the conversation
23
23
 
24
24
  This skill's purpose is now fulfilled. 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
25
 
26
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
27
+
26
28
  ```
27
29
  Specification session for: {Title Case Name}
30
+ Work type: {work_type}
28
31
 
29
32
  Continuing existing: .workflows/specification/{kebab-case-name}/specification.md (concluded)
30
33
 
@@ -23,8 +23,11 @@ Saving session state so Claude can pick up where it left off if the conversation
23
23
 
24
24
  This skill's purpose is now fulfilled. 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
25
 
26
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
27
+
26
28
  ```
27
29
  Specification session for: {Title Case Name}
30
+ Work type: {work_type}
28
31
 
29
32
  Continuing existing: .workflows/specification/{kebab-case-name}/specification.md
30
33
 
@@ -21,8 +21,11 @@ Saving session state so Claude can pick up where it left off if the conversation
21
21
 
22
22
  This skill's purpose is now fulfilled. 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.
23
23
 
24
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
25
+
24
26
  ```
25
27
  Specification session for: {Title Case Name}
28
+ Work type: {work_type}
26
29
 
27
30
  Source discussions:
28
31
  - .workflows/discussion/{discussion-name}.md
@@ -21,8 +21,11 @@ Saving session state so Claude can pick up where it left off if the conversation
21
21
 
22
22
  This skill's purpose is now fulfilled. 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.
23
23
 
24
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
25
+
24
26
  ```
25
27
  Specification session for: {Title Case Name}
28
+ Work type: {work_type}
26
29
 
27
30
  Sources:
28
31
  - .workflows/discussion/{discussion-name}.md
@@ -21,8 +21,11 @@ Saving session state so Claude can pick up where it left off if the conversation
21
21
 
22
22
  This skill's purpose is now fulfilled. 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.
23
23
 
24
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
25
+
24
26
  ```
25
27
  Specification session for: Unified
28
+ Work type: {work_type}
26
29
 
27
30
  Source discussions:
28
31
  - .workflows/discussion/{discussion-name}.md
@@ -21,8 +21,11 @@ Saving session state so Claude can pick up where it left off if the conversation
21
21
 
22
22
  This skill's purpose is now fulfilled. 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.
23
23
 
24
+ Determine work_type: use the value from Step 2 if available. Otherwise, read work_type from the source discussion(s) frontmatter.
25
+
24
26
  ```
25
27
  Specification session for: Unified
28
+ Work type: {work_type}
26
29
 
27
30
  Sources:
28
31
  - .workflows/discussion/{discussion-name}.md