agileflow 2.90.7 → 2.92.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 (144) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -6
  3. package/lib/README.md +178 -0
  4. package/lib/codebase-indexer.js +818 -0
  5. package/lib/colors.js +190 -12
  6. package/lib/consent.js +232 -0
  7. package/lib/correlation.js +277 -0
  8. package/lib/error-codes.js +46 -0
  9. package/lib/errors.js +48 -6
  10. package/lib/file-cache.js +182 -0
  11. package/lib/format-error.js +156 -0
  12. package/lib/path-resolver.js +155 -7
  13. package/lib/paths.js +212 -20
  14. package/lib/placeholder-registry.js +205 -0
  15. package/lib/registry-di.js +358 -0
  16. package/lib/result-schema.js +363 -0
  17. package/lib/result.js +210 -0
  18. package/lib/session-registry.js +13 -0
  19. package/lib/session-state-machine.js +465 -0
  20. package/lib/validate-commands.js +308 -0
  21. package/lib/validate-names.js +3 -3
  22. package/lib/validate.js +116 -52
  23. package/package.json +4 -1
  24. package/scripts/af +34 -0
  25. package/scripts/agent-loop.js +63 -9
  26. package/scripts/agileflow-configure.js +2 -2
  27. package/scripts/agileflow-welcome.js +435 -23
  28. package/scripts/archive-completed-stories.sh +57 -11
  29. package/scripts/claude-tmux.sh +102 -0
  30. package/scripts/damage-control-bash.js +3 -70
  31. package/scripts/damage-control-edit.js +3 -20
  32. package/scripts/damage-control-write.js +3 -20
  33. package/scripts/dependency-check.js +310 -0
  34. package/scripts/get-env.js +11 -4
  35. package/scripts/lib/configure-detect.js +23 -1
  36. package/scripts/lib/configure-features.js +43 -2
  37. package/scripts/lib/context-formatter.js +771 -0
  38. package/scripts/lib/context-loader.js +699 -0
  39. package/scripts/lib/damage-control-utils.js +107 -0
  40. package/scripts/lib/json-utils.sh +162 -0
  41. package/scripts/lib/state-migrator.js +353 -0
  42. package/scripts/lib/story-state-machine.js +437 -0
  43. package/scripts/obtain-context.js +118 -1048
  44. package/scripts/pre-push-check.sh +46 -0
  45. package/scripts/precompact-context.sh +36 -11
  46. package/scripts/query-codebase.js +538 -0
  47. package/scripts/ralph-loop.js +5 -5
  48. package/scripts/session-manager.js +220 -42
  49. package/scripts/spawn-parallel.js +651 -0
  50. package/scripts/tui/blessed/data/watcher.js +180 -0
  51. package/scripts/tui/blessed/index.js +244 -0
  52. package/scripts/tui/blessed/panels/output.js +101 -0
  53. package/scripts/tui/blessed/panels/sessions.js +150 -0
  54. package/scripts/tui/blessed/panels/trace.js +97 -0
  55. package/scripts/tui/blessed/ui/help.js +77 -0
  56. package/scripts/tui/blessed/ui/screen.js +52 -0
  57. package/scripts/tui/blessed/ui/statusbar.js +47 -0
  58. package/scripts/tui/blessed/ui/tabbar.js +99 -0
  59. package/scripts/tui/index.js +38 -30
  60. package/scripts/validators/README.md +143 -0
  61. package/scripts/validators/component-validator.js +239 -0
  62. package/scripts/validators/json-schema-validator.js +186 -0
  63. package/scripts/validators/markdown-validator.js +152 -0
  64. package/scripts/validators/migration-validator.js +129 -0
  65. package/scripts/validators/security-validator.js +380 -0
  66. package/scripts/validators/story-format-validator.js +197 -0
  67. package/scripts/validators/test-result-validator.js +114 -0
  68. package/scripts/validators/workflow-validator.js +247 -0
  69. package/src/core/agents/accessibility.md +6 -0
  70. package/src/core/agents/adr-writer.md +6 -0
  71. package/src/core/agents/analytics.md +6 -0
  72. package/src/core/agents/api.md +6 -0
  73. package/src/core/agents/ci.md +6 -0
  74. package/src/core/agents/codebase-query.md +261 -0
  75. package/src/core/agents/compliance.md +6 -0
  76. package/src/core/agents/configuration-damage-control.md +6 -0
  77. package/src/core/agents/configuration-visual-e2e.md +6 -0
  78. package/src/core/agents/database.md +10 -0
  79. package/src/core/agents/datamigration.md +6 -0
  80. package/src/core/agents/design.md +6 -0
  81. package/src/core/agents/devops.md +6 -0
  82. package/src/core/agents/documentation.md +6 -0
  83. package/src/core/agents/epic-planner.md +6 -0
  84. package/src/core/agents/integrations.md +6 -0
  85. package/src/core/agents/mentor.md +6 -0
  86. package/src/core/agents/mobile.md +6 -0
  87. package/src/core/agents/monitoring.md +6 -0
  88. package/src/core/agents/multi-expert.md +6 -0
  89. package/src/core/agents/performance.md +6 -0
  90. package/src/core/agents/product.md +6 -0
  91. package/src/core/agents/qa.md +6 -0
  92. package/src/core/agents/readme-updater.md +6 -0
  93. package/src/core/agents/refactor.md +6 -0
  94. package/src/core/agents/research.md +6 -0
  95. package/src/core/agents/security.md +6 -0
  96. package/src/core/agents/testing.md +10 -0
  97. package/src/core/agents/ui.md +6 -0
  98. package/src/core/commands/adr.md +114 -0
  99. package/src/core/commands/agent.md +120 -0
  100. package/src/core/commands/assign.md +145 -0
  101. package/src/core/commands/audit.md +401 -0
  102. package/src/core/commands/babysit.md +32 -5
  103. package/src/core/commands/board.md +1 -0
  104. package/src/core/commands/changelog.md +118 -0
  105. package/src/core/commands/configure.md +42 -6
  106. package/src/core/commands/diagnose.md +114 -0
  107. package/src/core/commands/epic.md +205 -1
  108. package/src/core/commands/handoff.md +128 -0
  109. package/src/core/commands/help.md +76 -0
  110. package/src/core/commands/metrics.md +1 -0
  111. package/src/core/commands/pr.md +96 -0
  112. package/src/core/commands/research/analyze.md +1 -0
  113. package/src/core/commands/research/ask.md +2 -0
  114. package/src/core/commands/research/import.md +1 -0
  115. package/src/core/commands/research/list.md +2 -0
  116. package/src/core/commands/research/synthesize.md +584 -0
  117. package/src/core/commands/research/view.md +2 -0
  118. package/src/core/commands/roadmap/analyze.md +400 -0
  119. package/src/core/commands/session/new.md +113 -6
  120. package/src/core/commands/session/spawn.md +197 -0
  121. package/src/core/commands/sprint.md +22 -0
  122. package/src/core/commands/status.md +200 -1
  123. package/src/core/commands/story/list.md +9 -9
  124. package/src/core/commands/story/view.md +1 -0
  125. package/src/core/commands/story.md +143 -4
  126. package/src/core/experts/codebase-query/expertise.yaml +190 -0
  127. package/src/core/experts/codebase-query/question.md +73 -0
  128. package/src/core/experts/codebase-query/self-improve.md +105 -0
  129. package/src/core/templates/agileflow-metadata.json +55 -2
  130. package/src/core/templates/plan-template.md +125 -0
  131. package/src/core/templates/story-lifecycle.md +213 -0
  132. package/src/core/templates/story-template.md +4 -0
  133. package/src/core/templates/tdd-test-template.js +241 -0
  134. package/tools/cli/commands/setup.js +86 -0
  135. package/tools/cli/installers/core/installer.js +94 -0
  136. package/tools/cli/installers/ide/_base-ide.js +20 -11
  137. package/tools/cli/installers/ide/codex.js +29 -47
  138. package/tools/cli/lib/config-manager.js +17 -2
  139. package/tools/cli/lib/content-transformer.js +271 -0
  140. package/tools/cli/lib/error-handler.js +14 -22
  141. package/tools/cli/lib/ide-error-factory.js +421 -0
  142. package/tools/cli/lib/ide-health-monitor.js +364 -0
  143. package/tools/cli/lib/ide-registry.js +114 -1
  144. package/tools/cli/lib/ui.js +14 -25
