agileflow 2.95.2 → 2.96.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 (81) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -6
  3. package/lib/api-routes.js +605 -0
  4. package/lib/api-server.js +260 -0
  5. package/lib/claude-cli-bridge.js +221 -0
  6. package/lib/dashboard-protocol.js +541 -0
  7. package/lib/dashboard-server.js +1601 -0
  8. package/lib/drivers/claude-driver.ts +310 -0
  9. package/lib/drivers/codex-driver.ts +454 -0
  10. package/lib/drivers/driver-manager.ts +158 -0
  11. package/lib/drivers/gemini-driver.ts +485 -0
  12. package/lib/drivers/index.ts +17 -0
  13. package/lib/flag-detection.js +350 -0
  14. package/lib/git-operations.js +267 -0
  15. package/lib/lock-file.js +144 -0
  16. package/lib/merge-operations.js +959 -0
  17. package/lib/protocol/driver.ts +360 -0
  18. package/lib/protocol/index.ts +12 -0
  19. package/lib/protocol/ir.ts +271 -0
  20. package/lib/session-display.js +330 -0
  21. package/lib/worktree-operations.js +221 -0
  22. package/package.json +2 -2
  23. package/scripts/agileflow-welcome.js +272 -24
  24. package/scripts/api-server-runner.js +177 -0
  25. package/scripts/archive-completed-stories.sh +22 -0
  26. package/scripts/automation-run-due.js +126 -0
  27. package/scripts/backfill-ideation-status.js +124 -0
  28. package/scripts/claude-tmux.sh +62 -1
  29. package/scripts/context-loader.js +292 -0
  30. package/scripts/dashboard-serve.js +323 -0
  31. package/scripts/lib/automation-registry.js +544 -0
  32. package/scripts/lib/automation-runner.js +476 -0
  33. package/scripts/lib/concurrency-limiter.js +513 -0
  34. package/scripts/lib/configure-features.js +46 -0
  35. package/scripts/lib/context-formatter.js +61 -0
  36. package/scripts/lib/damage-control-utils.js +29 -4
  37. package/scripts/lib/hook-metrics.js +324 -0
  38. package/scripts/lib/ideation-index.js +1196 -0
  39. package/scripts/lib/process-cleanup.js +359 -0
  40. package/scripts/lib/quality-gates.js +574 -0
  41. package/scripts/lib/status-task-bridge.js +522 -0
  42. package/scripts/lib/sync-ideation-status.js +292 -0
  43. package/scripts/lib/task-registry-cache.js +490 -0
  44. package/scripts/lib/task-registry.js +1181 -0
  45. package/scripts/migrate-ideation-index.js +515 -0
  46. package/scripts/precompact-context.sh +104 -0
  47. package/scripts/ralph-loop.js +2 -2
  48. package/scripts/session-manager.js +363 -2770
  49. package/scripts/spawn-parallel.js +45 -9
  50. package/src/core/agents/api-validator.md +180 -0
  51. package/src/core/agents/api.md +2 -0
  52. package/src/core/agents/code-reviewer.md +289 -0
  53. package/src/core/agents/configuration/damage-control.md +17 -0
  54. package/src/core/agents/database.md +2 -0
  55. package/src/core/agents/error-analyzer.md +203 -0
  56. package/src/core/agents/logic-analyzer-edge.md +171 -0
  57. package/src/core/agents/logic-analyzer-flow.md +254 -0
  58. package/src/core/agents/logic-analyzer-invariant.md +207 -0
  59. package/src/core/agents/logic-analyzer-race.md +267 -0
  60. package/src/core/agents/logic-analyzer-type.md +218 -0
  61. package/src/core/agents/logic-consensus.md +256 -0
  62. package/src/core/agents/orchestrator.md +89 -1
  63. package/src/core/agents/schema-validator.md +451 -0
  64. package/src/core/agents/team-coordinator.md +328 -0
  65. package/src/core/agents/ui-validator.md +328 -0
  66. package/src/core/agents/ui.md +2 -0
  67. package/src/core/commands/api.md +267 -0
  68. package/src/core/commands/automate.md +415 -0
  69. package/src/core/commands/babysit.md +290 -9
  70. package/src/core/commands/ideate/history.md +403 -0
  71. package/src/core/commands/{ideate.md → ideate/new.md} +244 -34
  72. package/src/core/commands/logic/audit.md +368 -0
  73. package/src/core/commands/roadmap/analyze.md +1 -1
  74. package/src/core/experts/documentation/expertise.yaml +29 -2
  75. package/src/core/templates/CONTEXT.md.example +49 -0
  76. package/src/core/templates/claude-settings.advanced.example.json +4 -0
  77. package/tools/cli/commands/serve.js +456 -0
  78. package/tools/cli/installers/core/installer.js +7 -2
  79. package/tools/cli/installers/ide/claude-code.js +85 -0
  80. package/tools/cli/lib/content-injector.js +27 -1
  81. package/tools/cli/lib/ui.js +26 -57
