5-phase-workflow 1.2.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,34 @@
1
1
  ---
2
2
  name: 5:plan-feature
3
3
  description: Plans feature implementation by analyzing requirements, identifying affected modules, and creating a structured feature specification. Use at the start of any new feature to ensure systematic implementation. This is Phase 1 of the 5-phase workflow.
4
- allowed-tools: Read, Glob, Grep, Task, AskUserQuestion
4
+ allowed-tools: Bash, Write, Task, AskUserQuestion
5
5
  context: fork
6
6
  user-invocable: true
7
7
  ---
8
8
 
9
9
  # Plan Feature Implementation (Phase 1)
10
10
 
11
+ ## Prerequisites Check
12
+
13
+ **CRITICAL: Check for configuration before proceeding**
14
+
15
+ ```bash
16
+ if [ ! -f ".claude/.5/config.json" ]; then
17
+ echo "❌ Configuration not found"
18
+ echo ""
19
+ echo "Please run /5:configure first to set up your project."
20
+ echo ""
21
+ echo "The configure command will:"
22
+ echo " • Detect your project type and build commands"
23
+ echo " • Set up ticket tracking conventions"
24
+ echo " • Generate documentation (CLAUDE.md)"
25
+ echo " • Create project-specific skills"
26
+ exit 1
27
+ fi
28
+ ```
29
+
30
+ **If config doesn't exist, STOP IMMEDIATELY. Do not proceed with the workflow.**
31
+
11
32
  ## Overview
12
33
 
13
34
  This skill is the **first phase** of the 5-phase workflow:
@@ -19,13 +40,26 @@ This skill is the **first phase** of the 5-phase workflow:
19
40
 
20
41
  This skill guides intensive collaboration with the developer to understand requirements, challenge assumptions, and create a comprehensive feature specification.
21
42
 
43
+ ## ⚠️ CRITICAL ARCHITECTURE
44
+
45
+ **This command uses a READ-ONLY sub-agent for codebase exploration.**
46
+
47
+ You (the main agent) orchestrate the process:
48
+ - You ask questions via AskUserQuestion
49
+ - You spawn a read-only Explore agent to analyze the codebase
50
+ - You receive findings from the sub-agent
51
+ - You create the feature.md file
52
+ - You inform the user of next steps
53
+
54
+ **The sub-agent CANNOT write files or implement anything. It can only read and report.**
55
+
22
56
  ## ⚠️ CRITICAL SCOPE CONSTRAINT
23
57
 
24
58
  **THIS COMMAND ONLY CREATES THE FEATURE SPECIFICATION. IT DOES NOT IMPLEMENT.**
25
59
 
26
60
  Your job in this phase:
27
61
  ✅ Ask questions
28
- Explore codebase
62
+ Spawn read-only sub-agent to explore codebase
29
63
  ✅ Create feature.md file
30
64
  ✅ Tell user to run /5:plan-implementation
31
65
 
@@ -80,35 +114,84 @@ Automatically extract the ticket ID from the current git branch:
80
114
  - Ask the developer if the ticket ID is correct
81
115
  - If no ticket ID found, ask developer for it
82
116
 
83
- ### Step 3: Analyze Existing Codebase
117
+ ### Step 3: Spawn Read-Only Explore Agent
118
+
119
+ **CRITICAL: Delegate ALL codebase exploration to a sub-agent.**
84
120
 
85
- Explore the codebase to understand existing patterns and identify affected modules:
121
+ Spawn a Task with `subagent_type=Explore` with the following prompt structure:
86
122
 
