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.
@@ -1,485 +1,223 @@
1
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
2
+ allowed-tools: AskUserQuestion, TodoWrite, Bash
3
+ description: Triage issues from discussion - implement now, defer to GitHub issue, or skip
4
4
  ---
5
5
 
6
6
  ## Your task
7
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.
8
+ Triage issues and decisions from the current conversation. For each item, help user understand it and decide: implement now, defer to GitHub issue, or skip entirely. Convert "now" decisions into actionable todos.
9
9
 
10
- **🎯 FOCUS**: Extract action items from discussion, let user choose which to tackle, then save to todo list.
10
+ **Goal**: Deliberate decision-making on each issue, not batch selection.
11
11
 
12
12
  ---
13
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
14
+ ## Step 1: Extract Issues from Conversation
41
15
 
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"
16
+ Scan the conversation for:
17
+ - **Technical issues** found in code review
18
+ - **Design decisions** that need to be made
19
+ - **Bugs or vulnerabilities** discovered
20
+ - **Refactoring opportunities** discussed
21
+ - **Missing features** or incomplete implementations
22
+ - **Technical debt** identified
23
+ - **Questions or uncertainties** raised
54
24
 
55
- **Bad todo items**:
56
- - "Improve authentication" (too vague)
57
- - "Add better error handling" (not specific)
58
- - "Make it more secure" (not actionable)
25
+ For each item, note:
26
+ - What is it?
27
+ - Why does it matter?
28
+ - Severity/impact (Critical, High, Medium, Low)
59
29
 
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)
30
+ Group similar or trivial items together for batch triage.
65
31
 
66
32
  ---
67
33
 
68
- ## Step 3: Present Extracted Items to User
34
+ ## Step 2: Triage Each Issue
69
35
 
70
- Show the user what you extracted from the discussion:
36
+ Present issues one at a time (or in small batches for similar items):
71
37
 
72
38
  ```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}
39
+ ## Issue ${n}/${total}: ${short_title}
85
40
 
86
- ### Testing
87
- 6. ${task_description}
88
- 7. ${task_description}
41
+ **What**: ${clear_explanation}
89
42
 
90
- ### Documentation
91
- 8. ${task_description}
43
+ **Why it matters**: ${impact_and_consequences}
92
44
 
93
- **Total: ${count} potential tasks**
94
-
95
- Let me help you decide which ones to tackle.
45
+ **Severity**: ${Critical|High|Medium|Low}
96
46
  ```
97
47
 
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:
48
+ Then ask using `AskUserQuestion`:
103
49
 
104
- **Question 1: Select tasks**
105
50
  ```
106
- header: "Select tasks"
107
- question: "Which tasks do you want to add to your todo list?"
108
- multiSelect: true
51
+ header: "Issue ${n}"
52
+ question: "What do you want to do with: ${short_title}?"
53
+ multiSelect: false
109
54
  options: [
110
55
  {
111
- label: "Task 1: ${short_summary}",
112
- description: "${full_description}"
113
- },
114
- {
115
- label: "Task 2: ${short_summary}",
116
- description: "${full_description}"
56
+ label: "Implement now",
57
+ description: "Add to current implementation tasks"
117
58
  },
118
59
  {
119
- label: "Task 3: ${short_summary}",
120
- description: "${full_description}"
60
+ label: "Create GitHub issue",
61
+ description: "Defer to later - will create and lock issue"
121
62
  },
122
- ...all extracted tasks...
123
63
  {
124
- label: "All tasks",
125
- description: "Add all extracted tasks to todo list"
64
+ label: "Skip entirely",
65
+ description: "Not relevant or not worth tracking"
126
66
  }
127
67
  ]
128
68
  ```
129
69
 
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**
70
+ **Batch similar issues** when appropriate:
149
71
  ```
150
- header: "Priority order"
151
- question: "How should we prioritize these ${count} tasks?"
152
- multiSelect: false
72
+ header: "Simple fixes"
73
+ question: "These 3 similar issues (typos, formatting, minor cleanup) - handle them together?"
153
74
  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
- }
75
+ { label: "Implement all now", description: "Add all to current tasks" },
76
+ { label: "Create single GitHub issue", description: "Group into one deferred issue" },
77
+ { label: "Skip all", description: "Not worth the effort" }
170
78
  ]
171
79
  ```
172
80
 
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.
81
+ **Handle emerging clarifications**: If user's response raises new questions or reveals misunderstandings, address them immediately before continuing triage.
191
82
 
192
83
  ---
193
84
 
194
- ## Step 6: Save to Todo List with TodoWrite
85
+ ## Step 3: Create GitHub Issues for Deferred Items
195
86
 
196
- Use `TodoWrite` to save the selected tasks:
87
+ For each "Create GitHub issue" decision, use `Bash` to create the issue:
197
88
 
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
- ---
89
+ ```bash
90
+ gh issue create \
91
+ --title "${issue_title}" \
92
+ --body "$(cat <<'EOF'
93
+ ## Context
222
94
 
223
- ## Step 7: Present Final Todo List
95
+ ${why_this_was_identified}
224
96
 
225
- Show the developer what was saved:
97
+ ## Issue Details
226
98
 
227
- ```markdown
228
- ## ✅ TASKS ADDED TO TODO LIST
229
-
230
- Based on your selection, I've added these ${count} tasks:
99
+ ${clear_description_of_the_issue}
231
100
 
232
- ### Selected Tasks (In Priority Order)
101
+ ## Suggested Approach
233
102
 
234
- 1. **${task_name}**
235
- - ${description}
236
- - ${file_paths}
103
+ ${potential_solution_if_discussed}
237
104
 