@@ -0,0 +1,403 @@
1
+ ---
2
+ description: Query ideation history and idea status
3
+ argument-hint: [IDEA-XXXX] [STATUS=pending|in-progress|implemented|recurring] [MODE=trends] [COMPARE=report1,report2]
4
+ compact_context:
5
+ priority: medium
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:ideate:history - Query ideation history"
8
+ - "Read ideation index from docs/00-meta/ideation-index.json"
9
+ - "Support filtering by status, category, or specific IDEA-XXXX"
10
+ - "Show recurring ideas (appeared 2+ times) prominently"
11
+ - "MODE=trends: Show aggregate statistics across all reports"
12
+ - "COMPARE=r1,r2: Diff two reports (Resolved/New/Persisted/Dropped)"
13
+ ---
14
+
15
+ # /agileflow:ideate:history
16
+
17
+ Query ideation history and track idea status across all previous ideation reports.
18
+
19
+ ---
20
+
21
+ ## Quick Usage
22
+
23
+ ```
24
+ /agileflow:ideate:history # Show summary
25
+ /agileflow:ideate:history IDEA-0023 # View specific idea
26
+ /agileflow:ideate:history STATUS=pending # Filter by status
27
+ /agileflow:ideate:history STATUS=recurring # Show recurring ideas (2+ occurrences)
28
+ /agileflow:ideate:history CATEGORY=Security # Filter by category
29
+ /agileflow:ideate:history MODE=trends # Show trend analysis across all reports
30
+ /agileflow:ideate:history COMPARE=20260114,20260130 # Compare two reports
31
+ ```
32
+
33
+ ---
34
+
35
+ ## How It Works
36
+
37
+ This command reads the ideation index (`docs/00-meta/ideation-index.json`) which tracks all ideas generated across ideation sessions. Each idea has:
38
+ - Unique ID (IDEA-XXXX)
39
+ - Status (pending, in-progress, implemented, rejected)
40
+ - Occurrence count (how many times it appeared)
41
+ - Linked story/epic (if implemented)
42
+ - First seen date and source report
43
+
44
+ ---
45
+
46
+ ## Prompt
47
+
48
+ ROLE: Ideation History Query Tool
49
+
50
+ You help users explore their ideation history and find actionable insights from past ideation reports.
51
+
52
+ ### STEP 1: LOAD INDEX
53
+
54
+ Read the ideation index:
55
+ ```
56
+ Read file: docs/00-meta/ideation-index.json
57
+ ```
58
+
59
+ If the file doesn't exist:
60
+ ```
61
+ The ideation index hasn't been created yet.
62
+
63
+ To populate it, either:
64
+ 1. Run /agileflow:ideate:new to generate new ideas (index created automatically)
65
+ 2. Run the migration script to backfill from existing reports:
66
+ node .agileflow/scripts/migrate-ideation-index.js
67
+ ```
68
+
69
+ ### STEP 2: PARSE ARGUMENTS
70
+
71
+ **Arguments**:
72
+ - `IDEA-XXXX`: Show details for a specific idea
73
+ - `STATUS=<status>`: Filter by status
74
+ - `pending`: Ideas not yet addressed
75
+ - `in-progress`: Ideas being worked on
76
+ - `implemented`: Ideas that have been completed
77
+ - `rejected`: Ideas that were rejected
78
+ - `recurring`: Special filter for ideas seen 2+ times
79
+ - `CATEGORY=<category>`: Filter by category (Security, Performance, Code Quality, UX/Design, Testing, API/Architecture)
80
+ - `MODE=trends`: Show aggregate trend analysis across all reports (US-0210)
81
+ - `COMPARE=<r1>,<r2>`: Compare two reports to see progress (US-0211)
82
+
83
+ ### STEP 3: GENERATE OUTPUT
84
+
85
+ **Default Output (Summary)**:
86
+
87
+ ```
88
+ IDEATION HISTORY
89
+ ════════════════════════════════════════════════════════════════
90
+
91
+ 📊 Overview
92
+ Total Ideas: {N}
93
+ Total Reports: {M}
94
+ Recurring Ideas: {R} (appeared 2+ times)
95
+
96
+ 📈 By Status
97
+ ✅ Implemented: {X} ({P}%)
98
+ 🚧 In Progress: {Y} ({P}%)
99
+ ⏳ Pending: {Z} ({P}%)
100
+ ❌ Rejected: {W} ({P}%)
101
+
102
+ 📂 By Category
103
+ 🔒 Security: {N}
104
+ ⚡ Performance: {N}
105
+ 🧹 Code Quality: {N}
106
+ 🎨 UX/Design: {N}
107
+ 🧪 Testing: {N}
108
+ 🏗️ API/Architecture: {N}
109
+
110
+ ════════════════════════════════════════════════════════════════
111
+
112
+ 🔥 Top Recurring Ideas (Not Yet Addressed)
113
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
114
+
115
+ 1. [IDEA-0023] Error Handling Consolidation
116
+ Category: Code Quality | Occurrences: 4
117
+ First seen: ideation-20260106.md
118
+ Status: pending
119
+
120
+ 2. [IDEA-0045] Path Traversal Protection
121
+ Category: Security | Occurrences: 3
122
+ First seen: ideation-20260109.md
123
+ Status: pending
124
+
125
+ 3. [IDEA-0067] Terminal Width Adaptation
126
+ Category: UX/Design | Occurrences: 3
127
+ First seen: ideation-20260112.md
128
+ Status: pending
129
+
130
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
131
+
132
+ 💡 Quick Actions:
133
+ • /agileflow:ideate:history STATUS=pending - View all pending ideas
134
+ • /agileflow:ideate:history STATUS=recurring - View all recurring ideas
135
+ • /agileflow:ideate:history IDEA-0023 - View specific idea details
136
+ • /agileflow:ideate:new - Generate new ideas
137
+ ```
138
+
139
+ **Specific Idea Output** (when IDEA-XXXX provided):
140
+
141
+ ```
142
+ IDEA DETAILS: IDEA-0023
143
+ ════════════════════════════════════════════════════════════════
144
+
145
+ 📋 Error Handling Consolidation
146
+
147
+ Status: ⏳ Pending
148
+ Category: Code Quality
149
+ Impact: High
150
+ Confidence: HIGH (3 experts agreed)
151
+
152
+ 📁 Files Affected:
153
+ • packages/cli/lib/errors.js
154
+ • packages/cli/tools/cli/lib/ide-errors.js
155
+ • packages/cli/tools/cli/lib/error-handler.js
156
+
157
+ 📝 Description:
158
+ Three separate error systems exist with inconsistent patterns.
159
+ Consolidate into unified error handling with typed exceptions.
160
+
161
+ 📊 Occurrence History:
162
+ 1. ideation-20260106.md (2026-01-06) - Experts: Code Quality, API
163
+ 2. ideation-20260114.md (2026-01-14) - Experts: Security, Code Quality, API
164
+ 3. ideation-20260121.md (2026-01-21) - Experts: Code Quality
165
+ 4. ideation-20260130.md (2026-01-30) - Experts: Code Quality, UX
166
+
167
+ 🔗 Linked Items:
168
+ Story: None
169
+ Epic: None
170
+
171
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
172
+
173
+ 💡 Actions:
174
+ • Create story: /agileflow:story "Error Handling Consolidation"
175
+ • Mark in progress: Update ideation index manually
176
+ • View original report: Read docs/08-project/ideation-20260106.md
177
+ ```
178
+
179
+ **Status Filter Output** (when STATUS=pending):
180
+
181
+ ```
182
+ PENDING IDEAS ({N} total)
183
+ ════════════════════════════════════════════════════════════════
184
+
185
+ High Priority (Recurring)
186
+ ━━━━━━━━━━━━━━━━━━━━━━━━━
187
+
188
+ [IDEA-0023] Error Handling Consolidation
189
+ Category: Code Quality | Occurrences: 4 | First: 2026-01-06
190
+
191
+ [IDEA-0045] Path Traversal Protection
192
+ Category: Security | Occurrences: 3 | First: 2026-01-09
193
+
194
+ Standard Priority
195
+ ━━━━━━━━━━━━━━━━━
196
+
197
+ [IDEA-0089] Add Redis Caching
198
+ Category: Performance | Occurrences: 1 | First: 2026-01-14
199
+
200
+ [IDEA-0091] TypeScript Strict Mode
201
+ Category: Code Quality | Occurrences: 1 | First: 2026-01-14
202
+
203
+ ... (showing first 10 of {N})
204
+
205
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
206
+ Use /agileflow:ideate:history IDEA-XXXX for details on any idea
207
+ ```
208
+
209
+ **Trend Analysis Output** (when MODE=trends):
210
+
211
+ Use helper script: `node .agileflow/scripts/lib/ideation-index.js trends`
212
+
213
+ ```
214
+ IDEATION TREND ANALYSIS
215
+ ════════════════════════════════════════════════════════════════
216
+
217
+ 📊 Overview ({N} ideas across {M} reports)
218
+ Implementation Rate: {P}% ({X}/{N} ideas implemented)
219
+ Avg. Velocity: {V} ideas/month resolved
220
+
221
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
222
+
223
+ 📈 Category Hotspots (by implementation success)
224
+ ⚡ Performance: 76% resolved (16/21 ideas)
225
+ 🧪 Testing: 57% resolved (16/28 ideas)
226
+ 🔒 Security: 74% resolved (14/19 ideas)
227
+ 🧹 Code Quality: 56% resolved (14/25 ideas)
228
+ 🏗️ API/Architecture: 20% resolved (1/5 ideas)
229
+
230
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
231
+
232
+ ⚠️ Stale Ideas (appeared 4+ times, never addressed)
233
+ These ideas keep appearing but aren't being worked on:
234
+
235
+ 1. [IDEA-XXXX] {Title} (appeared {N}x)
236
+ First seen: {date} ({D} days ago)
237
+ Category: {category}
238
+
239
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
240
+
241
+ 🤝 Expert Agreement Patterns
242
+ These expert pairs frequently agree on the same ideas:
243
+
244
+ AG-REFACTOR + AG-API: {N} shared ideas
245
+ AG-TESTING + AG-SECURITY: {N} shared ideas
246
+ AG-PERFORMANCE + AG-API: {N} shared ideas
247
+
248
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
249
+
250
+ 📅 Implementation Velocity by Month
251
+ 2026-01: +{new} new, {impl} resolved
252
+ 2026-02: +{new} new, {impl} resolved
253
+
254
+ ════════════════════════════════════════════════════════════════
255
+ 💡 Insights:
256
+ • Performance ideas have highest success rate - consider prioritizing these
257
+ • {N} ideas stale for 4+ occurrences - need attention
258
+ • Most common expert agreement: {pair} ({N} ideas)
259
+ ```
260
+
261
+ **Comparison Output** (when COMPARE=report1,report2):
262
+
263
+ Use helper script: `node .agileflow/scripts/lib/ideation-index.js compare {r1} {r2}`
264
+
265
+ ```
266
+ REPORT COMPARISON
267
+ ════════════════════════════════════════════════════════════════
268
+
269
+ 📅 Comparing: ideation-{r1}.md → ideation-{r2}.md
270
+ {date1} → {date2}
271
+
272
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
273
+
274
+ ✅ RESOLVED ({N} ideas)
275
+ Ideas from {r1} that have since been implemented:
276
+
277
+ 1. [IDEA-0095] Unified Error Handling API
278
+ Implemented via: EP-0018
279
+ Category: API/Architecture + Security
280
+
281
+ 2. [IDEA-0099] Unified Progress Feedback System
282
+ Implemented via: EP-0018
283
+ Category: UX/Design + Performance
284
+
285
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
286
+
287
+ 🆕 NEW ({N} ideas)
288
+ Ideas that first appeared in {r2}:
289
+
290
+ 1. [IDEA-0180] New Performance Optimization
291
+ Category: Performance | Confidence: HIGH
292
+
293
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
294
+
295
+ 🔄 PERSISTED ({N} ideas)
296
+ Ideas that appeared in both reports (recurring):
297
+
298
+ 1. [IDEA-0023] Error Handling Consolidation
299
+ Status: pending | Occurrences: 4
300
+
301
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
302
+
303
+ 📉 DROPPED ({N} ideas)
304
+ Ideas from {r1} that didn't recur and weren't implemented:
305
+
306
+ 1. [IDEA-0087] Low-priority suggestion
307
+ Category: Code Quality | Status: pending
308
+
309
+ ════════════════════════════════════════════════════════════════
310
+ Summary:
311
+ ✅ Resolved: {X} ideas addressed since {r1}
312
+ 🆕 New: {Y} fresh ideas in {r2}
313
+ 🔄 Persisted: {Z} recurring concerns
314
+ 📉 Dropped: {W} one-time ideas (may be low priority)
315
+ ```
316
+
317
+ ### STEP 4: OFFER NEXT STEPS
318
+
319
+ ```xml
320
+ <invoke name="AskUserQuestion">
321
+ <parameter name="questions">[{
322
+ "question": "What would you like to do with these ideas?",
323
+ "header": "Next Steps",
324
+ "multiSelect": false,
325
+ "options": [
326
+ {"label": "Create story for top recurring idea", "description": "Generate a story for the most recurring pending idea"},
327
+ {"label": "View pending ideas by category", "description": "Filter by Security, Performance, etc."},
328
+ {"label": "Run new ideation", "description": "Generate fresh ideas with /agileflow:ideate:new"},
329
+ {"label": "Done", "description": "No further action needed"}
330
+ ]
331
+ }]</parameter>
332
+ </invoke>
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Arguments
338
+
339
+ | Argument | Values | Default | Description |
340
+ |----------|--------|---------|-------------|
341
+ | IDEA-XXXX | Idea ID | - | Show details for specific idea |
342
+ | STATUS | pending, in-progress, implemented, rejected, recurring | - | Filter by status |
343
+ | CATEGORY | Security, Performance, Code Quality, UX/Design, Testing, API/Architecture | - | Filter by category |
344
+ | MODE | trends | - | Show aggregate trend analysis across all reports |
345
+ | COMPARE | report1,report2 | - | Compare two reports (e.g., COMPARE=20260114,20260130) |
346
+ | LIMIT | number | 10 | Maximum ideas to show in list views |
347
+
348
+ ---
349
+
350
+ ## Example Execution
351
+
352
+ **User**: `/agileflow:ideate:history STATUS=recurring`
353
+
354
+ **Output**:
355
+ ```
356
+ RECURRING IDEAS (Appeared 2+ Times)
357
+ ════════════════════════════════════════════════════════════════
358
+
359
+ These ideas keep appearing across ideation sessions. Consider prioritizing them!
360
+
361
+ 🔴 Not Addressed (5 ideas)
362
+ ━━━━━━━━━━━━━━━━━━━━━━━━━
363
+
364
+ 1. [IDEA-0023] Error Handling Consolidation (4x)
365
+ Category: Code Quality | Status: pending
366
+
367
+ 2. [IDEA-0045] Path Traversal Protection (3x)
368
+ Category: Security | Status: pending
369
+
370
+ 3. [IDEA-0067] Terminal Width Adaptation (3x)
371
+ Category: UX/Design | Status: pending
372
+
373
+ 4. [IDEA-0012] YAML Safe Loading (2x)
374
+ Category: Security | Status: pending
375
+
376
+ 5. [IDEA-0089] IDE Handler Interface (2x)
377
+ Category: API/Architecture | Status: pending
378
+
379
+
380
+ 🟢 Already Addressed (3 ideas)
381
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
382
+
383
+ 1. [IDEA-0005] Unified Progress Feedback (4x)
384
+ Implemented via: US-0099 in EP-0017
385
+
386
+ 2. [IDEA-0008] Content Injection Security (3x)
387
+ Implemented via: US-0100 in EP-0017
388
+
389
+ 3. [IDEA-0011] Test Suite Reliability (2x)
390
+ Implemented via: US-0102 in EP-0017
391
+
392
+ ════════════════════════════════════════════════════════════════
393
+ Total: 8 recurring ideas (5 pending, 3 implemented)
394
+ ```
395
+
396
+ ---
397
+
398
+ ## Related Commands
399
+
400
+ - `/agileflow:ideate:new` - Generate new improvement ideas
401
+ - `/agileflow:story` - Create user stories from ideas
402
+ - `/agileflow:epic` - Create epic for grouped improvements
403
+ - `/agileflow:debt` - Track technical debt items