agileflow 2.51.0 → 2.55.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 (87) hide show
  1. package/README.md +82 -460
  2. package/package.json +18 -3
  3. package/scripts/agileflow-configure.js +134 -63
  4. package/scripts/agileflow-welcome.js +161 -31
  5. package/scripts/generators/agent-registry.js +2 -2
  6. package/scripts/generators/command-registry.js +6 -6
  7. package/scripts/generators/index.js +2 -6
  8. package/scripts/generators/inject-babysit.js +9 -2
  9. package/scripts/generators/inject-help.js +3 -1
  10. package/scripts/generators/inject-readme.js +7 -3
  11. package/scripts/generators/skill-registry.js +5 -5
  12. package/scripts/get-env.js +13 -12
  13. package/scripts/obtain-context.js +79 -26
  14. package/scripts/session-coordinator.sh +232 -0
  15. package/scripts/session-manager.js +512 -0
  16. package/src/core/agents/orchestrator.md +275 -0
  17. package/src/core/commands/adr.md +38 -16
  18. package/src/core/commands/agent.md +39 -22
  19. package/src/core/commands/assign.md +17 -0
  20. package/src/core/commands/auto.md +60 -46
  21. package/src/core/commands/babysit.md +302 -637
  22. package/src/core/commands/baseline.md +20 -0
  23. package/src/core/commands/blockers.md +33 -48
  24. package/src/core/commands/board.md +19 -0
  25. package/src/core/commands/changelog.md +20 -0
  26. package/src/core/commands/ci.md +17 -0
  27. package/src/core/commands/context.md +43 -40
  28. package/src/core/commands/debt.md +76 -45
  29. package/src/core/commands/deploy.md +20 -0
  30. package/src/core/commands/deps.md +40 -46
  31. package/src/core/commands/diagnose.md +24 -18
  32. package/src/core/commands/docs.md +18 -0
  33. package/src/core/commands/epic.md +31 -0
  34. package/src/core/commands/feedback.md +33 -21
  35. package/src/core/commands/handoff.md +29 -0
  36. package/src/core/commands/help.md +16 -7
  37. package/src/core/commands/impact.md +31 -61
  38. package/src/core/commands/metrics.md +17 -35
  39. package/src/core/commands/packages.md +21 -0
  40. package/src/core/commands/pr.md +15 -0
  41. package/src/core/commands/readme-sync.md +42 -9
  42. package/src/core/commands/research.md +58 -11
  43. package/src/core/commands/retro.md +42 -50
  44. package/src/core/commands/review.md +22 -27
  45. package/src/core/commands/session/end.md +53 -297
  46. package/src/core/commands/session/history.md +38 -257
  47. package/src/core/commands/session/init.md +44 -446
  48. package/src/core/commands/session/new.md +152 -0
  49. package/src/core/commands/session/resume.md +51 -447
  50. package/src/core/commands/session/status.md +32 -244
  51. package/src/core/commands/sprint.md +33 -0
  52. package/src/core/commands/status.md +18 -0
  53. package/src/core/commands/story-validate.md +32 -0
  54. package/src/core/commands/story.md +21 -6
  55. package/src/core/commands/template.md +18 -0
  56. package/src/core/commands/tests.md +22 -0
  57. package/src/core/commands/update.md +72 -58
  58. package/src/core/commands/validate-expertise.md +25 -37
  59. package/src/core/commands/velocity.md +33 -74
  60. package/src/core/commands/verify.md +16 -0
  61. package/src/core/experts/documentation/expertise.yaml +16 -2
  62. package/src/core/skills/agileflow-retro-facilitator/SKILL.md +57 -219
  63. package/src/core/skills/agileflow-retro-facilitator/cookbook/4ls.md +86 -0
  64. package/src/core/skills/agileflow-retro-facilitator/cookbook/glad-sad-mad.md +79 -0
  65. package/src/core/skills/agileflow-retro-facilitator/cookbook/start-stop-continue.md +142 -0
  66. package/src/core/skills/agileflow-retro-facilitator/prompts/action-items.md +83 -0
  67. package/src/core/skills/writing-skills/SKILL.md +352 -0
  68. package/src/core/skills/writing-skills/testing-skills-with-subagents.md +232 -0
  69. package/tools/cli/agileflow-cli.js +4 -2
  70. package/tools/cli/commands/config.js +20 -13
  71. package/tools/cli/commands/doctor.js +25 -9
  72. package/tools/cli/commands/list.js +10 -6
  73. package/tools/cli/commands/setup.js +54 -3
  74. package/tools/cli/commands/status.js +6 -8
  75. package/tools/cli/commands/uninstall.js +5 -5
  76. package/tools/cli/commands/update.js +51 -7
  77. package/tools/cli/installers/core/installer.js +8 -4
  78. package/tools/cli/installers/ide/_base-ide.js +3 -1
  79. package/tools/cli/installers/ide/claude-code.js +3 -7
  80. package/tools/cli/installers/ide/codex.js +440 -0
  81. package/tools/cli/installers/ide/manager.js +2 -6
  82. package/tools/cli/lib/content-injector.js +3 -3
  83. package/tools/cli/lib/docs-setup.js +3 -2
  84. package/tools/cli/lib/npm-utils.js +3 -3
  85. package/tools/cli/lib/ui.js +7 -7
  86. package/tools/cli/lib/version-checker.js +3 -3
  87. package/tools/postinstall.js +2 -3
