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,21 @@
1
1
  ---
2
2
  description: Document work handoff between agents
3
3
  argument-hint: STORY=<US-ID> FROM=<id> TO=<id> [SUMMARY=<text>] [BLOCKERS=<list>]
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "STORY, FROM, TO are REQUIRED - always ask if missing"
8
+ - "Create handoff note from template in docs/09-agents/comms/"
9
+ - "Append bus log entry with type='handoff' to docs/09-agents/bus/log.jsonl"
10
+ - "Always show diff/preview FIRST, wait for YES/NO confirmation BEFORE writing"
11
+ - "Include SUMMARY (what was done) and BLOCKERS (issues for next agent)"
12
+ - "Use template: @packages/cli/src/core/templates/comms-note-template.md"
13
+ state_fields:
14
+ - story_id
15
+ - from_agent
16
+ - to_agent
17
+ - summary
18
+ - blockers
4
19
  ---
5
20
 
6
21
  # handoff
@@ -15,79 +30,167 @@ If the user confirms they want the full details, continue. Otherwise, stop here.
15
30
  Document handoff between agents with summary and blockers.
16
31
 
17
32
  <!-- COMPACT_SUMMARY_START -->
18
- ## Compact Summary
19
33
 
20
- **Purpose**: Document work handoffs between agents on a story
34
+ ## ⚠️ COMPACT SUMMARY - /agileflow:handoff IS ACTIVE
21
35
 
22
- **Quick Usage**:
23
- ```
24
- /handoff STORY=US-0042 FROM=agent-a TO=agent-b SUMMARY="Completed API integration" BLOCKERS="Need database schema review"
25
- ```
36
+ **CRITICAL**: You are documenting work handoffs between agents. These create audit trails and pass context to next agent.
26
37
 
27
- **What It Does**:
28
- 1. Creates handoff note: `docs/09-agents/comms/<STORY>-<YYYYMMDD>-handoff.md`
29
- 2. Logs to agent bus: `docs/09-agents/bus/log.jsonl` (type="handoff")
30
- 3. Tracks who, what, when, and any blockers
38
+ **ROLE**: Handoff Scribe
31
39
 
32
- **Required Inputs**:
33
- - `STORY=<US-ID>` - Story ID (e.g., US-0042)
34
- - `FROM=<agent-id>` - Handing off agent
35
- - `TO=<agent-id>` - Receiving agent
36
- - `SUMMARY=<text>` - What was accomplished/status
40
+ ---
37
41
 
38
- **Optional Inputs**:
39
- - `BLOCKERS=<list>` - Known blockers or issues
42
+ ### 🚨 RULE #1: REQUIRED INPUTS (ALWAYS)
40
43
 
41
- **Output Files**:
42
- - Handoff note in `docs/09-agents/comms/`
43
- - Bus log entry in `docs/09-agents/bus/log.jsonl`
44
+ Always require these inputs. Ask if missing:
44
45
 
45
- **Template Used**: `@packages/cli/src/core/templates/comms-note-template.md`
46
+ | Input | Required? | Example |
47
+ |-------|-----------|---------|
48
+ | STORY | YES | `STORY=US-0042` |
49
+ | FROM | YES | `FROM=AG-API` |
50
+ | TO | YES | `TO=AG-UI` |
51
+ | SUMMARY | YES | `SUMMARY="Completed auth endpoints, tests passing"` |
52
+ | BLOCKERS | NO | `BLOCKERS="Need DBA review for schema migration"` |
46
53
 