@@ -0,0 +1,401 @@
1
+ ---
2
+ description: Audit story completion - tests + acceptance criteria verification (GSD pattern)
3
+ argument-hint: STORY=<US-ID>
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "STORY ID is REQUIRED - always ask if missing"
8
+ - "Run STEP 0 context activation before any other action"
9
+ - "Execute 4-step audit: tests, AC check, learnings, verdict"
10
+ - "Generate clear PASS/FAIL report with visual indicators"
11
+ - "On PASS, suggest marking story complete"
12
+ state_fields:
13
+ - story_id
14
+ - audit_result
15
+ - tests_passed
16
+ - ac_verified
17
+ ---
18
+
19
+ # Story Audit
20
+
21
+ Verify story completion through the GSD (Get Stuff Done) audit cycle: run tests, check acceptance criteria, capture learnings, and provide clear PASS/FAIL verdict.
22
+
23
+ ---
24
+
25
+ ## STEP 0: Gather Context
26
+
27
+ ```bash
28
+ node .agileflow/scripts/obtain-context.js audit
29
+ ```
30
+
31
+ This gathers git status, stories/epics, session state, and registers for PreCompact.
32
+
33
+ ---
34
+
35
+ <!-- COMPACT_SUMMARY_START -->
36
+
37
+ ## Compact Summary
38
+
39
+ **Role**: Story Auditor - GSD verification cycle before completion
40
+
41
+ **Critical Behavioral Rules**:
42
+ 1. ALWAYS run STEP 0 activation before any other action
43
+ 2. STORY ID is REQUIRED - ask user if not provided
44
+ 3. Execute 4-step audit: tests, AC check, learnings, verdict
45
+ 4. Generate clear PASS/FAIL report with visual indicators
46
+ 5. On PASS, suggest marking story complete
47
+
48
+ **Workflow**:
49
+ 1. **Parse Story**: Get story ID from argument or ask user
50
+ 2. **Run Tests**: Execute test command from environment.json
51
+ 3. **Check AC**: Display acceptance criteria, ask user to verify each
52
+ 4. **Capture Learnings**: Prompt for insights and technical debt
53
+ 5. **Verdict**: PASS if tests pass AND all AC verified, otherwise FAIL
54
+ 6. **Next Steps**: Suggest marking complete (PASS) or fixing issues (FAIL)
55
+
56
+ **Audit Result Values**:
57
+ - `PASS`: Tests passing + All AC verified
58
+ - `FAIL`: Tests failing OR Any AC unverified
59
+
60
+ **Output Format Requirements**:
61
+ - Display test results with counts and duration
62
+ - Show each AC with checkbox status
63
+ - Clear PASS/FAIL verdict with blocking issues if any
64
+ - Actionable next steps
65
+
66
+ **Integration**:
67
+ - Uses: environment.json (test config), status.json (story/AC data)
68
+ - Logs to: docs/09-agents/bus/log.jsonl (learnings)
69
+ - Related: /agileflow:verify, /agileflow:story-validate, /agileflow:status
70
+
71
+ **Tool Usage Examples**:
72
+
73
+ TodoWrite:
74
+ ```xml
75
+ <invoke name="TodoWrite">
76
+ <parameter name="todos">[
77
+ {"content": "Parse story ID and load story data", "status": "in_progress", "activeForm": "Loading story"},
78
+ {"content": "Run project tests", "status": "pending", "activeForm": "Running tests"},
79
+ {"content": "Verify acceptance criteria with user", "status": "pending", "activeForm": "Verifying AC"},
80
+ {"content": "Capture learnings", "status": "pending", "activeForm": "Capturing learnings"},
81
+ {"content": "Generate audit verdict and next steps", "status": "pending", "activeForm": "Generating verdict"}
82
+ ]</parameter>
83
+ </invoke>
84
+ ```
85
+
86
+ AskUserQuestion (AC Verification):
87
+ ```xml
88
+ <invoke name="AskUserQuestion">
89
+ <parameter name="questions">[{
90
+ "question": "Verify each acceptance criterion is met for US-0129:",
91
+ "header": "AC Check",
92
+ "multiSelect": true,
93
+ "options": [
94
+ {"label": "AC1: Create audit.md", "description": "File exists in commands/"},
95
+ {"label": "AC2: Accept story ID", "description": "Argument parsing works"},
96
+ {"label": "AC3: Run tests", "description": "Tests execute and report"},
97
+ {"label": "AC4: Check AC met", "description": "AC verification works"}
98
+ ]
99
+ }]</parameter>
100
+ </invoke>
101
+ ```
102
+
103
+ <!-- COMPACT_SUMMARY_END -->
104
+
105
+ ---
106
+
107
+ ## Prompt
108
+
109
+ ROLE: Story Auditor
110
+
111
+ INPUTS
112
+ STORY=<US-ID> Required - story to audit
113
+
114
+ TODO LIST TRACKING
115
+ **CRITICAL**: Immediately create a todo list using TodoWrite tool:
116
+ ```
117
+ 1. Parse story ID and load story data
118
+ 2. Run project tests
119
+ 3. Verify acceptance criteria with user
120
+ 4. Capture learnings
121
+ 5. Generate audit verdict and next steps
122
+ ```
123
+
124
+ ACTIONS
125
+
126
+ ### Step 1: Parse Story ID
127
+
128
+ If STORY argument not provided, ask user:
129
+ ```xml
130
+ <invoke name="AskUserQuestion">
131
+ <parameter name="questions">[{
132
+ "question": "Which story would you like to audit?",
133
+ "header": "Story ID",
134
+ "multiSelect": false,
135
+ "options": [
136
+ {"label": "Enter story ID", "description": "e.g., US-0129"}
137
+ ]
138
+ }]</parameter>
139
+ </invoke>
140
+ ```
141
+
142
+ Load story from `docs/09-agents/status.json`:
143
+ - Verify story exists
144
+ - Get title, epic, acceptance_criteria array
145
+ - Check current status (should be in_progress or ready)
146
+
147
+ ### Step 2: Run Tests
148
+
149
+ Read `docs/00-meta/environment.json` for test configuration:
150
+ - `test_command` - Command to run (e.g., "npm test")
151
+ - `test_timeout_ms` - Maximum wait time
152
+
153
+ Execute tests:
154
+ ```bash
155
+ # Run with timeout, capture exit code
156
+ timeout 120s npm test 2>&1
157
+ EXIT_CODE=$?
158
+ ```
159
+
160
+ Parse results:
161
+ - Exit code 0 = PASSING
162
+ - Exit code non-zero = FAILING
163
+ - Extract pass/fail counts if possible (Jest/Pytest patterns)
164
+
165
+ ### Step 3: Verify Acceptance Criteria
166
+
167
+ Display each AC from status.json and ask user to verify:
168
+
169
+ ```xml
170
+ <invoke name="AskUserQuestion">
171
+ <parameter name="questions">[{
172
+ "question": "Verify each acceptance criterion is met for {{STORY_ID}}:",
173
+ "header": "AC Check",
174
+ "multiSelect": true,
175
+ "options": [
176
+ {"label": "{{AC_1}}", "description": "Mark if complete"},
177
+ {"label": "{{AC_2}}", "description": "Mark if complete"},
178
+ {"label": "{{AC_3}}", "description": "Mark if complete"}
179
+ ]
180
+ }]</parameter>
181
+ </invoke>
182
+ ```
183
+
184
+ Calculate verification rate:
185
+ - Count selected (verified) vs total AC
186
+ - 100% = All verified
187
+ - <100% = Partial
188
+
189
+ ### Step 4: Capture Learnings
190
+
191
+ Prompt user for insights:
192
+
193
+ ```xml
194
+ <invoke name="AskUserQuestion">
195
+ <parameter name="questions">[{
196
+ "question": "What did you learn during this story? (Select or enter custom)",
197
+ "header": "Learnings",
198
+ "multiSelect": false,
199
+ "options": [
200
+ {"label": "Enter learnings", "description": "Share insights, patterns discovered, or improvements"},
201
+ {"label": "No learnings to capture", "description": "Skip this step"}
202
+ ]
203
+ }]</parameter>
204
+ </invoke>
205
+ ```
206
+
207
+ If learnings provided, log to `docs/09-agents/bus/log.jsonl`:
208
+ ```json
209
+ {
210
+ "type": "audit_learnings",
211
+ "story": "US-0129",
212
+ "timestamp": "2026-01-19T12:00:00Z",
213
+ "learnings": "User's learnings text here",
214
+ "tests_passed": true,
215
+ "ac_verified": 7,
216
+ "ac_total": 7
217
+ }
218
+ ```
219
+
220
+ ### Step 5: Generate Verdict
221
+
222
+ **PASS Criteria**:
223
+ - Tests passing (exit code 0)
224
+ - All AC verified (100%)
225
+
226
+ **FAIL Criteria**:
227
+ - Tests failing (exit code non-zero)
228
+ - OR any AC unverified (<100%)
229
+
230
+ ---
231
+
232
+ ## Output Format
233
+
234
+ ### PASS Report
235
+
236
+ ```
237
+ ========================================
238
+ STORY AUDIT: US-0129
239
+ ========================================
240
+
241
+ TESTS
242
+ Command: npm test
243
+ Result: PASSED (2,201 passed, 0 failed)
244
+ Duration: 45.2s
245
+
246
+ ACCEPTANCE CRITERIA
247
+ [x] Create packages/cli/src/core/commands/audit.md
248
+ [x] Accept story ID as argument
249
+ [x] Run tests and report pass/fail
250
+ [x] Check acceptance criteria met
251
+ [x] Prompt for learnings to capture
252
+ [x] Output: PASS/FAIL with recommended next action
253
+ [x] On PASS, suggest marking story complete
254
+
255
+ AC Verification: 7/7 (100%)
256
+
257
+ ========================================
258
+ AUDIT RESULT: PASS
259
+ ========================================
260
+ Tests: PASSING
261
+ AC: ALL VERIFIED (7/7)
262
+
263
+ Learnings captured:
264
+ - GSD audit pattern successfully integrated
265
+
266
+ NEXT STEPS:
267
+ 1. Mark story complete: /agileflow:status US-0129 STATUS=done
268
+ 2. Review epic progress: /agileflow:epic EP-0022
269
+ ```
270
+
271
+ ### FAIL Report
272
+
273
+ ```
274
+ ========================================
275
+ STORY AUDIT: US-0129
276
+ ========================================
277
+
278
+ TESTS
279
+ Command: npm test
280
+ Result: FAILED (40 passed, 3 failed)
281
+ Duration: 12.8s
282
+
283
+ ACCEPTANCE CRITERIA
284
+ [x] Create packages/cli/src/core/commands/audit.md
285
+ [x] Accept story ID as argument
286
+ [x] Run tests and report pass/fail
287
+ [ ] Check acceptance criteria met
288
+ [ ] Prompt for learnings to capture
289
+ [x] Output: PASS/FAIL with recommended next action
290
+ [x] On PASS, suggest marking story complete
291
+
292
+ AC Verification: 5/7 (71%)
293
+
294
+ ========================================
295
+ AUDIT RESULT: FAIL
296
+ ========================================
297
+ Tests: FAILING (3 failed)
298
+ AC: PARTIAL (5/7)
299
+
300
+ BLOCKING ISSUES:
301
+ - Test: audit.test.ts:42 - Expected PASS verdict
302
+ - AC: "Check acceptance criteria met" - Not implemented
303
+ - AC: "Prompt for learnings" - Missing
304
+
305
+ NEXT STEPS:
306
+ 1. Fix failing tests
307
+ 2. Complete missing AC items
308
+ 3. Re-run: /agileflow:audit US-0129
309
+ ```
310
+
311
+ ---
312
+
313
+ ## Post-Audit Actions
314
+
315
+ ### If PASS
316
+
317
+ Offer to mark story complete:
318
+
319
+ ```xml
320
+ <invoke name="AskUserQuestion">
321
+ <parameter name="questions">[{
322
+ "question": "Story US-0129 passed audit! What would you like to do?",
323
+ "header": "Next Steps",
324
+ "multiSelect": false,
325
+ "options": [
326
+ {"label": "Mark complete (Recommended)", "description": "Update status to done"},
327
+ {"label": "View epic progress", "description": "Check EP-0022 status"},
328
+ {"label": "Done", "description": "Exit without changes"}
329
+ ]
330
+ }]</parameter>
331
+ </invoke>
332
+ ```
333
+
334
+ If "Mark complete":
335
+ 1. Update status.json: `status: "done"`, add `completed_at` timestamp
336
+ 2. Add audit summary to story
337
+ 3. Log completion to bus/log.jsonl
338
+
339
+ ### If FAIL
340
+
341
+ Offer to help fix issues:
342
+
343
+ ```xml
344
+ <invoke name="AskUserQuestion">
345
+ <parameter name="questions">[{
346
+ "question": "Story US-0129 failed audit. What would you like to do?",
347
+ "header": "Fix Issues",
348
+ "multiSelect": false,
349
+ "options": [
350
+ {"label": "Fix failing tests", "description": "I'll help debug test failures"},
351
+ {"label": "Review AC requirements", "description": "Check what's missing"},
352
+ {"label": "Done", "description": "Exit and fix later"}
353
+ ]
354
+ }]</parameter>
355
+ </invoke>
356
+ ```
357
+
358
+ ---
359
+
360
+ ## Error Handling
361
+
362
+ ### Story Not Found
363
+ ```
364
+ Story US-9999 not found in status.json
365
+
366
+ Available in_progress stories:
367
+ - US-0129: Create /agileflow:audit command
368
+ - US-0130: Add phase handoff summaries
369
+
370
+ Run: /agileflow:audit US-0129
371
+ ```
372
+
373
+ ### No Test Configuration
374
+ ```
375
+ No test configuration found.
376
+
377
+ Run /agileflow:session:init to configure:
378
+ - test_command
379
+ - test_timeout_ms
380
+
381
+ Or manually create docs/00-meta/environment.json
382
+ ```
383
+
384
+ ### Story Already Complete
385
+ ```
386
+ Story US-0129 is already marked as 'done'
387
+
388
+ To re-audit, first change status:
389
+ /agileflow:status US-0129 STATUS=in_progress
390
+
391
+ Then run audit again.
392
+ ```
393
+
394
+ ---
395
+
396
+ ## Related Commands
397
+
398
+ - `/agileflow:verify` - Run tests only (no AC check)
399
+ - `/agileflow:story-validate` - Validate story structure before development
400
+ - `/agileflow:status` - Update story status
401
+ - `/agileflow:epic` - View epic progress
@@ -217,9 +217,26 @@ node scripts/ralph-loop.js --reset # Reset loop state
217
217
 