@@ -1,292 +1,73 @@
1
1
  ---
2
2
  description: View past session history and metrics
3
- argument-hint: [DAYS=7|30|90|all]
3
+ argument-hint: "[DAYS=7|30|90|all]"
4
4
  ---
5
5
 
6
- # Session History
6
+ # /agileflow:session:history
7
7
 
8
- You are running the `/agileflow:session:history` command to view past session history and productivity metrics.
8
+ View historical session data and metrics.
9
9
 
10
- ## IMMEDIATE ACTIONS
11
-
12
- **Execute these steps NOW (read-only):**
13
-
14
- ### Step 1: Read session-state.json
15
- ```bash
16
- cat docs/09-agents/session-state.json
17
- ```
18
-
19
- ### Step 2: Parse the DAYS argument
20
- Default is 7. Accepted values: 7, 30, 90, all
21
-
22
- ### Step 3: Filter and aggregate history
23
- From `session_history` array:
24
- - Count total sessions
25
- - Sum duration_minutes
26
- - Sum stories_completed
27
- - Count test_regressions
10
+ ---
28
11
 
29
- ### Step 4: Display formatted output
30
- Show:
31
- - Summary metrics (total sessions, time, stories)
32
- - Daily breakdown with ASCII bar chart
33
- - Trends compared to previous period
12
+ ## Purpose
34
13
 
35
- **This command is READ-ONLY. It never modifies files.**
14
+ Show all sessions (active and inactive) with creation dates, last activity, and work done.
36
15
 
37
16
  ## Arguments
38
17
 
39
- | Argument | Description | Default |
40
- |----------|-------------|---------|
41
- | `DAYS` | Time period to show | `7` (last 7 days) |
42
-
43
- **Examples:**
44
- - `/agileflow:session:history` - Last 7 days
45
- - `/agileflow:session:history DAYS=30` - Last 30 days
46
- - `/agileflow:session:history DAYS=all` - All time
47
-
48
- ## Execution Flow
49
-
50
- ### 1. Load Session History
51
-
52
- Read from `docs/09-agents/session-state.json`:
53
-
54
- ```bash
55
- HISTORY=$(jq '.session_history' docs/09-agents/session-state.json)
56
- ```
18
+ | Argument | Default | Description |
19
+ |----------|---------|-------------|
20
+ | DAYS | 30 | Filter sessions by age (7, 30, 90, or "all") |
57
21
 
58
- ### 2. Filter by Time Period
59
-
60
- ```bash
61
- if [ "$DAYS" == "all" ]; then
62
- FILTERED_HISTORY="$HISTORY"
63
- else
64
- CUTOFF_DATE=$(date -d "-$DAYS days" +%Y-%m-%d)
65
- FILTERED_HISTORY=$(echo "$HISTORY" | jq --arg cutoff "$CUTOFF_DATE" '[.[] | select(.date >= $cutoff)]')
66
- fi
67
- ```
22
+ ## IMMEDIATE ACTIONS
68
23
 
69
- ### 3. Calculate Metrics
24
+ ### Step 1: Get All Sessions
70
25
 