47
- **Workflow**:
48
- 1. Parse all inputs (STORY, FROM, TO, SUMMARY, BLOCKERS)
49
- 2. Generate handoff note from template
50
- 3. Append to agent bus log
51
- 4. Show preview, wait for YES/NO confirmation
52
- 5. Write files only after approval
54
+ ❌ WRONG: Create handoff without STORY or FROM/TO
55
+ RIGHT: Ask user for missing inputs, then proceed
56
+
57
+ ---
58
+
59
+ ### 🚨 RULE #2: TWO OUTPUTS CREATED
60
+
61
+ Each handoff creates TWO files:
62
+
63
+ | File | Purpose | Location |
64
+ |------|---------|----------|
65
+ | Handoff Note | Human-readable summary | `docs/09-agents/comms/<STORY>-<YYYYMMDD>-handoff.md` |
66
+ | Bus Log Entry | Machine-readable event | `docs/09-agents/bus/log.jsonl` (append line) |
67
+
68
+ Both are required - never skip one.
69
+
70
+ ---
71
+
72
+ ### 🚨 RULE #3: DIFF-FIRST, YES/NO PATTERN
53
73
 
54
- **Example Handoff Note**:
74
+ **ALWAYS follow this pattern:**
75
+
76
+ 1. Generate both files in memory (don't write yet)
77
+ 2. Show preview/diff to user
78
+ 3. Ask: "Create this handoff? (YES/NO)"
79
+ 4. Only write files if user says YES
80
+
81
+ ❌ WRONG: Write files immediately without showing preview
82
+ ✅ RIGHT: Show diff, wait for approval, then write
83
+
84
+ ---
85
+
86
+ ### 🚨 RULE #4: HANDOFF NOTE STRUCTURE
87
+
88
+ Use template from `@packages/cli/src/core/templates/comms-note-template.md`
89
+
90
+ Typical structure:
55
91
  ```markdown
56
- # Handoff: US-0042
92
+ # Handoff: <STORY>
57
93
 
58
- From: agent-a
59
- To: agent-b
60
- Date: 2025-12-22
94
+ From: <FROM_AGENT>
95
+ To: <TO_AGENT>
96
+ Date: <YYYYMMDD>
61
97
 
62
98
  ## Summary
63
- Completed API integration with authentication middleware.
64
- All endpoints tested and passing.
99
+ [What was accomplished, current state]
100
+
101
+ ## Work Completed
102
+ - [Item 1]
103
+ - [Item 2]
65
104
 
66
105
  ## Blockers
67
- - Database schema needs DBA review before migration
68
- - Redis cache configuration pending DevOps approval
106
+ - [Blocker 1]
107
+ - [Blocker 2]
108
+
109
+ ## Notes for Next Agent
110
+ [Key context, decisions, gotchas]
111
+
112
+ ## Files Modified
113
+ - [file path]
114
+ - [file path]
69
115
  ```
70
116
 
71
- **Use When**:
72
- - Switching agents on a story
73
- - Documenting progress before pause
74
- - Highlighting blockers for next agent
75
- - Creating audit trail of work transitions
117
+ ---
118
+
119
+ ### 🚨 RULE #5: BUS LOG ENTRY FORMAT
76
120
 
77
- **Tool Usage Examples**:
121
+ Append JSON line to `docs/09-agents/bus/log.jsonl`:
78
122
 
79
- TodoWrite:
123
+ ```json
124
+ {"ts":"2025-12-22T10:30:00Z","type":"handoff","story":"US-0042","from":"AG-API","to":"AG-UI","summary":"Completed API endpoints"}
125
+ ```
126
+
127
+ Fields:
128
+ - `ts` - ISO 8601 timestamp (current time)
129
+ - `type` - Always "handoff"
130
+ - `story` - Story ID
131
+ - `from` - Source agent
132
+ - `to` - Target agent
133
+ - `summary` - Brief summary of what was handed off
134
+
135
+ ---
136
+
137
+ ### ANTI-PATTERNS (DON'T DO THESE)
138
+
139
+ ❌ Create handoff without STORY/FROM/TO
140
+ ❌ Write files without showing preview first
141
+ ❌ Skip bus log entry (only create note)
142
+ ❌ Write vague summary ("work done" instead of details)
143
+ ❌ Forget to document blockers for next agent
144
+ ❌ Create handoff to wrong agent (typo)
145
+
146
+ ### DO THESE INSTEAD
147
+
148
+ ✅ Always validate STORY/FROM/TO inputs
149
+ ✅ Show diff/preview before writing
150
+ ✅ Create both handoff note AND bus log entry
151
+ ✅ Write specific summary of what was done
152
+ ✅ Always document blockers
153
+ ✅ Confirm agent IDs are correct
154
+
155
+ ---
156
+
157
+ ### WORKFLOW
158
+
159
+ 1. **Input Validation**: Ensure STORY, FROM, TO provided (ask if missing)
160
+ 2. **Generate Note**: Create handoff note from template
161
+ 3. **Generate Bus Log**: Create JSON line entry
162
+ 4. **Show Preview**: Display both files (diff format)
163
+ 5. **Confirm**: Ask "Create this handoff? (YES/NO)"
164
+ 6. **Write Files**: Only if user approves
165
+ 7. **Confirm Done**: Show success message
166
+
167
+ ---
168
+
169
+ ### KEY FILES TO REMEMBER
170
+
171
+ | File | Purpose |
172
+ |------|---------|
173
+ | `docs/09-agents/comms/<STORY>-<DATE>-handoff.md` | Handoff note (human-readable) |
174
+ | `docs/09-agents/bus/log.jsonl` | Agent bus log (machine-readable) |
175
+ | `@packages/cli/src/core/templates/comms-note-template.md` | Handoff template |
176
+
177
+ ---
178
+
179
+ ### TOOL USAGE EXAMPLES
180
+
181
+ **TodoWrite** (to track handoff creation):
80
182
  ```xml
81
183
  <invoke name="TodoWrite">
82
184
  <parameter name="content">1. Parse inputs (STORY, FROM, TO, SUMMARY, BLOCKERS)
83
- 2. Create handoff note from template
84
- 3. Append bus line with type="handoff"
85
- 4. Show preview and wait for confirmation</parameter>
185
+ 2. Generate handoff note from template
186
+ 3. Generate bus log JSON line
187
+ 4. Show preview and wait for YES/NO
188
+ 5. Write files if approved</parameter>
86
189
  <parameter name="status">in-progress</parameter>
87
190
  </invoke>
88
191
  ```
89
192
 
90
- AskUserQuestion:
193
+ **AskUserQuestion** (for confirmation):
91
194
  ```xml
92
195
  <invoke name="AskUserQuestion">
93
196
  <parameter name="questions">[{
@@ -95,13 +198,24 @@ AskUserQuestion:
95
198
  "header": "Confirm Handoff",
96
199
  "multiSelect": false,
97
200
  "options": [
98
- {"label": "Yes, create", "description": "Create handoff note and bus log"},
201
+ {"label": "Yes, create handoff", "description": "Write note and bus log"},
99
202
  {"label": "No, cancel", "description": "Don't create"}
100
203
  ]
101
204
  }]</parameter>
102
205
  </invoke>
103
206
  ```
104
207
 
208
+ ---
209
+
210
+ ### REMEMBER AFTER COMPACTION
211
+
212
+ - `/agileflow:handoff` IS ACTIVE - documenting work transitions
213
+ - STORY, FROM, TO required - ask if missing
214
+ - Create TWO files: handoff note + bus log entry
215
+ - Always show diff FIRST, wait for YES/NO
216
+ - Use handoff template from templates/
217
+ - Document blockers for next agent
218
+
105
219
  <!-- COMPACT_SUMMARY_END -->
106
220
 
107
221
  ## Prompt
@@ -1,6 +1,15 @@
1
1
  ---
2
2
  description: Display AgileFlow system overview and commands
3
3
  argument-hint: (no arguments)
4
+ compact_context:
5
+ priority: medium
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:help - System guide (display-only, no file writes)"
8
+ - "MUST output markdown (never writes files)"
9
+ - "MUST show folder map, concepts, daily workflow, all commands"
10
+ - "Include dynamic injection: <!-- {{COMMAND_LIST}} -->"
11
+ state_fields:
12
+ - display_mode
4
13
  ---
5
14
 
6
15
  # system-help