218
218
  <!-- COMPACT_SUMMARY_START -->
219
219
 
220
- ## ⚠️ COMPACT SUMMARY - /agileflow:babysit IS ACTIVE
220
+ ## 🛑 STOP - READ THIS FIRST - MANDATORY INSTRUCTIONS
221
+
222
+ **THIS IS NOT OPTIONAL.** You are currently running `/agileflow:babysit`. These are binding instructions that OVERRIDE your default behavior. Failure to follow these rules breaks the user's workflow.
223
+
224
+ ---
225
+
226
+ ## ⚡ IMMEDIATE ACTION REQUIRED
227
+
228
+ **YOUR VERY NEXT RESPONSE MUST END WITH THE `AskUserQuestion` TOOL.**
229
+
230
+ This is not a suggestion. This is a requirement. After reading this context, you will:
231
+ 1. Process the user's message
232
+ 2. Do your work (read files, spawn agents, etc.)
233
+ 3. **CALL THE AskUserQuestion TOOL** - not text like "What next?" but the ACTUAL TOOL
234
+
235
+ If you end your response without calling AskUserQuestion, you have violated these instructions.
236
+
237
+ ---
221
238
 
222
- **CRITICAL**: You are running `/agileflow:babysit`. This defines your behavior. Follow these rules EXACTLY.
239
+ ## ⚠️ COMPACT SUMMARY - /agileflow:babysit IS ACTIVE
223
240
 
