5-phase-workflow 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +332 -0
  2. package/bin/install.js +408 -0
  3. package/docs/workflow-guide.md +1024 -0
  4. package/package.json +34 -0
  5. package/src/agents/integration-agent.md +219 -0
  6. package/src/agents/review-processor.md +160 -0
  7. package/src/agents/step-executor.md +108 -0
  8. package/src/agents/step-fixer.md +132 -0
  9. package/src/agents/step-verifier.md +125 -0
  10. package/src/agents/verification-agent.md +411 -0
  11. package/src/commands/5/configure.md +309 -0
  12. package/src/commands/5/discuss-feature.md +393 -0
  13. package/src/commands/5/implement-feature.md +502 -0
  14. package/src/commands/5/plan-feature.md +285 -0
  15. package/src/commands/5/plan-implementation.md +376 -0
  16. package/src/commands/5/quick-implement.md +263 -0
  17. package/src/commands/5/review-code.md +583 -0
  18. package/src/commands/5/verify-implementation.md +277 -0
  19. package/src/hooks/statusline.js +53 -0
  20. package/src/settings.json +6 -0
  21. package/src/skills/build-project/SKILL.md +277 -0
  22. package/src/skills/configure-project/SKILL.md +355 -0
  23. package/src/skills/generate-readme/EXAMPLES.md +168 -0
  24. package/src/skills/generate-readme/SKILL.md +123 -0
  25. package/src/skills/generate-readme/TEMPLATE.md +141 -0
  26. package/src/skills/run-tests/SKILL.md +365 -0
  27. package/src/templates/ARCHITECTURE.md +64 -0
  28. package/src/templates/CONCERNS.md +75 -0
  29. package/src/templates/CONVENTIONS.md +75 -0
  30. package/src/templates/INTEGRATIONS.md +65 -0
  31. package/src/templates/STACK.md +60 -0
  32. package/src/templates/STRUCTURE.md +60 -0
  33. package/src/templates/TESTING.md +107 -0
