devflow-kit 0.6.1 β 0.8.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.
- package/CHANGELOG.md +64 -0
- package/README.md +83 -16
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -4
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/src/claude/agents/devflow/audit-performance.md +1 -1
- package/src/claude/agents/devflow/audit-security.md +1 -1
- package/src/claude/agents/devflow/brainstorm.md +279 -0
- package/src/claude/agents/devflow/catch-up.md +3 -6
- package/src/claude/agents/devflow/code-review.md +307 -0
- package/src/claude/agents/devflow/commit.md +3 -5
- package/src/claude/agents/devflow/debug.md +2 -1
- package/src/claude/agents/devflow/design.md +491 -0
- package/src/claude/agents/devflow/pr-comments.md +285 -0
- package/src/claude/agents/devflow/tech-debt.md +338 -0
- package/src/claude/commands/devflow/brainstorm.md +68 -0
- package/src/claude/commands/devflow/breakdown.md +125 -0
- package/src/claude/commands/devflow/code-review.md +152 -346
- package/src/claude/commands/devflow/commit.md +8 -19
- package/src/claude/commands/devflow/design.md +82 -0
- package/src/claude/commands/devflow/devlog.md +2 -3
- package/src/claude/commands/devflow/implement.md +50 -457
- package/src/claude/commands/devflow/plan.md +133 -395
- package/src/claude/skills/devflow/research/SKILL.md +36 -33
- package/src/claude/agents/devflow/research.md +0 -609
- package/src/claude/commands/devflow/plan-next-steps.md +0 -212
- package/src/claude/commands/devflow/research.md +0 -51
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Task
|
|
3
|
+
description: Create detailed implementation design with integration points and edge cases - use '/design [feature description]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Your task
|
|
7
|
+
|
|
8
|
+
Launch the `design` sub-agent to create a detailed implementation design for: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
If no arguments provided, use the previous discussion context to infer the feature, or prompt the user for the feature to design.
|
|
11
|
+
|
|
12
|
+
### Design Process
|
|
13
|
+
|
|
14
|
+
The design agent will:
|
|
15
|
+
|
|
16
|
+
1. **Analyze Existing Patterns** - Study code style, architecture, and reusable components
|
|
17
|
+
2. **Map Integration Points** - Identify all places new feature touches existing code
|
|
18
|
+
3. **Handle Edge Cases** - Surface non-obvious scenarios and error conditions
|
|
19
|
+
4. **Avoid Duplication** - Find existing code to reuse instead of recreating
|
|
20
|
+
5. **Create Implementation Plan** - Step-by-step guide with file references
|
|
21
|
+
|
|
22
|
+
### Next: Present Implementation Design
|
|
23
|
+
|
|
24
|
+
After the sub-agent completes, present a concise summary to the user:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
π¨ DESIGN COMPLETE: $ARGUMENTS
|
|
28
|
+
|
|
29
|
+
## π IMPLEMENTATION OVERVIEW
|
|
30
|
+
|
|
31
|
+
{High-level summary of the design}
|
|
32
|
+
|
|
33
|
+
## π INTEGRATION POINTS
|
|
34
|
+
|
|
35
|
+
{Where this connects to existing code}
|
|
36
|
+
- {module/file}: {what needs updating}
|
|
37
|
+
- {module/file}: {what needs updating}
|
|
38
|
+
|
|
39
|
+
## π― CORE COMPONENTS
|
|
40
|
+
|
|
41
|
+
{New code to create}
|
|
42
|
+
1. {component}: {purpose and location}
|
|
43
|
+
2. {component}: {purpose and location}
|
|
44
|
+
|
|
45
|
+
## β οΈ EDGE CASES HANDLED
|
|
46
|
+
|
|
47
|
+
{Non-obvious scenarios to account for}
|
|
48
|
+
- {scenario}: {how to handle}
|
|
49
|
+
- {scenario}: {how to handle}
|
|
50
|
+
|
|
51
|
+
## β»οΈ CODE REUSE OPPORTUNITIES
|
|
52
|
+
|
|
53
|
+
{Existing code to leverage}
|
|
54
|
+
- {file:function}: {what it does, how to use}
|
|
55
|
+
|
|
56
|
+
## π IMPLEMENTATION STEPS
|
|
57
|
+
|
|
58
|
+
{Ordered sequence to implement}
|
|
59
|
+
1. {step with file references}
|
|
60
|
+
2. {step with file references}
|
|
61
|
+
|
|
62
|
+
## π§ͺ TESTING STRATEGY
|
|
63
|
+
|
|
64
|
+
{How to test this implementation}
|
|
65
|
+
|
|
66
|
+
π Full design document available from sub-agent output above
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
π‘ **Usage Examples**:
|
|
70
|
+
- `/design user authentication with JWT`
|
|
71
|
+
- `/design file upload with validation`
|
|
72
|
+
- `/design real-time sync engine`
|
|
73
|
+
- `/design search with filters and pagination`
|
|
74
|
+
|
|
75
|
+
**When to use `/brainstorm` vs `/design`**:
|
|
76
|
+
- **Brainstorm** = "What approach should we take?" (architecture decisions)
|
|
77
|
+
- **Design** = "How should we implement it?" (detailed implementation plan)
|
|
78
|
+
|
|
79
|
+
**Typical workflow**:
|
|
80
|
+
1. `/brainstorm` - Explore approaches and make design decisions
|
|
81
|
+
2. `/design` - Create detailed implementation plan based on chosen approach
|
|
82
|
+
3. `/implement` - Execute the plan with continuous user interaction
|
|
@@ -117,9 +117,8 @@ Combine with session context:
|
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
119
|
# Get timestamp
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
TIMESTAMP="${DATE}_${TIME}"
|
|
120
|
+
TIMESTAMP=$(date +%Y-%m-%d_%H%M)
|
|
121
|
+
DATE=$(date +"%Y-%m-%d")
|
|
123
122
|
PROJECT_NAME=$(basename $(pwd))
|
|
124
123
|
```
|
|
125
124
|
|
|
@@ -1,507 +1,100 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: TodoWrite, Read, Write, Edit, AskUserQuestion, Bash, Grep, Glob
|
|
3
|
-
description:
|
|
3
|
+
description: Implement pending todos efficiently with minimal interruption
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Your task
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Philosophy**: Pair programming with AI - you decide priorities and provide clarification, I implement with your guidance.
|
|
8
|
+
Implement all pending todos from the todo list. Flow through each task to completion, only stopping for genuine design decisions that require user input.
|
|
11
9
|
|
|
12
10
|
---
|
|
13
11
|
|
|
14
|
-
## Step 1: Load
|
|
15
|
-
|
|
16
|
-
Get the current todo list and show it to the user:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
Fetch current todos using TodoWrite to get state.
|
|
20
|
-
```
|
|
12
|
+
## Step 1: Load Pending Todos
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
Get current todos and display pending work:
|
|
23
15
|
|
|
24
16
|
```markdown
|
|
25
|
-
π **
|
|
26
|
-
|
|
27
|
-
### π In Progress ({count})
|
|
28
|
-
- {todo 1}
|
|
29
|
-
- {todo 2}
|
|
30
|
-
|
|
31
|
-
### β³ Pending ({count})
|
|
32
|
-
- {todo 1}
|
|
33
|
-
- {todo 2}
|
|
34
|
-
- {todo 3}
|
|
35
|
-
|
|
36
|
-
### β
Completed ({count})
|
|
37
|
-
- {todo 1}
|
|
38
|
-
- {todo 2}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If no pending or in-progress todos:
|
|
42
|
-
```
|
|
43
|
-
No todos found. Run /plan-next-steps to create actionable tasks, or use TodoWrite to add tasks manually.
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Step 2: Todo Triage
|
|
49
|
-
|
|
50
|
-
Use AskUserQuestion to let the user manage their todo list:
|
|
51
|
-
|
|
52
|
-
**Question 1: Remove unnecessary todos?**
|
|
53
|
-
```
|
|
54
|
-
header: "Remove todos"
|
|
55
|
-
question: "Are there any todos you want to remove from the list?"
|
|
56
|
-
multiSelect: true
|
|
57
|
-
options: [List all pending/in-progress todos]
|
|
58
|
-
```
|
|
17
|
+
π **Implementing {N} todos**
|
|
59
18
|
|
|
60
|
-
|
|
19
|
+
{List each pending todo}
|
|
61
20
|
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
header: "Defer todos"
|
|
65
|
-
question: "Any todos you want to discuss/plan later instead of implementing now?"
|
|
66
|
-
multiSelect: true
|
|
67
|
-
options: [List remaining pending/in-progress todos]
|
|
21
|
+
Starting implementation...
|
|
68
22
|
```
|
|
69
23
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
**Question 3: Prioritize implementation order**
|
|
24
|
+
If no pending todos:
|
|
73
25
|
```
|
|
74
|
-
|
|
75
|
-
question: "Which todo should we implement FIRST?"
|
|
76
|
-
multiSelect: false
|
|
77
|
-
options: [List remaining pending/in-progress todos with complexity indicators]
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Reorder todos based on selection. Present final implementation queue:
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
π― **Implementation Queue**
|
|
84
|
-
|
|
85
|
-
1. {todo 1} - {complexity: Simple/Medium/Complex}
|
|
86
|
-
2. {todo 2} - {complexity}
|
|
87
|
-
3. {todo 3} - {complexity}
|
|
88
|
-
|
|
89
|
-
Total: {count} todos to implement
|
|
26
|
+
No pending todos. Use /breakdown or /plan to create tasks.
|
|
90
27
|
```
|
|
91
28
|
|
|
92
29
|
---
|
|
93
30
|
|
|
94
|
-
## Step
|
|
31
|
+
## Step 2: Implementation Loop
|
|
95
32
|
|
|
96
|
-
For each todo
|
|
33
|
+
For each pending todo:
|
|
97
34
|
|
|
98
|
-
|
|
35
|
+
1. **Mark in_progress** using TodoWrite
|
|
99
36
|
|
|
100
|
-
**
|
|
101
|
-
- Is the task clear and specific?
|
|
102
|
-
- Are there multiple possible approaches?
|
|
103
|
-
- Is there missing context (file paths, specific requirements)?
|
|
37
|
+
2. **Find existing patterns** - Quick grep for similar implementations
|
|
104
38
|
|
|
105
|
-
**
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
39
|
+
3. **Implement** using Read/Edit/Write tools:
|
|
40
|
+
- Read relevant files
|
|
41
|
+
- Make changes following existing patterns
|
|
42
|
+
- Update imports/dependencies if needed
|
|
43
|
+
- Skills auto-validate (pattern-check, test-design, error-handling, code-smell)
|
|
109
44
|
|
|
110
|
-
|
|
45
|
+
4. **Ask for design decisions only when:**
|
|
46
|
+
- Multiple architectural approaches exist (event-driven vs REST, GraphQL vs REST API)
|
|
47
|
+
- Security/performance trade-off requires decision
|
|
48
|
+
- Framework/library choice impacts future development (Redux vs Context, Jest vs Vitest)
|
|
111
49
|
|
|
112
|
-
**
|
|
50
|
+
**Never ask for:**
|
|
51
|
+
- Which file to modify (infer from context)
|
|
52
|
+
- Standard implementation details (follow existing patterns)
|
|
53
|
+
- Obvious choices (use best practices)
|
|
113
54
|
|
|
114
|
-
|
|
115
|
-
header: "Clarification"
|
|
116
|
-
question: "For '{todo}': {specific question about the unclear aspect}?"
|
|
117
|
-
multiSelect: false
|
|
118
|
-
options: [
|
|
119
|
-
{option 1 with explanation},
|
|
120
|
-
{option 2 with explanation},
|
|
121
|
-
{option 3 with explanation}
|
|
122
|
-
]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Examples of when to ask**:
|
|
126
|
-
- Multiple valid approaches (REST vs GraphQL, Redux vs Context)
|
|
127
|
-
- Missing specifics (which file? which component?)
|
|
128
|
-
- Architectural decision needed (new pattern vs existing)
|
|
129
|
-
- Security/performance trade-off
|
|
130
|
-
|
|
131
|
-
**Examples of when NOT to ask**:
|
|
132
|
-
- Standard implementation (follow existing patterns)
|
|
133
|
-
- Clear from context
|
|
134
|
-
- Developer best judgment applies
|
|
135
|
-
|
|
136
|
-
**If user provides clarification**, update todo content with the decision and proceed.
|
|
55
|
+
5. **Mark completed** using TodoWrite
|
|
137
56
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
Before coding, quickly check:
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
# Find relevant existing code
|
|
144
|
-
grep -r "similar_pattern" --include="*.ts" --include="*.js" src/ | head -5
|
|
145
|
-
|
|
146
|
-
# Check for related files
|
|
147
|
-
find . -name "*related*" -type f | head -10
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Identify:
|
|
151
|
-
- **Files to modify**: List specific files
|
|
152
|
-
- **Existing patterns**: Reference similar code
|
|
153
|
-
- **Dependencies**: Any new imports needed
|
|
154
|
-
|
|
155
|
-
**Share plan** with user:
|
|
156
|
-
|
|
157
|
-
```markdown
|
|
158
|
-
π **Implementation Plan for**: {todo}
|
|
159
|
-
|
|
160
|
-
**Approach**: {chosen approach}
|
|
161
|
-
**Files to modify**:
|
|
162
|
-
- {file1} - {what changes}
|
|
163
|
-
- {file2} - {what changes}
|
|
164
|
-
|
|
165
|
-
**Pattern**: Following {existing pattern from file:line}
|
|
166
|
-
**Estimated complexity**: {Simple/Medium/Complex}
|
|
167
|
-
|
|
168
|
-
Proceeding with implementation...
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### 3.4 Implement
|
|
172
|
-
|
|
173
|
-
Implement the todo step-by-step:
|
|
174
|
-
|
|
175
|
-
1. **Read relevant files** using Read tool
|
|
176
|
-
2. **Make changes** using Edit or Write tool
|
|
177
|
-
3. **Follow existing patterns** (skills will auto-validate)
|
|
178
|
-
4. **Update imports/dependencies** if needed
|
|
179
|
-
5. **Verify changes** with quick grep/read
|
|
180
|
-
|
|
181
|
-
**During implementation**:
|
|
182
|
-
- Pattern-check skill auto-validates architecture
|
|
183
|
-
- Test-design skill auto-validates test quality
|
|
184
|
-
- Error-handling skill auto-validates Result types
|
|
185
|
-
- Code-smell skill detects anti-patterns
|
|
186
|
-
|
|
187
|
-
### 3.5 Pause for Unexpected Issues
|
|
188
|
-
|
|
189
|
-
If issues arise during implementation:
|
|
190
|
-
|
|
191
|
-
**Question: How to proceed?**
|
|
192
|
-
```
|
|
193
|
-
header: "Issue found"
|
|
194
|
-
question: "Found {issue description}. How should we proceed?"
|
|
195
|
-
multiSelect: false
|
|
196
|
-
options: [
|
|
197
|
-
{Approach 1 with trade-offs},
|
|
198
|
-
{Approach 2 with trade-offs},
|
|
199
|
-
{Defer this todo for later discussion}
|
|
200
|
-
]
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
If deferred, mark todo status and move to next.
|
|
204
|
-
|
|
205
|
-
### 3.6 Mark Complete
|
|
206
|
-
|
|
207
|
-
Once implemented successfully:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
# Update todo status
|
|
211
|
-
TodoWrite: Mark current todo as "completed"
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Brief confirmation**:
|
|
215
|
-
```
|
|
216
|
-
β
Completed: {todo}
|
|
217
|
-
Files modified: {list}
|
|
218
|
-
Pattern used: {pattern}
|
|
219
|
-
```
|
|
57
|
+
6. **Brief confirmation**: `β
{todo} - {files modified}`
|
|
220
58
|
|
|
221
59
|
Move to next todo.
|
|
222
60
|
|
|
223
61
|
---
|
|
224
62
|
|
|
225
|
-
## Step
|
|
63
|
+
## Step 3: Summary
|
|
226
64
|
|
|
227
|
-
After all todos
|
|
65
|
+
After all todos completed:
|
|
228
66
|
|
|
229
67
|
```markdown
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
### β
Completed ({count})
|
|
233
|
-
- {todo 1} - {files modified}
|
|
234
|
-
- {todo 2} - {files modified}
|
|
235
|
-
- {todo 3} - {files modified}
|
|
68
|
+
β
**Completed {N} todos**
|
|
236
69
|
|
|
237
|
-
|
|
238
|
-
- {todo 1} - {reason deferred}
|
|
239
|
-
- {todo 2} - {reason deferred}
|
|
240
|
-
|
|
241
|
-
### π Session Stats
|
|
242
|
-
- **Files modified**: {count}
|
|
243
|
-
- **Files created**: {count}
|
|
244
|
-
- **Pattern compliance**: {skills flagged X issues, addressed inline}
|
|
245
|
-
- **Time estimate**: {based on complexity}
|
|
246
|
-
|
|
247
|
-
### π Code Changes
|
|
248
|
-
|
|
249
|
-
{Brief summary of what was implemented}
|
|
250
|
-
|
|
251
|
-
### π Next Steps
|
|
252
|
-
|
|
253
|
-
**Immediate**:
|
|
254
|
-
- [ ] Run tests to verify implementations
|
|
255
|
-
- [ ] Review changed files: {list}
|
|
256
|
-
- [ ] Consider committing: `git add {files}` && `/commit`
|
|
257
|
-
|
|
258
|
-
**Deferred Todos**:
|
|
259
|
-
{If any todos were deferred, list them with notes}
|
|
260
|
-
|
|
261
|
-
**Recommended**:
|
|
262
|
-
- Run `/code-review` before committing for comprehensive quality check
|
|
263
|
-
- Use `/devlog` to document this implementation session
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Step 5: Recommend Next Action
|
|
269
|
-
|
|
270
|
-
Based on what was implemented:
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
π‘ **Recommended Next Action**:
|
|
274
|
-
|
|
275
|
-
{Smart recommendation based on context:}
|
|
276
|
-
|
|
277
|
-
- If major changes: "Run `/code-review` to ensure quality across all changes"
|
|
278
|
-
- If tests written: "Run test suite: `npm test` (or relevant command)"
|
|
279
|
-
- If ready to commit: "Review changes and use `/commit` to create atomic commit"
|
|
280
|
-
- If complex changes: "Use `/devlog` to document implementation decisions"
|
|
281
|
-
- If deferred todos: "Use `/plan-next-steps` to refine deferred todos"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## Best Practices
|
|
287
|
-
|
|
288
|
-
### When to Ask Questions
|
|
289
|
-
|
|
290
|
-
**DO ask when**:
|
|
291
|
-
- Multiple valid approaches with different trade-offs
|
|
292
|
-
- Missing critical context (which file, which approach)
|
|
293
|
-
- Architectural decision impacts future code
|
|
294
|
-
- Security or performance implications
|
|
295
|
-
- User preference matters
|
|
296
|
-
|
|
297
|
-
**DON'T ask when**:
|
|
298
|
-
- Following obvious existing pattern
|
|
299
|
-
- Developer best judgment applies
|
|
300
|
-
- Standard implementation approach
|
|
301
|
-
- Clear from todo description
|
|
302
|
-
- Existing codebase shows the way
|
|
303
|
-
|
|
304
|
-
### Smart Implementation
|
|
305
|
-
|
|
306
|
-
**Simple todos** (< 50 lines):
|
|
307
|
-
- Quick grep for patterns
|
|
308
|
-
- Implement directly
|
|
309
|
-
- Mark complete
|
|
310
|
-
|
|
311
|
-
**Medium todos** (50-150 lines):
|
|
312
|
-
- Analyze existing patterns
|
|
313
|
-
- Share plan with user
|
|
314
|
-
- Implement with pattern compliance
|
|
315
|
-
- Mark complete
|
|
316
|
-
|
|
317
|
-
**Complex todos** (> 150 lines):
|
|
318
|
-
- Break into smaller steps
|
|
319
|
-
- Check for clarification
|
|
320
|
-
- Implement incrementally
|
|
321
|
-
- Validate along the way
|
|
322
|
-
- Mark complete
|
|
323
|
-
|
|
324
|
-
### Quality Enforcement
|
|
325
|
-
|
|
326
|
-
**Let skills do their job**:
|
|
327
|
-
- pattern-check enforces Result types, DI, immutability
|
|
328
|
-
- test-design validates test quality
|
|
329
|
-
- error-handling ensures consistency
|
|
330
|
-
- code-smell detects anti-patterns
|
|
331
|
-
|
|
332
|
-
**Don't re-validate** what skills already check.
|
|
333
|
-
|
|
334
|
-
### User Interaction Style
|
|
335
|
-
|
|
336
|
-
**Be efficient**:
|
|
337
|
-
- Ask ONE question at a time (not multiple)
|
|
338
|
-
- Only ask when genuinely needed
|
|
339
|
-
- Provide clear options with trade-offs
|
|
340
|
-
- Recommend the best option
|
|
341
|
-
|
|
342
|
-
**Be transparent**:
|
|
343
|
-
- Share implementation plan before coding
|
|
344
|
-
- Explain pattern choices
|
|
345
|
-
- Report issues as they arise
|
|
346
|
-
- Keep user informed of progress
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## Example Session
|
|
70
|
+
Files modified: {list}
|
|
351
71
|
|
|
72
|
+
Next: Run /code-review (if major changes) or /commit
|
|
352
73
|
```
|
|
353
|
-
User: /implement
|
|
354
|
-
AI: Loading current todo list...
|
|
355
|
-
|
|
356
|
-
π **Current Todo List**
|
|
357
|
-
|
|
358
|
-
### β³ Pending (5)
|
|
359
|
-
- Add authentication middleware to API routes
|
|
360
|
-
- Write unit tests for user registration
|
|
361
|
-
- Update README with auth setup instructions
|
|
362
|
-
- Refactor error handling to use Result types
|
|
363
|
-
- Add rate limiting to public endpoints
|
|
364
|
-
|
|
365
|
-
[Shows AskUserQuestion: "Remove todos?"]
|
|
366
|
-
User: None
|
|
367
|
-
|
|
368
|
-
[Shows AskUserQuestion: "Defer todos?"]
|
|
369
|
-
User: "Update README" and "Add rate limiting"
|
|
370
|
-
|
|
371
|
-
[Shows AskUserQuestion: "Which todo first?"]
|
|
372
|
-
User: "Add authentication middleware"
|
|
373
|
-
|
|
374
|
-
AI: π― **Implementation Queue**
|
|
375
|
-
|
|
376
|
-
1. Add authentication middleware to API routes - Medium
|
|
377
|
-
2. Write unit tests for user registration - Simple
|
|
378
|
-
3. Refactor error handling to use Result types - Complex
|
|
379
|
-
|
|
380
|
-
Deferred for later:
|
|
381
|
-
- Update README with auth setup instructions
|
|
382
|
-
- Add rate limiting to public endpoints
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
AI: π **Implementation Plan for**: Add authentication middleware
|
|
387
|
-
|
|
388
|
-
Checking existing patterns...
|
|
389
|
-
Found similar auth pattern in src/middleware/cors.ts:12
|
|
390
|
-
|
|
391
|
-
**Approach**: Create JWT middleware following existing pattern
|
|
392
|
-
**Files to modify**:
|
|
393
|
-
- src/middleware/auth.ts (create new)
|
|
394
|
-
- src/routes/api.ts (add middleware)
|
|
395
|
-
|
|
396
|
-
**Pattern**: Following middleware pattern from cors.ts
|
|
397
|
-
**Estimated complexity**: Medium
|
|
398
|
-
|
|
399
|
-
Proceeding with implementation...
|
|
400
|
-
|
|
401
|
-
[AI implements the changes using Edit/Write tools]
|
|
402
|
-
[pattern-check skill auto-validates Result types]
|
|
403
|
-
[error-handling skill validates error handling]
|
|
404
|
-
|
|
405
|
-
β
Completed: Add authentication middleware to API routes
|
|
406
|
-
Files modified: src/middleware/auth.ts, src/routes/api.ts
|
|
407
|
-
Pattern used: Middleware pattern from cors.ts:12
|
|
408
74
|
|
|
409
75
|
---
|
|
410
76
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
[Question appears: "Testing library preference?"]
|
|
414
|
-
User: Select "Use existing Jest setup"
|
|
77
|
+
## Design Decision Guidelines
|
|
415
78
|
|
|
416
|
-
|
|
417
|
-
|
|
79
|
+
**DO ask when:**
|
|
80
|
+
- Architectural choice impacts future codebase structure
|
|
81
|
+
- Security vs performance decision with real trade-offs
|
|
82
|
+
- Multiple valid framework/library options exist
|
|
418
83
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
84
|
+
**DON'T ask when:**
|
|
85
|
+
- Existing pattern is obvious from codebase
|
|
86
|
+
- Standard implementation applies (CRUD, validation, tests)
|
|
87
|
+
- File location clear from context
|
|
88
|
+
- Best practices provide the answer
|
|
422
89
|
|
|
423
90
|
---
|
|
424
91
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
This is complex - will require changes across multiple files.
|
|
428
|
-
Analyzing impact...
|
|
429
|
-
|
|
430
|
-
[Question: "Approach?"]
|
|
431
|
-
Options:
|
|
432
|
-
1. Incremental refactor (start with one module, expand)
|
|
433
|
-
2. Full refactor now (all error handling at once)
|
|
434
|
-
3. Defer for deeper planning
|
|
435
|
-
|
|
436
|
-
User: Option 1
|
|
437
|
-
|
|
438
|
-
[AI implements incrementally for one module]
|
|
439
|
-
[error-handling skill validates Result type usage]
|
|
440
|
-
|
|
441
|
-
β
Completed: Refactor error handling to use Result types
|
|
442
|
-
Files modified: src/services/user.ts, src/types/result.ts
|
|
443
|
-
Pattern used: Result<T, E> type, incremental refactor
|
|
444
|
-
|
|
445
|
-
---
|
|
446
|
-
|
|
447
|
-
## π Implementation Session Complete
|
|
448
|
-
|
|
449
|
-
### β
Completed (3)
|
|
450
|
-
- Add authentication middleware - src/middleware/auth.ts, src/routes/api.ts
|
|
451
|
-
- Write unit tests - tests/auth/register.test.ts
|
|
452
|
-
- Refactor error handling (user module) - src/services/user.ts
|
|
453
|
-
|
|
454
|
-
### βΈοΈ Deferred (2)
|
|
455
|
-
- Update README - deferred for documentation session
|
|
456
|
-
- Add rate limiting - deferred for later discussion
|
|
457
|
-
|
|
458
|
-
### π Session Stats
|
|
459
|
-
- **Files modified**: 5
|
|
460
|
-
- **Files created**: 2
|
|
461
|
-
- **Skills auto-validated**: pattern-check, test-design, error-handling
|
|
462
|
-
- **Complexity**: 1 Simple, 1 Medium, 1 Complex
|
|
463
|
-
|
|
464
|
-
### π Next Steps
|
|
465
|
-
|
|
466
|
-
**Immediate**:
|
|
467
|
-
- [ ] Run test suite: `npm test`
|
|
468
|
-
- [ ] Review changes: src/middleware/auth.ts, src/routes/api.ts, src/services/user.ts
|
|
469
|
-
- [ ] Consider committing changes
|
|
470
|
-
|
|
471
|
-
**Remaining error refactor**:
|
|
472
|
-
- Continue incremental refactor to other modules
|
|
473
|
-
|
|
474
|
-
π‘ **Recommended Next Action**:
|
|
475
|
-
Run `/code-review` to validate all changes before committing.
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
---
|
|
479
|
-
|
|
480
|
-
## Key Features
|
|
481
|
-
|
|
482
|
-
**Smart Triage**:
|
|
483
|
-
- Remove unnecessary todos
|
|
484
|
-
- Defer todos for later discussion
|
|
485
|
-
- Prioritize implementation order
|
|
486
|
-
|
|
487
|
-
**Continuous Clarification**:
|
|
488
|
-
- Asks ONE question at a time
|
|
489
|
-
- Only when genuinely needed
|
|
490
|
-
- Provides clear options with trade-offs
|
|
491
|
-
|
|
492
|
-
**Pattern-Driven Implementation**:
|
|
493
|
-
- Finds and follows existing patterns
|
|
494
|
-
- Shares implementation plan
|
|
495
|
-
- Validates through skills
|
|
496
|
-
|
|
497
|
-
**Quality by Default**:
|
|
498
|
-
- Skills auto-enforce patterns
|
|
499
|
-
- Result types checked automatically
|
|
500
|
-
- Test quality validated inline
|
|
92
|
+
## Quality Enforcement
|
|
501
93
|
|
|
502
|
-
|
|
503
|
-
-
|
|
504
|
-
-
|
|
505
|
-
-
|
|
94
|
+
Skills auto-validate during implementation:
|
|
95
|
+
- `pattern-check` - Result types, DI, immutability
|
|
96
|
+
- `test-design` - Test quality and structure
|
|
97
|
+
- `error-handling` - Error consistency
|
|
98
|
+
- `code-smell` - Anti-pattern detection
|
|
506
99
|
|
|
507
|
-
|
|
100
|
+
Trust skills to handle quality enforcement automatically.
|