71
26
  ```bash
72
- # Total sessions
73
- TOTAL_SESSIONS=$(echo "$FILTERED_HISTORY" | jq '[.[].sessions] | add')
74
-
75
- # Total time
76
- TOTAL_MINUTES=$(echo "$FILTERED_HISTORY" | jq '[.[].total_duration_minutes] | add')
77
-
78
- # Stories completed
79
- TOTAL_STORIES=$(echo "$FILTERED_HISTORY" | jq '[.[].stories_completed] | add')
80
-
81
- # Test regressions
82
- TOTAL_REGRESSIONS=$(echo "$FILTERED_HISTORY" | jq '[.[].test_regressions] | add')
83
-
84
- # Averages
85
- AVG_SESSION_LENGTH=$((TOTAL_MINUTES / TOTAL_SESSIONS))
86
- AVG_STORIES_PER_SESSION=$(echo "scale=2; $TOTAL_STORIES / $TOTAL_SESSIONS" | bc)
87
- ```
88
-
89
- ### 4. Display History
90
-
27
+ node .agileflow/scripts/session-manager.js list --json
91
28
  ```
92
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
93
- 📊 Session History (Last 7 Days)
94
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
-
96
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
97
- 📈 Summary
98
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
99
-
100
- Total Sessions: 12
101
- Total Time: 32 hours 45 minutes
102
- Stories Completed: 8
103
- Test Regressions: 1
104
-
105
- Averages:
106
- • Session length: 2h 44m
107
- • Stories per session: 0.67
108
- • Stories per day: 1.14
109
29
 
110
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
- 📅 Daily Breakdown
112
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
30
+ ### Step 2: Filter by Timeframe
113
31
 
114
- Mon Dec 16 │ ██████████████ 4h 30m 1 story │ 3 commits │ ✅
115
- Sun Dec 15 │ ████████████ 4h 00m │ 2 stories │ 5 commits │ ✅
116
- Sat Dec 14 │ ██████ 2h 00m │ 0 stories │ 2 commits │ ✅
117
- Fri Dec 13 │ ████████████████ 5h 15m │ 2 stories │ 8 commits │ ⚠️ regression
118
- Thu Dec 12 │ ██████████████ 4h 30m │ 1 story │ 4 commits │ ✅
119
- Wed Dec 11 │ ████████████████████ 6h 30m │ 2 stories │ 10 commits │ ✅
120
- Tue Dec 10 │ ████████████ 4h 00m │ 0 stories │ 3 commits │ ✅
32
+ Parse the DAYS argument and filter sessions by their `created` timestamp.
121
33
 
122
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
123
- 📋 Session Details
124
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
34
+ ### Step 3: Display History
125
35
 
126
- Mon Dec 16 (1 session):
127
- sess-20251216-140000
128
- │ Duration: 4h 30m
129
- │ Stories: US-0043 ✅
130
- │ Commits: 3
131
- │ Tests: ✅ passing
132
-
133
- Sun Dec 15 (2 sessions):
134
- sess-20251215-140000
135
- │ Duration: 2h 15m
136
- │ Stories: US-0041 ✅
137
- │ Commits: 3
138
- │ Tests: ✅ passing
139
-
140
- sess-20251215-090000
141
- │ Duration: 1h 45m
142
- │ Stories: US-0042 ✅
143
- │ Commits: 2
144
- │ Tests: ✅ passing
145
-
146
- Fri Dec 13 (1 session):
147
- sess-20251213-100000
148
- │ Duration: 5h 15m
149
- │ Stories: US-0039 ✅, US-0040 ✅
150
- │ Commits: 8
151
- │ Tests: ⚠️ regression detected
152
- │ Notes: Auth tests broke, fixed same session
153
-
154
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
155
- 📊 Trends
156
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
-
158
- Productivity (stories/week):
159
- This week: █████████████████████ 8
160
- Last week: ████████████████ 6
161
- 2 weeks ago: ██████████████ 5
162
-
163
- Session length trend:
164
- Avg this week: 2h 44m ↑
165
- Avg last week: 2h 10m
166
- Avg 2 weeks ago: 1h 55m
167
-
168
- Test stability:
169
- This week: 1 regression (fixed same day)
170
- Last week: 0 regressions
171
- 2 weeks ago: 2 regressions
172
-
173
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
36
  ```
175
-
176
- ## Output Variations
177
-
178
- ### No History
37
+ 📜 Session History (Last 30 days)
38
+
39
+ ┌─────┬────────────┬──────────────────┬─────────────┬────────────┐
40
+ │ # │ Created │ Name/Branch │ Story │ Status │
41
+ ├─────┼────────────┼──────────────────┼─────────────┼────────────┤
42
+ │ 1 │ Dec 20 │ main │ - │ ● Active │
43
+ │ 2 │ Dec 22 │ "auth" │ US-0042 │ ● Active │
44
+ │ 3 │ Dec 23 │ feature/payments │ US-0051 │ ○ Inactive │
45
+ │ 4 │ Dec 25 │ "bugfix" │ US-0038 │ ○ Inactive │
46
+ └─────┴────────────┴──────────────────┴─────────────┴────────────┘
47
+
48
+ Summary: 4 sessions │ 2 active │ 2 inactive
179
49
  ```
180
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181
- 📊 Session History
182
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
50
 
184
- No session history found.
51
+ ### Step 4: Show Tips
185
52
 
186
- Start tracking sessions with:
187
- 1. /agileflow:session:init (one-time setup)
188
- 2. /agileflow:session:resume (each session)
189
- 3. /agileflow:session:end (end of session)
190
-
191
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
192
53
  ```
