agileflow 2.94.0 → 2.95.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 (80) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +6 -6
  3. package/lib/colors.generated.js +117 -0
  4. package/lib/colors.js +59 -109
  5. package/lib/generator-factory.js +333 -0
  6. package/lib/path-utils.js +49 -0
  7. package/lib/session-registry.js +25 -15
  8. package/lib/smart-json-file.js +40 -32
  9. package/lib/state-machine.js +286 -0
  10. package/package.json +1 -1
  11. package/scripts/agileflow-configure.js +7 -6
  12. package/scripts/archive-completed-stories.sh +86 -11
  13. package/scripts/babysit-context-restore.js +89 -0
  14. package/scripts/claude-tmux.sh +186 -7
  15. package/scripts/damage-control/bash-tool-damage-control.js +11 -247
  16. package/scripts/damage-control/edit-tool-damage-control.js +9 -249
  17. package/scripts/damage-control/write-tool-damage-control.js +9 -244
  18. package/scripts/generate-colors.js +314 -0
  19. package/scripts/lib/colors.generated.sh +82 -0
  20. package/scripts/lib/colors.sh +10 -70
  21. package/scripts/lib/configure-features.js +401 -0
  22. package/scripts/lib/context-loader.js +181 -52
  23. package/scripts/precompact-context.sh +54 -17
  24. package/scripts/session-coordinator.sh +2 -2
  25. package/scripts/session-manager.js +677 -11
  26. package/src/core/agents/council-advocate.md +202 -0
  27. package/src/core/agents/council-analyst.md +248 -0
  28. package/src/core/agents/council-optimist.md +166 -0
  29. package/src/core/commands/audit.md +93 -0
  30. package/src/core/commands/auto.md +73 -0
  31. package/src/core/commands/babysit.md +169 -13
  32. package/src/core/commands/baseline.md +73 -0
  33. package/src/core/commands/batch.md +64 -0
  34. package/src/core/commands/blockers.md +60 -0
  35. package/src/core/commands/board.md +66 -0
  36. package/src/core/commands/choose.md +77 -0
  37. package/src/core/commands/ci.md +77 -0
  38. package/src/core/commands/compress.md +27 -1
  39. package/src/core/commands/configure.md +126 -10
  40. package/src/core/commands/council.md +591 -0
  41. package/src/core/commands/debt.md +72 -0
  42. package/src/core/commands/deploy.md +73 -0
  43. package/src/core/commands/deps.md +68 -0
  44. package/src/core/commands/docs.md +60 -0
  45. package/src/core/commands/feedback.md +68 -0
  46. package/src/core/commands/help.md +189 -3
  47. package/src/core/commands/ideate.md +219 -20
  48. package/src/core/commands/impact.md +74 -0
  49. package/src/core/commands/install.md +529 -0
  50. package/src/core/commands/maintain.md +558 -0
  51. package/src/core/commands/metrics.md +75 -0
  52. package/src/core/commands/multi-expert.md +74 -0
  53. package/src/core/commands/packages.md +69 -0
  54. package/src/core/commands/readme-sync.md +64 -0
  55. package/src/core/commands/research/analyze.md +285 -121
  56. package/src/core/commands/research/import.md +281 -109
  57. package/src/core/commands/retro.md +76 -0
  58. package/src/core/commands/review.md +72 -0
  59. package/src/core/commands/rlm.md +83 -0
  60. package/src/core/commands/rpi.md +90 -0
  61. package/src/core/commands/session/cleanup.md +214 -12
  62. package/src/core/commands/session/end.md +229 -17
  63. package/src/core/commands/sprint.md +72 -0
  64. package/src/core/commands/story-validate.md +68 -0
  65. package/src/core/commands/template.md +69 -0
  66. package/src/core/commands/tests.md +83 -0
  67. package/src/core/commands/update.md +59 -0
  68. package/src/core/commands/validate-expertise.md +76 -0
  69. package/src/core/commands/velocity.md +74 -0
  70. package/src/core/commands/verify.md +91 -0
  71. package/src/core/commands/whats-new.md +69 -0
  72. package/src/core/commands/workflow.md +88 -0
  73. package/src/core/council/sessions/.gitkeep +0 -0
  74. package/src/core/council/shared_reasoning.template.md +106 -0
  75. package/src/core/templates/command-documentation.md +187 -0
  76. package/tools/cli/commands/session.js +1171 -0
  77. package/tools/cli/commands/setup.js +2 -81
  78. package/tools/cli/installers/core/installer.js +0 -5
  79. package/tools/cli/installers/ide/claude-code.js +6 -0
  80. package/tools/cli/lib/config-manager.js +42 -5
