agileflow 2.30.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 (133) hide show
  1. package/package.json +61 -0
  2. package/src/core/agents/accessibility.md +445 -0
  3. package/src/core/agents/adr-writer.md +215 -0
  4. package/src/core/agents/analytics.md +523 -0
  5. package/src/core/agents/api.md +484 -0
  6. package/src/core/agents/ci.md +452 -0
  7. package/src/core/agents/compliance.md +401 -0
  8. package/src/core/agents/context7.md +164 -0
  9. package/src/core/agents/database.md +377 -0
  10. package/src/core/agents/datamigration.md +565 -0
  11. package/src/core/agents/design.md +400 -0
  12. package/src/core/agents/devops.md +576 -0
  13. package/src/core/agents/documentation.md +229 -0
  14. package/src/core/agents/epic-planner.md +277 -0
  15. package/src/core/agents/integrations.md +459 -0
  16. package/src/core/agents/mentor.md +375 -0
  17. package/src/core/agents/mobile.md +391 -0
  18. package/src/core/agents/monitoring.md +430 -0
  19. package/src/core/agents/performance.md +390 -0
  20. package/src/core/agents/product.md +311 -0
  21. package/src/core/agents/qa.md +647 -0
  22. package/src/core/agents/readme-updater.md +325 -0
  23. package/src/core/agents/refactor.md +432 -0
  24. package/src/core/agents/research.md +250 -0
  25. package/src/core/agents/security.md +379 -0
  26. package/src/core/agents/testing.md +397 -0
  27. package/src/core/agents/ui.md +999 -0
  28. package/src/core/commands/adr.md +32 -0
  29. package/src/core/commands/agent.md +23 -0
  30. package/src/core/commands/assign.md +34 -0
  31. package/src/core/commands/auto.md +364 -0
  32. package/src/core/commands/babysit.md +1357 -0
  33. package/src/core/commands/baseline.md +520 -0
  34. package/src/core/commands/blockers.md +343 -0
  35. package/src/core/commands/board.md +241 -0
  36. package/src/core/commands/changelog.md +321 -0
  37. package/src/core/commands/ci.md +36 -0
  38. package/src/core/commands/compress.md +270 -0
  39. package/src/core/commands/context.md +222 -0
  40. package/src/core/commands/debt.md +268 -0
  41. package/src/core/commands/deploy.md +544 -0
  42. package/src/core/commands/deps.md +560 -0
  43. package/src/core/commands/diagnose.md +227 -0
  44. package/src/core/commands/docs.md +166 -0
  45. package/src/core/commands/epic.md +40 -0
  46. package/src/core/commands/feedback.md +307 -0
  47. package/src/core/commands/handoff.md +33 -0
  48. package/src/core/commands/help.md +90 -0
  49. package/src/core/commands/impact.md +204 -0
  50. package/src/core/commands/metrics.md +530 -0
  51. package/src/core/commands/packages.md +369 -0
  52. package/src/core/commands/pr.md +35 -0
  53. package/src/core/commands/readme-sync.md +168 -0
  54. package/src/core/commands/research.md +30 -0
  55. package/src/core/commands/resume.md +475 -0
  56. package/src/core/commands/retro.md +538 -0
  57. package/src/core/commands/review.md +364 -0
  58. package/src/core/commands/session-init.md +532 -0
  59. package/src/core/commands/setup.md +708 -0
  60. package/src/core/commands/sprint.md +490 -0
  61. package/src/core/commands/status.md +38 -0
  62. package/src/core/commands/story-validate.md +242 -0
  63. package/src/core/commands/story.md +38 -0
  64. package/src/core/commands/template.md +458 -0
  65. package/src/core/commands/tests.md +359 -0
  66. package/src/core/commands/update.md +407 -0
  67. package/src/core/commands/velocity.md +369 -0
  68. package/src/core/commands/verify.md +283 -0
  69. package/src/core/skills/acceptance-criteria-generator/SKILL.md +46 -0
  70. package/src/core/skills/adr-template/SKILL.md +62 -0
  71. package/src/core/skills/agileflow-acceptance-criteria/SKILL.md +156 -0
  72. package/src/core/skills/agileflow-adr/SKILL.md +147 -0
  73. package/src/core/skills/agileflow-adr/examples/database-choice-example.md +122 -0
  74. package/src/core/skills/agileflow-adr/templates/adr-template.md +69 -0
  75. package/src/core/skills/agileflow-commit-messages/SKILL.md +130 -0
  76. package/src/core/skills/agileflow-commit-messages/reference/bad-examples.md +168 -0
  77. package/src/core/skills/agileflow-commit-messages/reference/good-examples.md +120 -0
  78. package/src/core/skills/agileflow-commit-messages/scripts/check-attribution.sh +15 -0
  79. package/src/core/skills/agileflow-epic-planner/SKILL.md +184 -0
  80. package/src/core/skills/agileflow-retro-facilitator/SKILL.md +281 -0
  81. package/src/core/skills/agileflow-sprint-planner/SKILL.md +212 -0
  82. package/src/core/skills/agileflow-story-writer/SKILL.md +163 -0
  83. package/src/core/skills/agileflow-story-writer/examples/good-story-example.md +63 -0
  84. package/src/core/skills/agileflow-story-writer/templates/story-template.md +44 -0
  85. package/src/core/skills/agileflow-tech-debt/SKILL.md +215 -0
  86. package/src/core/skills/api-documentation-generator/SKILL.md +65 -0
  87. package/src/core/skills/changelog-entry/SKILL.md +55 -0
  88. package/src/core/skills/commit-message-formatter/SKILL.md +50 -0
  89. package/src/core/skills/deployment-guide-generator/SKILL.md +84 -0
  90. package/src/core/skills/diagram-generator/SKILL.md +65 -0
  91. package/src/core/skills/error-handler-template/SKILL.md +78 -0
  92. package/src/core/skills/migration-checklist/SKILL.md +82 -0
  93. package/src/core/skills/pr-description/SKILL.md +65 -0
  94. package/src/core/skills/sql-schema-generator/SKILL.md +69 -0
  95. package/src/core/skills/story-skeleton/SKILL.md +34 -0
  96. package/src/core/skills/test-case-generator/SKILL.md +63 -0
  97. package/src/core/skills/type-definitions/SKILL.md +65 -0
  98. package/src/core/skills/validation-schema-generator/SKILL.md +64 -0
  99. package/src/core/templates/README-template.md +16 -0
  100. package/src/core/templates/adr-template.md +28 -0
  101. package/src/core/templates/agent-profile-template.md +51 -0
  102. package/src/core/templates/agileflow-metadata.json +41 -0
  103. package/src/core/templates/ci-workflow.yml +74 -0
  104. package/src/core/templates/claude-settings.advanced.example.json +71 -0
  105. package/src/core/templates/claude-settings.example.json +26 -0
  106. package/src/core/templates/comms-note-template.md +24 -0
  107. package/src/core/templates/environment.json +18 -0
  108. package/src/core/templates/epic-template.md +27 -0
  109. package/src/core/templates/init.sh +76 -0
  110. package/src/core/templates/research-template.md +44 -0
  111. package/src/core/templates/resume-session.sh +121 -0
  112. package/src/core/templates/session-state.json +20 -0
  113. package/src/core/templates/skill-template.md +75 -0
  114. package/src/core/templates/story-template.md +88 -0
  115. package/src/core/templates/validate-tokens.sh +88 -0
  116. package/src/core/templates/worktree-create.sh +111 -0
  117. package/src/core/templates/worktrees-guide.md +235 -0
  118. package/tools/agileflow-npx.js +40 -0
  119. package/tools/cli/agileflow-cli.js +70 -0
  120. package/tools/cli/commands/doctor.js +243 -0
  121. package/tools/cli/commands/install.js +82 -0
  122. package/tools/cli/commands/status.js +121 -0
  123. package/tools/cli/commands/uninstall.js +110 -0
  124. package/tools/cli/commands/update.js +99 -0
  125. package/tools/cli/installers/core/installer.js +296 -0
  126. package/tools/cli/installers/ide/_base-ide.js +133 -0
  127. package/tools/cli/installers/ide/claude-code.js +174 -0
  128. package/tools/cli/installers/ide/cursor.js +189 -0
  129. package/tools/cli/installers/ide/manager.js +197 -0
  130. package/tools/cli/installers/ide/windsurf.js +192 -0
  131. package/tools/cli/lib/ui.js +203 -0
  132. package/tools/cli/lib/version-checker.js +95 -0
  133. package/tools/postinstall.js +141 -0