87
123
  ```
88
- 1. Explore the project structure to identify modules/components
89
- - Use Glob to discover relevant directories
90
- - Look for patterns that indicate module organization
124
+ Analyze the codebase for a feature planning session.
91
125
 
92
- 2. Check existing implementations in relevant modules
93
- - Search for similar features or components
94
- - Identify coding patterns and conventions
126
+ **Feature Description:** {paste the user's feature description here}
95
127
 
96
- 3. Check for similar patterns across the codebase
97
- - Search for class/function patterns that might be reusable
128
+ **Your Task:**
129
+ 1. Explore the project structure to identify modules/components
130
+ 2. Find existing implementations similar to this feature
131
+ 3. Identify coding patterns and conventions used
132
+ 4. Find reusable components or patterns
133
+ 5. Identify which existing files/modules would be affected
134
+
135
+ **Report Format:**
136
+ Return a structured report with:
137
+ - Project structure overview
138
+ - Relevant existing patterns found
139
+ - Similar implementations discovered
140
+ - Affected modules/files
141
+ - Reusable components identified
142
+ - Potential integration points
143
+
144
+ **IMPORTANT:** You are a READ-ONLY agent. Only use Read, Glob, and Grep tools. Do NOT suggest implementations or write any code.
98
145
  ```
99
146
 
100
- Use Task tool with subagent_type=Explore for complex exploration.
101
-
102
- **Goal:** Understand what already exists so you can ask informed questions.
147
+ **Wait for the sub-agent to return its findings before proceeding.**
103
148
 
104
149
  ### Step 4: Intensive Collaboration (5-10 Questions, ONE AT A TIME)
105
150
 
106
- **CRITICAL:** After exploring the codebase, engage in intensive Q&A. This is NOT optional.
151
+ **CRITICAL:** After receiving the exploration report, engage in intensive Q&A. This is NOT optional.
107
152
 
108
153
  - Ask 5-10 clarifying questions using AskUserQuestion
109
154
  - **ONE question at a time** - wait for answer before next question
110
155
  - Do NOT list multiple questions in one message
111
156
  - Do NOT skip to creating feature.md before asking at least 5 questions
157
+ - **Use the sub-agent's findings to inform your questions**
158
+
159
+ #### Step 4b: Optional Targeted Re-Exploration
160
+
161
+ During Q&A, the user may mention components, modules, or patterns that weren't covered in the initial exploration. You MAY spawn additional targeted Explore agents to gather more specific information.
162
+
163
+ **When to trigger re-exploration:**
164
+ - User mentions a specific file, module, or service by name that wasn't in the initial report
165
+ - User's answer reveals a dependency or integration point not previously identified
166
+ - User asks "have you looked at X?" or "what about the Y module?"
167
+ - Understanding a specific component is critical for accurate feature specification
168
+
169
+ **How to re-explore:**
170
+
171
+ Spawn a targeted Task with `subagent_type=Explore`:
172
+
173
+ ```
174
+ Targeted exploration for feature planning.
175
+
176
+ **Context:** During Q&A, the user mentioned {specific component/module/pattern}.
177
+
178
+ **Focused Task:**
179
+ 1. Find and analyze {specific component} mentioned by user
180
+ 2. Understand how it works and its patterns
181
+ 3. Identify how it might relate to the planned feature
182
+
183
+ **Report:** Provide a focused summary of:
184
+ - How this component works
185
+ - Relevant patterns or conventions
186
+ - How it could integrate with the planned feature
187
+
188
+ **IMPORTANT:** READ-ONLY. Only use Read, Glob, and Grep tools.
189
+ ```
190
+
191
+ **Guidelines:**
192
+ - Keep re-explorations focused and specific (not broad searches)
193
+ - Use findings to ask better follow-up questions
194
+ - Document relevant discoveries in the final feature spec
112
195
 
113
196
  **Question categories to explore:**
114
197
 
@@ -137,12 +220,12 @@ Use Task tool with subagent_type=Explore for complex exploration.
137
220
  - What are the acceptance criteria?
138
221
  - What test scenarios should be covered?
139
222
 
140
- 6. **Integration Points**
223
+ 6. **Integration Points** (informed by sub-agent findings)
141
224
  - Which existing components/modules are affected?
142
225
  - Are there API changes?