224
241
  **ROLE**: Mentor that delegates to domain experts. You coordinate, experts implement.
225
242
 
@@ -425,9 +442,6 @@ Present top 3-5 via AskUserQuestion, always include "Other" option.
425
442
  ### REMEMBER AFTER COMPACTION
426
443
 
427
444
  - `/agileflow:babysit` IS ACTIVE - follow these rules
428
- - **🔔 AskUserQuestion AFTER EVERY RESPONSE** - especially after task completion!
429
- - Don't say "Done!" and stop - call AskUserQuestion with next step options
430
- - Don't leave user waiting - proactively suggest what to do next
431
445
  - Plan mode FIRST for non-trivial tasks
432
446
  - Delegate complex work to experts
433
447
  - If stuck 2+ times → research prompt
@@ -437,6 +451,19 @@ Present top 3-5 via AskUserQuestion, always include "Other" option.
437
451
  2. AFTER user selects: `node .agileflow/scripts/lib/story-claiming.js claim <id>`
438
452
  3. WHEN done: `node .agileflow/scripts/lib/story-claiming.js release <id>`
439
453
 
454
+ ---
455
+
456
+ ## 🛑 FINAL ACTION REQUIRED - DO NOT SKIP
457
+
458
+ **BEFORE SENDING YOUR RESPONSE, YOU MUST:**
459
+
460
+ Call the `AskUserQuestion` tool with relevant options for the user's next steps.
461
+
462
+ **DO NOT** end with text like "What would you like to do?" or "Let me know!"
463
+ **DO** call the actual AskUserQuestion tool.
464
+
465
+ If you fail to do this, you have broken the /agileflow:babysit contract.
466
+
440
467
  <!-- COMPACT_SUMMARY_END -->