@@ -523,6 +523,65 @@ OUTPUT
523
523
 
524
524
  ---
525
525
 
526
+ ## Expected Output
527
+
528
+ ### Success - Update Generated
529
+
530
+ ```
531
+ 📊 Stakeholder Update Generated
532
+ ══════════════════════════════════════════════════════════════
533
+
534
+ Period: Oct 9-16, 2025 (Week)
535
+ Audience: Executive
536
+ Format: Markdown
537
+
538
+ Data collected from:
539
+ ✓ status.json (45 stories)
540
+ ✓ 3 epics
541
+ ✓ Git history (28 commits)
542
+ ✓ Bus log (142 events)
543
+ ✓ 2 ADRs
544
+
545
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
546
+ Preview
547
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
548
+
549
+ ## Executive Summary
550
+ **Status**: 🟢 On Track
551
+
552
+ We completed the user authentication epic this week,
553
+ delivering all planned features on schedule.
554
+
555
+ **Key Highlights**:
556
+ - ✅ 12 stories completed (velocity: 18 points)
557
+ - 🎯 Payment integration on track for end-of-month
558
+
559
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
560
+
561
+ Save to: docs/08-project/updates/20251016-update.md
562
+
563
+ Send update? (YES/NO/EDIT)
564
+ ```
565
+
566
+ ### Error - No Data for Period
567
+
568
+ ```
569
+ ⚠️ Insufficient data for update
570
+
571
+ Period: Oct 1-7, 2025
572
+ Stories completed: 0
573
+ Commits: 3
574
+
575
+ Not enough activity to generate meaningful update.
576
+
577
+ Options:
578
+ 1. Expand period to last 2 weeks
579
+ 2. Generate minimal status report
580
+ 3. Cancel
581
+ ```
582
+
583
+ ---
584
+
526
585
  ## Related Commands
527
586
 
528
587
  - `/agileflow:docs` - Synchronize documentation with code
@@ -221,6 +221,82 @@ RULES
221
221
 
222
222
  ---
223
223
 
224
+ ## Expected Output
225
+
226
+ ### Success - All Validations Pass
227
+
228
+ ```
229
+ ======================================
230
+ EXPERTISE VALIDATION REPORT
231
+ ======================================
232
+
233
+ Validating: database
234
+ [PASS] File exists: expertise.yaml
235
+ [PASS] Required sections present
236
+ [PASS] No stale learnings
237
+ [PASS] File size OK (142 lines)
238
+ [PASS] All referenced files exist
239
+
240
+ Validating: api
241
+ [PASS] All checks passed
242
+
243
+ Validating: ui
244
+ [PASS] All checks passed
245
+
246
+ --------------------------------------
247
+ SUMMARY
248
+ --------------------------------------
249
+ Total domains: 25
250
+ Passed: 25
251
+ Warnings: 0
252
+ Failures: 0
253
+
254
+ ✅ All expertise files are valid and up-to-date.
255
+ ```
256
+
257
+ ### Success - Issues Found
258
+
259
+ ```
260
+ ======================================
261
+ EXPERTISE VALIDATION REPORT
262
+ ======================================
263
+
264
+ Validating: database
265
+ [PASS] File exists: expertise.yaml
266
+ [PASS] Required sections present
267
+ [WARN] 2 stale learnings (>30 days)
268
+ [FAIL] DRIFT: src/old/database.ts not found
269
+ [FAIL] DRIFT: lib/deprecated/orm.js not found
270
+
271
+ Validating: api
272
+ [PASS] All checks passed
273
+
274
+ --------------------------------------
275
+ SUMMARY
276
+ --------------------------------------
277
+ Total domains: 25
278
+ Passed: 23
279
+ Warnings: 1
280
+ Failures: 2
281
+
282
+ RECOMMENDED ACTIONS:
283
+ 1. Update database expertise - remove reference to src/old/database.ts
284
+ 2. Update database expertise - remove reference to lib/deprecated/orm.js
285
+ 3. Review stale learnings in database domain
286
+ ```
287
+
288
+ ### Error - Expertise Not Found
289
+
290
+ ```
291
+ ❌ Expertise file not found: .agileflow/experts/mobile/expertise.yaml
292
+
293
+ The 'mobile' domain has no expertise file.
294
+
295
+ Create one with: /agileflow:agent mobile
296
+ ```
297
+
298
+ ---
299
+
224
300
  ## Related Commands
225
301
 
226
302
  - `/agileflow:diagnose` - System health diagnostics
@@ -547,6 +547,80 @@ OUTPUT
547
547
 
548
548
  ---
549
549
 
