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
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.95.0] - 2026-01-30
11
+
12
+ ### Added
13
+ - Global session management commands (status, history, cleanup)
14
+ - `/agileflow:install` and `/agileflow:maintain` commands for quick setup
15
+ - Multi-expert Implementation Ideation in `/research:import` and `/research:analyze`
16
+ - Plan file context preservation with experimental profile
17
+ - Tmux freeze recovery keybinds and `--rescue` flag
18
+ - Shellcheck CI job for shell script linting
19
+
20
+ ### Fixed
21
+ - Prevent worktree sessions from being marked as main
22
+ - Prevent duplicate agents during install/update
23
+ - Inline uncommitted changes handling for `/session:end`
24
+
25
+ ## [2.94.1] - 2026-01-24
26
+
27
+ ### Added
28
+ - DEPTH=ultradeep mode for comprehensive 13-expert ideation
29
+
10
30
  ## [2.94.0] - 2026-01-24
11
31
 
12
32
  ### Added
package/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  </p>
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/agileflow?color=brightgreen)](https://www.npmjs.com/package/agileflow)
6
- [![Commands](https://img.shields.io/badge/commands-78-blue)](docs/04-architecture/commands.md)
7
- [![Agents/Experts](https://img.shields.io/badge/agents%2Fexperts-31-orange)](docs/04-architecture/subagents.md)
6
+ [![Commands](https://img.shields.io/badge/commands-79-blue)](docs/04-architecture/commands.md)
7
+ [![Agents/Experts](https://img.shields.io/badge/agents%2Fexperts-34-orange)](docs/04-architecture/subagents.md)
8
8
  [![Skills](https://img.shields.io/badge/skills-dynamic-purple)](docs/04-architecture/skills.md)
9
9
 
10
10
  **AI-driven agile development for Claude Code, Cursor, Windsurf, OpenAI Codex CLI, and more.** Combining Scrum, Kanban, ADRs, and docs-as-code principles into one framework-agnostic system.
@@ -65,8 +65,8 @@ AgileFlow combines three proven methodologies:
65
65
 
66
66
  | Component | Count | Description |
67
67
  |-----------|-------|-------------|
68
- | [Commands](docs/04-architecture/commands.md) | 78 | Slash commands for agile workflows |
69
- | [Agents/Experts](docs/04-architecture/subagents.md) | 31 | Specialized agents with self-improving knowledge bases |
68
+ | [Commands](docs/04-architecture/commands.md) | 79 | Slash commands for agile workflows |
69
+ | [Agents/Experts](docs/04-architecture/subagents.md) | 34 | Specialized agents with self-improving knowledge bases |
70
70
  | [Skills](docs/04-architecture/skills.md) | Dynamic | Generated on-demand with `/agileflow:skill:create` |
71
71
 
72
72
  ---
@@ -76,8 +76,8 @@ AgileFlow combines three proven methodologies:
76
76
  Full documentation lives in [`docs/04-architecture/`](docs/04-architecture/):
77
77
 
78
78
  ### Reference
79
- - [Commands](docs/04-architecture/commands.md) - All 78 slash commands
80
- - [Agents/Experts](docs/04-architecture/subagents.md) - 31 specialized agents with self-improving knowledge
79
+ - [Commands](docs/04-architecture/commands.md) - All 79 slash commands
80
+ - [Agents/Experts](docs/04-architecture/subagents.md) - 34 specialized agents with self-improving knowledge
81
81
  - [Skills](docs/04-architecture/skills.md) - Dynamic skill generator with MCP integration
82
82
 
83
83
  ### Architecture
@@ -0,0 +1,117 @@
1
+ /**
2
+ * colors.generated.js - Auto-generated from config/colors.yaml
3
+ *
4
+ * DO NOT EDIT THIS FILE DIRECTLY.
5
+ * Run: node scripts/generate-colors.js
6
+ *
7
+ * Generated: 2026-01-29T08:28:33.726Z
8
+ */
9
+
10
+ 'use strict';
11
+
12
+ // Brand color
13
+ const BRAND_HEX = '#e8683a';
14
+
15
+ // Modifiers
16
+ const modifiers = {
17
+ reset: '\x1b[0m',
18
+ bold: '\x1b[1m',
19
+ dim: '\x1b[2m',
20
+ italic: '\x1b[3m',
21
+ underline: '\x1b[4m',
22
+ };
23
+
24
+ // Standard ANSI colors
25
+ const standard = {
26
+ red: '\x1b[31m',
27
+ green: '\x1b[32m',
28
+ yellow: '\x1b[33m',
29
+ blue: '\x1b[34m',
30
+ magenta: '\x1b[35m',
31
+ cyan: '\x1b[36m',
32
+ white: '\x1b[37m',
33
+ black: '\x1b[30m',
34
+ };
35
+
36
+ // Bright ANSI colors
37
+ const bright = {
38
+ brightRed: '\x1b[91m',
39
+ brightGreen: '\x1b[92m',
40
+ brightYellow: '\x1b[93m',
41
+ brightBlue: '\x1b[94m',
42
+ brightMagenta: '\x1b[95m',
43
+ brightCyan: '\x1b[96m',
44
+ brightWhite: '\x1b[97m',
45
+ brightBlack: '\x1b[90m',
46
+ };
47
+
48
+ // 256-color palette
49
+ const palette256 = {
50
+ mintGreen: '\x1b[38;5;158m', // Healthy/success states
51
+ peach: '\x1b[38;5;215m', // Warning states
52
+ coral: '\x1b[38;5;203m', // Critical/error states
53
+ lightGreen: '\x1b[38;5;194m', // Session healthy
54
+ lightYellow: '\x1b[38;5;228m', // Session warning
55
+ lightPink: '\x1b[38;5;210m', // Session critical
56
+ skyBlue: '\x1b[38;5;117m', // Directories/paths, ready states
57
+ lavender: '\x1b[38;5;147m', // Model info, story IDs
58
+ softGold: '\x1b[38;5;222m', // Cost/money
59
+ teal: '\x1b[38;5;80m', // Pending states
60
+ slate: '\x1b[38;5;103m', // Secondary info
61
+ rose: '\x1b[38;5;211m', // Blocked/critical accent
62
+ amber: '\x1b[38;5;214m', // WIP/in-progress accent
63
+ powder: '\x1b[38;5;153m', // Labels/headers
64
+ };
65
+
66
+ // Background colors
67
+ const backgrounds = {
68
+ bgRed: '\x1b[41m',
69
+ bgGreen: '\x1b[42m',
70
+ bgYellow: '\x1b[43m',
71
+ bgBlue: '\x1b[44m',
72
+ };
73
+
74
+ // Brand color ANSI
75
+ const brand = '\x1b[38;2;232;104;58m';
76
+
77
+ // High-contrast mode colors (WCAG AAA)
78
+ const highContrast = {
79
+ red: '\x1b[91m',
80
+ green: '\x1b[92m',
81
+ yellow: '\x1b[93m',
82
+ blue: '\x1b[94m',
83
+ magenta: '\x1b[95m',
84
+ cyan: '\x1b[96m',
85
+ white: '\x1b[97m',
86
+ dim: '\x1b[0m',
87
+ brightBlack: '\x1b[37m',
88
+ brand: '\x1b[38;2;255;165;0m',
89
+ };
90
+
91
+ // Combined standard color palette
92
+ const cStandard = {
93
+ ...modifiers,
94
+ ...standard,
95
+ ...bright,
96
+ ...palette256,
97
+ ...backgrounds,
98
+ brand,
99
+ orange: brand, // Alias
100
+ // Semantic aliases
101
+ success: standard.green,
102
+ error: standard.red,
103
+ warning: standard.yellow,
104
+ info: standard.cyan,
105
+ };
106
+
107
+ module.exports = {
108
+ BRAND_HEX,
109
+ modifiers,
110
+ standard,
111
+ bright,
112
+ palette256,
113
+ backgrounds,
114
+ brand,
115
+ highContrast,
116
+ cStandard,
117
+ };
package/lib/colors.js CHANGED
@@ -4,6 +4,9 @@
4
4
  * Centralized ANSI color codes and formatting helpers.
5
5
  * Uses 256-color palette for modern terminal support.
6
6
  *
7
+ * Color definitions are generated from config/colors.yaml.
8
+ * Run: node scripts/generate-colors.js
9
+ *
7
10
  * WCAG AA Contrast Ratios (verified against #1a1a1a dark terminal background):
8
11
  * - Green (#32CD32): 4.5:1 ✓ (meets AA for normal text)
9
12
  * - Red (#FF6B6B): 5.0:1 ✓ (meets AA for normal text)
@@ -22,6 +25,9 @@
22
25
  * are for typical dark terminal configurations.
23
26
  */
24
27
 
28
+ // Import generated color definitions from YAML source of truth
29
+ const generated = require('./colors.generated');
30
+
25
31
  // High-contrast mode detection
26
32
  let _highContrastMode = null;
27
33
 
@@ -57,135 +63,79 @@ function resetHighContrast() {
57
63
  * Brand color hex value for chalk compatibility.
58
64
  * Use with chalk.hex(BRAND_HEX) in files that use chalk.
59
65
  */
60
- const BRAND_HEX = '#e8683a';
66
+ const { BRAND_HEX } = generated;
61
67
 
62
68
  /**
63
69
  * WCAG AAA high-contrast color palette (7:1+ contrast ratio).
64
70
  * Used when AGILEFLOW_HIGH_CONTRAST=1 or --high-contrast flag.
71
+ * Built from generated highContrast values plus additional mappings.
65
72
  */
66
73
  const hc = {
67
- // Reset and modifiers
68
- reset: '\x1b[0m',
69
- bold: '\x1b[1m',
70
- dim: '\x1b[0m', // No dimming in high-contrast (use regular text)
71
- italic: '\x1b[3m',
72
- underline: '\x1b[4m',
73
-
74
- // High-contrast standard colors (bright variants for max visibility)
75
- red: '\x1b[91m', // Bright red
76
- green: '\x1b[92m', // Bright green
77
- yellow: '\x1b[93m', // Bright yellow
78
- blue: '\x1b[94m', // Bright blue
79
- magenta: '\x1b[95m', // Bright magenta
80
- cyan: '\x1b[96m', // Bright cyan
81
- white: '\x1b[97m', // Bright white
74
+ // Reset and modifiers from generated
75
+ reset: generated.modifiers.reset,
76
+ bold: generated.modifiers.bold,
77
+ dim: generated.highContrast.dim, // No dimming in high-contrast
78
+ italic: generated.modifiers.italic,
79
+ underline: generated.modifiers.underline,
80
+
81
+ // High-contrast standard colors (from generated)
82
+ red: generated.highContrast.red,
83
+ green: generated.highContrast.green,
84
+ yellow: generated.highContrast.yellow,
85
+ blue: generated.highContrast.blue,
86
+ magenta: generated.highContrast.magenta,
87
+ cyan: generated.highContrast.cyan,
88
+ white: generated.highContrast.white,
82
89
 
83
90
  // Bright variants (same in high-contrast mode)
84
- brightBlack: '\x1b[37m', // Use white instead of gray
85
- brightRed: '\x1b[91m',
86
- brightGreen: '\x1b[92m',
87
- brightYellow: '\x1b[93m',
88
- brightBlue: '\x1b[94m',
89
- brightMagenta: '\x1b[95m',
90
- brightCyan: '\x1b[96m',
91
- brightWhite: '\x1b[97m',
91
+ brightBlack: generated.highContrast.brightBlack, // Use white instead of gray
92
+ brightRed: generated.highContrast.red,
93
+ brightGreen: generated.highContrast.green,
94
+ brightYellow: generated.highContrast.yellow,
95
+ brightBlue: generated.highContrast.blue,
96
+ brightMagenta: generated.highContrast.magenta,
97
+ brightCyan: generated.highContrast.cyan,
98
+ brightWhite: generated.highContrast.white,
92
99
 
93
100
  // 256-color high-contrast alternatives (all 7:1+ ratio)
94
- mintGreen: '\x1b[92m', // Bright green
95
- peach: '\x1b[93m', // Bright yellow
96
- coral: '\x1b[91m', // Bright red
97
- lightGreen: '\x1b[92m', // Bright green
98
- lightYellow: '\x1b[93m', // Bright yellow
99
- lightPink: '\x1b[91m', // Bright red
100
- skyBlue: '\x1b[96m', // Bright cyan
101
- lavender: '\x1b[95m', // Bright magenta
102
- softGold: '\x1b[93m', // Bright yellow
103
- teal: '\x1b[96m', // Bright cyan
104
- slate: '\x1b[97m', // White (instead of gray)
105
- rose: '\x1b[91m', // Bright red
106
- amber: '\x1b[93m', // Bright yellow
107
- powder: '\x1b[96m', // Bright cyan
108
-
109
- // Brand color - use bright orange/yellow for visibility
110
- brand: '\x1b[38;2;255;165;0m', // Bright orange (#FFA500 - 8.0:1 ratio)
111
- orange: '\x1b[38;2;255;165;0m',
101
+ mintGreen: generated.highContrast.green,
102
+ peach: generated.highContrast.yellow,
103
+ coral: generated.highContrast.red,
104
+ lightGreen: generated.highContrast.green,
105
+ lightYellow: generated.highContrast.yellow,
106
+ lightPink: generated.highContrast.red,
107
+ skyBlue: generated.highContrast.cyan,
108
+ lavender: generated.highContrast.magenta,
109
+ softGold: generated.highContrast.yellow,
110
+ teal: generated.highContrast.cyan,
111
+ slate: generated.highContrast.white, // White instead of gray
112
+ rose: generated.highContrast.red,
113
+ amber: generated.highContrast.yellow,
114
+ powder: generated.highContrast.cyan,
115
+
116
+ // Brand color - from generated high-contrast brand
117
+ brand: generated.highContrast.brand,
118
+ orange: generated.highContrast.brand,
112
119
 
113
120
  // Background colors (same as standard)
114
- bgRed: '\x1b[41m',
115
- bgGreen: '\x1b[42m',
116
- bgYellow: '\x1b[43m',
117
- bgBlue: '\x1b[44m',
121
+ bgRed: generated.backgrounds.bgRed,
122
+ bgGreen: generated.backgrounds.bgGreen,
123
+ bgYellow: generated.backgrounds.bgYellow,
124
+ bgBlue: generated.backgrounds.bgBlue,
118
125
 
119
126
  // Semantic aliases
120
- success: '\x1b[92m',
121
- error: '\x1b[91m',
122
- warning: '\x1b[93m',
123
- info: '\x1b[96m',
127
+ success: generated.highContrast.green,
128
+ error: generated.highContrast.red,
129
+ warning: generated.highContrast.yellow,
130
+ info: generated.highContrast.cyan,
124
131
  };
125
132
 
126
133
  /**
127
134
  * ANSI color codes for terminal output.
128
135
  * Includes standard colors, 256-color palette, and brand colors.
136
+ * Values imported from generated colors (config/colors.yaml source of truth).
129
137
  */
130
- const cStandard = {
131
- // Reset and modifiers
132
- reset: '\x1b[0m',
133
- bold: '\x1b[1m',
134
- dim: '\x1b[2m',
135
- italic: '\x1b[3m',
136
- underline: '\x1b[4m',
137
-
138
- // Standard ANSI colors (8 colors)
139
- red: '\x1b[31m',
140
- green: '\x1b[32m',
141
- yellow: '\x1b[33m',
142
- blue: '\x1b[34m',
143
- magenta: '\x1b[35m',
144
- cyan: '\x1b[36m',
145
- white: '\x1b[37m',
146
-
147
- // Bright variants
148
- brightBlack: '\x1b[90m',
149
- brightRed: '\x1b[91m',
150
- brightGreen: '\x1b[92m',
151
- brightYellow: '\x1b[93m',
152
- brightBlue: '\x1b[94m',
153
- brightMagenta: '\x1b[95m',
154
- brightCyan: '\x1b[96m',
155
- brightWhite: '\x1b[97m',
156
-
157
- // 256-color palette (vibrant, modern look)
158
- mintGreen: '\x1b[38;5;158m', // Healthy/success states
159
- peach: '\x1b[38;5;215m', // Warning states
160
- coral: '\x1b[38;5;203m', // Critical/error states
161
- lightGreen: '\x1b[38;5;194m', // Session healthy
162
- lightYellow: '\x1b[38;5;228m', // Session warning
163
- lightPink: '\x1b[38;5;210m', // Session critical
164
- skyBlue: '\x1b[38;5;117m', // Directories/paths, ready states
165
- lavender: '\x1b[38;5;147m', // Model info, story IDs
166
- softGold: '\x1b[38;5;222m', // Cost/money
167
- teal: '\x1b[38;5;80m', // Pending states
168
- slate: '\x1b[38;5;103m', // Secondary info
169
- rose: '\x1b[38;5;211m', // Blocked/critical accent
170
- amber: '\x1b[38;5;214m', // WIP/in-progress accent
171
- powder: '\x1b[38;5;153m', // Labels/headers
172
-
173
- // Brand color (#e8683a - burnt orange/terracotta)
174
- brand: '\x1b[38;2;232;104;58m',
175
- orange: '\x1b[38;2;232;104;58m', // Alias for brand color
176
-
177
- // Background colors
178
- bgRed: '\x1b[41m',
179
- bgGreen: '\x1b[42m',
180
- bgYellow: '\x1b[43m',
181
- bgBlue: '\x1b[44m',
182
-
183
- // Semantic aliases (for consistent meaning across codebase)
184
- success: '\x1b[32m', // Same as green
185
- error: '\x1b[31m', // Same as red
186
- warning: '\x1b[33m', // Same as yellow
187
- info: '\x1b[36m', // Same as cyan
188
- };
138
+ const cStandard = generated.cStandard;
189
139
 
190
140
  /**
191
141
  * Get the active color palette based on high-contrast mode.