143
226
  - How does this interact with existing features?
144
227
 
145
- 7. **Alternative Approaches**
228
+ 7. **Alternative Approaches** (informed by sub-agent findings)
146
229
  - Have you considered approach X instead?
147
230
  - Is this the simplest solution?
148
231
  - Could we reuse existing components?
@@ -156,7 +239,7 @@ Use Task tool with subagent_type=Explore for complex exploration.
156
239
  - "Is this the simplest solution?"
157
240
  - "Have you considered X alternative?"
158
241
  - "What happens when Y fails?"
159
- - "Could we use existing Z component instead?"
242
+ - "Could we use existing Z component instead?" (reference sub-agent findings)
160
243
  - "Is a full factory needed or just simple creation?"
161
244
 
162
245
  **Ask questions ONE AT A TIME.** Use AskUserQuestion for each question. For clarifying questions, provide 2-4 options where meaningful. Wait for the user's answer before asking the next question. Open questions (like feature description) can use free text.
@@ -169,7 +252,7 @@ Based on the feature description and discussion:
169
252
 
170
253
  ### Step 6: Create Feature Specification
171
254
 
172
- Write a comprehensive feature spec to `.5/{TICKET-ID}-{description}/feature.md` using the template structure.
255
+ Write a comprehensive feature spec to `.5/features/{TICKET-ID}-{description}/feature.md` using the Write tool.
173
256
 
174
257
  **THIS IS YOUR FINAL OUTPUT. After creating this file, proceed immediately to Step 7.**
175
258
 
@@ -182,7 +265,7 @@ Key sections to populate:
182
265
  - **Problem Statement** - Why this feature is needed
183
266
  - **Requirements** - Functional and non-functional requirements from discussion
184
267
  - **Constraints** - Business, technical, and time constraints identified
185
- - **Affected Components** - Discovered from codebase exploration
268
+ - **Affected Components** - From sub-agent exploration report
186
269
  - **Entity Definitions** - If the feature involves new data structures
187
270
  - **Acceptance Criteria** - Verifiable criteria for success
188
271
  - **Alternatives Considered** - Options discussed and why chosen approach was selected
@@ -195,11 +278,12 @@ Follow these steps **IN ORDER** and **STOP after step 8**:
195
278
 
196
279
  1. **Ask for feature description** - Request task description and additional information from developer
197
280
  2. **Extract Ticket ID** - Get current branch name and extract ticket ID using configured pattern
198
- 3. **Explore the codebase** - Understand existing patterns and affected modules
199
- 4. **Ask 5-10 clarifying questions** - Based on findings, ask informed questions using AskUserQuestion - This is MANDATORY
281
+ 3. **Spawn Explore sub-agent** - Delegate codebase analysis to read-only agent, wait for report
282
+ 4. **Ask 5-10 clarifying questions** - Based on sub-agent findings, ask informed questions using AskUserQuestion - This is MANDATORY
283
+ - **4b. Re-explore as needed** - If user mentions unknown components during Q&A, spawn targeted Explore agents
200
284
  5. **Challenge assumptions** - Present alternatives, question complexity
201
285
  6. **Determine feature name** - Create short kebab-case description
202
- 7. **Create feature specification** in `.5/{TICKET-ID}-{description}/feature.md`
286
+ 7. **Create feature specification** in `.5/features/{TICKET-ID}-{description}/feature.md` using Write tool
203
287
  8. **Inform the developer** to review the spec, run `/clear` to reset context, and then run `/5:plan-implementation {TICKET-ID}-{description}`
204
288
 
205
289
  **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT PROCEED TO IMPLEMENTATION.**
@@ -208,12 +292,13 @@ Follow these steps **IN ORDER** and **STOP after step 8**:
208
292
 
209
293
  1. **Feature description first** - Get context before asking detailed questions
210
294
  2. **Auto-extract ticket ID** - Parse from branch name automatically