441
468
 
442
469
  ---
@@ -2,6 +2,7 @@
2
2
  description: Display visual kanban board with WIP limits
3
3
  argument-hint: "[EPIC=<id>] [OWNER=<id>] [FORMAT=ascii|markdown|html] [GROUP_BY=status|owner|epic]"
4
4
  model: haiku
5
+ type: output-only # Board display - read-only visualization, not an ongoing task
5
6
  compact_context:
6
7
  priority: medium
7
8
  preserve_rules:
@@ -433,3 +433,121 @@ OUTPUT
433
433
  - Changelog entry preview
434
434
  - Updated CHANGELOG.md (if approved)
435
435
  - Optional: Git tag and release creation
436
+
437
+ ---
438
+
439
+ ## Expected Output
440
+
441
+ ### Successful Changelog Generation
442
+
443
+ ```
444
+ 📋 Generating Changelog
445
+
446
+ Detecting version...
447
+ ✅ Current version: v2.4.0
448
+ ✅ Last release: v2.4.0 (2026-01-15)
449
+
450
+ Collecting changes since v2.4.0...
451
+ Found: 12 commits, 8 PRs merged
452
+
453
+ Categorizing changes...
454
+ ───────────────────────────────────────────────
455
+ ### Added
456
+ - OAuth2 authentication support for Google and GitHub providers (#123)
457
+ - Dark mode toggle in user preferences (#137)
458
+ - User profile settings page with avatar upload (#135)
459
+
460
+ ### Changed
461
+ - ⚠️ **BREAKING**: Redesigned API endpoints to RESTful structure (#126)
462
+ See migration guide at docs/migration-v2.md
463
+ - Improved user query performance by 50% with database indexing (#125)
464
+
465
+ ### Fixed
466
+ - Crash when user object is null in login endpoint (#124)
467
+ - Memory leak in WebSocket connection handler (#139)
468
+ - Incorrect timezone display in activity logs (#140)
469
+
470
+ ### Security
471
+ - Patched XSS vulnerability in comment rendering (#131)
472
+ ───────────────────────────────────────────────
473
+
474
+ 📊 Change Summary:
475
+ - Added: 3
476
+ - Changed: 2 (1 breaking)
477
+ - Fixed: 3
478
+ - Security: 1
479
+
480
+ 💡 Suggested version: 2.5.0 (MAJOR due to breaking change)
481
+
482
+ [AskUserQuestion: "Update CHANGELOG.md with these changes?"]
483
+
484
+ ✅ CHANGELOG.md updated
485
+ ✅ Commit created: "chore(release): update CHANGELOG for v2.5.0"
486
+
487
+ Next steps:
488
+ 1. Create git tag: git tag -a v2.5.0 -m "Release v2.5.0"
489
+ 2. Create GitHub release: gh release create v2.5.0 --generate-notes
490
+ ```
491
+
492
+ ### No Changes Detected
493
+
494
+ ```
495
+ 📋 Generating Changelog
496
+
497
+ Detecting version...
498
+ ✅ Current version: v2.4.0
499
+ ✅ Last release: v2.4.0 (2026-01-15)
500
+
501
+ Collecting changes since v2.4.0...
502
+ Found: 0 commits
503
+
504
+ ℹ️ No changes detected since v2.4.0
505
+
506
+ Nothing to add to changelog.
507
+ ```
508
+
509
+ ### Unclear Commits (Manual Categorization)
510
+
511
+ ```
512
+ 📋 Generating Changelog
513
+
514
+ Found 3 commits that need manual categorization:
515
+
516
+ Unclear commits:
517
+ 1. "update stuff" (abc1234)
518
+ 2. "fix things" (def5678)
519
+ 3. "misc changes" (ghi9012)
520
+
521
+ [AskUserQuestion: "How should 'update stuff' be categorized?"]
522
+ - Added (new feature)
523
+ - Changed (modification)
524
+ - Fixed (bug fix)
525
+ - Skip (don't include)
526
+
527
+ User selected: Changed
528
+
529
+ [Continuing with remaining commits...]
530
+ ```
531
+
532
+ ### Version Suggestion
533
+
534
+ ```
535
+ 📊 Version Analysis
536
+
537
+ Changes detected:
538
+ - 3 Added (feat:)
539
+ - 5 Fixed (fix:)
540
+ - 1 BREAKING (feat!:)
541
+
542
+ Version calculation:
543
+ Current: 1.5.2
544
+ Breaking change detected → Major bump required
545
+
546
+ 💡 Suggested: 2.0.0 (MAJOR - breaking change)
547
+
548
+ [AskUserQuestion: "Accept version 2.0.0?"]
549
+ - Yes, use 2.0.0 (Recommended)
550
+ - Use minor: 1.6.0
551
+ - Use patch: 1.5.3
552
+ - Enter custom version
553
+ ```
@@ -51,6 +51,7 @@ node .agileflow/scripts/agileflow-configure.js --profile=full # Enable all
51
51
  node .agileflow/scripts/agileflow-configure.js --migrate # Fix format
