@leeovery/claude-technical-workflows 2.0.23 → 2.0.25

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.
@@ -74,7 +74,7 @@ Work from the inline context provided above.
74
74
 
75
75
  ## Notes
76
76
 
77
- - The specification skill will synthesize the inline context, present it for validation, and build the specification
77
+ - The specification skill contains instructions for synthesizing the inline context, presenting it for validation, and building the specification
78
78
  - Output is a standard specification file at `docs/workflow/specification/{topic}.md`
79
79
  - From there, the user can proceed to `/workflow:start-planning` as normal
80
80
  - This path skips formal discussion documentation - use the full workflow for complex features that need debate captured
@@ -300,40 +300,34 @@ What would you like to focus on in this session?
300
300
 
301
301
  Wait for response before proceeding.
302
302
 
303
- ## Step 5: Invoke Discussion Skill
303
+ ## Step 5: Invoke the Skill
304
304
 
305
- Begin the discussion session with appropriate context based on the path taken.
305
+ After completing the steps above, this command's purpose is fulfilled.
306
306
 
307
- **If from research:**
307
+ Invoke the [technical-discussion](../skills/technical-discussion/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.
308
+
309
+ **Example handoff (from research):**
308
310
  ```
309
311
  Discussion session for: {topic}
310
312
  Output: docs/workflow/discussion/{topic}.md
311
313
 
312
- ## Research Reference
314
+ Research reference:
313
315
  Source: docs/workflow/research/{filename}.md (lines {start}-{end})
314
316
  Summary: {the 1-2 sentence summary from Step 3A}
315
317
 
316
- Begin discussion using the technical-discussion skill.
318
+ Invoke the technical-discussion skill.
317
319
  ```
318
320
 
319
- **If continuing or fresh:**
321
+ **Example handoff (continuing or fresh):**
320
322
  ```
321
323
  Discussion session for: {topic}
322
324
  Source: {existing discussion | fresh}
323
325
  Output: docs/workflow/discussion/{topic}.md
324
326
 
325
- Begin discussion using the technical-discussion skill.
327
+ Invoke the technical-discussion skill.
326
328
  ```
327
329
 
328
- **Setup:**
329
- - Ensure discussion directory exists: `docs/workflow/discussion/`
330
- - If new: Create file using the template structure
331
- - If continuing: Work with existing file
332
- - Commit frequently at natural discussion breaks
333
-
334
330
  ## Notes
335
331
 
336
332
  - Ask questions clearly and wait for responses before proceeding
337
333
  - Discussion captures WHAT and WHY - don't jump to specifications or implementation
338
- - The goal is to work through edge cases, debates, and decisions before planning
339
- - Commit the discussion document frequently during the session
@@ -127,7 +127,7 @@ Proceeding with environment setup...
127
127
 
128
128
  ## Step 4: Check Environment Setup
129
129
 
130
- > **IMPORTANT**: This step is for **information gathering only**. Do NOT execute any setup commands at this stage. The technical-implementation skill will handle execution when invoked.
130
+ > **IMPORTANT**: This step is for **information gathering only**. Do NOT execute any setup commands at this stage. Execution instructions are in the technical-implementation skill.
131
131
 
132
132
  After the user selects a plan:
133
133
 
@@ -157,31 +157,25 @@ If they choose a specific phase or task, ask them to specify which one.
157
157
 
158
158
  > **Note:** Do NOT verify that the phase or task exists. Accept the user's answer and pass it to the skill. Validation happens during the implementation phase.
159
159
 
160
- ## Step 6: Invoke Implementation Skill
160
+ ## Step 6: Invoke the Skill
161
161
 
162
- Invoke the **technical-implementation** skill for this conversation.
162
+ After completing the steps above, this command's purpose is fulfilled.
163
163
 
164
- Pass to the technical-implementation skill:
165
- - Plan: `docs/workflow/planning/{topic}.md`
166
- - Format: (from frontmatter)
167
- - Scope: (all phases | specific phase | specific task | next-available)
168
- - Dependencies: (all satisfied - verified in Step 3)
169
- - Environment setup: (completed | not needed)
164
+ Invoke the [technical-implementation](../skills/technical-implementation/SKILL.md) skill for your next instructions. Do not act on the gathered information until the skill is loaded - it contains the instructions for how to proceed.
170
165
 
171
166
  **Example handoff:**
172
167
  ```
173
168
  Implementation session for: {topic}
174
169
  Plan: docs/workflow/planning/{topic}.md
175
170
  Format: {format}
176
- Scope: All phases
171
+ Scope: {all phases | specific phase | specific task | next-available}
177
172
 
178
173
  Dependencies: All satisfied ✓
179
- Environment setup: Completed (or: Not needed)
174
+ Environment setup: {completed | not needed}
180
175
 
181
- Begin implementation using the technical-implementation skill.
176
+ Invoke the technical-implementation skill.
182
177
  ```
183
178
 
184
179
  ## Notes
185
180
 
186
181
  - Ask questions clearly and wait for responses before proceeding
187
- - Execute environment setup before starting implementation
@@ -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,24 +101,46 @@ 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
 
91
- ## Step 6: Invoke Planning Skill
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
+
124
+ ## Step 6: Invoke the Skill
125
+
126
+ After completing the steps above, this command's purpose is fulfilled.
92
127
 
93
- Pass to the technical-planning skill with:
94
- - Specification path
95
- - Output format chosen
96
- - Additional context gathered
128
+ Invoke the [technical-planning](../skills/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.
97
129
 
98
130
  **Example handoff:**
99
131
  ```
100
132
  Planning session for: {topic}
101
133
  Specification: docs/workflow/specification/{topic}.md
102
134
  Output format: {format}
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
- Begin planning using the technical-planning skill.
138
+ Invoke the technical-planning skill.
105
139
  ```
106
140
 
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
111
- - Commit the plan files when complete
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
@@ -21,7 +21,9 @@ This is **Phase 1** of the six-phase workflow:
21
21
 
22
22
  ---
23
23
 
24
- Then ask these questions to kickstart the exploration:
24
+ ## Instructions
25
+
26
+ Ask these questions to gather context:
25
27
 
26
28
  1. **What's on your mind?**
27
29
  - What idea or topic do you want to explore?
@@ -35,4 +37,10 @@ Then ask these questions to kickstart the exploration:
35
37
  - Technical feasibility? Market landscape? Business model?
36
38
  - Or just talk it through and see where it goes?
37
39
 
38
- Ask these questions clearly and wait for responses before proceeding. The skill handles everything else.
40
+ Ask these questions clearly and wait for responses before proceeding.
41
+
42
+ ## Invoke the Skill
43
+
44
+ After completing the steps above, this command's purpose is fulfilled.
45
+
46
+ Invoke the [technical-research](../skills/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.
@@ -86,13 +86,11 @@ Check if a specification exists:
86
86
  2. **If exists**: Note the path for context
87
87
  3. **If missing**: Proceed without - the plan is the primary review artifact
88
88
 
89
- ## Step 6: Invoke Review Skill
89
+ ## Step 6: Invoke the Skill
90
90
 
91
- Pass to the technical-review skill:
92
- - Plan: `docs/workflow/planning/{topic}.md`
93
- - Format: (from frontmatter)
94
- - Specification: `docs/workflow/specification/{topic}.md` (if exists)
95
- - Implementation scope: (files/directories to review)
91
+ After completing the steps above, this command's purpose is fulfilled.
92
+
93
+ Invoke the [technical-review](../skills/technical-review/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.
96
94
 
97
95
  **Example handoff:**
98
96
  ```
@@ -102,11 +100,10 @@ Format: {format}
102
100
  Specification: docs/workflow/specification/{topic}.md (or: Not available)
103
101
  Scope: {implementation scope}
104
102
 
105
- Begin review using the technical-review skill.
103
+ Invoke the technical-review skill.
106
104
  ```
107
105
 
108
106
  ## Notes
109
107
 
110
108
  - Ask questions clearly and wait for responses before proceeding
111
109
  - Review produces feedback (approve, request changes, or comments) - it does NOT fix code
112
- - Verify ALL plan tasks, don't sample
@@ -82,25 +82,23 @@ Ask:
82
82
  - Any constraints or changes since the discussion concluded?
83
83
  - Are there any existing partial plans or related documentation I should review?
84
84
 
85
- ## Step 5: Invoke Specification Skill
85
+ ## Step 5: Invoke the Skill
86
86
 
87
- Pass to the technical-specification skill:
88
- - Source: `docs/workflow/discussion/{topic}.md`
89
- - Output: `docs/workflow/specification/{topic}.md`
90
- - Additional context gathered
87
+ After completing the steps above, this command's purpose is fulfilled.
88
+
89
+ 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.
91
90
 
92
91
  **Example handoff:**
93
92
  ```
94
93
  Specification session for: {topic}
95
94
  Source: docs/workflow/discussion/{topic}.md
96
95
  Output: docs/workflow/specification/{topic}.md
96
+ Additional context: {summary of user's answers from Step 4}
97
97
 
98
- Begin specification using the technical-specification skill.
99
- Reference: specification-guide.md
98
+ Invoke the technical-specification skill.
100
99
  ```
101
100
 
102
101
  ## Notes
103
102
 
104
103
  - Ask questions clearly and wait for responses before proceeding
105
104
  - The specification phase validates and refines discussion content into a standalone document
106
- - Commit the specification files frequently during the session
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeovery/claude-technical-workflows",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "Technical workflow skills & commands for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "Lee Overy <me@leeovery.com>",
@@ -21,8 +21,8 @@ You're an AI - do both. Engage fully while documenting. Don't dumb down.
21
21
 
22
22
  1. **Discuss** - Participate
23
23
  2. **Document** - Capture
24
- 3. **Plan** - ❌ Not this skill's job
25
- 4. **Implement** - ❌ Not this skill's job
24
+ 3. **Plan** - ❌ Not covered here
25
+ 4. **Implement** - ❌ Not covered here
26
26
 
27
27
  Stop after documentation. No plans, implementation steps, or code.
28
28
 
@@ -115,7 +115,7 @@ Follow project-specific coding skills in `.claude/skills/` for:
115
115
  - Architecture conventions
116
116
  - Testing conventions
117
117
 
118
- This skill provides the implementation **process**. Project skills provide the **style**.
118
+ This skill contains the implementation **process**. Project skills contain the **style**.
119
119
 
120
120
  ## Handling Problems
121
121
 
@@ -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
@@ -36,6 +36,30 @@ Either way: Transform unvalidated reference material into a specification that's
36
36
 
37
37
  **When complete**: User signs off on the specification.
38
38
 
39
+ ## CRITICAL: You Do NOT Create or Update the Specification Autonomously
40
+
41
+ **This is a collaborative, interactive process. You MUST wait for explicit user approval before writing ANYTHING to the specification file.**
42
+
43
+ ❌ **NEVER:**
44
+ - Create the specification document and then ask the user to review it
45
+ - Write multiple sections and present them for review afterward
46
+ - Assume silence or moving on means approval
47
+ - Make "minor" amendments without explicit approval
48
+ - Batch up content and log it all at once
49
+
50
+ ✅ **ALWAYS:**
51
+ - Present ONE topic at a time
52
+ - **STOP and WAIT** for the user to explicitly approve before writing
53
+ - Treat each write operation as requiring its own explicit approval
54
+
55
+ **What counts as approval:** "Log it" (the standard choice you present) or equivalent: "Yes", "Approved", "Add it", "That's good".
56
+
57
+ **What does NOT count as approval:** Silence, you presenting choices, the user asking a follow-up question, the user saying "What's next?", or any response that isn't explicit confirmation.
58
+
59
+ If you are uncertain whether the user approved, **ASK**: "Would you like me to log it, or do you want to adjust something?"
60
+
61
+ ---
62
+
39
63
  ## What You Do
40
64
 
41
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).
@@ -46,18 +70,32 @@ Either way: Transform unvalidated reference material into a specification that's
46
70
 
47
71
  4. **Present**: Synthesize and present content to the user in the format it would appear in the specification.
48
72
 
49
- 5. **Log**: Only when approved, write content verbatim to the specification.
73
+ 5. **STOP AND WAIT**: Do not proceed until the user explicitly approves. This is not optional.
74
+
75
+ 6. **Log**: Only after explicit approval, write content verbatim to the specification.
50
76
 
51
- 6. **Final review**: After all topics and dependencies are documented, perform a comprehensive review of ALL source material against the specification. Flag any potentially missed content to the user - but only from the sources, never fabricated. User confirms before any additions.
77
+ 7. **Final review**: After all topics and dependencies are documented, perform a comprehensive review of ALL source material against the specification. Flag any potentially missed content to the user - but only from the sources, never fabricated. User confirms before any additions.
52
78
 
53
79
  The specification is the **golden document** - planning uses only this. If information doesn't make it into the specification, it won't be built. No references back to source material.
54
80
 
55
81
  ## Critical Rules
56
82
 
57
- **Present before logging**: Never write content to the specification until the user has seen and approved it.
83
+ **STOP AND WAIT FOR APPROVAL**: You MUST NOT write to the specification until the user has explicitly approved. Presenting content is NOT approval. Presenting choices is NOT approval. You must receive explicit confirmation (e.g., "Log it") before ANY write operation. If uncertain, ASK.
58
84
 
59
85
  **Log verbatim**: When approved, write exactly what was presented - no silent modifications.
60
86
 
61
87
  **Commit frequently**: Commit at natural breaks, after significant exchanges, and before any context refresh. Context refresh = lost work.
62
88
 
63
89
  **Trust nothing without validation**: Synthesize and present, but never assume source material is correct.
90
+
91
+ ---
92
+
93
+ ## Self-Check: Are You Following the Rules?
94
+
95
+ Before ANY write operation to the specification, ask yourself:
96
+
97
+ 1. **Did I present this specific content to the user?** If no → STOP. Present it first.
98
+ 2. **Did the user explicitly approve it?** (Not "did I ask if it's good" - did THEY say yes?) If no → STOP. Wait for approval.
99
+ 3. **Am I writing exactly what was approved?** If adding/changing anything → STOP. Present the changes first.
100
+
101
+ > **If you have written to the specification file without going through steps 1-2-3 above, you have violated the workflow.** The user must approve every piece of content before it's logged. There are no exceptions.
@@ -29,6 +29,16 @@ Before starting any topic, identify ALL available reference material:
29
29
 
30
30
  **Treat all source material as untrusted input**, regardless of where it came from. Your job is to synthesize and present - the user validates.
31
31
 
32
+ ## CRITICAL: This is an Interactive Process
33
+
34
+ **You MUST NOT create or update the specification without explicit user approval for each piece of content.**
35
+
36
+ This is a collaborative dialogue, not an autonomous task. The user validates every piece before it's logged.
37
+
38
+ > **CHECKPOINT**: If you are about to write to the specification file and haven't received explicit approval (e.g., "Log it") for this specific content, **STOP**. You are violating the workflow. Go back and present the choices first.
39
+
40
+ ---
41
+
32
42
  ## The Workflow
33
43
 
34
44
  Work through the specification **topic by topic**:
@@ -62,11 +72,19 @@ For each topic or subtopic, perform exhaustive extraction:
62
72
  ### 2. Synthesize and Present
63
73
  Present your understanding to the user **in the format it would appear in the specification**:
64
74
 
65
- > "Here's what I understand about [topic] based on the reference material. This is how I'd write it into the specification:
75
+ > "Here's what I understand about [topic] based on the reference material. This is exactly what I'll write into the specification:
66
76
  >
67
77
  > [content as it would appear]
68
- >
69
- > Does this capture it? Anything to adjust, remove, or add?"
78
+
79
+ Then present two explicit choices:
80
+
81
+ > **To proceed, choose one:**
82
+ > - **"Log it"** - I'll add the above to the specification **verbatim** (exactly as shown, no modifications)
83
+ > - **"Adjust"** - Tell me which part to change and what you want it to say instead
84
+
85
+ **Do not paraphrase these choices.** Present them exactly as written so users always know what to expect.
86
+
87
+ > **CHECKPOINT**: After presenting, you MUST STOP and wait for the user's response. Do NOT proceed to logging. Do NOT present the next topic. WAIT.
70
88
 
71
89
  ### 3. Discuss and Refine
72
90
  Work through the content together:
@@ -78,22 +96,46 @@ Work through the content together:
78
96
 
79
97
  This is a **human-level conversation**, not form-filling. The user brings context from across the project that may not be in the reference material - decisions from other topics, implications from later work, or knowledge that can't all fit in context.
80
98
 
81
- ### 4. Log When Approved
82
- Only when the user approves ("yes, log it", "that's good", etc.) do you write it to the specification - **verbatim** as presented and approved.
99
+ ### 4. STOP - Wait for Explicit Approval
100
+
101
+ **DO NOT PROCEED TO LOGGING WITHOUT EXPLICIT USER APPROVAL.**
102
+
103
+ **What counts as approval:**
104
+ - **"Log it"** - the standard confirmation you present as a choice
105
+ - Or equivalent explicit confirmation: "Yes", "Approved", "Add it", "That's good"
106
+
107
+ **What does NOT count as approval:**
108
+ - Silence
109
+ - You presenting choices (that's you asking, not them approving)
110
+ - The user asking a follow-up question
111
+ - The user saying "What's next?" or "Continue"
112
+ - The user making a minor comment without explicit approval
113
+ - ANY response that isn't explicit confirmation
83
114
 
84
- ### 5. Repeat
115
+ **If you are uncertain, ASK:** "Would you like me to log it, or do you want to adjust something?"
116
+
117
+ > **CHECKPOINT**: If you are about to write to the specification and the user's last message was not explicit approval, **STOP**. You are violating the workflow. Present the choices again.
118
+
119
+ ### 5. Log When Approved
120
+ Only after receiving explicit approval do you write to the specification - **verbatim** as presented and approved. No silent modifications.
121
+
122
+ ### 6. Repeat
85
123
  Move to the next topic.
86
124
 
87
125
  ## Context Resurfacing
88
126
 
89
127
  When you discover information that affects **already-logged topics**, resurface them. Even mid-discussion - interrupt, flag what you found, and discuss whether it changes anything.
90
128
 
91
- If it does: summarize what's changing in the chat, then re-present the full updated topic. The summary is for discussion only - the specification just gets the clean replacement. Standard workflow applies: user approves before you update.
129
+ If it does: summarize what's changing in the chat, then re-present the full updated topic. The summary is for discussion only - the specification just gets the clean replacement. **Standard workflow applies: user approves before you update.**
130
+
131
+ > **CHECKPOINT**: Even when resurfacing content, you MUST NOT update the specification until the user explicitly approves the change. Present the updated version, wait for approval, then update.
92
132
 
93
133
  This is encouraged. Better to resurface and confirm "already covered" than let something slip past.
94
134
 
95
135
  ## The Specification Document
96
136
 
137
+ > **CHECKPOINT**: You should NOT be creating or writing to this file unless you have explicit user approval for specific content. If you're about to create this file with content you haven't presented and had approved, **STOP**. That violates the workflow.
138
+
97
139
  Create `docs/workflow/specification/{topic}.md`
98
140
 
99
141
  This is a single file per topic. Structure is **flexible** - organize around phases and subject matter, not rigid sections. This is a working document.
@@ -104,6 +146,7 @@ Suggested skeleton:
104
146
  # Specification: [Topic Name]
105
147
 
106
148
  **Status**: Building specification
149
+ **Type**: feature | cross-cutting
107
150
  **Last Updated**: YYYY-MM-DD *(use today's actual date)*
108
151
 
109
152
  ---
@@ -119,11 +162,80 @@ Suggested skeleton:
119
162
  [Optional - capture in-progress discussion if needed]
120
163
  ```
121
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
+
122
232
  ## Critical Rules
123
233
 
124
- **Exhaustive extraction is non-negotiable**: Before presenting any topic, re-scan source material. Search for keywords. Collect scattered information. The specification is the golden document - planning uses only this. If you miss something, it doesn't get built.
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.
125
235
 
126
- **Present before logging**: Never write content to the specification until the user has seen and approved it.
236
+ > **CHECKPOINT**: Before ANY write operation, ask yourself: "Did the user explicitly approve this specific content?" If the answer is no or uncertain, STOP and ask.
237
+
238
+ **Exhaustive extraction is non-negotiable**: Before presenting any topic, re-scan source material. Search for keywords. Collect scattered information. The specification is the golden document - planning uses only this. If you miss something, it doesn't get built.
127
239
 
128
240
  **Log verbatim**: When approved, write exactly what was presented - no silent modifications.
129
241
 
@@ -232,7 +344,11 @@ After documenting dependencies, perform a **final comprehensive review** of the
232
344
  - Error handling, validation rules, or boundary conditions
233
345
  - Integration points or data flows mentioned but not elaborated
234
346
 
235
- 4. **Flag what you find** - When you discover potentially missed content, present it to the user. There are two cases:
347
+ 4. **Flag what you find** - When you discover potentially missed content, present it to the user. **Do NOT add it to the specification without explicit approval.**
348
+
349
+ > **CHECKPOINT**: If you found missed content and are about to add it to the specification without presenting it first and receiving explicit approval, **STOP**. Every addition requires the present → approve → log cycle, even during final review.
350
+
351
+ There are two cases:
236
352
 
237
353
  **Enhancing an existing topic** - Details that belong in an already-documented section:
238
354
 
@@ -296,7 +412,74 @@ When you've:
296
412
 
297
413
  ## Completion
298
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
+
299
467
  Specification is complete when:
300
468
  - All topics/phases have validated content
469
+ - Type has been determined and confirmed
301
470
  - User confirms the specification is complete
302
471
  - No blocking gaps remain
472
+
473
+ ---
474
+
475
+ ## Self-Check: Have You Followed the Rules?
476
+
477
+ Before ANY write operation to the specification file, verify:
478
+
479
+ | Question | If No... |
480
+ |----------|----------|
481
+ | Did I present this specific content to the user? | **STOP**. Present it first. |
482
+ | Did the user explicitly approve? (e.g., "Log it") | **STOP**. Wait for approval or ask. |
483
+ | Am I writing exactly what was approved, with no additions? | **STOP**. Present any changes first. |
484
+
485
+ > **FINAL CHECK**: If you have written to the specification file and cannot answer "yes" to all three questions above for that content, you have violated the workflow. Every piece of content requires explicit user approval before logging.