211
- 3. **Explore before questioning** - Understand codebase to ask informed questions
212
- 4. **Challenge assumptions** - Don't accept requirements at face value
213
- 5. **Explore alternatives** - Present options and trade-offs
214
- 6. **Document decisions** - Capture why choices were made
215
- 7. **Structured output** - Use the feature spec template consistently
216
- 8. **Clear handoff** - Tell developer what to do next
295
+ 3. **Delegate exploration** - Use read-only sub-agent for codebase analysis
296
+ 4. **Explore before questioning** - Wait for sub-agent report before asking questions
297
+ 5. **Challenge assumptions** - Don't accept requirements at face value
298
+ 6. **Explore alternatives** - Present options and trade-offs
299
+ 7. **Document decisions** - Capture why choices were made
300
+ 8. **Structured output** - Use the feature spec template consistently
301
+ 9. **Clear handoff** - Tell developer what to do next
217
302
 
218
303
 
219
304
  ## Common Feature Types
@@ -236,16 +321,21 @@ Follow these steps **IN ORDER** and **STOP after step 8**:
236
321
 
237
322
  ## Example Workflow
238
323
 
239
- 1. User runs: `/plan-feature`
240
- 2. Skill asks: "Please describe the feature you want to develop"
324
+ 1. User runs: `/5:plan-feature`
325
+ 2. Main agent asks: "Please describe the feature you want to develop"
241
326
  3. User: "I want to add emergency schedule tracking to products. It should allow marking products as emergency and setting a schedule window."