52
52
  node .agileflow/scripts/agileflow-configure.js --upgrade # Update scripts
53
53
  node .agileflow/scripts/agileflow-configure.js --repair # Restore missing
54
+ node .agileflow/scripts/agileflow-configure.js --new-options # Check for new options
54
55
  ```
55
56
 
56
57
  ### Critical Rules
@@ -170,8 +171,8 @@ After handling issues (or if none), present the main category menu:
170
171
  "header": "Preset",
171
172
  "multiSelect": false,
172
173
  "options": [
173
- {"label": "Full (Recommended)", "description": "All features: hooks, archival, status line, AskUserQuestion"},
174
- {"label": "Basic", "description": "SessionStart + PreCompact + Archival + AskUserQuestion"},
174
+ {"label": "Full (Recommended)", "description": "All features: hooks, archival, status line, AskUserQuestion, TmuxAutoSpawn"},
175
+ {"label": "Basic", "description": "SessionStart + PreCompact + Archival + AskUserQuestion + TmuxAutoSpawn"},
175
176
  {"label": "Minimal", "description": "SessionStart + Archival only"},
176
177
  {"label": "None", "description": "Disable all AgileFlow features"}
177
178
  ]
@@ -313,7 +314,8 @@ Then ask about other features:
313
314
  {"label": "Archival", "description": "Auto-archive completed stories older than threshold"},
314
315
  {"label": "Status Line", "description": "Custom status bar showing story/epic info"},
315
316
  {"label": "Auto-Update", "description": "Automatically update AgileFlow on session start"},
316
- {"label": "AskUserQuestion Mode", "description": "End responses with guided options"}
317
+ {"label": "AskUserQuestion Mode", "description": "End responses with guided options"},
318
+ {"label": "Tmux Auto-Spawn", "description": "Auto-start Claude in tmux session when using af/agileflow wrapper"}
317
319
  ]
318
320
  }]</parameter>
319
321
  </invoke>
@@ -328,6 +330,7 @@ Map selections to commands:
328
330
  - Status Line → `statusline`
329
331
  - Auto-Update → `autoupdate`
330
332
  - AskUserQuestion Mode → `askuserquestion`
333
+ - Tmux Auto-Spawn → `tmuxautospawn`
331
334
 
332
335
  Then run:
333
336
  ```bash
