agileflow 2.77.0 → 2.79.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 (128) hide show
  1. package/README.md +6 -6
  2. package/package.json +6 -1
  3. package/scripts/agileflow-configure.js +174 -2
  4. package/scripts/agileflow-statusline.sh +171 -78
  5. package/scripts/agileflow-welcome.js +88 -64
  6. package/scripts/auto-self-improve.js +23 -45
  7. package/scripts/check-update.js +35 -42
  8. package/scripts/damage-control/bash-tool-damage-control.js +257 -0
  9. package/scripts/damage-control/edit-tool-damage-control.js +279 -0
  10. package/scripts/damage-control/patterns.yaml +227 -0
  11. package/scripts/damage-control/write-tool-damage-control.js +274 -0
  12. package/scripts/damage-control-bash.js +232 -0
  13. package/scripts/damage-control-edit.js +243 -0
  14. package/scripts/damage-control-write.js +243 -0
  15. package/scripts/obtain-context.js +22 -3
  16. package/scripts/ralph-loop.js +191 -63
  17. package/scripts/screenshot-verifier.js +213 -0
  18. package/scripts/session-manager.js +12 -33
  19. package/src/core/agents/accessibility.md +124 -53
  20. package/src/core/agents/adr-writer.md +192 -52
  21. package/src/core/agents/analytics.md +139 -60
  22. package/src/core/agents/api.md +173 -63
  23. package/src/core/agents/ci.md +139 -57
  24. package/src/core/agents/compliance.md +159 -68
  25. package/src/core/agents/configuration/damage-control.md +356 -0
  26. package/src/core/agents/configuration-damage-control.md +248 -0
  27. package/src/core/agents/database.md +162 -61
  28. package/src/core/agents/datamigration.md +179 -66
  29. package/src/core/agents/design.md +179 -57
  30. package/src/core/agents/devops.md +160 -3
  31. package/src/core/agents/documentation.md +204 -60
  32. package/src/core/agents/epic-planner.md +147 -55
  33. package/src/core/agents/integrations.md +197 -69
  34. package/src/core/agents/mentor.md +158 -57
  35. package/src/core/agents/mobile.md +159 -67
  36. package/src/core/agents/monitoring.md +154 -65
  37. package/src/core/agents/multi-expert.md +115 -43
  38. package/src/core/agents/orchestrator.md +77 -24
  39. package/src/core/agents/performance.md +130 -75
  40. package/src/core/agents/product.md +151 -55
  41. package/src/core/agents/qa.md +162 -74
  42. package/src/core/agents/readme-updater.md +178 -76
  43. package/src/core/agents/refactor.md +148 -95
  44. package/src/core/agents/research.md +143 -72
  45. package/src/core/agents/security.md +154 -65
  46. package/src/core/agents/testing.md +176 -97
  47. package/src/core/agents/ui.md +170 -79
  48. package/src/core/commands/adr/list.md +171 -0
  49. package/src/core/commands/adr/update.md +235 -0
  50. package/src/core/commands/adr/view.md +252 -0
  51. package/src/core/commands/adr.md +207 -50
  52. package/src/core/commands/agent.md +16 -0
  53. package/src/core/commands/assign.md +148 -44
  54. package/src/core/commands/auto.md +18 -1
  55. package/src/core/commands/babysit.md +391 -38
  56. package/src/core/commands/baseline.md +14 -0
  57. package/src/core/commands/blockers.md +170 -51
  58. package/src/core/commands/board.md +144 -66
  59. package/src/core/commands/changelog.md +15 -0
  60. package/src/core/commands/ci.md +179 -69
  61. package/src/core/commands/compress.md +18 -0
  62. package/src/core/commands/configure.md +16 -0
  63. package/src/core/commands/context/export.md +193 -4
  64. package/src/core/commands/context/full.md +191 -18
  65. package/src/core/commands/context/note.md +248 -4
  66. package/src/core/commands/debt.md +17 -0
  67. package/src/core/commands/deploy.md +208 -65
  68. package/src/core/commands/deps.md +15 -0
  69. package/src/core/commands/diagnose.md +16 -0
  70. package/src/core/commands/docs.md +196 -64
  71. package/src/core/commands/epic/list.md +170 -0
  72. package/src/core/commands/epic/view.md +242 -0
  73. package/src/core/commands/epic.md +192 -69
  74. package/src/core/commands/feedback.md +191 -71
  75. package/src/core/commands/handoff.md +162 -48
  76. package/src/core/commands/help.md +9 -0
  77. package/src/core/commands/ideate.md +446 -0
  78. package/src/core/commands/impact.md +16 -0
  79. package/src/core/commands/metrics.md +141 -37
  80. package/src/core/commands/multi-expert.md +77 -0
  81. package/src/core/commands/packages.md +16 -0
  82. package/src/core/commands/pr.md +161 -67
  83. package/src/core/commands/readme-sync.md +16 -0
  84. package/src/core/commands/research/analyze.md +568 -0
  85. package/src/core/commands/research/ask.md +345 -20
  86. package/src/core/commands/research/import.md +562 -19
  87. package/src/core/commands/research/list.md +173 -5
  88. package/src/core/commands/research/view.md +181 -8
  89. package/src/core/commands/retro.md +135 -48
  90. package/src/core/commands/review.md +219 -47
  91. package/src/core/commands/session/end.md +209 -0
  92. package/src/core/commands/session/history.md +210 -0
  93. package/src/core/commands/session/init.md +116 -0
  94. package/src/core/commands/session/new.md +296 -0
  95. package/src/core/commands/session/resume.md +166 -0
  96. package/src/core/commands/session/status.md +166 -0
  97. package/src/core/commands/setup/visual-e2e.md +462 -0
  98. package/src/core/commands/skill/create.md +115 -17
  99. package/src/core/commands/skill/delete.md +117 -0
  100. package/src/core/commands/skill/edit.md +104 -0
  101. package/src/core/commands/skill/list.md +128 -0
  102. package/src/core/commands/skill/test.md +135 -0
  103. package/src/core/commands/skill/upgrade.md +542 -0
  104. package/src/core/commands/sprint.md +17 -1
  105. package/src/core/commands/status.md +133 -21
  106. package/src/core/commands/story/list.md +176 -0
  107. package/src/core/commands/story/view.md +265 -0
  108. package/src/core/commands/story-validate.md +101 -1
  109. package/src/core/commands/story.md +204 -51
  110. package/src/core/commands/template.md +16 -1
  111. package/src/core/commands/tests.md +226 -64
  112. package/src/core/commands/update.md +17 -1
  113. package/src/core/commands/validate-expertise.md +16 -0
  114. package/src/core/commands/velocity.md +140 -36
  115. package/src/core/commands/verify.md +14 -0
  116. package/src/core/commands/whats-new.md +30 -0
  117. package/src/core/skills/_learnings/README.md +91 -0
  118. package/src/core/skills/_learnings/_template.yaml +106 -0
  119. package/src/core/skills/_learnings/code-review.yaml +118 -0
  120. package/src/core/skills/_learnings/commit.yaml +69 -0
  121. package/src/core/skills/_learnings/story-writer.yaml +71 -0
  122. package/src/core/templates/damage-control-patterns.yaml +234 -0
  123. package/src/core/templates/skill-template.md +53 -11
  124. package/tools/cli/commands/start.js +180 -0
  125. package/tools/cli/installers/ide/claude-code.js +127 -0
  126. package/tools/cli/tui/Dashboard.js +66 -0
  127. package/tools/cli/tui/StoryList.js +69 -0
  128. package/tools/cli/tui/index.js +16 -0
