devflow-kit 0.5.0 → 0.6.1
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 +75 -0
- package/README.md +29 -12
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +49 -8
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +32 -1
- package/dist/commands/uninstall.js.map +1 -1
- package/package.json +1 -1
- package/src/claude/agents/devflow/audit-architecture.md +92 -110
- package/src/claude/agents/devflow/audit-complexity.md +94 -130
- package/src/claude/agents/devflow/audit-database.md +95 -136
- package/src/claude/agents/devflow/audit-dependencies.md +94 -136
- package/src/claude/agents/devflow/audit-documentation.md +82 -323
- package/src/claude/agents/devflow/audit-performance.md +212 -107
- package/src/claude/agents/devflow/audit-security.md +201 -83
- package/src/claude/agents/devflow/audit-tests.md +82 -471
- package/src/claude/agents/devflow/audit-typescript.md +83 -311
- package/src/claude/agents/devflow/pull-request.md +423 -0
- package/src/claude/commands/devflow/code-review.md +297 -248
- package/src/claude/commands/devflow/plan-next-steps.md +1 -1
- package/src/claude/commands/devflow/plan.md +485 -0
- package/src/claude/commands/devflow/pull-request.md +269 -0
- package/src/claude/commands/devflow/resolve-comments.md +583 -0
- package/src/claude/scripts/statusline.sh +0 -36
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: AskUserQuestion, TodoWrite, Read, Write, Edit, Bash, Grep, Glob
|
|
3
|
+
description: Extract actionable next steps from discussion and let user select which to tackle
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Your task
|
|
7
|
+
|
|
8
|
+
Analyze the current discussion to extract actionable next steps, present them to the user for selection, and save only the chosen tasks to the todo list. This command is identical to `/plan-next-steps` but adds user selection before loading todos.
|
|
9
|
+
|
|
10
|
+
**🎯 FOCUS**: Extract action items from discussion, let user choose which to tackle, then save to todo list.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Step 1: Extract Next Steps from Discussion
|
|
15
|
+
|
|
16
|
+
**FOCUS**: Look at the current discussion and identify concrete next steps that emerged from the conversation.
|
|
17
|
+
|
|
18
|
+
**What to Extract**:
|
|
19
|
+
- **Immediate tasks** mentioned or implied in the discussion
|
|
20
|
+
- **Code changes** that were discussed or agreed upon
|
|
21
|
+
- **Files** that need to be created, modified, or reviewed
|
|
22
|
+
- **Dependencies** that need to be installed or configured
|
|
23
|
+
- **Tests** that need to be written or updated
|
|
24
|
+
- **Documentation** that needs updating
|
|
25
|
+
- **Investigations** or research tasks mentioned
|
|
26
|
+
- **Decisions** that need to be made before proceeding
|
|
27
|
+
|
|
28
|
+
**Look for phrases like**:
|
|
29
|
+
- "We should..."
|
|
30
|
+
- "Next, I'll..."
|
|
31
|
+
- "Let me..."
|
|
32
|
+
- "I need to..."
|
|
33
|
+
- "We could..."
|
|
34
|
+
- "First, we'll..."
|
|
35
|
+
|
|
36
|
+
**From recent context:**
|
|
37
|
+
- Look at the last 10-20 messages in the conversation
|
|
38
|
+
- Extract tasks from `/research` output if present
|
|
39
|
+
- Extract issues from `/code-review` output if present
|
|
40
|
+
- Extract action items from general discussion
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Step 2: Convert to Actionable Todo Items
|
|
45
|
+
|
|
46
|
+
Transform the extracted items into specific todo tasks:
|
|
47
|
+
|
|
48
|
+
**Good todo items**:
|
|
49
|
+
- ✅ "Add authentication middleware to routes in `/src/middleware/auth`"
|
|
50
|
+
- ✅ "Write unit tests for user registration in `/tests/auth_test`"
|
|
51
|
+
- ✅ "Install password hashing library dependency"
|
|
52
|
+
- ✅ "Research API schema design for user endpoints"
|
|
53
|
+
- ✅ "Update README.md with new authentication setup instructions"
|
|
54
|
+
|
|
55
|
+
**Bad todo items**:
|
|
56
|
+
- ❌ "Improve authentication" (too vague)
|
|
57
|
+
- ❌ "Add better error handling" (not specific)
|
|
58
|
+
- ❌ "Make it more secure" (not actionable)
|
|
59
|
+
|
|
60
|
+
Create a preliminary list of todo items with:
|
|
61
|
+
- Specific description
|
|
62
|
+
- File paths when relevant
|
|
63
|
+
- Clear success criteria
|
|
64
|
+
- Logical grouping (dependencies, implementation, tests, docs)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 3: Present Extracted Items to User
|
|
69
|
+
|
|
70
|
+
Show the user what you extracted from the discussion:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
📋 EXTRACTED ACTION ITEMS
|
|
74
|
+
|
|
75
|
+
Based on our discussion, I identified these potential tasks:
|
|
76
|
+
|
|
77
|
+
### Dependencies & Setup
|
|
78
|
+
1. ${task_description}
|
|
79
|
+
2. ${task_description}
|
|
80
|
+
|
|
81
|
+
### Core Implementation
|
|
82
|
+
3. ${task_description}
|
|
83
|
+
4. ${task_description}
|
|
84
|
+
5. ${task_description}
|
|
85
|
+
|
|
86
|
+
### Testing
|
|
87
|
+
6. ${task_description}
|
|
88
|
+
7. ${task_description}
|
|
89
|
+
|
|
90
|
+
### Documentation
|
|
91
|
+
8. ${task_description}
|
|
92
|
+
|
|
93
|
+
**Total: ${count} potential tasks**
|
|
94
|
+
|
|
95
|
+
Let me help you decide which ones to tackle.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Step 4: Let User Select Tasks to Tackle
|
|
101
|
+
|
|
102
|
+
Use `AskUserQuestion` to let user choose which tasks to add to the todo list:
|
|
103
|
+
|
|
104
|
+
**Question 1: Select tasks**
|
|
105
|
+
```
|
|
106
|
+
header: "Select tasks"
|
|
107
|
+
question: "Which tasks do you want to add to your todo list?"
|
|
108
|
+
multiSelect: true
|
|
109
|
+
options: [
|
|
110
|
+
{
|
|
111
|
+
label: "Task 1: ${short_summary}",
|
|
112
|
+
description: "${full_description}"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: "Task 2: ${short_summary}",
|
|
116
|
+
description: "${full_description}"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: "Task 3: ${short_summary}",
|
|
120
|
+
description: "${full_description}"
|
|
121
|
+
},
|
|
122
|
+
...all extracted tasks...
|
|
123
|
+
{
|
|
124
|
+
label: "All tasks",
|
|
125
|
+
description: "Add all extracted tasks to todo list"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**If user selects "All tasks":**
|
|
131
|
+
Include all extracted tasks.
|
|
132
|
+
|
|
133
|
+
**If user selects specific tasks:**
|
|
134
|
+
Only include the selected tasks.
|
|
135
|
+
|
|
136
|
+
**If user selects nothing:**
|
|
137
|
+
```markdown
|
|
138
|
+
No tasks selected. Your todo list remains unchanged.
|
|
139
|
+
|
|
140
|
+
💡 Use `/plan-next-steps` if you want to add all items without selection.
|
|
141
|
+
```
|
|
142
|
+
Exit without saving.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 5: Prioritize Selected Tasks (Optional)
|
|
147
|
+
|
|
148
|
+
**Question 2: Prioritization**
|
|
149
|
+
```
|
|
150
|
+
header: "Priority order"
|
|
151
|
+
question: "How should we prioritize these ${count} tasks?"
|
|
152
|
+
multiSelect: false
|
|
153
|
+
options: [
|
|
154
|
+
{
|
|
155
|
+
label: "Logical order (dependencies first)",
|
|
156
|
+
description: "Arrange by dependencies → implementation → tests → docs"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: "Quick wins first",
|
|
160
|
+
description: "Start with easiest tasks to build momentum"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: "Critical items first",
|
|
164
|
+
description: "Start with most important tasks"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: "Keep current order",
|
|
168
|
+
description: "Use the order I extracted them in"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Reorder tasks based on user's choice:
|
|
174
|
+
|
|
175
|
+
**Logical order:**
|
|
176
|
+
1. Dependencies & setup
|
|
177
|
+
2. Core implementation
|
|
178
|
+
3. Tests
|
|
179
|
+
4. Documentation
|
|
180
|
+
|
|
181
|
+
**Quick wins first:**
|
|
182
|
+
1. Simple, fast tasks first
|
|
183
|
+
2. Complex tasks last
|
|
184
|
+
|
|
185
|
+
**Critical items first:**
|
|
186
|
+
1. High-priority tasks first
|
|
187
|
+
2. Nice-to-have tasks last
|
|
188
|
+
|
|
189
|
+
**Keep current order:**
|
|
190
|
+
Don't reorder, use extraction order.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Step 6: Save to Todo List with TodoWrite
|
|
195
|
+
|
|
196
|
+
Use `TodoWrite` to save the selected tasks:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
[
|
|
200
|
+
{
|
|
201
|
+
"content": "${task_description}",
|
|
202
|
+
"status": "pending",
|
|
203
|
+
"activeForm": "${active_form_description}"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"content": "${task_description}",
|
|
207
|
+
"status": "pending",
|
|
208
|
+
"activeForm": "${active_form_description}"
|
|
209
|
+
},
|
|
210
|
+
...
|
|
211
|
+
]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Each task should:**
|
|
215
|
+
- Be specific and testable
|
|
216
|
+
- Include file paths when relevant
|
|
217
|
+
- Be completable in 15-30 minutes
|
|
218
|
+
- Have clear success criteria
|
|
219
|
+
- Start as "pending" status
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Step 7: Present Final Todo List
|
|
224
|
+
|
|
225
|
+
Show the developer what was saved:
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## ✅ TASKS ADDED TO TODO LIST
|
|
229
|
+
|
|
230
|
+
Based on your selection, I've added these ${count} tasks:
|
|
231
|
+
|
|
232
|
+
### Selected Tasks (In Priority Order)
|
|
233
|
+
|
|
234
|
+
1. **${task_name}**
|
|
235
|
+
- ${description}
|
|
236
|
+
- ${file_paths}
|
|
237
|
+
|
|
238
|
+
2. **${task_name}**
|
|
239
|
+
- ${description}
|
|
240
|
+
- ${file_paths}
|
|
241
|
+
|
|
242
|
+
3. **${task_name}**
|
|
243
|
+
- ${description}
|
|
244
|
+
- ${file_paths}
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### Not Selected (${count} tasks)
|
|
249
|
+
${If any tasks weren't selected:}
|
|
250
|
+
- ${task_name} - ${reason_not_selected}
|
|
251
|
+
- ${task_name} - ${reason_not_selected}
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
**Total tasks in todo list: ${count}**
|
|
256
|
+
|
|
257
|
+
💡 **Ready to start?** Run `/implement` to work through these tasks systematically.
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Usage Examples
|
|
263
|
+
|
|
264
|
+
### Example 1: After /research
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
User: [runs /research on authentication implementation]
|
|
268
|
+
Research output: [Comprehensive analysis with multiple approaches]
|
|
269
|
+
|
|
270
|
+
User: /plan
|
|
271
|
+
|
|
272
|
+
AI: 📋 EXTRACTED ACTION ITEMS
|
|
273
|
+
|
|
274
|
+
Based on the research, I identified these potential tasks:
|
|
275
|
+
|
|
276
|
+
### Core Implementation
|
|
277
|
+
1. Create JWT authentication middleware in src/middleware/auth.ts
|
|
278
|
+
2. Add token validation logic using jsonwebtoken library
|
|
279
|
+
3. Integrate auth middleware into API routes
|
|
280
|
+
|
|
281
|
+
### Testing
|
|
282
|
+
4. Write unit tests for token generation
|
|
283
|
+
5. Write integration tests for auth flow
|
|
284
|
+
|
|
285
|
+
### Documentation
|
|
286
|
+
6. Update API docs with authentication endpoints
|
|
287
|
+
|
|
288
|
+
Total: 6 potential tasks
|
|
289
|
+
|
|
290
|
+
[Shows selection question]
|
|
291
|
+
User: Selects tasks 1, 2, 3, 4 (skips 5 and 6)
|
|
292
|
+
|
|
293
|
+
[Shows prioritization question]
|
|
294
|
+
User: Chooses "Logical order"
|
|
295
|
+
|
|
296
|
+
AI: ✅ TASKS ADDED TO TODO LIST
|
|
297
|
+
|
|
298
|
+
1. Create JWT authentication middleware in src/middleware/auth.ts
|
|
299
|
+
2. Add token validation logic using jsonwebtoken library
|
|
300
|
+
3. Integrate auth middleware into API routes
|
|
301
|
+
4. Write unit tests for token generation
|
|
302
|
+
|
|
303
|
+
Not Selected (2 tasks):
|
|
304
|
+
- Integration tests for auth flow
|
|
305
|
+
- Update API docs with authentication endpoints
|
|
306
|
+
|
|
307
|
+
Total tasks in todo list: 4
|
|
308
|
+
|
|
309
|
+
💡 Ready to start? Run /implement
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Example 2: After /code-review
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
User: [runs /code-review]
|
|
316
|
+
Review output: [Multiple issues found]
|
|
317
|
+
|
|
318
|
+
User: /plan
|
|
319
|
+
|
|
320
|
+
AI: 📋 EXTRACTED ACTION ITEMS
|
|
321
|
+
|
|
322
|
+
Based on the code review, I identified these issues to fix:
|
|
323
|
+
|
|
324
|
+
### Critical Issues
|
|
325
|
+
1. Fix SQL injection vulnerability in user query (src/db/users.ts:45)
|
|
326
|
+
2. Add input validation for API endpoints (src/routes/api.ts)
|
|
327
|
+
|
|
328
|
+
### High Priority
|
|
329
|
+
3. Refactor error handling to use Result types (src/services/user.ts)
|
|
330
|
+
4. Add missing tests for edge cases (tests/user.test.ts)
|
|
331
|
+
|
|
332
|
+
### Medium Priority
|
|
333
|
+
5. Update documentation for new error format (docs/errors.md)
|
|
334
|
+
6. Optimize database query performance (src/db/queries.ts)
|
|
335
|
+
|
|
336
|
+
Total: 6 potential tasks
|
|
337
|
+
|
|
338
|
+
[Shows selection question]
|
|
339
|
+
User: Selects tasks 1, 2, 3 (critical + high priority)
|
|
340
|
+
|
|
341
|
+
[Shows prioritization question]
|
|
342
|
+
User: Chooses "Critical items first"
|
|
343
|
+
|
|
344
|
+
AI: ✅ TASKS ADDED TO TODO LIST
|
|
345
|
+
|
|
346
|
+
1. Fix SQL injection vulnerability in user query (src/db/users.ts:45)
|
|
347
|
+
2. Add input validation for API endpoints (src/routes/api.ts)
|
|
348
|
+
3. Refactor error handling to use Result types (src/services/user.ts)
|
|
349
|
+
|
|
350
|
+
Not Selected (3 tasks):
|
|
351
|
+
- Add missing tests for edge cases
|
|
352
|
+
- Update documentation for new error format
|
|
353
|
+
- Optimize database query performance
|
|
354
|
+
|
|
355
|
+
Total tasks in todo list: 3
|
|
356
|
+
|
|
357
|
+
💡 Ready to start? Run /implement
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Example 3: After General Discussion
|
|
361
|
+
|
|
362
|
+
```
|
|
363
|
+
User: "I want to add dark mode support to the app"
|
|
364
|
+
AI: "We could add a theme provider with CSS variables..."
|
|
365
|
+
User: "Yeah, and we need to persist the preference..."
|
|
366
|
+
AI: "We should also update the color palette..."
|
|
367
|
+
|
|
368
|
+
User: /plan
|
|
369
|
+
|
|
370
|
+
AI: 📋 EXTRACTED ACTION ITEMS
|
|
371
|
+
|
|
372
|
+
Based on our discussion about dark mode, I identified:
|
|
373
|
+
|
|
374
|
+
### Core Implementation
|
|
375
|
+
1. Create ThemeProvider component with light/dark modes
|
|
376
|
+
2. Define CSS variables for light and dark color palettes
|
|
377
|
+
3. Add theme toggle button in settings
|
|
378
|
+
|
|
379
|
+
### Persistence
|
|
380
|
+
4. Store theme preference in localStorage
|
|
381
|
+
5. Read theme preference on app load
|
|
382
|
+
|
|
383
|
+
### Updates
|
|
384
|
+
6. Update existing components to use theme variables
|
|
385
|
+
7. Test dark mode across all pages
|
|
386
|
+
|
|
387
|
+
Total: 7 potential tasks
|
|
388
|
+
|
|
389
|
+
[Shows selection question]
|
|
390
|
+
User: Selects "All tasks"
|
|
391
|
+
|
|
392
|
+
[Shows prioritization question]
|
|
393
|
+
User: Chooses "Logical order"
|
|
394
|
+
|
|
395
|
+
AI: ✅ TASKS ADDED TO TODO LIST
|
|
396
|
+
|
|
397
|
+
1. Create ThemeProvider component with light/dark modes
|
|
398
|
+
2. Define CSS variables for light and dark color palettes
|
|
399
|
+
3. Store theme preference in localStorage
|
|
400
|
+
4. Read theme preference on app load
|
|
401
|
+
5. Add theme toggle button in settings
|
|
402
|
+
6. Update existing components to use theme variables
|
|
403
|
+
7. Test dark mode across all pages
|
|
404
|
+
|
|
405
|
+
Total tasks in todo list: 7
|
|
406
|
+
|
|
407
|
+
💡 Ready to start? Run /implement
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## Command Behavior Rules
|
|
413
|
+
|
|
414
|
+
### ALWAYS Do These:
|
|
415
|
+
- ✅ Extract concrete action items from the discussion
|
|
416
|
+
- ✅ Present all extracted items to user
|
|
417
|
+
- ✅ Use AskUserQuestion to let user select which to tackle
|
|
418
|
+
- ✅ Use AskUserQuestion to let user prioritize order
|
|
419
|
+
- ✅ Save only selected tasks using TodoWrite
|
|
420
|
+
- ✅ Show what was added and what wasn't
|
|
421
|
+
|
|
422
|
+
### NEVER Do These:
|
|
423
|
+
- ❌ Automatically add all tasks without user selection
|
|
424
|
+
- ❌ Skip the selection step (that's what /plan-next-steps is for)
|
|
425
|
+
- ❌ Create vague or untestable tasks
|
|
426
|
+
- ❌ Skip showing what wasn't selected
|
|
427
|
+
- ❌ Forget to use TodoWrite to save the list
|
|
428
|
+
|
|
429
|
+
### Focus Areas:
|
|
430
|
+
- 🎯 **Extract**: Pull concrete next steps from discussion
|
|
431
|
+
- 🎯 **Present**: Show all options clearly
|
|
432
|
+
- 🎯 **Select**: Let user choose which to tackle
|
|
433
|
+
- 🎯 **Prioritize**: Let user decide order
|
|
434
|
+
- 🎯 **Save**: Use TodoWrite only for selected tasks
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## Differences from /plan-next-steps
|
|
439
|
+
|
|
440
|
+
| Feature | /plan | /plan-next-steps |
|
|
441
|
+
|---------|-------|------------------|
|
|
442
|
+
| Extract action items | ✅ Yes | ✅ Yes |
|
|
443
|
+
| Show extracted items | ✅ Yes | ❌ No |
|
|
444
|
+
| User selects tasks | ✅ Yes | ❌ No |
|
|
445
|
+
| User prioritizes | ✅ Yes | ❌ No |
|
|
446
|
+
| Save to todos | ✅ Selected only | ✅ All items |
|
|
447
|
+
| Speed | Slower (interactive) | Faster (automatic) |
|
|
448
|
+
|
|
449
|
+
**When to use which:**
|
|
450
|
+
|
|
451
|
+
**Use `/plan`:**
|
|
452
|
+
- After `/research` or `/code-review` (lots of potential tasks)
|
|
453
|
+
- When you only want to tackle some items
|
|
454
|
+
- When you want to prioritize before starting
|
|
455
|
+
- When you want to see options before committing
|
|
456
|
+
|
|
457
|
+
**Use `/plan-next-steps`:**
|
|
458
|
+
- After discussion where you've already decided
|
|
459
|
+
- When you want all items added quickly
|
|
460
|
+
- When you trust AI to extract and prioritize
|
|
461
|
+
- When you want minimal interaction
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## Integration with Workflow
|
|
466
|
+
|
|
467
|
+
```
|
|
468
|
+
Common workflows:
|
|
469
|
+
|
|
470
|
+
1. Research → Plan → Implement
|
|
471
|
+
/research → /plan → /implement
|
|
472
|
+
|
|
473
|
+
2. Review → Plan → Implement
|
|
474
|
+
/code-review → /plan → /implement
|
|
475
|
+
|
|
476
|
+
3. Discussion → Plan → Implement
|
|
477
|
+
[discussion] → /plan → /implement
|
|
478
|
+
|
|
479
|
+
4. Quick capture (no selection)
|
|
480
|
+
[discussion] → /plan-next-steps → /implement
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
This creates a user-controlled planning process where you see all potential tasks and choose which ones to tackle, rather than blindly adding everything to your todo list.
|