550
+ ## Expected Output
551
+
552
+ ### Success - Velocity Report
553
+
554
+ ```
555
+ 📊 Velocity Report
556
+ ══════════════════════════════════════════════════════════════
557
+
558
+ Generated: 2025-10-17 14:30
559
+ Period: Last 4 sprints (8 weeks)
560
+ Team: AG-UI, AG-API, AG-CI, AG-DEVOPS
561
+
562
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
563
+ 📈 Current Velocity
564
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
565
+
566
+ Average: 8.3 points/week
567
+ Trend: ↗️ +15% (improving)
568
+ Last sprint: 10 points
569
+ Confidence: High (85%)
570
+
571
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
572
+ 🎯 Forecast: EP-0010 (User Auth)
573
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
574
+
575
+ Stories: 8/12 completed (66%)
576
+ Remaining: 6 points
577
+ At current velocity: < 1 week
578
+ Forecast completion: 2025-10-24
579
+ Confidence: High (85%)
580
+
581
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
582
+
583
+ Saved to: docs/08-project/velocity/velocity-2025-10-17.md
584
+ ```
585
+
586
+ ### Success - Forecast Mode
587
+
588
+ ```
589
+ 📊 Epic Completion Forecast
590
+ ══════════════════════════════════════════════════════════════
591
+
592
+ Epic: EP-0011 (Payment Integration)
593
+ Current velocity: 8.3 points/week
594
+
595
+ Stories: 2/8 completed (25%)
596
+ Remaining: 6 stories, 9 points
597
+
598
+ Forecast:
599
+ P50 (50% confidence): 2025-10-28 (11 days)
600
+ P80 (80% confidence): 2025-11-01 (15 days)
601
+ P90 (90% confidence): 2025-11-04 (18 days)
602
+
603
+ ⚠️ Risks:
604
+ - AG-API dependency (50% of velocity)
605
+ - 2 stories have external dependencies
606
+ ```
607
+
608
+ ### Error - Insufficient Data
609
+
610
+ ```
611
+ ⚠️ Insufficient velocity data
612
+
613
+ Sample size: 3 stories completed
614
+ Minimum required: 5 stories
615
+
616
+ Velocity calculations require at least 5 completed stories
617
+ over 3+ time periods for reliable forecasting.
618
+
619
+ Complete more stories and try again.
620
+ ```
621
+
622
+ ---
623
+
550
624
  ## Related Commands
551
625
 
552
626
  - `/agileflow:sprint` - Sprint planning
@@ -411,6 +411,97 @@ Run without story_id to verify all in_progress stories.
411
411
 
412
412
  ---
413
413
 
414
+ ## Expected Output
415
+
416
+ ### Success - Tests Passing
417
+
418
+ ```
419
+ 🧪 Test Verification Complete
420
+ ══════════════════════════════════════════════════════════════
421
+
422
+ Command: npm test
423
+ Duration: 12.3s
424
+ Result: ✅ PASSED
425
+
426
+ Tests: 42 passed, 0 failed, 42 total
427
+
428
+ Updated stories:
429
+ • US-0042: passing
430
+ • US-0043: passing
431
+
432
+ All in-progress stories have passing tests ✅
433
+ ```
434
+
435
+ ### Error - Tests Failing
436
+
437
+ ```
438
+ 🧪 Test Verification Complete
439
+ ══════════════════════════════════════════════════════════════
440
+
441
+ Command: npm test
442
+ Duration: 8.7s
443
+ Result: ❌ FAILED
444
+
445
+ Tests: 40 passed, 2 failed, 42 total
446
+
447
+ Failed tests:
448
+ ❌ auth.test.ts:42
449
+ Expected redirect to /dashboard
450
+ Got redirect to /login
451
+
452
+ ❌ auth.test.ts:67
453
+ Session token not persisting
454
+ Cookie not set after login
455
+
456
+ Updated stories:
457
+ • US-0042: failing
458
+ • US-0043: failing
459
+
460
+ ⚠️ WARNING: 2 stories now have failing tests
461
+ ```
462
+
463
+ ### Error - Timeout
464
+
465
+ ```
466
+ 🧪 Test Verification Failed
467
+ ══════════════════════════════════════════════════════════════
468
+
469
+ Command: npm test
470
+ Result: ⏱️ TIMEOUT (60s)
471
+
472
+ The test suite did not complete within 60 seconds.
473
+
474
+ Updated stories:
475
+ • US-0042: failing (timeout)
476
+
477
+ ⚠️ Consider:
478
+ 1. Increase test_timeout_ms in environment.json
479
+ 2. Optimize slow tests
480
+ 3. Run specific test suites instead of all tests
481
+ ```
482
+
483
+ ### Error - Session Not Initialized
484
+
485
+ ```
486
+ ⚠️ Session Harness Not Initialized
487
+ ══════════════════════════════════════════════════════════════
488
+
489
+ The verify command requires session harness configuration.
490
+
491
+ Run /agileflow:session:init to:
492
+ 1. Detect your project type and test command
493
+ 2. Create environment.json configuration
494
+ 3. Enable test verification for all stories
495
+
496
+ Or manually create docs/00-meta/environment.json with:
497
+ {
498
+ "test_command": "npm test",
499
+ "test_timeout_ms": 60000
500
+ }
501
+ ```
502
+
503
+ ---
504
+
414
505
  ## Example Execution