193
-
194
- ### 30-Day Summary View
54
+ 💡 Tips:
55
+ /agileflow:session:new to create a new session
56
+ • /agileflow:session:delete {id} to remove old sessions
57
+ • Inactive sessions can be resumed with /agileflow:session:resume
195
58
  ```
196
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
197
- 📊 Session History (Last 30 Days)
198
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
199
-
200
- Total Sessions: 45
201
- Total Time: 98 hours 30 minutes
202
- Stories Completed: 32
203
- Test Regressions: 3
204
-
205
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
206
- 📅 Weekly Summary
207
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
208
-
209
- Week of Dec 16: █████████████████████ 8 stories │ 22h │ 12 sessions
210
- Week of Dec 9: ██████████████████ 6 stories │ 18h │ 10 sessions
211
- Week of Dec 2: ████████████████████ 7 stories │ 24h │ 11 sessions
212
- Week of Nov 25: ████████████████████████████ 11 stories │ 34h │ 12 sessions
213
59
 
214
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
- 📈 Monthly Metrics
216
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ ## No History Case
217
61
 
218
- Average:
219
- • Sessions per week: 11.25
220
- • Hours per week: 24.6h
221
- • Stories per week: 8.0
222
-
223
- Best day: Nov 27 (5 stories, 6h session)
224
- Most active: Wednesdays (avg 4.2h)
225
- Least active: Saturdays (avg 1.5h)
226
-
227
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
228
- ```
229
-
230
- ### All Time Stats
231
62
  ```
232
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
233
- 📊 Session History (All Time)
234
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
235
-
236
- Since: October 15, 2025 (62 days ago)
237
-
238
- Total Sessions: 156
239
- Total Time: 312 hours
240
- Stories Completed: 98
241
- Epics Completed: 4
242
- Test Regressions: 8
243
-
244
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
245
- 📅 Monthly Summary
246
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
+ 📜 Session History
247
64
 
248
- Dec 2025: ████████████████████ 32 stories 98h
249
- Nov 2025: ██████████████████████████████ 48 stories │ 156h
250
- Oct 2025: ████████████ 18 stories │ 58h
65
+ No sessions found in the last {DAYS} days.
251
66
 
252
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
253
- 🏆 Milestones
254
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
255
-
256
- ✅ 100 stories completed (Dec 10, 2025)
257
- ✅ 100 hours tracked (Nov 28, 2025)
258
- ✅ First epic completed (Nov 15, 2025)
259
- ✅ First session (Oct 15, 2025)
260
-
261
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
+ Try /agileflow:session:history DAYS=all to see all sessions.
262
68
  ```
263
69
 
264
70
  ## Related Commands
265
71
 
266
- | Command | Purpose |
267
- |---------|---------|
268
- | `/agileflow:session:init` | One-time setup of session harness |
269
- | `/agileflow:session:resume` | Start session with verification |
270
- | `/agileflow:session:status` | Quick view of current session |
271
- | `/agileflow:session:end` | Cleanly end session and record summary |
272
- | `/agileflow:metrics` | Full project analytics dashboard |
273
- | `/agileflow:velocity` | Sprint velocity tracking |
274
-
275
- ## Integration Points
276
-
277
- ### Reads
278
- - `docs/09-agents/session-state.json` - Session history
279
- - `docs/09-agents/status.json` - Story completion data
280
-
281
- ### Does NOT
282
- - Modify any files
283
- - Start or end sessions
284
- - Run tests
285
-
286
- ## Implementation Notes
287
-
288
- 1. **Read-Only**: Never modifies files
289
- 2. **Flexible Time Ranges**: 7, 30, 90 days, or all time
290
- 3. **Visual**: Uses ASCII charts for trends
291
- 4. **Actionable**: Shows patterns to optimize work habits
292
- 5. **Performance**: Handles large histories efficiently
72
+ - `/agileflow:session:status` - Current status
73
+ - `/agileflow:session:resume` - Switch sessions