@@ -1,6 +1,19 @@
1
1
  ---
2
2
  description: Pick a session to switch to or resume
3
3
  argument-hint: (no arguments)
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:session:resume - Switch between parallel sessions"
8
+ - "Lists all registered sessions (active and inactive) with status"
9
+ - "User selects which session to resume"
10
+ - "Returns `cd` command to switch to selected session"
11
+ - "Formats nickname/branch with activity status (Active now / inactive)"
12
+ - "Marks current session with '(current)' label"
13
+ state_fields:
14
+ - current_session
15
+ - all_sessions
16
+ - user_selection
4
17
  ---
5
18
 
6
19
  # /agileflow:session:resume
@@ -89,3 +102,156 @@ Run /agileflow:session:new to create a new parallel workspace.
89
102
  - `/agileflow:session:new` - Create new session
90
103
  - `/agileflow:session:status` - Quick status view
91
104
  - `/agileflow:session:end` - End current session
105
+
106
+ ---
107
+
108
+ <!-- COMPACT_SUMMARY_START -->
109
+
110
+ ## ⚠️ COMPACT SUMMARY - /agileflow:session:resume IS ACTIVE
111
+
112
+ **CRITICAL**: This command is the primary way to **switch between parallel sessions**. User selects, you display the cd command.
113
+
114
+ ---
115
+
116
+ ### 🚨 RULE #1: ALWAYS USE AskUserQuestion
117
+
118
+ **NEVER just describe the sessions.** Build an AskUserQuestion with:
119
+ - One option per session
120
+ - Current session marked "(current)"
121
+ - Active sessions marked "Active now"
122
+ - Inactive sessions show "last active: {time}"
123
+ - "Create new session" option at bottom
124
+
125
+ ```xml
126
+ <invoke name="AskUserQuestion">
127
+ <parameter name="questions">[{
128
+ "question": "Which session would you like to resume?",
129
+ "header": "Sessions",
130
+ "multiSelect": false,
131
+ "options": [
132
+ {"label": "Session 1: main (current)",
133
+ "description": "US-0042: User Auth API │ Active now │ /home/user/project"},
134
+ {"label": "Session 2: \"auth\"",
135
+ "description": "US-0038: Fix Login │ Active now │ ../project-auth"},
136
+ {"label": "Session 3: feature/payments",
137
+ "description": "US-0051 │ Inactive (1 day ago) │ ../project-payments"},
138
+ {"label": "Create new session",
139
+ "description": "Start a fresh parallel workspace"}
140
+ ]
141
+ }]</parameter>
142
+ </invoke>
143
+ ```
144
+
145
+ ---
146
+
147
+ ### 🚨 RULE #2: HANDLE EACH SELECTION CASE
148
+
149
+ **If user selects current session:**
150
+ ```
151
+ You're already in Session 1!
152
+ ```
153
+
154
+ **If user selects different session:**
155
+ ```
156
+ To resume Session 2 "auth":
157
+
158
+ ┌─────────────────────────────────────────────────────────┐
159
+ │ cd ../project-auth && claude --resume │
160
+ └─────────────────────────────────────────────────────────┘
161
+
162
+ Session info:
163
+ Branch: session-2
164
+ Story: US-0038 (in-progress)
165
+ ```
166
+
167
+ **If user selects "Create new session":**
168
+ ```
169
+ Run /agileflow:session:new to create a new parallel workspace.
170
+ ```
171
+
172
+ ---
173
+
174
+ ### 🚨 RULE #3: FORMATTING LABELS & DESCRIPTIONS
175
+
176
+ **Label format (session option):**
177
+ - Session with nickname: `Session {id}: "{nickname}"`
178
+ - Session with branch: `Session {id}: {branch}`
179
+ - Current session: append ` (current)`
180
+
181
+ **Description format:**
182
+ - Include story ID if available: `US-0042`
183
+ - Include status: `Active now` OR `Inactive (N days ago)`
184
+ - Include relative path: `../project-auth`
185
+ - Format: `{STORY_ID} │ {STATUS} │ {PATH}`
186
+
187
+ ---
188
+
189
+ ### 🚨 RULE #4: SESSION DATA STRUCTURE
190
+
191
+ Sessions from `session-manager.js list --json` contain:
192
+ ```json
193
+ {
194
+ "id": 1,
195
+ "path": "/home/user/project",
196
+ "branch": "main",
197
+ "nickname": null,
198
+ "status": "active",
199
+ "is_current": true,
200
+ "is_main": true,
201
+ "created": "2025-12-20T10:00:00Z",
202
+ "last_active": "2025-12-20T10:30:00Z"
203
+ }
204
+ ```
205
+
206
+ Use these fields to build readable labels.
207
+
208
+ ---
209
+
210
+ ### KEY FILES TO REMEMBER
211
+
212
+ | File | Purpose |
213
+ |------|---------|
214
+ | `.agileflow/sessions/registry.json` | Master list of all sessions |
215
+ | `.agileflow/sessions/{id}.lock` | Lock file = session is active |
216
+ | `.agileflow/scripts/session-manager.js` | Script providing session data |
217
+
218
+ ---
219
+
220
+ ### WORKFLOW
221
+
222
+ 1. **Get sessions** → `node .agileflow/scripts/session-manager.js list --json`
223
+ 2. **Parse JSON** → Extract id, branch, nickname, status, path
224
+ 3. **Build options** → Create readable labels with status
225
+ 4. **Show AskUserQuestion** → Let user select
226
+ 5. **Handle selection** → Show cd command or appropriate response
227
+
228
+ ---
229
+
230
+ ### ANTI-PATTERNS (DON'T DO THESE)
231
+
232
+ ❌ Just list sessions without AskUserQuestion
233
+ ❌ Format label as "session_1_main" (use readable format)
234
+ ❌ Show path as absolute when relative is shorter
235
+ ❌ Don't mark current session with "(current)"
236
+ ❌ Don't show "Active now" status for active sessions
237
+
238
+ ### DO THESE INSTEAD
239
+
240
+ ✅ ALWAYS use AskUserQuestion with user options
241
+ ✅ Format labels as "Session 1: main (current)"
242
+ ✅ Show relative paths (../project-auth)
243
+ ✅ Mark current session clearly
244
+ ✅ Show activity status (Active now / Inactive Xd ago)
245
+
246
+ ---
247
+
248
+ ### REMEMBER AFTER COMPACTION
249
+
250
+ - `/agileflow:session:resume` IS ACTIVE
251
+ - ALWAYS use AskUserQuestion to let user select
252
+ - Format labels clearly: `Session {id}: {nickname/branch} {(current)}`
253
+ - Show status in description: `Active now` OR `Inactive (N days ago)`
254
+ - Handle each case: current / different / create new
255
+ - Return cd command when user selects different session
256
+
257
+ <!-- COMPACT_SUMMARY_END -->
@@ -1,6 +1,19 @@
1
1
  ---