415
506
 
416
507
  ```
@@ -125,6 +125,75 @@ If a newer version exists, show:
125
125
 
126
126
  ---
127
127
 
128
+ ## Expected Output
129
+
130
+ ### Success - Changelog Display
131
+
132
+ ```
133
+ ╭─────────────────────────────────────────────────────╮
134
+ │ AgileFlow Changelog │
135
+ │ Current: v2.57.0 │
136
+ ╰─────────────────────────────────────────────────────╯
137
+
138
+ ## v2.57.0 (2025-12-27)
139
+
140
+ ### Added
141
+ • Auto-update system with configurable check frequency
142
+ • Update notifications in welcome message and status line
143
+ • Changelog display after updates
144
+
145
+ ---
146
+
147
+ ## v2.56.0 (2025-12-27)
148
+
149
+ ### Added
150
+ • Dynamic IDE discovery - Codex CLI now in setup
151
+
152
+ ### Changed
153
+ • Replaced hardcoded IDE list with dynamic loading
154
+
155
+ ---
156
+
157
+ ## v2.55.0 (2025-12-26)
158
+
159
+ ### Changed
160
+ • Consolidated code improvements and debugging
161
+
162
+ ---
163
+
164
+ 📖 Full changelog: https://github.com/projectquestorg/AgileFlow/blob/main/packages/cli/CHANGELOG.md
165
+ 🔄 Check for updates: npx agileflow update
166
+ ⚙️ Configure auto-update: /agileflow:configure --auto-update
167
+ ```
168
+
169
+ ### Success - Update Available
170
+
171
+ ```
172
+ ╭─────────────────────────────────────────────────────╮
173
+ │ AgileFlow Changelog │
174
+ │ Current: v2.57.0 │
175
+ ╰─────────────────────────────────────────────────────╯
176
+
177
+ [changelog content...]
178
+
179
+ ⚡ Update available: v2.57.0 → v2.58.0
180
+ Run: npx agileflow update
181
+ ```
182
+
183
+ ### Error - Changelog Not Found
184
+
185
+ ```
186
+ ⚠️ Changelog not found
187
+
188
+ Expected location: .agileflow/CHANGELOG.md
189
+
190
+ The changelog file may be missing or AgileFlow may need to be reinstalled.
191
+
192
+ Check: https://github.com/projectquestorg/AgileFlow/releases
193
+ ```
194
+
195
+ ---
196
+
128
197
  ## Related Commands
129
198
 
130
199
  - `/agileflow:changelog` - Generate changelog from commits
@@ -350,6 +350,94 @@ Custom workflows (docs/08-project/workflows/):
350
350
 
351
351
  ---
352
352
 
353
+ ## Expected Output
354
+
355
+ ### Success - Workflow Executed
356
+
357
+ ```
358
+ 🔄 Workflow: review
359
+ ══════════════════════════════════════════════════════════════
360
+
361
+ Arguments:
362
+ • path: src/auth.ts
363
+ • focus: security
364
+
365
+ Executing workflow steps...
366
+
367
+ Step 1: Reading target file(s)
368
+ ✓ Read src/auth.ts (245 lines)
369
+
370
+ Step 2: Spawning security expert
371
+ ✓ agileflow-security analyzing...
372
+
373
+ Step 3: Generating findings
374
+
375
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
376
+ 📋 Review Results
377
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
378
+
379
+ Security Analysis: src/auth.ts
380
+
381
+ 🔴 HIGH: Hardcoded JWT secret (line 42)
382
+ Suggestion: Use environment variable
383
+
384
+ 🟡 MEDIUM: No rate limiting on login endpoint
385
+ Suggestion: Add rate limiter middleware
386
+
387
+ 🟢 LOW: Console.log in production code (line 87)
388
+ Suggestion: Remove or use proper logging
389
+
390
+ Summary: 1 high, 1 medium, 1 low severity issues
391
+ ```
392
+
393
+ ### Success - List Workflows
394
+
395
+ ```
396
+ 📋 Available Workflows
397
+ ══════════════════════════════════════════════════════════════
398
+
399
+ Built-in workflows:
400
+ • review Code review with configurable focus
401
+ • test-feature Test a feature end-to-end
402
+ • implement Implement a story/feature
403
+ • analyze Analyze codebase for issues
404
+
405
+ Custom workflows (docs/08-project/workflows/):
406
+ • deploy-staging Deploy to staging environment
407
+ • release-check Pre-release checklist
408
+
409
+ Usage: /agileflow:workflow <name> [args...]
410
+ ```
411
+
412
+ ### Error - Unknown Workflow
413
+
414
+ ```
415
+ ❌ Workflow not found: my-workflow
416
+
417
+ Available workflows:
418
+ • review
419
+ • test-feature
420
+ • implement
421
+ • analyze
422
+
423
+ Create custom workflow:
424
+ docs/08-project/workflows/my-workflow.md
425
+ ```
426
+
427
+ ### Error - Missing Required Argument
428
+
429
+ ```
430
+ ❌ Missing required argument: path
431
+
432
+ Workflow 'review' requires:
433
+ • path (required): File or glob pattern to review
434
+ • focus (optional): Review focus (default: all)
435
+
436
+ Usage: /agileflow:workflow review path=src/auth.ts focus=security
437
+ ```
438
+
439
+ ---
440
+
353
441
  ## Related Commands
354
442
 
355
443
  - `/agileflow:babysit` - Interactive mentor workflow
File without changes
@@ -0,0 +1,106 @@
1
+ # AI Council Deliberation
2
+
3
+ ## Session Info
4
+ - **Session ID**: {{session_id}}
5
+ - **Created**: {{timestamp}}
6
+ - **Mode**: {{mode}} (parallel | debate)
7
+ - **Rounds**: {{rounds}}
8
+
9
+ ---
10
+
11
+ ## Question/Proposal
12
+
13
+ {{question}}
14
+
15
+ ---
16
+
17
+ ## Council Perspectives
18
+
19
+ ### Round 1
20
+
21
+ #### Optimist Strategist
22
+ <!-- council-optimist writes here -->
23
+
24
+ [Awaiting optimist perspective...]
25
+
26
+ ---
27
+
28
+ #### Devil's Advocate
29
+ <!-- council-advocate writes here -->
30
+
31
+ [Awaiting advocate perspective...]
32
+
33
+ ---
34
+
35
+ #### Neutral Analyst
36
+ <!-- council-analyst writes here -->
37
+
38
+ [Awaiting analyst perspective...]
39
+
40
+ ---
41
+
42
+ {{#if debate_mode}}
43
+ ### Round {{round_number}}
44
+
45
+ #### Optimist Response
46
+ <!-- Responds to other perspectives -->
47
+
48
+ [Awaiting optimist response...]
49
+
50
+ ---
51
+
52
+ #### Advocate Response
53
+ <!-- Responds to other perspectives -->
54
+
55
+ [Awaiting advocate response...]
56
+
57
+ ---
58
+
59
+ #### Analyst Synthesis
60
+ <!-- Synthesizes debate -->
61
+
62
+ [Awaiting analyst synthesis...]
63
+
64
+ ---
65
+ {{/if}}
66
+
67
+ ## Final Synthesis
68
+
69
+ ### Common Ground (All Agree)
70
+ - [To be synthesized after all perspectives received]
71
+
72
+ ### Opportunities (Optimist Unique)
73
+ - [From optimist perspective]
74
+
75
+ ### Risks (Advocate Unique)
76
+ - [From advocate perspective]
77
+
78
+ ### Trade-offs (Analyst Assessment)
79
+ - [From analyst perspective]
80
+
81
+ ### Recommendation
82
+ **Decision**: [To be determined]
83
+ **Confidence**: [High/Medium/Low]
84
+ **Reasoning**: [Summary of key factors]
85
+
86
+ ### Next Steps
87
+ 1. [Action item]
88
+ 2. [Action item]
89
+ 3. [Action item]
90
+
91
+ ---
92
+
93
+ ## Metadata
94
+
95
+ ```json
96
+ {
97
+ "session_id": "{{session_id}}",
98
+ "question": "{{question}}",
99
+ "mode": "{{mode}}",
100
+ "rounds": {{rounds}},
101
+ "agents": ["council-optimist", "council-advocate", "council-analyst"],
102
+ "status": "in_progress",
103
+ "created_at": "{{timestamp}}",
104
+ "completed_at": null
105
+ }
106
+ ```