agileflow 2.94.1 → 2.95.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +3 -3
  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 +111 -5
  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 +653 -10
  26. package/src/core/commands/audit.md +93 -0
  27. package/src/core/commands/auto.md +73 -0
  28. package/src/core/commands/babysit.md +169 -13
  29. package/src/core/commands/baseline.md +73 -0
  30. package/src/core/commands/batch.md +64 -0
  31. package/src/core/commands/blockers.md +60 -0
  32. package/src/core/commands/board.md +66 -0
  33. package/src/core/commands/choose.md +77 -0
  34. package/src/core/commands/ci.md +77 -0
  35. package/src/core/commands/compress.md +27 -1
  36. package/src/core/commands/configure.md +126 -10
  37. package/src/core/commands/council.md +74 -0
  38. package/src/core/commands/debt.md +72 -0
  39. package/src/core/commands/deploy.md +73 -0
  40. package/src/core/commands/deps.md +68 -0
  41. package/src/core/commands/docs.md +60 -0
  42. package/src/core/commands/feedback.md +68 -0
  43. package/src/core/commands/ideate.md +74 -0
  44. package/src/core/commands/impact.md +74 -0
  45. package/src/core/commands/install.md +529 -0
  46. package/src/core/commands/maintain.md +558 -0
  47. package/src/core/commands/metrics.md +75 -0
  48. package/src/core/commands/multi-expert.md +74 -0
  49. package/src/core/commands/packages.md +69 -0
  50. package/src/core/commands/readme-sync.md +64 -0
  51. package/src/core/commands/research/analyze.md +285 -121
  52. package/src/core/commands/research/import.md +281 -109
  53. package/src/core/commands/retro.md +76 -0
  54. package/src/core/commands/review.md +72 -0
  55. package/src/core/commands/rlm.md +83 -0
  56. package/src/core/commands/rpi.md +90 -0
  57. package/src/core/commands/session/cleanup.md +214 -12
  58. package/src/core/commands/session/end.md +155 -17
  59. package/src/core/commands/sprint.md +72 -0
  60. package/src/core/commands/story-validate.md +68 -0
  61. package/src/core/commands/template.md +69 -0
  62. package/src/core/commands/tests.md +83 -0
  63. package/src/core/commands/update.md +59 -0
  64. package/src/core/commands/validate-expertise.md +76 -0
  65. package/src/core/commands/velocity.md +74 -0
  66. package/src/core/commands/verify.md +91 -0
  67. package/src/core/commands/whats-new.md +69 -0
  68. package/src/core/commands/workflow.md +88 -0
  69. package/src/core/templates/command-documentation.md +187 -0
  70. package/tools/cli/commands/session.js +1171 -0
  71. package/tools/cli/commands/setup.js +2 -81
  72. package/tools/cli/installers/core/installer.js +0 -5
  73. package/tools/cli/installers/ide/claude-code.js +6 -0
  74. package/tools/cli/lib/config-manager.js +42 -5