238
- 2. **${task_name}**
239
- - ${description}
240
- - ${file_paths}
105
+ ## Severity
241
106
 
242
- 3. **${task_name}**
243
- - ${description}
244
- - ${file_paths}
107
+ ${Critical|High|Medium|Low}
245
108
 
246
109
  ---
247
110
 
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.
111
+ *Created during triage session. Review before implementation.*
112
+ EOF
113
+ )" \
114
+ --label "${appropriate_labels}"
258
115
  ```
259
116
 
260
- ---
261
-
262
- ## Usage Examples
263
-
264
- ### Example 1: After /research
117
+ Then lock the issue (no reason required):
265
118
 
119
+ ```bash
120
+ gh issue lock ${issue_number}
266
121
  ```
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
122
 
288
- Total: 6 potential tasks
123
+ Track created issues for final summary.
289
124
 
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
125
+ ---
337
126
 
338
- [Shows selection question]
339
- User: Selects tasks 1, 2, 3 (critical + high priority)
127
+ ## Step 4: Convert "Now" Items to Actionable Todos
340
128
 
341
- [Shows prioritization question]
342
- User: Chooses "Critical items first"
129
+ For all items marked "Implement now":
343
130
 
344
- AI: TASKS ADDED TO TODO LIST
131
+ 1. **Break down** into specific, actionable tasks
132
+ 2. **Order** by dependencies and priority
133
+ 3. **Estimate** complexity (simple: 15min, medium: 30min, complex: 1hr+)
345
134
 
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)
135
+ Good task breakdown:
136
+ - "Fix SQL injection in `src/db/users.ts:45` - use parameterized queries"
137
+ - "Add input validation for email field in registration endpoint"
138
+ - ✅ "Refactor `UserService` to use Result types instead of throwing"
349
139
 
350
- Not Selected (3 tasks):
351
- - Add missing tests for edge cases
352
- - Update documentation for new error format
353
- - Optimize database query performance
140
+ Bad task breakdown:
141
+ - "Fix security issues" (too vague)
142
+ - "Improve error handling" (not specific)
354
143
 
355
- Total tasks in todo list: 3
144
+ ---
356
145
 
357
- 💡 Ready to start? Run /implement
358
- ```
146
+ ## Step 5: Save Todos with TodoWrite
359
147
 
360
- ### Example 3: After General Discussion
148
+ Use `TodoWrite` to save actionable tasks:
361
149
 
150
+ ```json
151
+ [
152
+ {
153
+ "content": "${specific_task_description}",
154
+ "status": "pending",
155
+ "activeForm": "${task_in_progress_form}"
156
+ }
157
+ ]
362
158
  ```
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
159
 
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
- ```
160
+ Each task should be:
161
+ - Completable in 15-60 minutes
162
+ - Clear success criteria
163
+ - Include file paths when relevant
164
+ - Ordered by dependencies
409
165
 
410
166
  ---
411
167
 
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
168
+ ## Step 6: Final Summary
435
169
 
436
- ---
170
+ ```markdown
171
+ ## TRIAGE COMPLETE
437
172
 
438
- ## Differences from /plan-next-steps
173
+ ### Implementing Now (${count} items → ${task_count} tasks)
439
174
 
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) |
175
+ ${For each "now" item:}
176
+ - **${issue_title}**
177
+ - ${brief_description}
178
+ - Tasks: ${list_of_specific_todos}
448
179
 
449
- **When to use which:**
180
+ ### Deferred to GitHub Issues (${count} items)
450
181
 
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
182
+ ${For each deferred item:}
183
+ - **${issue_title}** Issue #${number}
184
+ - ${brief_description}
185
+ - Severity: ${severity}
186
+ - [View issue](${issue_url})
456
187
 
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
188
+ ### Skipped (${count} items)
462
189
 
463
- ---
190
+ ${For each skipped item:}
191
+ - ${issue_title} - ${reason_user_gave_or_inferred}
464
192
 
465
- ## Integration with Workflow
193
+ ---
466
194
 
195
+ **Next Steps**:
196
+ - ${task_count} tasks saved to todo list
197
+ - ${issue_count} GitHub issues created and locked
198
+ - Run `/implement` to start working through tasks
467
199
  ```
468
- Common workflows:
469
-
470
- 1. Research → Plan → Implement
471
- /research → /plan → /implement
472
200
 
473
- 2. Review → Plan → Implement
474
- /code-review → /plan → /implement
201
+ ---
475
202
 
476
- 3. Discussion → Plan → Implement
477
- [discussion] → /plan → /implement
203
+ ## Behavior Rules
478
204
 
479
- 4. Quick capture (no selection)
480
- [discussion] /plan-next-steps /implement
481
- ```
205
+ ### ALWAYS:
206
+ - Explain each issue clearly before asking for decision
207
+ - Create actual GitHub issues via `gh` CLI
208
+ - Lock created issues immediately
209
+ - Break "now" items into specific, actionable todos
210
+ - Track all decisions for final summary
211
+ - Address clarifications that arise during triage
482
212
 
483
- ---
213
+ ### NEVER:
214
+ - Present all issues as a batch selection list
215
+ - Skip the understanding phase
216
+ - Create vague or unactionable todos
217
+ - Forget to lock GitHub issues
218
+ - Ignore user questions that arise during triage
484
219
 
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.
220
+ ### Handle Edge Cases:
221
+ - **No issues found**: "I didn't identify any issues to triage from this conversation. Did I miss something?"
222
+ - **gh CLI not available**: Warn user, offer to output issue text for manual creation
223
+ - **User wants to reconsider**: Allow changing previous decisions before final save