2
2
  description: View current session state and activity
3
3
  argument-hint: (no arguments)
4
+ compact_context:
5
+ priority: medium
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:session:status - Display all sessions in table"
8
+ - "Does NOT prompt for action (read-only display)"
9
+ - "Shows current session, then table of other sessions"
10
+ - "Marks active sessions with ● bullet, inactive with ○"
11
+ - "Returns session count and active count"
12
+ state_fields:
13
+ - current_session
14
+ - all_sessions
15
+ - active_count
16
+ - total_count
4
17
  ---
5
18
 
6
19
  # /agileflow:session:status
@@ -63,3 +76,156 @@ Run /agileflow:session:new to create a parallel workspace.
63
76
  - `/agileflow:session:new` - Create new session
64
77
  - `/agileflow:session:resume` - Switch sessions
65
78
  - `/agileflow:session:end` - End current session
79
+
80
+ ---
81
+
82
+ <!-- COMPACT_SUMMARY_START -->
83
+
84
+ ## ⚠️ COMPACT SUMMARY - /agileflow:session:status IS ACTIVE
85
+
86
+ **CRITICAL**: This command displays read-only status. It NEVER prompts for action - just shows information.
87
+
88
+ ---
89
+
90
+ ### 🚨 RULE #1: READ-ONLY DISPLAY (NO USER PROMPTS)
91
+
92
+ **NEVER use AskUserQuestion or present options.** This command is informational only.
93
+
94
+ | Command | Has Prompts? | Use Case |
95
+ |---------|-------------|----------|
96
+ | `/agileflow:session:status` | ❌ No | Quick info view |
97
+ | `/agileflow:session:resume` | ✅ Yes | Switch sessions |
98
+ | `/agileflow:session:new` | ✅ Yes | Create session |
99
+ | `/agileflow:session:end` | ✅ Yes | End session |
100
+
101
+ ---
102
+
103
+ ### 🚨 RULE #2: DISPLAY FORMAT
104
+
105
+ **Structure:**
106
+ 1. Header with emoji: `📊 Session Status`
107
+ 2. Current session info (highlighted)
108
+ 3. Table of other sessions
109
+ 4. Summary line: `Total: X sessions │ Y active`
110
+ 5. Quick actions (optional)
111
+
112
+ **Example:**
113
+ ```
114
+ 📊 Session Status
115
+
116
+ Current: Session 1 (main)
117
+ Branch: main │ Story: US-0042 │ Active
118
+
119
+ Other Sessions:
120
+ ┌─────┬──────────────────┬─────────────┬────────────┐
121
+ │ # │ Name/Branch │ Story │ Status │
122
+ ├─────┼──────────────────┼─────────────┼────────────┤
123
+ │ 2 │ "auth" │ US-0038 │ ● Active │
124
+ │ 3 │ feature/payments │ - │ ○ Inactive │
125
+ └─────┴──────────────────┴─────────────┴────────────┘
126
+
127
+ Total: 3 sessions │ 2 active
128
+ ```
129
+
130
+ ---
131
+
132
+ ### 🚨 RULE #3: STATUS BULLETS
133
+
134
+ - **● Active** - Session has lock file (Claude process running)
135
+ - **○ Inactive** - No lock file (can be resumed)
136
+
137
+ ---
138
+
139
+ ### 🚨 RULE #4: SHOW QUICK ACTIONS (OPTIONAL)
140
+
141
+ After the table, show optional quick actions info:
142
+ ```
143
+ 💡 Quick actions:
144
+ /agileflow:session:new - Create parallel session
145
+ /agileflow:session:resume - Switch to another session
146
+ /agileflow:session:end - End current session
147
+ ```
148
+
149
+ ---
150
+
151
+ ### 🚨 RULE #5: HANDLE EDGE CASES
152
+
153
+ **If no sessions exist:**
154
+ ```
155
+ 📊 Session Status
156
+
157
+ No sessions registered yet. You're in the main project directory.
158
+ Run /agileflow:session:new to create a parallel workspace.
159
+ ```
160
+
161
+ **If only current session:**
162
+ ```
163
+ 📊 Session Status
164
+
165
+ Current: Session 1 (main)
166
+ Branch: main │ Active
167
+
168
+ This is your only session. Use /agileflow:session:new to create more.
169
+ ```
170
+
171
+ ---
172
+
173
+ ### FORMATTING RULES
174
+
175
+ | Element | Format | Example |
176
+ |---------|--------|---------|
177
+ | Session name | Branch or nickname | `main` or `"auth"` |
178
+ | Story ID | US-#### or dash | `US-0042` or `-` |
179
+ | Status | ● Active or ○ Inactive | `● Active` |
180
+ | Session reference | Session {id} | `Session 1` |
181
+
182
+ ---
183
+
184
+ ### KEY FILES TO REMEMBER
185
+
186
+ | File | Purpose |
187
+ |------|---------|
188
+ | `.agileflow/sessions/registry.json` | Master list of sessions |
189
+ | `.agileflow/sessions/{id}.lock` | Lock file marks session active |
190
+ | `.agileflow/scripts/session-manager.js` | Data source |
191
+
192
+ ---
193
+
194
+ ### WORKFLOW
195
+
196
+ 1. **Get sessions** → `node .agileflow/scripts/session-manager.js list --json`
197
+ 2. **Parse JSON** → Extract sessions, identify current
198
+ 3. **Build display** → Format header, current session, table
199
+ 4. **Show summary** → Total and active counts
200
+ 5. **Optionally show** → Quick actions reference
201
+
202
+ ---
203
+
204
+ ### ANTI-PATTERNS (DON'T DO THESE)
205
+
206
+ ❌ Use AskUserQuestion to prompt for action
207
+ ❌ Show "Resume Session 2?" or similar prompts
208
+ ❌ Use table without proper formatting
209
+ ❌ Show path in table (too much info)
210
+ ❌ Skip summary line showing counts
211
+
212
+ ### DO THESE INSTEAD
213
+
214
+ ✅ Display as read-only information
215
+ ✅ Use ● and ○ bullets for status
216
+ ✅ Format table with proper borders
217
+ ✅ Show summary with counts
218
+ ✅ Optionally show quick actions for reference
219
+
220
+ ---
221
+
222
+ ### REMEMBER AFTER COMPACTION
223
+
224
+ - `/agileflow:session:status` IS ACTIVE
225
+ - NEVER prompt for action (read-only display)
226
+ - Format: header + current session + table + summary
227
+ - Use ● for active, ○ for inactive
228
+ - Show session counts in summary
229
+ - Optionally show quick actions reference
230
+
231
+ <!-- COMPACT_SUMMARY_END -->