@@ -0,0 +1,263 @@
1
+ ---
2
+ name: 5:quick-implement
3
+ description: Execute small, focused implementations quickly with state tracking and atomic commits. Skips extensive planning phases and verification agents - use for tasks where you know exactly what to do.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Task, AskUserQuestion, Skill, mcp__jetbrains__*
5
+ context: fork
6
+ user-invocable: true
7
+ ---
8
+
9
+ # Quick Implement
10
+
11
+ Fast path for small, well-understood tasks (1-5 files). Skips extensive planning phases but preserves state tracking and skill-based implementation.
12
+
13
+ ## Process
14
+
15
+ ### Step 1: Get Task Description
16
+
17
+ Use AskUserQuestion:
18
+ - Question: "What do you want to implement?"
19
+ - Header: "Quick Task"
20
+ - Free text response
21
+
22
+ Store as `$DESCRIPTION`.
23
+
24
+ ### Step 2: Extract Ticket ID
25
+
26
+ ```bash
27
+ git branch --show-current
28
+ ```
29
+
30
+ Extract ticket ID using configurable pattern from config (e.g., `PROJ-\d+` or `\d+`). If not found, ask developer.
31
+
32
+ ### Step 3: Generate Identifiers
33
+
34
+ ```bash
35
+ slug=$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-40)
36
+ feature_name="${TICKET_ID}-${slug}"
37
+ ```
38
+
39
+ ### Step 4: Analyze and Plan
40
+
41
+ 1. **Identify affected files** using Glob and Grep
42
+ 2. **Determine skills needed** based on task type
43
+ 3. **List components** (max 5 for quick mode)
44
+
45
+ **If unclear about implementation details**, ask 2-3 focused questions using AskUserQuestion:
46
+ - What validation rules apply?
47
+ - Which existing patterns to follow?
48
+ - Any edge cases to handle?
49
+
50
+ ### Step 5: Create Plan
51
+
52
+ Write plan to `.5/${feature_name}/plan.md`:
53
+
54
+ ```markdown
55
+ # Quick Implementation: ${TICKET_ID}
56
+
57
+ ## Task
58
+ ${DESCRIPTION}
59
+
60
+ ## Components
61
+
62
+ | # | Type | Name | Skill | Module |
63
+ |---|------|------|-------|--------|
64
+ | 1 | {type} | {name} | {skill} | {module} |
65
+
66
+ ## Affected Modules
67
+ - {module-1}
68
+ - {module-2}
69
+
70
+ ## Execution
71
+ {parallel | sequential | direct}
72
+ ```
73
+
74
+ ### Step 6: Present Plan and Iterate
75
+
76
+ Show plan to user:
77
+ ```
78
+ Quick implementation plan for ${TICKET_ID}:
79
+
80
+ Components:
81
+ 1. {type}: {name} ({skill})
82
+ 2. ...
83
+
84
+ Affected modules: {modules}
85
+
86
+ Ready to implement, or would you like changes?
87
+ ```
88
+
89
+ Use AskUserQuestion:
90
+ - Question: "How would you like to proceed?"
91
+ - Header: "Plan"
92
+ - Options:
93
+ - "Proceed with implementation (Recommended)"
94
+ - "I have changes to the plan"
95
+
96
+ **If user selects "I have changes":**
97
+ - Ask what changes they want
98
+ - Update the plan accordingly
99
+ - Present again until user approves
100
+
101
+ ### Step 7: Initialize State (MANDATORY)
102
+
103
+ **CRITICAL**: You MUST create the state file before starting implementation. This enables resumability if work is interrupted.
104
+
105
+ Create state file at `.5/${feature_name}/state.json` using Write tool:
106
+
107
+ ```json
108
+ {
109
+ "ticketId": "${TICKET_ID}",
110
+ "featureName": "${feature_name}",
111
+ "phase": "quick-implementation",
112
+ "status": "in-progress",
113
+ "currentWave": 1,
114
+ "totalWaves": 1,
115
+ "completedComponents": [],
116
+ "pendingComponents": [/* from plan */],
117
+ "failedAttempts": [],
118
+ "verificationResults": {},
119
+ "startedAt": "{ISO timestamp}",
120
+ "lastUpdated": "{ISO timestamp}"
121
+ }
122
+ ```
123
+
124
+ **After creating the file:**
125
+ 1. Use Read tool to verify the file was written correctly
126
+ 2. Report to user: "State tracking initialized"
127
+ 3. If file creation fails, stop and report error
128
+
129
+ ### Step 8: Execute Implementation
130
+
131
+ **Decision criteria for execution approach:**
132
+
133
+ - **Direct execution** (1-2 components, simple edits): Execute skills directly in current context
134
+ - **Step-executor** (3+ components or complex work): Spawn step-executor agent
135
+
136
+ #### Direct Execution
137
+
138
+ For each component:
139
+ 1. Invoke appropriate skill using Skill tool
140
+ 2. **Update state file after each component** (MANDATORY):
141
+ - Read current state file
142
+ - Move component from `pendingComponents` to `completedComponents`
143
+ - Update `lastUpdated` timestamp
144
+ - Write back to state file
145
+ - Verify write succeeded
146
+ 3. Track created/modified files
147
+
148
+ #### Step-Executor Delegation
149
+
150
+ Read `.claude/agents/step-executor.md` and spawn:
151
+
152
+ ```
153
+ Task tool call:
154
+ subagent_type: step-executor
155
+ description: "Execute quick implementation for ${feature_name}"
156
+ prompt: |
157
+ {Contents of step-executor.md}
158
+
159
+ ---
160
+
161
+ ## Your Task
162
+
163
+ Feature: ${feature_name}
164
+ Components:
165
+ {component list from plan with full skill prompts}
166
+
167
+ Execution mode: {parallel | sequential}
168
+ ```
169
+
170
+ Process results and **update state file** (MANDATORY):
171
+ - Read current state file
172
+ - Move completed components from `pendingComponents` to `completedComponents`
173
+ - Record any failures in `failedAttempts`
174
+ - Update `lastUpdated` timestamp
175
+ - Write back to state file
176
+ - Verify write succeeded
177
+
178
+ ### Step 9: Verification
179
+
180
+ Run build verification if a build skill is configured:
181
+
182
+ **If build skill is available:**
183
+ ```
184
+ Skill tool call:
185
+ skill: "{configured-build-skill}"
186
+ ```
187
+
188
+ **If build fails:**
189
+ 1. Analyze error
190
+ 2. Attempt fix (max 2 retries)
191
+ 3. Re-run build
192
+ 4. If still failing, report to user
193
+
194
+ **If tests are affected and test skill is available:**
195
+
196
+ ```
197
+ Skill tool call:
198
+ skill: "{configured-test-skill}"
199
+ args: "{affected test modules}"
200
+ ```
201
+
202
+ ### Step 10: Update State and Report (MANDATORY)
203
+
204
+ **CRITICAL**: You MUST update the state file to mark completion.
205
+
206
+ 1. **Read current state file**
207
+ 2. **Update to completed status**:
208
+ ```json
209
+ {
210
+ "status": "completed",
211
+ "phase": "completed",
212
+ "verificationResults": {
213
+ "buildStatus": "success",
214
+ "testStatus": "success | skipped",
215
+ "timestamp": "{ISO timestamp}"
216
+ },
217
+ "completedAt": "{ISO timestamp}",
218
+ "lastUpdated": "{ISO timestamp}"
219
+ }
220
+ ```
221
+ 3. **Write back using Write tool**
222
+ 4. **Verify the update** by reading file again
223
+
224
+ Report to user:
225
+
226
+ ```
227
+ Quick implementation complete!
228
+
229
+ ${TICKET_ID}: ${DESCRIPTION}
230
+
231
+ Components created/modified:
232
+ - {file1}
233
+ - {file2}
234
+
235
+ Build: Success
236
+ Tests: {Success | Skipped}
237
+
238
+ State: .5/${feature_name}/state.json
239
+ ```
240
+
241
+ ## Skill Mappings
242
+
243
+ Skills are project-specific and should be configured in your project's `.claude/skills/` directory. Common patterns include:
244
+
245
+ | Component Type | Example Skill |
246
+ |---------------|---------------|
247
+ | Data models | Project-specific model skill |
248
+ | Validation logic | Project-specific validator skill |
249
+ | Data access | Project-specific repository skill |
250
+ | Business logic | Project-specific handler/service skill |
251
+ | API endpoints | Project-specific endpoint skill |
252
+ | Tests | Project-specific test skill |
253
+ | Simple edits | Edit tool directly |
254
+
255
+ ## DO NOT
256
+
257
+ - DO NOT use for complex features (6+ files, multiple domains)
258
+ - DO NOT skip clarifying questions if implementation is unclear
259
+ - **DO NOT skip state file updates** (breaks resumability)
260
+ - **DO NOT skip state file initialization** (Step 7 is mandatory)
261
+ - **DO NOT skip state file completion update** (Step 10 is mandatory)
262
+ - DO NOT create feature spec files (use full workflow for that)
263
+ - DO NOT commit changes (user handles this)