@@ -0,0 +1,530 @@
1
+ ---
2
+ description: Analytics dashboard with cycle time and throughput
3
+ allowed-tools: Bash, Read, Edit, Write, Glob, Grep
4
+ ---
5
+
6
+ # metrics
7
+
8
+ Comprehensive project analytics dashboard with cycle time, lead time, throughput, and trend analysis.
9
+
10
+ ## Prompt
11
+
12
+ ROLE: Metrics & Analytics Specialist
13
+
14
+ OBJECTIVE
15
+ Generate comprehensive project metrics from AgileFlow data sources (status.json, bus/log.jsonl, story files) to enable data-driven decision making.
16
+
17
+ INPUTS (optional)
18
+ - TIMEFRAME=7d|30d|90d|all (default: 30d)
19
+ - EPIC=<EP_ID> (filter by specific epic)
20
+ - OWNER=<AG_*> (filter by agent/owner)
21
+ - FORMAT=ascii|markdown|json|csv (default: ascii)
22
+ - METRIC=cycle-time|lead-time|throughput|all (default: all)
23
+
24
+ DATA SOURCES
25
+
26
+ ### Primary Sources
27
+ 1. **docs/09-agents/bus/log.jsonl** - Event stream with timestamps
28
+ - Story lifecycle events (created, status changes, completed)
29
+ - Timestamps for all state transitions
30
+ - Agent assignments and handoffs
31
+
32
+ 2. **docs/09-agents/status.json** - Current state
33
+ - Active stories and their statuses
34
+ - Owner assignments
35
+ - Last updated timestamps
36
+
37
+ 3. **docs/06-stories/**/US-*.md** - Story metadata
38
+ - Creation dates (from frontmatter or file mtime)
39
+ - Estimates vs actuals
40
+ - Epic relationships
41
+
42
+ 4. **docs/05-epics/*.md** - Epic data
43
+ - Epic start/end dates
44
+ - Story rollup
45
+
46
+ CORE METRICS
47
+
48
+ ### 1. Cycle Time
49
+ **Definition**: Time from "in-progress" to "done" (actual work time)
50
+
51
+ ```bash
52
+ # Extract from bus/log.jsonl
53
+ for story in stories; do
54
+ start=$(jq -r 'select(.story=="'$story'" and .status=="in-progress") | .ts' bus/log.jsonl | head -1)
55
+ end=$(jq -r 'select(.story=="'$story'" and .status=="done") | .ts' bus/log.jsonl | head -1)
56
+
57
+ cycle_time=$(date_diff $start $end)
58
+ echo "$story: $cycle_time days"
59
+ done
60
+
61
+ # Calculate statistics
62
+ avg_cycle_time=$(echo "$cycle_times" | awk '{sum+=$1; count++} END {print sum/count}')
63
+ p50_cycle_time=$(echo "$cycle_times" | sort -n | awk '{a[NR]=$1} END {print a[int(NR/2)]}')
64
+ p85_cycle_time=$(echo "$cycle_times" | sort -n | awk '{a[NR]=$1} END {print a[int(NR*0.85)]}')
65
+ ```
66
+
67
+ **Output**:
68
+ ```
69
+ Cycle Time (30 days)
70
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
71
+ Average: 3.2 days
72
+ Median: 2.5 days
73
+ 85th %ile: 5.0 days
74
+ Min: 0.5 days
75
+ Max: 8.0 days
76
+
77
+ Distribution:
78
+ 0-1 days ████████░░ 8 stories (32%)
79
+ 1-3 days ████████████████░░ 12 stories (48%)
80
+ 3-5 days ████░░ 3 stories (12%)
81
+ 5+ days ██░░ 2 stories (8%)
82
+ ```
83
+
84
+ ### 2. Lead Time
85
+ **Definition**: Time from story creation to "done" (total time including waiting)
86
+
87
+ ```bash
88
+ for story in stories; do
89
+ created=$(stat -f %B docs/06-stories/*/$story.md 2>/dev/null || stat -c %Y docs/06-stories/*/$story.md)
90
+ completed=$(jq -r 'select(.story=="'$story'" and .status=="done") | .ts' bus/log.jsonl | tail -1)
91
+
92
+ lead_time=$(date_diff $created $completed)
93
+ echo "$story: $lead_time days"
94
+ done
95
+ ```
96
+
97
+ **Output**:
98
+ ```
99
+ Lead Time (30 days)
100
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
+ Average: 7.8 days
102
+ Median: 6.0 days
103
+ 85th %ile: 12.0 days
104
+
105
+ Breakdown:
106
+ Waiting (ready): 2.5 days (32%)
107
+ Active (in-progress): 3.2 days (41%)
108
+ Review (in-review): 2.1 days (27%)
109
+ ```
110
+
111
+ ### 3. Throughput
112
+ **Definition**: Stories completed per time period
113
+
114
+ ```bash
115
+ # Count stories completed in each week
116
+ for week in weeks; do
117
+ count=$(jq -r 'select(.status=="done" and .ts >= "'$week_start'" and .ts < "'$week_end'") | .story' bus/log.jsonl | sort -u | wc -l)
118
+ echo "Week $week: $count stories"
119
+ done
120
+ ```
121
+
122
+ **Output**:
123
+ ```
124
+ Throughput (Last 8 Weeks)
125
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
126
+ Week 1 ████████░░ 8 stories
127
+ Week 2 ██████████░░ 10 stories
128
+ Week 3 ██████░░ 6 stories
129
+ Week 4 ████████████░░ 12 stories ← Peak
130
+ Week 5 ████████░░ 8 stories
131
+ Week 6 ██████░░ 6 stories
132
+ Week 7 ██████████░░ 10 stories
133
+ Week 8 ████████░░ 8 stories
134
+
135
+ Average: 8.5 stories/week
136
+ Trend: ↗ +12% vs previous month
137
+ ```
138
+
139
+ ### 4. Work In Progress (WIP)
140
+ **Definition**: Stories currently in-progress or in-review
141
+
142
+ ```bash
143
+ wip_count=$(jq -r '.stories | to_entries[] | select(.value.status == "in-progress" or .value.status == "in-review") | .key' status.json | wc -l)
144
+ wip_limit=6 # 2 per agent * 3 agents
145
+
146
+ echo "Current WIP: $wip_count / $wip_limit"
147
+ if [ $wip_count -gt $wip_limit ]; then
148
+ echo "⚠️ WIP limit exceeded! Consider finishing stories before starting new ones."
149
+ fi
150
+ ```
151
+
152
+ **Output**:
153
+ ```
154
+ Work In Progress
155
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
156
+ Current WIP: 4 / 6 stories (67% capacity)
157
+ Status: ✅ Within limits
158
+
159
+ Breakdown:
160
+ in-progress: 3 stories
161
+ in-review: 1 story
162
+ blocked: 0 stories
163
+
164
+ By Owner:
165
+ AG-API: 2 stories (at limit)
166
+ AG-UI: 1 story
167
+ AG-CI: 1 story
168
+ ```
169
+
170
+ ### 5. Agent Utilization
171
+ **Definition**: Distribution of work across agents
172
+
173
+ ```bash
174
+ for agent in AG-UI AG-API AG-CI AG-DEVOPS; do
175
+ completed=$(jq -r 'select(.status=="done" and .owner=="'$agent'") | .story' bus/log.jsonl | sort -u | wc -l)
176
+ in_progress=$(jq -r '.stories | to_entries[] | select(.value.owner=="'$agent'" and .value.status=="in-progress") | .key' status.json | wc -l)
177
+ echo "$agent: $completed done, $in_progress active"
178
+ done
179
+ ```
180
+
181
+ **Output**:
182
+ ```
183
+ Agent Utilization (30 days)
184
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
185
+ AG-API ████████████████░░ 12 stories (40%) 2 active
186
+ AG-UI ████████████░░ 10 stories (33%) 1 active
187
+ AG-CI ██████░░ 6 stories (20%) 1 active
188
+ AG-DEVOPS ██░░ 2 stories (7%) 0 active
189
+
190
+ Balance Score: 78/100 (Good distribution)
191
+ Recommendation: Consider assigning more work to AG-DEVOPS
192
+ ```
193
+
194
+ ### 6. Epic Health
195
+ **Definition**: Progress and health indicators for epics
196
+
197
+ ```bash
198
+ for epic in epics; do
199
+ total_stories=$(ls docs/06-stories/$epic/*.md | wc -l)
200
+ done_stories=$(jq -r 'select(.epic=="'$epic'" and .status=="done")' bus/log.jsonl | wc -l)
201
+ blocked_stories=$(jq -r '.stories | to_entries[] | select(.value.epic=="'$epic'" and .value.status=="blocked") | .key' status.json | wc -l)
202
+
203
+ completion_pct=$((done_stories * 100 / total_stories))
204
+ health="🟢" # Green
205
+ [ $blocked_stories -gt 0 ] && health="🟡" # Yellow
206
+ [ $completion_pct -lt 30 ] && [ $blocked_stories -gt 1 ] && health="🔴" # Red
207
+
208
+ echo "$epic: $completion_pct% complete, $blocked_stories blocked $health"
209
+ done
210
+ ```
211
+
212
+ **Output**:
213
+ ```
214
+ Epic Health
215
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
216
+ EP-0010: Authentication
217
+ Progress: ████████████████████░░ 85% (11/13 stories)
218
+ Status: 🟢 On track
219
+ Velocity: 2.5 stories/week
220
+ ETA: ~1 week
221
+
222
+ EP-0011: Payment Processing
223
+ Progress: ████████░░ 40% (4/10 stories)
224
+ Status: 🟡 At risk (2 blocked)
225
+ Velocity: 1.2 stories/week
226
+ ETA: ~5 weeks
227
+ ⚠️ Action: Unblock US-0045, US-0048
228
+
229
+ EP-0012: User Dashboard
230
+ Progress: ██░░ 10% (1/10 stories)
231
+ Status: 🟢 Healthy
232
+ Velocity: 0.5 stories/week (just started)
233
+ ETA: ~18 weeks
234
+ ```
235
+
236
+ ADVANCED METRICS
237
+
238
+ ### 7. Estimation Accuracy
239
+ **Definition**: Compare estimates vs actual cycle time
240
+
241
+ ```bash
242
+ for story in completed_stories; do
243
+ estimate=$(grep "^estimate:" docs/06-stories/*/$story.md | awk '{print $2}' | sed 's/d//')
244
+ actual=$(calculate_cycle_time $story)
245
+ variance=$((actual - estimate))
246
+ echo "$story: Est $estimate, Act $actual, Var $variance"
247
+ done
248
+
249
+ avg_variance=$(echo "$variances" | awk '{sum+=$1; count++} END {print sum/count}')
250
+ ```
251
+
252
+ **Output**:
253
+ ```
254
+ Estimation Accuracy
255
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
256
+ Average Variance: +0.5 days (underestimating by 15%)
257
+
258
+ Distribution:
259
+ Under-estimated ████████████░░ 12 stories (48%)
260
+ Accurate (±20%) ████████░░ 8 stories (32%)
261
+ Over-estimated ████░░ 5 stories (20%)
262
+
263
+ Worst Offenders:
264
+ US-0042: Est 2d, Act 5d (+150%)
265
+ US-0035: Est 1d, Act 3d (+200%)
266
+
267
+ Best Estimates:
268
+ US-0038: Est 3d, Act 3d (0%)
269
+ US-0040: Est 2d, Act 2d (0%)
270
+
271
+ Recommendation: Increase estimates by ~20% for accuracy
272
+ ```
273
+
274
+ ### 8. Blocked Story Analysis
275
+ **Definition**: Identify blocking patterns
276
+
277
+ ```bash
278
+ blocked_stories=$(jq -r '.stories | to_entries[] | select(.value.status=="blocked")' status.json)
279
+
280
+ for story in blocked_stories; do
281
+ blocked_duration=$(date_diff $(get_blocked_timestamp $story) $(date +%s))
282
+ echo "$story: Blocked for $blocked_duration days"
283
+ done
284
+ ```
285
+
286
+ **Output**:
287
+ ```
288
+ Blocked Story Analysis
289
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
290
+ Currently Blocked: 2 stories
291
+
292
+ US-0045: Payment gateway integration
293
+ Blocked: 5 days
294
+ Reason: Waiting for API keys
295
+ Owner: AG-API
296
+ Impact: Blocks EP-0011 (40% complete)
297
+ Action: Escalate to product for API access
298
+
299
+ US-0048: Stripe webhook setup
300
+ Blocked: 2 days
301
+ Reason: Depends on US-0045
302
+ Owner: AG-API
303
+ Impact: Delays payment epic by 1 week
304
+ Action: Can unblock after US-0045
305
+
306
+ ⚠️ Critical: 2 stories blocked > 2 days. Review immediately.
307
+ ```
308
+
309
+ ### 9. Flow Efficiency
310
+ **Definition**: Active work time / total lead time
311
+
312
+ ```bash
313
+ for story in stories; do
314
+ lead_time=$(calculate_lead_time $story)
315
+ cycle_time=$(calculate_cycle_time $story)
316
+ flow_efficiency=$((cycle_time * 100 / lead_time))
317
+ echo "$story: $flow_efficiency% efficiency"
318
+ done
319
+
320
+ avg_efficiency=$(echo "$efficiencies" | awk '{sum+=$1; count++} END {print sum/count}')
321
+ ```
322
+
323
+ **Output**:
324
+ ```
325
+ Flow Efficiency
326
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
327
+ Average: 41% (3.2d active / 7.8d total)
328
+
329
+ Interpretation:
330
+ Stories spend 59% of time waiting (in 'ready' or 'in-review')
331
+ Only 41% of time is active work
332
+
333
+ Breakdown:
334
+ Ready → In-Progress: 2.5 days avg wait
335
+ In-Progress → Done: 3.2 days avg work
336
+ In-Review → Done: 2.1 days avg review
337
+
338
+ Recommendations:
339
+ 🎯 Reduce "ready" wait time (start stories faster)
340
+ 🎯 Reduce "in-review" time (faster code reviews)
341
+ Target: >60% flow efficiency
342
+ ```
343
+
344
+ ### 10. Cumulative Flow Diagram (CFD)
345
+ **Definition**: Stacked area chart showing story distribution over time
346
+
347
+ ```bash
348
+ # Generate data for each day in timeframe
349
+ for day in $(seq 0 30); do
350
+ date=$(date -d "$day days ago" +%Y-%m-%d)
351
+
352
+ ready=$(count_stories_in_status_on_date "ready" $date)
353
+ in_progress=$(count_stories_in_status_on_date "in-progress" $date)
354
+ in_review=$(count_stories_in_status_on_date "in-review" $date)
355
+ done=$(count_stories_in_status_on_date "done" $date)
356
+
357
+ echo "$date $ready $in_progress $in_review $done"
358
+ done
359
+ ```
360
+
361
+ **Output (ASCII visualization)**:
362
+ ```
363
+ Cumulative Flow Diagram (Last 30 Days)
364
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
365
+ 30 │ ████████████ Done
366
+ 25 │ ████████████████████
367
+ 20 │ ████████████████████████████
368
+ 15 │ ████████████████████████████████████ In Review
369
+ 10 │ ████████████████████████████████████████████ In Progress
370
+ 5 │██████████████████████████████████████████████████ Ready
371
+ 0 └────────────────────────────────────────────────→
372
+ Oct 17 Oct 24 Oct 31 Nov 7 Nov 14
373
+
374
+ Insights:
375
+ ✅ Steady throughput (done stories increasing linearly)
376
+ ⚠️ WIP creeping up (in-progress growing)
377
+ 🎯 Review bottleneck (in-review staying constant)
378
+ ```
379
+
380
+ DASHBOARD OUTPUT
381
+
382
+ ### ASCII Dashboard (default)
383
+ ```markdown
384
+ ╔════════════════════════════════════════════════════════════════╗
385
+ ║ AGILEFLOW METRICS DASHBOARD ║
386
+ ║ Last 30 Days (Oct 17 - Nov 14) ║
387
+ ╠════════════════════════════════════════════════════════════════╣
388
+ ║ ║
389
+ ║ 📊 KEY METRICS ║
390
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
391
+ ║ ║
392
+ ║ Cycle Time: 3.2 days avg (↓ 8% vs last month) ║
393
+ ║ Lead Time: 7.8 days avg (↑ 5% vs last month) ║
394
+ ║ Throughput: 8.5 stories/week (↗ +12%) ║
395
+ ║ Flow Efficiency: 41% (Target: >60%) ║
396
+ ║ ║
397
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
398
+ ║ ║
399
+ ║ 🎯 WORK IN PROGRESS ║
400
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
401
+ ║ ║
402
+ ║ Current WIP: 4 / 6 stories (67%) ✅ ║
403
+ ║ Blocked: 2 stories ⚠️ ║
404
+ ║ ║
405
+ ║ AG-API: 2 stories (at limit) ║
406
+ ║ AG-UI: 1 story ║
407
+ ║ AG-CI: 1 story ║
408
+ ║ AG-DEVOPS: 0 stories ║
409
+ ║ ║
410
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
411
+ ║ ║
412
+ ║ 📈 EPIC HEALTH ║
413
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
414
+ ║ ║
415
+ ║ EP-0010 ████████████████████░░ 85% 🟢 On track ║
416
+ ║ EP-0011 ████████░░ 40% 🟡 2 blocked ║
417
+ ║ EP-0012 ██░░ 10% 🟢 Healthy ║
418
+ ║ ║
419
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
420
+ ║ ║
421
+ ║ ⚡ RECOMMENDATIONS ║
422
+ ║ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ║
423
+ ║ ║
424
+ ║ 1. Unblock US-0045, US-0048 (blocked >2 days) ║
425
+ ║ 2. Reduce review time (currently 2.1 days avg) ║
426
+ ║ 3. Assign more stories to AG-DEVOPS (0 active) ║
427
+ ║ 4. Improve estimation accuracy (+15% variance) ║
428
+ ║ ║
429
+ ╚════════════════════════════════════════════════════════════════╝
430
+
431
+ Run `/AgileFlow:velocity` for forecasting
432
+ Run `/AgileFlow:board` for current kanban view
433
+ Run `/AgileFlow:retro` for retrospective insights
434
+ ```
435
+
436
+ EXPORT FORMATS
437
+
438
+ ### JSON Export
439
+ ```json
440
+ {
441
+ "timeframe": "30d",
442
+ "generated_at": "2025-10-17T15:00:00Z",
443
+ "metrics": {
444
+ "cycle_time": {
445
+ "avg": 3.2,
446
+ "median": 2.5,
447
+ "p85": 5.0,
448
+ "unit": "days",
449
+ "change_pct": -8
450
+ },
451
+ "lead_time": {
452
+ "avg": 7.8,
453
+ "median": 6.0,
454
+ "p85": 12.0,
455
+ "unit": "days",
456
+ "change_pct": 5
457
+ },
458
+ "throughput": {
459
+ "avg": 8.5,
460
+ "unit": "stories/week",
461
+ "change_pct": 12,
462
+ "trend": "up"
463
+ },
464
+ "wip": {
465
+ "current": 4,
466
+ "limit": 6,
467
+ "pct": 67,
468
+ "blocked": 2
469
+ }
470
+ },
471
+ "epics": [...],
472
+ "recommendations": [...]
473
+ }
474
+ ```
475
+
476
+ ### CSV Export
477
+ ```csv
478
+ Date,Cycle Time,Lead Time,Throughput,WIP,Blocked
479
+ 2025-10-17,3.2,7.8,8.5,4,2
480
+ 2025-10-16,3.1,7.5,8.2,5,1
481
+ ...
482
+ ```
483
+
484
+ USAGE EXAMPLES
485
+
486
+ ### View all metrics for last 30 days
487
+ ```bash
488
+ /AgileFlow:metrics
489
+ ```
490
+
491
+ ### Last 90 days, specific epic
492
+ ```bash
493
+ /AgileFlow:metrics TIMEFRAME=90d EPIC=EP-0010
494
+ ```
495
+
496
+ ### Only cycle time, export as JSON
497
+ ```bash
498
+ /AgileFlow:metrics METRIC=cycle-time FORMAT=json
499
+ ```
500
+
501
+ ### Agent-specific metrics
502
+ ```bash
503
+ /AgileFlow:metrics OWNER=AG-API TIMEFRAME=7d
504
+ ```
505
+
506
+ ### Export to CSV for spreadsheet analysis
507
+ ```bash
508
+ /AgileFlow:metrics FORMAT=csv > metrics.csv
509
+ ```
510
+
511
+ INTEGRATION WITH OTHER COMMANDS
512
+
513
+ - After `/AgileFlow:velocity`: Run `/AgileFlow:metrics` to see detailed trends
514
+ - After `/AgileFlow:board`: Run `/AgileFlow:metrics` to understand bottlenecks
515
+ - Before `/AgileFlow:retro`: Run `/AgileFlow:metrics` to gather data for retrospective
516
+ - In `/AgileFlow:babysit`: Auto-run `/AgileFlow:metrics` when velocity drops
517
+
518
+ RULES
519
+ - Always calculate from raw data (bus/log.jsonl, status.json)
520
+ - Show trends (↗↘) compared to previous period
521
+ - Highlight actionable insights
522
+ - Use color coding (🟢🟡🔴) for health indicators
523
+ - Provide recommendations based on data
524
+ - Respect privacy (no individual developer metrics, only agent-level)
525
+
526
+ OUTPUT
527
+ - ASCII dashboard (default, shown above)
528
+ - Or JSON/CSV/Markdown based on FORMAT parameter
529
+ - Always include timeframe and generation timestamp
530
+ - Save to docs/08-project/metrics-reports/metrics-YYYYMMDD.md (optional)