@@ -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
@@ -0,0 +1,187 @@
1
+ # Command Documentation Template
2
+
3
+ This template provides a standardized structure for documenting AgileFlow slash commands.
4
+
5
+ ## File Structure
6
+
7
+ ```markdown
8
+ ---
9
+ # REQUIRED: Frontmatter section
10
+ description: Brief one-line description of what the command does
11
+ argument-hint: PARAM1=<value> [PARAM2=<optional>]
12
+ compact_context:
13
+ priority: high|medium|low
14
+ preserve_rules:
15
+ - "Rule descriptions for compact context"
16
+ state_fields:
17
+ - field_name
18
+ ---
19
+
20
+ # command-name
21
+
22
+ Full description of the command's purpose and primary use case.
23
+
24
+ ---
25
+
26
+ ## STEP 0: Gather Context
27
+
28
+ ```bash
29
+ node .agileflow/scripts/obtain-context.js command-name
30
+ ```
31
+
32
+ This gathers relevant context for the command.
33
+
34
+ ---
35
+
36
+ ## Context Loading (Documentation)
37
+
38
+ **PURPOSE**: Description of why context is loaded.
39
+
40
+ **ACTIONS**:
41
+ 1. Action item 1
42
+ 2. Action item 2
43
+
44
+ **WHY**: Explanation of benefits.
45
+
46
+ ---
47
+
48
+ ## Syntax
49
+
50
+ ```
51
+ /agileflow:command-name PARAM1=value [PARAM2=optional]
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ | Parameter | Required | Default | Description |
57
+ |-----------|----------|---------|-------------|
58
+ | PARAM1 | Yes | - | Description |
59
+ | PARAM2 | No | default | Description |
60
+
61
+ ---
62
+
63
+ ## Examples
64
+
65
+ ### Basic Usage
66
+
67
+ ```
68
+ /agileflow:command-name PARAM1=example
69
+ ```
70
+
71
+ ### Advanced Usage
72
+
73
+ ```
74
+ /agileflow:command-name PARAM1=example PARAM2=custom
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Expected Output
80
+
81
+ ### Success Case
82
+
83
+ ```
84
+ ✓ Operation completed successfully
85
+
86
+ Results:
87
+ - Item 1: value
88
+ - Item 2: value
89
+ ```
90
+
91
+ ### Error Cases
92
+
93
+ #### Missing Required Parameter
94
+
95
+ ```
96
+ ❌ Error: PARAM1 is required
97
+ Usage: /agileflow:command-name PARAM1=<value>
98
+ ```
99
+
100
+ #### Invalid Parameter Value
101
+
102
+ ```
103
+ ❌ Error: Invalid value for PARAM1: 'invalid'
104
+ Expected: description of valid values
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Related Commands
110
+
111
+ - `/agileflow:related1` - Description
112
+ - `/agileflow:related2` - Description
113
+
114
+ ---
115
+
116
+ ## Troubleshooting
117
+
118
+ ### Common Issue 1
119
+
120
+ **Symptom**: Description of what goes wrong.
121
+
122
+ **Cause**: Explanation of why it happens.
123
+
124
+ **Solution**: Steps to resolve.
125
+
126
+ ### Common Issue 2
127
+
128
+ **Symptom**: Description.
129
+
130
+ **Cause**: Explanation.
131
+
132
+ **Solution**: Steps.
133
+
134
+ ---
135
+
136
+ ## See Also
137
+
138
+ - [Practice Guide](link) - Related practice documentation
139
+ - [Architecture Doc](link) - Technical implementation details
140
+ ```
141
+
142
+ ## Best Practices for Command Documentation
143
+
144
+ ### 1. Description Quality
145
+
146
+ - **Frontmatter description**: Keep to one line, action-oriented (e.g., "Create a new story" not "This command creates stories")
147
+ - **Main description**: 1-2 sentences explaining the command's purpose and when to use it
148
+
149
+ ### 2. Expected Output Section
150
+
151
+ Always include:
152
+ - **Success case**: Show actual CLI output the user will see
153
+ - **At least 2 error cases**: Common failures with their messages
154
+ - Use actual ANSI color indicators if present:
155
+ - `✓` (green) for success
156
+ - `❌` (red) for errors
157
+ - `⚠️` (yellow) for warnings
158
+
159
+ ### 3. Parameter Documentation
160
+
161
+ - Table format for clarity
162
+ - Always specify Required/Optional
163
+ - Include default values
164
+ - Provide meaningful descriptions
165
+
166
+ ### 4. Examples
167
+
168
+ - Start with simplest usage
169
+ - Progress to advanced scenarios
170
+ - Include real-world use cases
171
+
172
+ ### 5. Consistency
173
+
174
+ - Use consistent heading levels
175
+ - Follow the template structure
176
+ - Match the formatting of existing commands
177
+
178
+ ## Checklist Before Publishing
179
+
180
+ - [ ] Frontmatter has description and argument-hint
181
+ - [ ] Expected Output section exists
182
+ - [ ] At least one success example shown
183
+ - [ ] At least two error scenarios documented
184
+ - [ ] Parameters are documented in a table
185
+ - [ ] Examples demonstrate common use cases
186
+ - [ ] Related commands are linked
187
+ - [ ] Troubleshooting section addresses common issues