@@ -379,20 +382,49 @@ Task({ subagent_type: "configuration-ci", description: "Configure CI/CD", prompt
379
382
  "header": "Maintenance",
380
383
  "multiSelect": false,
381
384
  "options": [
385
+ {"label": "Apply new options", "description": "Enable newly available configuration options"},
382
386
  {"label": "Fix format issues", "description": "Migrate invalid settings to correct format"},
383
387
  {"label": "Upgrade scripts", "description": "Update features to latest AgileFlow version"},
384
- {"label": "Repair missing scripts", "description": "Restore accidentally deleted scripts"},
385
- {"label": "Check status", "description": "View current configuration (already shown above)"}
388
+ {"label": "Repair missing scripts", "description": "Restore accidentally deleted scripts"}
386
389
  ]
387
390
  }]</parameter>
388
391
  </invoke>
389
392
  ```
390
393
 
391
394
  Then run:
395
+ - "Apply new options" → Show available new options and apply selected ones (see below)
392
396
  - "Fix format issues" → `node .agileflow/scripts/agileflow-configure.js --migrate`
393
397
  - "Upgrade scripts" → `node .agileflow/scripts/agileflow-configure.js --upgrade`
394
398
  - "Repair missing scripts" → `node .agileflow/scripts/agileflow-configure.js --repair`
395
- - "Check status" → Already shown in Step 1, no action needed
399
+
400
+ #### If "Apply new options" selected
401
+
402
+ Check for unconfigured options:
403
+ ```bash
404
+ node .agileflow/scripts/agileflow-configure.js --new-options
405
+ ```
406
+
407
+ If new options found, present them:
408
+ ```xml
409
+ <invoke name="AskUserQuestion">
410
+ <parameter name="questions">[{
411
+ "question": "Which new options do you want to enable?",
412
+ "header": "New Options",
413
+ "multiSelect": true,
414
+ "options": [
415
+ {"label": "CLAUDE.md reinforcement", "description": "Add /babysit context preservation rules to CLAUDE.md"},
416
+ {"label": "Skip for now", "description": "Don't enable any new options"}
417
+ ]
418
+ }]</parameter>
419
+ </invoke>
420
+ ```
421
+
422
+ Then apply selected options:
423
+ ```bash
424
+ node .agileflow/scripts/agileflow-configure.js --apply-option=claudeMdReinforcement
425
+ ```
426
+
427
+ If no new options: "✅ All configuration options are up to date!"
396
428
 
397
429
  ---
398
430
 
@@ -437,6 +469,10 @@ node .agileflow/scripts/agileflow-configure.js --upgrade
437
469
  node .agileflow/scripts/agileflow-configure.js --repair
438
470
  node .agileflow/scripts/agileflow-configure.js --list-scripts
439
471
  node .agileflow/scripts/agileflow-configure.js --version
472
+
473
+ # New config options
474
+ node .agileflow/scripts/agileflow-configure.js --new-options # List unconfigured options
475
+ node .agileflow/scripts/agileflow-configure.js --apply-option=optionName # Apply specific option
440
476
  ```
441
477
 
442
478
  ## Custom Profiles