@leeovery/claude-technical-workflows 2.0.24 → 2.0.26

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.
@@ -39,12 +39,18 @@ Scan the codebase for specifications and plans:
39
39
  - Run `ls docs/workflow/specification/` to list specification files
40
40
  - Each file is named `{topic}.md`
41
41
 
42
- 2. **Check specification status**: For each specification file
43
- - Run `head -20 docs/workflow/specification/{topic}.md` to read the frontmatter and extract the `status:` field
42
+ 2. **Check specification metadata**: For each specification file
43
+ - Run `head -20 docs/workflow/specification/{topic}.md` to read the frontmatter
44
+ - Extract the `status:` field (Building specification | Complete)
45
+ - Extract the `type:` field (feature | cross-cutting) - if not present, default to `feature`
44
46
  - Do NOT use bash loops - run separate `head` commands for each topic
45
47
 
46
- 3. **Check for existing plans**: Look in `docs/workflow/planning/`
47
- - Identify specifications that don't have corresponding plans
48
+ 3. **Categorize specifications**:
49
+ - **Feature specifications** (`type: feature` or unspecified): Candidates for planning
50
+ - **Cross-cutting specifications** (`type: cross-cutting`): Reference context only - do NOT offer for planning
51
+
52
+ 4. **Check for existing plans**: Look in `docs/workflow/planning/`
53
+ - Identify feature specifications that don't have corresponding plans
48
54
 
49
55
  ## Step 2: Check Prerequisites
50
56
 
@@ -60,22 +66,29 @@ Stop here and wait for the user to acknowledge.
60
66
 
61
67
  ## Step 3: Present Options to User
62
68
 
63
- Show what you found using a list like below:
69
+ Show what you found, separating feature specs (planning targets) from cross-cutting specs (reference context):
64
70
 
65
71
  ```
66
- 📂 Specifications found:
72
+ 📂 Feature Specifications (planning targets):
67
73
  ⚠️ {topic-1} - Building specification - not ready for planning
68
74
  ✅ {topic-2} - Complete - ready for planning
69
75
  ✅ {topic-3} - Complete - plan exists
70
76
 
71
- Which specification would you like to create a plan for?
77
+ 📚 Cross-Cutting Specifications (reference context):
78
+ ✅ {caching-strategy} - Complete - will inform planning
79
+ ✅ {rate-limiting} - Complete - will inform planning
80
+
81
+ Which feature specification would you like to create a plan for?
72
82
  ```
73
83
 
74
- **Important:** Only completed specifications should proceed to planning. If a specification is still being built, advise the user to complete the specification phase first.
84
+ **Important:**
85
+ - Only completed **feature** specifications should proceed to planning
86
+ - **Cross-cutting** specifications are NOT planning targets - they inform feature plans
87
+ - If a specification is still being built, advise the user to complete the specification phase first
75
88
 
76
- **Auto-select:** If exactly one specification exists, automatically select it and proceed to Step 4. Inform the user which specification was selected. Do not ask for confirmation.
89
+ **Auto-select:** If exactly one completed feature specification exists, automatically select it and proceed to Step 4. Inform the user which specification was selected. Do not ask for confirmation.
77
90
 
78
- Ask: **Which specification would you like to plan?**
91
+ Ask: **Which feature specification would you like to plan?**
79
92
 
80
93
  ## Step 4: Choose Output Destination
81
94
 