242
- 4. Skill extracts: Ticket ID `PROJ-1234` from branch `PROJ-1234-add-emergency-schedule`
243
- 5. Skill explores: Checks Product model, related components, existing scheduling infrastructure
244
- 6. Skill asks 8 informed questions about requirements, scope, validation, API, etc.
245
- 7. Skill challenges: "Could we reuse existing scheduling infrastructure instead of creating new one?"
246
- 8. Skill determines: Feature name `add-emergency-schedule`
247
- 9. Skill creates: `.5/PROJ-1234-add-emergency-schedule/feature.md`
248
- 10. Skill tells user: "✅ Feature spec created at `.5/PROJ-1234-add-emergency-schedule/feature.md`
327
+ 4. Main agent extracts: Ticket ID `PROJ-1234` from branch `PROJ-1234-add-emergency-schedule`
328
+ 5. **Main agent spawns Explore sub-agent** with feature description
329
+ 6. **Sub-agent returns report:** Found Product model at src/models/Product.ts, existing ScheduleService at src/services/ScheduleService.ts, similar pattern in src/models/Promotion.ts...
330
+ 7. Main agent asks Question 1: "Should emergency schedules support recurring patterns or just one-time windows?"
331
+ 8. User answers: "One-time for now, but we have the NotificationService that should trigger alerts"
332
+ 9. **Main agent spawns targeted Re-Explore** for NotificationService (wasn't in initial report)
333
+ 10. **Sub-agent returns:** Found NotificationService at src/services/NotificationService.ts with event-based triggers...
334
+ 11. Main agent continues Q&A with better context about notifications
335
+ 12. Main agent challenges: "The sub-agent found existing ScheduleService - could we reuse it instead of creating new scheduling infrastructure?"
336
+ 13. Main agent determines: Feature name `add-emergency-schedule`
337
+ 14. Main agent creates: `.5/features/PROJ-1234-add-emergency-schedule/feature.md` using Write tool
338
+ 15. Main agent tells user: "✅ Feature spec created at `.5/features/PROJ-1234-add-emergency-schedule/feature.md`
249
339
 
250
340
  **Next steps:**
251
341
  1. Review the feature spec
@@ -1,26 +1,71 @@
1
1
  ---
2
2
  name: 5:plan-implementation
3
3
  description: Creates an implementation plan from a feature spec. Phase 2 of the 5-phase workflow.
4
- allowed-tools: Read, Glob, Grep, Task, AskUserQuestion, Write
4
+ allowed-tools: Bash, Read, Write, Task, AskUserQuestion
5
5
  context: fork
6
6
  user-invocable: true
7
7
  ---
8
8
 
9
9
  # Plan Implementation (Phase 2)
10
10
 
11
+ ## Prerequisites Check
12
+
13
+ **CRITICAL: Check for configuration before proceeding**
14
+
15
+ ```bash
16
+ if [ ! -f ".claude/.5/config.json" ]; then
17
+ echo "❌ Configuration not found"
18
+ echo ""
19
+ echo "Please run /5:configure first to set up your project."
20
+ echo ""
21
+ echo "The configure command will:"
22
+ echo " • Detect your project type and build commands"
23
+ echo " • Set up ticket tracking conventions"
24
+ echo " • Generate documentation (CLAUDE.md)"
25
+ echo " • Create project-specific skills"
26
+ exit 1
27
+ fi
28
+ ```
29
+
30
+ **If config doesn't exist, STOP IMMEDIATELY. Do not proceed with the workflow.**
31
+
11
32
  Create an implementation plan that maps a feature spec to concrete components.
12
33
 
34
+ ## ⚠️ CRITICAL ARCHITECTURE
35
+
36
+ **This command uses a READ-ONLY sub-agent for codebase exploration.**
37
+
38
+ You (the main agent) orchestrate the process:
39
+ - You read ONLY `.5/{feature-name}/feature.md` using Read tool
40
+ - You spawn a read-only Explore agent to scan the codebase
41
+ - You receive findings from the sub-agent
42
+ - You ask 2-3 technical questions
43
+ - You write ONLY `.5/{feature-name}/plan.md` using Write tool
44
+
45
+ **The sub-agent CANNOT write files. It can only read and report.**
46
+
47
+ **YOU may only write to `.5/{feature-name}/plan.md` - NO other files.**
48
+
13
49
  ## Scope
14
50
 
15
51
  **This command creates the plan. It does NOT implement.**
16
52
 
17
53
  After creating the plan, tell the user to run `/5:implement-feature`.
18
54
 
55
+ ## ❌ Boundaries
56
+
57
+ - ❌ **Do NOT read source code files directly** - Use Explore sub-agent
58
+ - ❌ **Do NOT write any file except plan.md** - No source code, no other files
59
+ - ❌ **Do NOT start implementation** - That's Phase 3
60
+ - ❌ **Do NOT write complete code in the plan** - Only describe WHAT to build
61
+
19
62
  ## Process
20
63
 
21
64
  ### Step 1: Load Feature Spec
22
65
 
23
- Read `.5/{feature-name}/feature.md` (where `{feature-name}` is the argument provided).
66
+ Read `.5/features/{feature-name}/feature.md` (where `{feature-name}` is the argument provided).
67
+
68
+ **This is the ONLY file you may read directly.**
24
69
 
25
70
  Extract:
26
71
  - Ticket ID
@@ -30,14 +75,36 @@ Extract:
30
75
 
31
76
  If the file doesn't exist, tell the user to run `/5:plan-feature` first.
32
77
 
33
- ### Step 2: Quick Codebase Scan
78
+ ### Step 2: Spawn Read-Only Explore Agent for Codebase Scan
79
+
80
+ **CRITICAL: Delegate ALL codebase exploration to a sub-agent.**
34
81
 
35
- Understand the project structure:
36
- - Use Glob to find source directories
37
- - Identify where similar components live (models, services, controllers, tests)
38
- - Note naming conventions from existing files
82
+ Spawn a Task with `subagent_type=Explore` with the following prompt:
39
83
 
40
- This is a quick scan, not deep analysis. The executor agent will do detailed pattern matching.
84
+ ```
85
+ Quick codebase scan for implementation planning.
86
+
87
+ **Feature:** {one-line summary from feature.md}
88
+ **Affected Components:** {list from feature.md}
89
+
90
+ **Your Task:**
91
+ 1. Find source directories and understand project structure
92
+ 2. Identify where similar components live (models, services, controllers, tests)
93
+ 3. Note naming conventions from existing files
94
+ 4. Find example files that can serve as patterns for new components
95
+
96
+ **Report Format:**
97
+ Return a structured report with:
98
+ - Project structure (key directories)
99
+ - Naming conventions observed
100
+ - Pattern files for each component type (e.g., "services follow pattern in src/services/UserService.ts")
101
+ - Where new files should be placed
102
+
103
+ **IMPORTANT:** This is a QUICK scan, not deep analysis. Focus on structure and patterns.
104
+ **READ-ONLY:** Only use Read, Glob, and Grep tools.
105
+ ```
106
+
107
+ **Wait for the sub-agent to return its findings before proceeding.**
41
108
 
42
109
  ### Step 3: Ask 2-3 Technical Questions (ONE AT A TIME)
43
110
 
@@ -54,11 +121,34 @@ Keep it brief. Don't over-question. Don't ask feature questions already answered
54
121
 
55
122
  - **ONE question at a time** - wait for answer before next question
56
123
  - Do NOT list multiple questions in one message
57
- - Do NOT skip to creating plan.md before asking your questions
124
+ - Do NOT skip to creating plan.md before asking your questions
125
+
126
+ #### Step 3b: Optional Targeted Re-Exploration
127
+
128
+ If during Q&A the user mentions specific patterns, files, or conventions not covered in the initial scan, you MAY spawn additional targeted Explore agents.
129
+
130
+ **When to trigger:**
131
+ - User mentions a specific file as a pattern to follow
132
+ - User asks about a component not in the initial report
133
+ - Understanding a specific pattern is critical for the plan
134
+
135
+ **How to re-explore:**
136
+
137
+ ```
138
+ Targeted scan for implementation planning.
139
+
140
+ **Context:** User mentioned {specific pattern/file/convention}.
141
+
142
+ **Task:** Find and analyze {specific target} to understand the pattern.
143
+
144
+ **Report:** How this pattern works and how to apply it.
145
+
146
+ **READ-ONLY:** Only use Read, Glob, and Grep tools.
147
+ ```
58
148
 
59
149
  ### Step 4: Design Components
60
150
 
61
- Based on the feature spec and codebase scan, identify:
151
+ Based on the feature spec and sub-agent's codebase scan, identify:
62
152
  - What files need to be created
63
153
  - What files need to be modified
64
154
  - The order of implementation (dependencies)
@@ -73,7 +163,9 @@ Not every feature needs all steps. Use what makes sense.
73
163
 
74
164
  ### Step 5: Write the Plan
75
165
 
76
- Create a single file at `.5/{feature-name}/plan.md`:
166
+ Create a single file at `.5/features/{feature-name}/plan.md`:
167
+
168
+ **THIS IS THE ONLY FILE YOU MAY WRITE.**
77
169
 
78
170
  ```markdown
79
171
  ---
@@ -134,7 +226,7 @@ created: {ISO-timestamp}
134
226
 
135
227
  Tell the user:
136
228
  ```
137
- Plan created at `.5/{feature-name}/plan.md`
229
+ Plan created at `.5/features/{feature-name}/plan.md`
138
230
 
139
231
  {N} components across {M} steps.
140
232
 
@@ -143,6 +235,23 @@ Review the plan, then:
143
235
  2. Run `/5:implement-feature {feature-name}`
144
236
  ```
145
237
 
238
+ **🛑 STOP HERE. YOUR JOB IS COMPLETE. DO NOT PROCEED TO IMPLEMENTATION.**
239
+
240
+ ## Example Workflow
241
+
242
+ 1. User runs: `/5:plan-implementation PROJ-1234-add-emergency-schedule`
243
+ 2. Main agent reads: `.5/features/PROJ-1234-add-emergency-schedule/feature.md`
244
+ 3. **Main agent spawns Explore sub-agent** for codebase scan
245
+ 4. **Sub-agent returns:** Project uses src/{models,services,controllers}, services follow UserService.ts pattern...
246
+ 5. Main agent asks: "Should the schedule validation be in the service or a separate validator?"
247
+ 6. User: "In the service, like we do in OrderService"
248
+ 7. **Main agent spawns targeted Re-Explore** for OrderService pattern
249
+ 8. Main agent asks one more question about testing approach
250
+ 9. Main agent creates: `.5/features/PROJ-1234-add-emergency-schedule/plan.md`
251
+ 10. Main agent tells user the plan is ready and to run `/5:implement-feature`
252
+
253
+ **🛑 COMMAND COMPLETE.**
254
+
146
255
  ## Example Plan
147
256
 
148
257
  ```markdown
@@ -215,8 +324,9 @@ Components in the same step run in parallel. Structure your plan accordingly:
215
324
  - Don't write complete code in the plan
216
325
  - Don't spend time on "haiku-ready prompts"
217
326
  - Don't create multiple plan files (meta.md, step-N.md, etc.)
218
- - Don't over-analyze the codebase - the executor will do detailed pattern matching
327
+ - Don't read source code directly - use Explore sub-agent
219
328
  - Don't ask more than 3 questions
220
329
  - Don't create unnecessary sequential steps - group independent work together
221
330
  - **Don't skip to implementation** - This command ONLY creates the plan
222
331
  - **Don't batch questions** - Ask one question at a time
332
+ - **Don't write any file except plan.md** - No source code files
@@ -8,6 +8,27 @@ user-invocable: true
8
8
 
9
9
  # Quick Implement
10
10
 
11
+ ## Prerequisites Check
12
+
13
+ **CRITICAL: Check for configuration before proceeding**
14
+
15
+ ```bash
16
+ if [ ! -f ".claude/.5/config.json" ]; then
17
+ echo "❌ Configuration not found"
18
+ echo ""
19
+ echo "Please run /5:configure first to set up your project."
20
+ echo ""
21
+ echo "The configure command will:"
22
+ echo " • Detect your project type and build commands"
23
+ echo " • Set up ticket tracking conventions"
24
+ echo " • Generate documentation (CLAUDE.md)"
25
+ echo " • Create project-specific skills"
26
+ exit 1
27
+ fi
28
+ ```
29
+
30
+ **If config doesn't exist, STOP IMMEDIATELY. Do not proceed with the workflow.**
31
+
11
32
  Fast path for small, well-understood tasks (1-5 files). Skips extensive planning phases but preserves state tracking and skill-based implementation.
12
33
 
13
34
  ## ⚠️ CRITICAL SCOPE CONSTRAINT
@@ -30,7 +51,7 @@ Your job is NOT:
30
51
  ❌ Skip clarifying questions if unclear
31
52
  ❌ Skip state file updates
32
53
  ❌ Create feature spec files (use full workflow)
33
- ❌ Commit changes (user handles this)
54
+ ❌ Commit without config - Only commit if git.autoCommit is enabled
34
55
 
35
56
  **This is a FAST PATH for well-understood, small tasks. For anything complex, use the full workflow.**
36
57
 
@@ -42,7 +63,7 @@ Your job is NOT:
42
63
  - ❌ **Skip clarifying questions** - If implementation is unclear, ask first
43
64
  - ❌ **Skip state updates** - State file updates are MANDATORY
44
65
  - ❌ **Create feature specs** - This is for quick tasks, not full features
45
- - ❌ **Auto-commit** - User handles commits
66
+ - ❌ **Commit without config** - Only commit if git.autoCommit is enabled
46
67
  - ❌ **Skip plan approval** - Always show plan and get user approval first
47
68
 
48
69
  **If the task involves more than 5 files or multiple domains, STOP and recommend the full workflow instead.**
@@ -58,7 +79,7 @@ Use AskUserQuestion:
58
79
 
59
80
  Store as `$DESCRIPTION`.
60
81
 
61
- ### Step 2: Extract Ticket ID
82
+ ### Step 2: Extract Ticket ID and Load Config
62
83
 
63
84
  ```bash
64
85
  git branch --show-current
@@ -66,6 +87,10 @@ git branch --show-current
66
87
 
67
88
  Extract ticket ID using configurable pattern from config (e.g., `PROJ-\d+` or `\d+`). If not found, ask developer.
68
89
 
90
+ Also read `.claude/.5/config.json` and extract:
91
+ - `git.autoCommit` (boolean, default `false`)
92
+ - `git.commitMessage.pattern` (string, default `{ticket-id} {short-description}`)
93
+
69
94
  ### Step 3: Generate Identifiers
70
95
 
71
96
  ```bash
@@ -88,7 +113,7 @@ feature_name="${TICKET_ID}-${slug}"
88
113
 
89
114
  ### Step 5: Create Plan
90
115
 
91
- Write plan to `.5/${feature_name}/plan.md` using the template structure.
116
+ Write plan to `.5/features/${feature_name}/plan.md` using the template structure.
92
117
 
93
118
  **Template Reference:** Use the structure from `.claude/templates/workflow/QUICK-PLAN.md`
94
119
 
@@ -130,7 +155,7 @@ Use AskUserQuestion:
130
155
 
131
156
  **CRITICAL**: You MUST create the state file before starting implementation. This enables resumability if work is interrupted.
132
157
 
133
- Create state file at `.5/${feature_name}/state.json` using Write tool:
158
+ Create state file at `.5/features/${feature_name}/state.json` using Write tool:
134
159
 
135
160
  ```json
136
161
  {
@@ -247,6 +272,32 @@ Skill tool call:
247
272
  args: "{affected test modules}"
248
273
  ```
249
274
 
275
+ ### Step 9b: Auto-Commit (if enabled)
276
+
277
+ Only fires if `git.autoCommit: true` AND build passed in Step 9.
278
+
279
+ Creates a **single commit** for all components (not per-component — quick-implement is for small tasks):
280
+
281
+ 1. Stage **only** the specific files from the plan's components (never `git add .`)
282
+ 2. Commit using the configured `git.commitMessage.pattern`:
283
+ - `{ticket-id}` → ticket ID
284
+ - `{short-description}` → auto-generated summary (imperative mood, max 50 chars for full first line)
285
+ - Body: one bullet per component
286
+
287
+ ```bash
288
+ # Stage only specific files
289
+ git add {file-1} {file-2} ...
290
+
291
+ # Commit with configured pattern + body
292
+ git commit -m "{ticket-id} {short-description}
293
+
294
+ - {concise change 1}
295
+ - {concise change 2}"
296
+ ```
297
+
298
+ 3. If commit fails → log warning, record in `state.json`, continue
299
+ 4. If build failed in Step 9 → skip commit entirely
300
+
250
301
  ### Step 10: Update State and Report (MANDATORY)
251
302
 
252
303
  **CRITICAL**: You MUST update the state file to mark completion.
@@ -282,10 +333,14 @@ Components created/modified:
282
333
 
283
334
  Build: Success
284
335
  Tests: {Success | Skipped}
336
+ {If git.autoCommit was true: "Commit: {Success | Failed | Skipped (build failed)}"}
285
337
 
286
- State: .5/${feature_name}/state.json
338
+ State: .5/features/${feature_name}/state.json
287
339
 
288
340
  Next steps:
341
+ {If auto-commit fired successfully:}
342
+ 1. For a new task, run `/clear` before starting
343
+ {If auto-commit not enabled or commit skipped:}
289
344
  1. Review and commit changes
290
345
  2. For a new task, run `/clear` before starting
291
346
  ```