@@ -88,6 +101,26 @@ Load **[output-formats.md](../skills/technical-planning/references/output-format
88
101
  - Any additional context or priorities to consider?
89
102
  - Any constraints since the specification was completed?
90
103
 
104
+ ## Step 5b: Surface Cross-Cutting Context
105
+
106
+ If any **completed cross-cutting specifications** exist, surface them as reference context for planning:
107
+
108
+ 1. **List applicable cross-cutting specs**:
109
+ - Read each cross-cutting specification
110
+ - Identify which ones are relevant to the feature being planned
111
+ - Relevance is determined by topic overlap (e.g., caching strategy applies if the feature involves data retrieval or API calls)
112
+
113
+ 2. **Summarize for handoff**:
114
+ ```
115
+ Cross-cutting specifications to reference:
116
+ - caching-strategy.md: [brief summary of key decisions]
117
+ - rate-limiting.md: [brief summary of key decisions]
118
+ ```
119
+
120
+ These specifications contain validated architectural decisions that should inform the plan. The planning skill will incorporate these as a "Cross-Cutting References" section in the plan.
121
+
122
+ **If no cross-cutting specifications exist**: Skip this step.
123
+
91
124
  ## Step 6: Invoke the Skill
92
125
 
93
126
  After completing the steps above, this command's purpose is fulfilled.
@@ -100,6 +133,7 @@ Planning session for: {topic}
100
133
  Specification: docs/workflow/specification/{topic}.md
101
134
  Output format: {format}
102
135
  Additional context: {summary of user's answers from Step 5}
136
+ Cross-cutting references: {list of applicable cross-cutting specs with brief summaries, or "none"}
103
137
 
104
138
  Invoke the technical-planning skill.
105
139
  ```
@@ -107,4 +141,6 @@ Invoke the technical-planning skill.
107
141
  ## Notes
108
142
 
109
143
  - Ask questions clearly and wait for responses before proceeding
110
- - The specification is the sole source of truth for planning - do not reference discussions
144
+ - The feature specification is the primary source of truth for planning
145
+ - Cross-cutting specifications provide supplementary context for architectural decisions
146
+ - Do not reference discussions - only specifications
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Start a specification session from an existing discussion. Discovers available discussions, checks for existing specifications, and invokes the technical-specification skill.
2
+ description: Start a specification session from existing discussions. Discovers available discussions, offers consolidation assessment for multiple discussions, and invokes the technical-specification skill.
3
3
  ---
4
4
 
5
5
  Invoke the **technical-specification** skill for this conversation.
@@ -17,7 +17,7 @@ This is **Phase 3** of the six-phase workflow:
17
17
  | 5. Implementation | DOING - tests first, then code | |
18
18
  | 6. Review | VALIDATING - check work against artifacts | |
19
19
 
20
- **Stay in your lane**: Validate and refine discussion content into a standalone specification. Don't jump to planning, phases, tasks, or code. The specification is the "line in the sand" - everything after this has hard dependencies on it.
20
+ **Stay in your lane**: Validate and refine discussion content into standalone specifications. Don't jump to planning, phases, tasks, or code. The specification is the "line in the sand" - everything after this has hard dependencies on it.
21
21
 
22
22
  ---
23
23
 
@@ -46,40 +46,221 @@ Scan the codebase for discussions and specifications:
46
46
  3. **Check for existing specifications**: Look in `docs/workflow/specification/`
47
47
  - Identify discussions that don't have corresponding specifications
48
48
 
49
+ 4. **Check for cached consolidation analysis** (if multiple discussions):
50
+ - Check if `docs/workflow/.cache/discussion-consolidation-analysis.md` exists
51
+ - If it exists, read it to get the stored checksum from the frontmatter
52
+
53
+ 5. **Compute current discussions checksum** (if multiple concluded discussions):
54
+ - Run exactly: `cat docs/workflow/discussion/*.md 2>/dev/null | md5sum | cut -d' ' -f1`
55
+ - IMPORTANT: Use this exact command - glob expansion is alphabetically sorted by default
56
+ - Do NOT modify or "simplify" this command - checksum must be deterministic
57
+ - Store this value to compare with the cached checksum
58
+
49
59
  ## Step 2: Check Prerequisites
50
60
 
51
61
  **If no discussions exist:**
52
62
 
53
63
  ```
54
- ⚠️ No discussions found in docs/workflow/discussion/
64
+ No discussions found in docs/workflow/discussion/
55
65
 
56
66
  The specification phase requires a completed discussion. Please run /workflow:start-discussion first to document the technical decisions, edge cases, and rationale before creating a specification.
57
67
  ```
58
68
 
59
69
  Stop here and wait for the user to acknowledge.
60
70
 
61
- ## Step 3: Present Options to User
71
+ ## Step 3: Present Options
62
72
 
63
- Show what you found using a list like below:
73
+ Show what you found:
64
74
 
65
75
  ```
66
- 📂 Discussions found:
67
- {topic-1} - Concluded - ready for specification
68
- ⚠️ {topic-2} - Exploring - not ready for specification
69
- {topic-3} - Concluded - specification exists
70
-
71
- Which discussion would you like to create a specification for?
76
+ Discussions found:
77
+ {topic-1} - Concluded - ready for specification
78
+ {topic-2} - Exploring - not ready for specification
79
+ {topic-3} - Concluded - specification exists
72
80
  ```
73
81
 
74
82
  **Important:** Only concluded discussions should proceed to specification. If a discussion is still exploring, advise the user to complete the discussion phase first.
75
83
 
76
- Ask: **Which discussion would you like to specify?**
84
+ **If only ONE concluded discussion is ready:** Skip to Step 4 (single-source path).
85
+
86
+ **If MORE THAN ONE concluded discussion is ready:** Proceed to Step 3A (consolidation assessment).
87
+
88
+ ---
89
+
90
+ ## Step 3A: Consolidation Assessment (Multiple Discussions)
91
+
92
+ When multiple concluded discussions exist, offer to assess how they should be organized into specifications.
93
+
94
+ ```
95
+ You have {N} concluded discussions ready for specification.
96
+
97
+ Would you like me to assess how these might be combined into specifications?
98
+
99
+ 1. **Yes, assess them** - I'll analyze all discussions for natural groupings
100
+ 2. **No, proceed individually** - Create specifications 1:1 with discussions
101
+
102
+ Which approach?
103
+ ```
104
+
105
+ **If user chooses individual:** Skip to Step 4 and ask which discussion to specify.
106
+
107
+ **If user chooses assessment:** Proceed to Step 3A.1.
108
+
109
+ ### Step 3A.1: Gather Context for Analysis
110
+
111
+ Before analyzing, ask:
112
+
113
+ ```
114
+ Before I analyze the discussions, is there anything about your project structure or how these topics relate that would help me group them appropriately?
115
+ ```
116
+
117
+ Wait for response.
118
+
119
+ ### Step 3A.2: Check Cache Validity
120
+
121
+ Compare the current discussions checksum (computed in Step 1.5) with the cached checksum:
122
+
123
+ **If cache exists AND checksums match:**
124
+ ```
125
+ Using cached analysis
126
+
127
+ Discussion documents unchanged since last analysis ({date from cache}).
128
+ Loading previously identified groupings...
129
+
130
+ To force a fresh analysis, enter: refresh
131
+ ```
132
+
133
+ Then load the groupings from the cache file and skip to Step 3A.4 (Present Options).
134
+
135
+ **If cache missing OR checksums differ:**
136
+ ```
137
+ Analyzing discussions...
138
+ ```
139
+
140
+ Proceed to Step 3A.3 (Full Analysis).
141
+
142
+ ### Step 3A.3: Full Analysis (when cache invalid)
143
+
144
+ **This step is critical. You MUST read every concluded discussion document thoroughly.**
145
+
146
+ For each concluded discussion:
147
+ 1. Read the ENTIRE document (not just frontmatter)
148
+ 2. Understand the decisions, systems, and concepts it defines
149
+ 3. Note dependencies on or references to other discussions
150
+ 4. Identify shared data structures, entities, or behaviors
151
+
152
+ Then analyze coupling between discussions:
153
+ - **Data coupling**: Discussions that define or depend on the same data structures
154
+ - **Behavioral coupling**: Discussions where one's implementation requires another
155
+ - **Conceptual coupling**: Discussions that address different facets of the same problem
156
+
157
+ Group discussions that are tightly coupled - they should become a single specification because their decisions are inseparable.
158
+
159
+ **Save to cache:**
160
+ After analysis, ensure `.cache` directory exists: `mkdir -p docs/workflow/.cache`
161
+
162
+ Create/update `docs/workflow/.cache/discussion-consolidation-analysis.md`:
163
+
164
+ ```markdown
165
+ ---
166
+ checksum: {computed_checksum}
167
+ generated: {ISO date}
168
+ discussion_files:
169
+ - {topic1}.md
170
+ - {topic2}.md
171
+ ---
172
+
173
+ # Discussion Consolidation Analysis
174
+
175
+ ## Recommended Groupings
176
+
177
+ ### {Suggested Specification Name}
178
+ - **{topic-a}**: {why it belongs in this group}
179
+ - **{topic-b}**: {why it belongs in this group}
180
+ - **{topic-c}**: {why it belongs in this group}
181
+
182
+ **Coupling**: {Brief explanation of what binds these together - shared data, dependencies, etc.}
183
+
184
+ ### {Another Specification Name}
185
+ - **{topic-d}**: {why it belongs}
186
+ - **{topic-e}**: {why it belongs}
187
+
188
+ **Coupling**: {Brief explanation}
189
+
190
+ ## Independent Discussions
191
+ - **{topic-f}**: {Why this stands alone - no strong coupling to others}
192
+
193
+ ## Analysis Notes
194
+ {Any additional context about the relationships discovered}
195
+ ```
196
+
197
+ ### Step 3A.4: Present Options
198
+
199
+ Present the analysis and options:
200
+
201
+ **If using cached analysis:**
202
+ ```
203
+ Cached analysis (discussions unchanged since {date})
204
+
205
+ {Display the Recommended Groupings section from cache}
206
+
207
+ How would you like to proceed?
208
+
209
+ 1. **Combine as recommended** - Create specifications per the groupings above
210
+ 2. **Combine differently** - Tell me your preferred groupings
211
+ 3. **Single specification** - Consolidate all discussions into one spec
212
+ 4. **Individual specifications** - Create 1:1 (I'll ask which to start with)
213
+
214
+ (Or enter 'refresh' to re-analyze)
215
+ ```
216
+
217
+ **If fresh analysis:**
218
+ ```
219
+ Analysis complete (cached for future sessions)
220
+
221
+ {Display the Recommended Groupings section}
222
+
223
+ How would you like to proceed?
224
+
225
+ 1. **Combine as recommended** - Create specifications per the groupings above
226
+ 2. **Combine differently** - Tell me your preferred groupings
227
+ 3. **Single specification** - Consolidate all discussions into one spec
228
+ 4. **Individual specifications** - Create 1:1 (I'll ask which to start with)
229
+ ```
230
+
231
+ Wait for user to choose.
232
+
233
+ ### Step 3A.5: Handle Choices
234
+
235
+ **If "Combine as recommended":**
236
+ - Confirm the first specification to create
237
+ - Proceed to Step 4 with the grouped sources
238
+
239
+ **If "Combine differently":**
240
+ - Ask user to describe their preferred groupings
241
+ - Confirm understanding
242
+ - Proceed to Step 4 with user-specified sources
243
+
244
+ **If "Single specification":**
245
+ - Use "unified" as the specification name (output: `docs/workflow/specification/unified.md`)
246
+ - Proceed to Step 4 with all discussions as sources
247
+
248
+ **If "Individual specifications":**
249
+ - Ask which discussion to specify first
250
+ - Proceed to Step 4 with single source
251
+
252
+ **If "refresh":**
253
+ - Delete the cache file: `rm docs/workflow/.cache/discussion-consolidation-analysis.md`
254
+ - Return to Step 3A.3 (Full Analysis)
255
+ - Inform user: "Refreshing analysis..."
256
+
257
+ ---
77
258
 
78
259
  ## Step 4: Gather Additional Context
79
260
 
80
261
  Ask:
81
262
  - Any additional context or priorities to consider?
82
- - Any constraints or changes since the discussion concluded?
263
+ - Any constraints or changes since the discussion(s) concluded?
83
264
  - Are there any existing partial plans or related documentation I should review?
84
265
 
85
266
  ## Step 5: Invoke the Skill
@@ -88,7 +269,7 @@ After completing the steps above, this command's purpose is fulfilled.
88
269
 
89
270
  Invoke the [technical-specification](../skills/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.
90
271
 
91
- **Example handoff:**
272
+ **Example handoff (single source):**
92
273
  ```
93
274
  Specification session for: {topic}
94
275
  Source: docs/workflow/discussion/{topic}.md
@@ -98,7 +279,26 @@ Additional context: {summary of user's answers from Step 4}
98
279
  Invoke the technical-specification skill.
99
280
  ```
100
281
 
282
+ **Example handoff (multiple sources):**
283
+ ```
284
+ Specification session for: {specification-name}
285
+
286
+ Sources:
287
+ - docs/workflow/discussion/{topic-1}.md
288
+ - docs/workflow/discussion/{topic-2}.md
289
+ - docs/workflow/discussion/{topic-3}.md
290
+
291
+ Output: docs/workflow/specification/{specification-name}.md
292
+ Additional context: {summary of user's answers from Step 4}
293
+
294
+ Invoke the technical-specification skill.
295
+ ```
296
+
297
+ ---
298
+
101
299
  ## Notes
102
300
 
103
301
  - Ask questions clearly and wait for responses before proceeding
104
- - The specification phase validates and refines discussion content into a standalone document
302
+ - The specification phase validates and refines discussion content into standalone documents
303
+ - When multiple sources are provided, the skill will extract exhaustively from ALL of them
304
+ - Attribution in the specification should trace content back to its source discussion(s)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -22,9 +22,20 @@ Either way: Transform specifications into actionable phases, tasks, and acceptan
22
22
  - **Specification content** (required) - The validated decisions and requirements to plan from
23
23
  - **Topic name** (optional) - Will derive from specification if not provided
24
24
  - **Output format preference** (optional) - Will ask if not specified
25
+ - **Cross-cutting references** (optional) - List of cross-cutting specifications that inform this plan
25
26
 
26
27
  **If missing:** Will ask user for specification location or content.
27
28
 
29
+ ### Cross-Cutting References
30
+
31
+ If cross-cutting specifications are provided (e.g., caching strategy, rate limiting policy), incorporate their decisions into the plan:
32
+
33
+ 1. **Include a "Cross-Cutting References" section** in the plan linking to these specifications
34
+ 2. **Apply their patterns** when designing phases and tasks (e.g., if caching strategy says "cache API responses for 5 minutes", include that in relevant tasks)
35
+ 3. **Note where patterns apply** - when a task implements a cross-cutting pattern, reference it
36
+
37
+ Cross-cutting specifications are architectural decisions that inform HOW features are built. They don't have their own implementation plans - instead, their patterns are applied within feature plans.
38
+
28
39
  ## Source Material
29
40
 
30
41
  **The specification is your sole input.** Everything you need should be in the specification - do not request details from prior source material. If information is missing, ask for clarification on the specification itself.
@@ -88,6 +88,17 @@ Tasks are organized with labels/priorities:
88
88
 
89
89
  [Summary of key decisions from specification]
90
90
 
91
+ ## Cross-Cutting References
92
+
93
+ Architectural decisions from cross-cutting specifications that inform this plan:
94
+
95
+ | Specification | Key Decisions | Applies To |
96
+ |---------------|---------------|------------|
97
+ | [Caching Strategy](../specification/caching-strategy.md) | Cache API responses for 5 min | Tasks involving API calls |
98
+ | [Rate Limiting](../specification/rate-limiting.md) | 100 req/min per user | User-facing endpoints |
99
+
100
+ *Remove this section if no cross-cutting specifications apply.*
101
+
91
102
  ## External Dependencies
92
103
 
93
104
  [Dependencies on other topics - copy from specification's Dependencies section]
@@ -269,6 +269,17 @@ This plan is managed via Beads. Tasks are stored in `.beads/` and tracked as a d
269
269
 
270
270
  [Summary of key decisions from specification]
271
271
 
272
+ ## Cross-Cutting References
273
+
274
+ Architectural decisions from cross-cutting specifications that inform this plan:
275
+
276
+ | Specification | Key Decisions | Applies To |
277
+ |---------------|---------------|------------|
278
+ | [Caching Strategy](../specification/caching-strategy.md) | Cache API responses for 5 min | Tasks involving API calls |
279
+ | [Rate Limiting](../specification/rate-limiting.md) | 100 req/min per user | User-facing endpoints |
280
+
281
+ *Remove this section if no cross-cutting specifications apply.*
282
+
272
283
  ## Phase Overview
273
284
 
274
285
  | Phase | Goal | Epic ID |
@@ -179,6 +179,17 @@ This plan is managed in Linear. The source of truth for tasks and progress is th
179
179
 
180
180
  [Summary of key decisions from specification - for quick reference]
181
181
 
182
+ ## Cross-Cutting References
183
+
184
+ Architectural decisions from cross-cutting specifications that inform this plan:
185
+
186
+ | Specification | Key Decisions | Applies To |
187
+ |---------------|---------------|------------|
188
+ | [Caching Strategy](../specification/caching-strategy.md) | Cache API responses for 5 min | Tasks involving API calls |
189
+ | [Rate Limiting](../specification/rate-limiting.md) | 100 req/min per user | User-facing endpoints |
190
+
191
+ *Remove this section if no cross-cutting specifications apply.*
192
+
182
193
  ## External Dependencies
183
194
 
184
195
  [Dependencies on other topics - copy from specification's Dependencies section]
@@ -54,6 +54,17 @@ format: local-markdown
54
54
  - Decision 1: Rationale
55
55
  - Decision 2: Rationale
56
56
 
57
+ ## Cross-Cutting References
58
+
59
+ Architectural decisions from cross-cutting specifications that inform this plan:
60
+
61
+ | Specification | Key Decisions | Applies To |
62
+ |---------------|---------------|------------|
63
+ | [Caching Strategy](../specification/caching-strategy.md) | Cache API responses for 5 min; use Redis | Tasks involving API calls |
64
+ | [Rate Limiting](../specification/rate-limiting.md) | 100 req/min per user; sliding window | User-facing endpoints |
65
+
66
+ *Remove this section if no cross-cutting specifications apply.*
67
+
57
68
  ## Architecture
58
69
 
59
70
  - Components
@@ -19,8 +19,8 @@ Either way: Transform unvalidated reference material into a specification that's
19
19
 
20
20
  ### What This Skill Needs
21
21
 
22
- - **Source material** (required) - The content to synthesize into a specification. Can be:
23
- - Discussion documents or research notes
22
+ - **Source material** (required) - One or more sources to synthesize into a specification. Can be:
23
+ - Discussion documents or research notes (single or multiple)
24
24
  - Inline feature descriptions
25
25
  - Requirements docs, design documents, or transcripts
26
26
  - Any other reference material
@@ -28,6 +28,8 @@ Either way: Transform unvalidated reference material into a specification that's
28
28
 
29
29
  **If missing:** Will ask user to provide context or point to source files.
30
30
 
31
+ **Multiple sources:** When multiple sources are provided, extract exhaustively from ALL of them. Content may be scattered across sources - a decision in one may have constraints or details in another. The specification consolidates everything into a single standalone document.
32
+
31
33
  ## The Process
32
34
 
33
35
  **Load**: [specification-guide.md](references/specification-guide.md)
@@ -62,7 +64,7 @@ If you are uncertain whether the user approved, **ASK**: "Would you like me to l
62
64
 
63
65
  ## What You Do
64
66
 
65
- 1. **Extract exhaustively**: For each topic, re-scan ALL source material. Search for keywords and related terms. Information is often scattered - collect it all before synthesizing. Include only what we're building (not discarded alternatives).
67
+ 1. **Extract exhaustively**: For each topic, re-scan ALL source materials. When working with multiple sources, search each one - information about a single topic may be scattered across documents. Search for keywords and related terms. Collect everything before synthesizing. Include only what we're building (not discarded alternatives).
66
68
 
67
69
  2. **Filter**: Reference material may contain hallucinations, inaccuracies, or outdated concepts. Validate before including.
68
70
 
@@ -88,6 +90,8 @@ The specification is the **golden document** - planning uses only this. If infor
88
90
 
89
91
  **Trust nothing without validation**: Synthesize and present, but never assume source material is correct.
90
92
 
93
+ **Surface conflicts**: When sources contain conflicting decisions, flag the conflict to the user during the discussion. Don't silently pick one - let the user decide what makes it into the specification.
94
+
91
95
  ---
92
96
 
93
97
  ## Self-Check: Are You Following the Rules?
@@ -146,6 +146,7 @@ Suggested skeleton:
146
146
  # Specification: [Topic Name]
147
147
 
148
148
  **Status**: Building specification
149
+ **Type**: feature | cross-cutting
149
150
  **Last Updated**: YYYY-MM-DD *(use today's actual date)*
150
151
 
151
152
  ---
@@ -161,6 +162,73 @@ Suggested skeleton:
161
162
  [Optional - capture in-progress discussion if needed]
162
163
  ```
163
164
 
165
+ ## Specification Types
166
+
167
+ The `Type` field distinguishes between specifications that result in standalone implementation work versus those that inform how other work is done.
168
+
169
+ ### Feature Specifications (`type: feature`)
170
+
171
+ Feature specifications describe something to **build** - a concrete piece of functionality with its own implementation plan.
172
+
173
+ **Examples:**
174
+ - User authentication system
175
+ - Order processing pipeline
176
+ - Notification service
177
+ - Dashboard analytics
178
+
179
+ **Characteristics:**
180
+ - Results in a dedicated implementation plan
181
+ - Has concrete deliverables (code, APIs, UI)
182
+ - Can be planned with phases, tasks, and acceptance criteria
183
+ - Progress is measurable ("the feature is done")
184
+
185
+ **This is the default type.** If not specified, assume `feature`.
186
+
187
+ ### Cross-Cutting Specifications (`type: cross-cutting`)
188
+
189
+ Cross-cutting specifications describe **patterns, policies, or architectural decisions** that inform how features are built. They don't result in standalone implementation - instead, they're referenced by feature specifications and plans.
190
+
191
+ **Examples:**
192
+ - Caching strategy
193
+ - Rate limiting policy
194
+ - Error handling conventions
195
+ - Logging and observability standards
196
+ - API versioning approach
197
+ - Security patterns
198
+
199
+ **Characteristics:**
200
+ - Does NOT result in a dedicated implementation plan
201
+ - Defines "how to do things" rather than "what to build"
202
+ - Referenced by multiple feature specifications
203
+ - Implementation happens within features that apply these patterns
204
+ - No standalone "done" state - the patterns are applied across features
205
+
206
+ ### Why This Matters
207
+
208
+ Cross-cutting specifications go through the same Research → Discussion → Specification phases. The decisions are just as important to validate and document. The difference is what happens after:
209
+
210
+ - **Feature specs** → Planning → Implementation → Review
211
+ - **Cross-cutting specs** → Referenced by feature plans → Applied during feature implementation
212
+
213
+ When planning a feature, the planning process surfaces relevant cross-cutting specifications as context. This ensures that a "user authentication" plan incorporates the validated caching strategy and error handling conventions.
214
+
215
+ ### Determining the Type
216
+
217
+ Ask: **"Is there a standalone thing to build, or does this inform how we build other things?"**
218
+
219
+ | Question | Feature | Cross-Cutting |
220
+ |----------|---------|---------------|
221
+ | Can you demo it when done? | Yes - "here's the login page" | No - it's invisible infrastructure |
222
+ | Does it have its own UI/API/data? | Yes | No - lives within other features |
223
+ | Can you plan phases and tasks for it? | Yes | Tasks would be "apply X to feature Y" |
224
+ | Is it used by one feature or many? | Usually one | By definition, multiple |
225
+
226
+ **Edge cases:**
227
+ - A "caching service" that provides shared caching infrastructure → **Feature** (you're building something)
228
+ - "How we use caching across the app" → **Cross-cutting** (policy/pattern)
229
+ - Authentication system → **Feature**
230
+ - Authentication patterns and security requirements → **Cross-cutting**
231
+
164
232
  ## Critical Rules
165
233
 
166
234
  **EXPLICIT APPROVAL REQUIRED FOR EVERY WRITE**: You MUST NOT write to the specification until the user has explicitly approved. "Presenting" is not approval. "Asking a question" is not approval. You need explicit confirmation. If uncertain, ASK. This rule is non-negotiable.
@@ -344,8 +412,61 @@ When you've:
344
412
 
345
413
  ## Completion
346
414
 
415
+ ### Step 1: Determine Specification Type
416
+
417
+ Before asking for sign-off, assess whether this is a **feature** or **cross-cutting** specification:
418
+
419
+ **Feature specification** - Something to build:
420
+ - Has concrete deliverables (code, APIs, UI)
421
+ - Can be planned with phases, tasks, acceptance criteria
422
+ - Results in a standalone implementation
423
+
424
+ **Cross-cutting specification** - Patterns/policies that inform other work:
425
+ - Defines "how to do things" rather than "what to build"
426
+ - Will be referenced by multiple feature specifications
427
+ - Implementation happens within features that apply these patterns
428
+
429
+ Present your assessment to the user:
430
+
431
+ > "This specification appears to be a **[feature/cross-cutting]** specification.
432
+ >
433
+ > [Brief rationale - e.g., "It defines a caching strategy that will inform how multiple features handle data retrieval, rather than being a standalone piece of functionality to build."]
434
+ >
435
+ > - **Feature specs** proceed to planning and implementation
436
+ > - **Cross-cutting specs** are referenced by feature plans but don't have their own implementation plan
437
+ >
438
+ > Does this assessment seem correct?"
439
+
440
+ Wait for user confirmation before proceeding.
441
+
442
+ ### Step 2: Sign-Off
443
+
444
+ Once the type is confirmed, ask for final sign-off:
445
+
446
+ > "The specification is ready for sign-off:
447
+ > - **Type**: [feature/cross-cutting]
448
+ > - **Status**: Complete
449
+ >
450
+ > [If feature]: This specification can proceed to planning
451
+ > [If cross-cutting]: This specification will be surfaced as reference context when planning features
452
+ >
453
+ > Ready to mark as complete?"
454
+
455
+ ### Step 3: Update Frontmatter
456
+
457
+ After user confirms, update the specification frontmatter:
458
+
459
+ ```markdown
460
+ # Specification: [Topic Name]
461
+
462
+ **Status**: Complete
463
+ **Type**: [feature/cross-cutting]
464
+ **Last Updated**: YYYY-MM-DD
465
+ ```
466
+
347
467
  Specification is complete when:
348
468
  - All topics/phases have validated content
469
+ - Type has been determined and confirmed
349
470
  - User confirms the specification is complete
350
471
  - No blocking gaps remain
351
472