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.
- package/README.md +6 -6
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +174 -2
- package/scripts/agileflow-statusline.sh +171 -78
- package/scripts/agileflow-welcome.js +88 -64
- package/scripts/auto-self-improve.js +23 -45
- package/scripts/check-update.js +35 -42
- package/scripts/damage-control/bash-tool-damage-control.js +257 -0
- package/scripts/damage-control/edit-tool-damage-control.js +279 -0
- package/scripts/damage-control/patterns.yaml +227 -0
- package/scripts/damage-control/write-tool-damage-control.js +274 -0
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/obtain-context.js +22 -3
- package/scripts/ralph-loop.js +191 -63
- package/scripts/screenshot-verifier.js +213 -0
- package/scripts/session-manager.js +12 -33
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/configuration-damage-control.md +248 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +391 -38
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/setup/visual-e2e.md +462 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/code-review.yaml +118 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/skills/_learnings/story-writer.yaml +71 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/installers/ide/claude-code.js +127 -0
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Import research results and save to research folder
|
|
3
3
|
argument-hint: TOPIC=<text> [CONTENT=<text>] [SOURCE=<url>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: critical
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:research:import - Import research from external sources"
|
|
8
|
+
- "FLOW: Validate → Analyze → Format → Preview (diff-first) → Save → Update index → Ask for analysis"
|
|
9
|
+
- "MUST validate TOPIC required, CONTENT required (or wait for paste)"
|
|
10
|
+
- "MUST preserve ALL code snippets exactly as provided"
|
|
11
|
+
- "MUST use diff-first: show formatted result BEFORE saving"
|
|
12
|
+
- "MUST update docs/10-research/README.md index after saving"
|
|
13
|
+
- "DO NOT jump to artifacts: ask 'would you like analysis' FIRST"
|
|
14
|
+
- "If user wants analysis: EnterPlanMode → obtain-context → show benefits/changes/risks"
|
|
15
|
+
- "Intelligent artifact recommendation based on research type (not always Epic)"
|
|
16
|
+
state_fields:
|
|
17
|
+
- topic
|
|
18
|
+
- content
|
|
19
|
+
- source
|
|
20
|
+
- formatted_research
|
|
21
|
+
- file_saved
|
|
22
|
+
- analysis_requested
|
|
4
23
|
---
|
|
5
24
|
|
|
6
25
|
# /agileflow:research:import
|
|
@@ -27,17 +46,344 @@ Also works for importing:
|
|
|
27
46
|
---
|
|
28
47
|
|
|
29
48
|
<!-- COMPACT_SUMMARY_START -->
|
|
30
|
-
## Compact Summary
|
|
31
49
|
|
|
32
|
-
|
|
33
|
-
|
|
50
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:research:import IS ACTIVE
|
|
51
|
+
|
|
52
|
+
**CRITICAL**: You are running `/agileflow:research:import`. This imports external research and optionally analyzes for implementation.
|
|
53
|
+
|
|
54
|
+
**ROLE**: Import → Format → Save → Optionally analyze for project-specific implementation.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 🚨 RULE #1: THREE-PHASE WORKFLOW
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Phase 1: IMPORT
|
|
62
|
+
├─ Validate TOPIC and CONTENT
|
|
63
|
+
├─ Analyze and extract key points
|
|
64
|
+
└─ Format into structured markdown
|
|
65
|
+
|
|
66
|
+
Phase 2: PREVIEW (Diff-First)
|
|
67
|
+
├─ Show formatted result to user
|
|
68
|
+
├─ Ask for confirmation BEFORE saving
|
|
69
|
+
└─ User reviews before file is written
|
|
70
|
+
|
|
71
|
+
Phase 3: SAVE & INDEX
|
|
72
|
+
├─ Save to docs/10-research/YYYYMMDD-topic-slug.md
|
|
73
|
+
├─ Update docs/10-research/README.md index
|
|
74
|
+
└─ Offer implementation analysis (ASK FIRST)
|
|
75
|
+
|
|
76
|
+
Phase 4: ANALYSIS (If Requested)
|
|
77
|
+
├─ Enter plan mode
|
|
78
|
+
├─ Gather project context
|
|
79
|
+
├─ Show benefits + implementation plan
|
|
80
|
+
└─ Suggest intelligent artifact (ADR/Epic/Story/Practice)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### 🚨 RULE #2: VALIDATE INPUTS FIRST
|
|
86
|
+
|
|
87
|
+
**TOPIC**: Required. If missing, ask user.
|
|
88
|
+
**CONTENT**: Required. If missing, ask user to paste after command.
|
|
89
|
+
|
|
90
|
+
```xml
|
|
91
|
+
<!-- If TOPIC missing -->
|
|
92
|
+
<invoke name="AskUserQuestion">
|
|
93
|
+
<parameter name="questions">[{
|
|
94
|
+
"question": "What topic is this research about?",
|
|
95
|
+
"header": "Topic",
|
|
96
|
+
"multiSelect": false,
|
|
97
|
+
"options": [{"label": "Enter topic", "description": "Provide a descriptive title"}]
|
|
98
|
+
}]</parameter>
|
|
99
|
+
</invoke>
|
|
100
|
+
|
|
101
|
+
<!-- If CONTENT missing -->
|
|
102
|
+
"Please paste the research results from ChatGPT/Claude/Perplexity below."
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### 🚨 RULE #3: PRESERVE CODE SNIPPETS EXACTLY
|
|
108
|
+
|
|
109
|
+
**Copy-paste code blocks verbatim. NO changes, NO reformatting.**
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
❌ WRONG: Reformat code to match project style / Remove comments / Clean up
|
|
113
|
+
✅ RIGHT: [Include code EXACTLY as provided in CONTENT]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Why**: Code from ChatGPT/Claude might have version-specific details or important comments.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### 🚨 RULE #4: DIFF-FIRST (PREVIEW BEFORE SAVING)
|
|
121
|
+
|
|
122
|
+
**ALWAYS show formatted result before writing file.**
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
1. Format the research into markdown
|
|
126
|
+
2. Display the preview
|
|
127
|
+
3. Ask "Save this research file?"
|
|
128
|
+
4. User confirms
|
|
129
|
+
5. Write to docs/10-research/
|
|
130
|
+
6. Update index
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```xml
|
|
134
|
+
<!-- Ask for confirmation -->
|
|
135
|
+
<invoke name="AskUserQuestion">
|
|
136
|
+
<parameter name="questions">[{
|
|
137
|
+
"question": "Save this research file?",
|
|
138
|
+
"header": "Confirm",
|
|
139
|
+
"multiSelect": false,
|
|
140
|
+
"options": [
|
|
141
|
+
{"label": "Yes, save to docs/10-research/", "description": "Write file and update index"},
|
|
142
|
+
{"label": "No, make changes first", "description": "Cancel, I'll revise"}
|
|
143
|
+
]
|
|
144
|
+
}]</parameter>
|
|
145
|
+
</invoke>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### 🚨 RULE #5: UPDATE INDEX ALWAYS
|
|
151
|
+
|
|
152
|
+
**After saving, ALWAYS update `docs/10-research/README.md` with new entry.**
|
|
153
|
+
|
|
154
|
+
Add entry to the top of the table:
|
|
155
|
+
```markdown
|
|
156
|
+
| Date | Topic | File | Summary |
|
|
157
|
+
|------|-------|------|---------|
|
|
158
|
+
| 2026-01-07 | New Research Title | 20260107-topic-slug.md | One-line summary |
|
|
159
|
+
| [older entries...] |
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Never skip this step.** Index is how users discover research.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### 🚨 RULE #6: ASK BEFORE ANALYZING
|
|
167
|
+
|
|
168
|
+
**After saving research, ask "Do you want implementation analysis?" - DON'T assume.**
|
|
169
|
+
|
|
170
|
+
```xml
|
|
171
|
+
<invoke name="AskUserQuestion">
|
|
172
|
+
<parameter name="questions">[{
|
|
173
|
+
"question": "Would you like me to analyze how this research could be implemented in your project?",
|
|
174
|
+
"header": "Analyze",
|
|
175
|
+
"multiSelect": false,
|
|
176
|
+
"options": [
|
|
177
|
+
{"label": "Yes - Enter plan mode and explore (Recommended)", "description": "I'll analyze your codebase and show benefits, implementation steps, and what would change"},
|
|
178
|
+
{"label": "No - Just save the research", "description": "Keep as reference, I can analyze later"},
|
|
179
|
+
{"label": "Link to existing Epic/Story", "description": "Reference from current work without full analysis"}
|
|
180
|
+
]
|
|
181
|
+
}]</parameter>
|
|
182
|
+
</invoke>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**If "No"**: Research saved, exit gracefully.
|
|
186
|
+
**If "Link"**: Add research reference to document, exit.
|
|
187
|
+
**If "Yes"**: Continue to analysis (Phase 4).
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### 🚨 RULE #7: ANALYSIS = PLAN MODE + PROJECT CONTEXT
|
|
192
|
+
|
|
193
|
+
**When analyzing, you MUST enter plan mode and gather project context.**
|
|
194
|
+
|
|
195
|
+
```xml
|
|
196
|
+
<invoke name="EnterPlanMode"/>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Then:
|
|
200
|
+
```bash
|
|
201
|
+
node .agileflow/scripts/obtain-context.js babysit
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Why**: Can't recommend artifacts without understanding their codebase, current patterns, tech stack.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### 🚨 RULE #8: SHOW BENEFITS FIRST IN ANALYSIS
|
|
209
|
+
|
|
210
|
+
**Order matters: Benefits → Implementation → Complexity → Risks.**
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
❌ WRONG: "We'd modify 5 files, add 2 dependencies, refactor the system..."
|
|
214
|
+
✅ RIGHT: "You'd gain: 40% faster auth, better security, cleaner codebase.
|
|
215
|
+
To implement, we'd modify 5 files, add 2 dependencies..."
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### 🚨 RULE #9: INTELLIGENT ARTIFACT SELECTION
|
|
221
|
+
|
|
222
|
+
**Recommend artifact type based on research scope. DON'T default to Epic.**
|
|
223
|
+
|
|
224
|
+
| Research Type | Artifact | Indicators |
|
|
225
|
+
|---|---|---|
|
|
226
|
+
| Architecture/tech decision | **ADR** | Trade-offs, "use X or Y?", one-time decision |
|
|
227
|
+
| Large feature (5+ steps) | **Epic + Stories** | Multiple files, multiple domains, 3+ days |
|
|
228
|
+
| Single focused task | **Story** | 1-3 files, 1-4 hours, single domain |
|
|
229
|
+
| Best practices/guidelines | **Practice doc** | "How to do X", guidelines, no feature work |
|
|
230
|
+
| Code quality/refactoring | **Tech debt item** | No user-facing change, improvement |
|
|
231
|
+
|
|
232
|
+
**Example recommendations:**
|
|
233
|
+
- "Upgrade to Next.js 15" → ADR
|
|
234
|
+
- "Add OAuth" → Epic + Stories (multiple domains)
|
|
235
|
+
- "Fix cache bug" → Story (single issue)
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
### FORMATTED RESEARCH STRUCTURE
|
|
240
|
+
|
|
241
|
+
Every imported research must be formatted as:
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
# [Topic Title]
|
|
245
|
+
|
|
246
|
+
**Import Date**: YYYY-MM-DD
|
|
247
|
+
**Topic**: [original topic]
|
|
248
|
+
**Source**: [URL or "Direct import"]
|
|
249
|
+
**Content Type**: [research/transcript/article/notes]
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Summary
|
|
254
|
+
[2-3 paragraph executive summary]
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Key Findings
|
|
259
|
+
- [Point 1]
|
|
260
|
+
- [Point 2]
|
|
261
|
+
- [Point 3]
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Implementation Approach
|
|
266
|
+
1. [Step 1]
|
|
267
|
+
2. [Step 2]
|
|
268
|
+
3. [Step 3]
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Code Snippets
|
|
273
|
+
[PRESERVE EXACTLY AS PROVIDED]
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Action Items
|
|
278
|
+
- [ ] [Action 1]
|
|
279
|
+
- [ ] [Action 2]
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Risks & Gotchas
|
|
284
|
+
- [Risk 1]
|
|
285
|
+
- [Risk 2]
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Story Suggestions
|
|
290
|
+
[If content suggests feature work]
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## References
|
|
295
|
+
- Source: [URL]
|
|
296
|
+
- Import date: YYYY-MM-DD
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
302
|
+
|
|
303
|
+
❌ Skip validation of TOPIC/CONTENT
|
|
304
|
+
❌ Save without showing preview first (diff-first)
|
|
305
|
+
❌ Reformat or clean up code snippets
|
|
306
|
+
❌ Forget to update docs/10-research/README.md
|
|
307
|
+
❌ Jump straight to artifact creation without asking
|
|
308
|
+
❌ Show generic benefits without project context
|
|
309
|
+
❌ Assume Epic is the right artifact for all research
|
|
310
|
+
|
|
311
|
+
### DO THESE INSTEAD
|
|
312
|
+
|
|
313
|
+
✅ Validate TOPIC and CONTENT before formatting
|
|
314
|
+
✅ Show formatted result before saving
|
|
315
|
+
✅ Preserve code snippets exactly as provided
|
|
316
|
+
✅ Always update the research index
|
|
317
|
+
✅ Ask "Do you want analysis?" before proceeding
|
|
318
|
+
✅ Enter plan mode to gather project context
|
|
319
|
+
✅ Show specific, project-relevant benefits
|
|
320
|
+
✅ Recommend artifact type based on research scope
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
### WORKFLOW
|
|
325
|
+
|
|
326
|
+
**Phase 1: Validate Inputs**
|
|
327
|
+
1. Check TOPIC provided, ask if not
|
|
328
|
+
2. Check CONTENT provided, ask user to paste if not
|
|
329
|
+
3. Extract framework/versions if available
|
|
330
|
+
|
|
331
|
+
**Phase 2: Analyze & Format**
|
|
332
|
+
4. Extract key findings, summary, code snippets
|
|
333
|
+
5. Generate action items from content
|
|
334
|
+
6. Identify story suggestions if applicable
|
|
335
|
+
|
|
336
|
+
**Phase 3: Preview**
|
|
337
|
+
7. Format complete research markdown
|
|
338
|
+
8. Display preview to user
|
|
339
|
+
9. Ask for confirmation
|
|
340
|
+
|
|
341
|
+
**Phase 4: Save**
|
|
342
|
+
10. If confirmed: Save to docs/10-research/YYYYMMDD-slug.md
|
|
343
|
+
11. Update docs/10-research/README.md index
|
|
344
|
+
|
|
345
|
+
**Phase 5: Offer Analysis**
|
|
346
|
+
12. Ask "Do you want implementation analysis?"
|
|
347
|
+
13. If "No": Done
|
|
348
|
+
14. If "Link": Add reference to document, exit
|
|
349
|
+
15. If "Yes": Continue to Phase 6
|
|
350
|
+
|
|
351
|
+
**Phase 6: Analysis (If Requested)**
|
|
352
|
+
16. Enter plan mode
|
|
353
|
+
17. Run obtain-context.js
|
|
354
|
+
18. Show implementation benefits + plan
|
|
355
|
+
19. Recommend intelligent artifact type
|
|
356
|
+
20. Create artifact if user confirms
|
|
357
|
+
|
|
358
|
+
**Phase 7: Finish**
|
|
359
|
+
21. Exit plan mode
|
|
360
|
+
22. Confirm artifact created
|
|
361
|
+
23. Research ready for implementation
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
### KEY FILES
|
|
366
|
+
|
|
367
|
+
| File | Purpose |
|
|
368
|
+
|------|---------|
|
|
369
|
+
| `docs/10-research/` | Imported research notes |
|
|
370
|
+
| `docs/10-research/README.md` | Index of all research |
|
|
371
|
+
| `docs/09-agents/status.json` | Where artifacts are created |
|
|
372
|
+
| `.agileflow/scripts/obtain-context.js` | Get project context |
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
### REMEMBER AFTER COMPACTION
|
|
377
|
+
|
|
378
|
+
- `/agileflow:research:import` IS ACTIVE - you're importing research
|
|
379
|
+
- Validate TOPIC and CONTENT first
|
|
380
|
+
- Format into structured markdown
|
|
381
|
+
- Show preview BEFORE saving (diff-first)
|
|
382
|
+
- Always update docs/10-research/README.md
|
|
383
|
+
- Ask "Do you want analysis?" BEFORE assuming
|
|
384
|
+
- If analyzing: enter plan mode + gather context
|
|
385
|
+
- Recommend artifact type based on research scope
|
|
34
386
|
|
|
35
|
-
### Critical Rules
|
|
36
|
-
- **Validate inputs**: TOPIC required, CONTENT required (or user pastes after command)
|
|
37
|
-
- **Preserve ALL code snippets** exactly as provided
|
|
38
|
-
- **Generate actionable items** (not vague suggestions)
|
|
39
|
-
- **Diff-first**: Show formatted result before saving
|
|
40
|
-
- **Update index**: Always add entry to README.md
|
|
41
387
|
<!-- COMPACT_SUMMARY_END -->
|
|
42
388
|
|
|
43
389
|
---
|
|
@@ -69,7 +415,10 @@ Upon invocation, execute these steps:
|
|
|
69
415
|
{"content": "Show diff for review", "status": "pending", "activeForm": "Showing preview"},
|
|
70
416
|
{"content": "Save to docs/10-research/", "status": "pending", "activeForm": "Saving file"},
|
|
71
417
|
{"content": "Update README.md index", "status": "pending", "activeForm": "Updating index"},
|
|
72
|
-
{"content": "Offer
|
|
418
|
+
{"content": "Offer implementation analysis", "status": "pending", "activeForm": "Offering analysis"},
|
|
419
|
+
{"content": "Enter plan mode and gather context (if requested)", "status": "pending", "activeForm": "Gathering context"},
|
|
420
|
+
{"content": "Present implementation plan with benefits", "status": "pending", "activeForm": "Presenting plan"},
|
|
421
|
+
{"content": "Suggest and create appropriate artifact", "status": "pending", "activeForm": "Creating artifact"}
|
|
73
422
|
]</parameter>
|
|
74
423
|
</invoke>
|
|
75
424
|
```
|
|
@@ -245,29 +594,222 @@ Add entry to `docs/10-research/README.md`:
|
|
|
245
594
|
|
|
246
595
|
Insert newest entries at the top of the table.
|
|
247
596
|
|
|
248
|
-
### Step 9: Offer
|
|
597
|
+
### Step 9: Offer Implementation Analysis
|
|
598
|
+
|
|
599
|
+
After saving, ask if the user wants to understand how this research applies to their specific project:
|
|
249
600
|
|
|
250
601
|
```xml
|
|
251
602
|
<invoke name="AskUserQuestion">
|
|
252
603
|
<parameter name="questions">[{
|
|
253
|
-
"question": "
|
|
254
|
-
"header": "
|
|
255
|
-
"multiSelect":
|
|
604
|
+
"question": "Would you like me to analyze how this research could be implemented in your project?",
|
|
605
|
+
"header": "Analyze",
|
|
606
|
+
"multiSelect": false,
|
|
256
607
|
"options": [
|
|
257
|
-
{"label": "
|
|
258
|
-
{"label": "
|
|
259
|
-
{"label": "Link to existing Epic/Story", "description": "Reference from current work"}
|
|
260
|
-
{"label": "Done for now", "description": "No further action needed"}
|
|
608
|
+
{"label": "Yes - Enter plan mode and explore (Recommended)", "description": "I'll analyze your codebase and show benefits, implementation steps, and what would change"},
|
|
609
|
+
{"label": "No - Just save the research", "description": "Keep as reference, I can analyze later"},
|
|
610
|
+
{"label": "Link to existing Epic/Story", "description": "Reference from current work without full analysis"}
|
|
261
611
|
]
|
|
262
612
|
}]</parameter>
|
|
263
613
|
</invoke>
|
|
264
614
|
```
|
|
265
615
|
|
|
266
|
-
If
|
|
616
|
+
**If "Link to existing"**: Add to the target document and finish:
|
|
267
617
|
```markdown
|
|
268
618
|
**Research**: See [Topic Research](../10-research/YYYYMMDD-topic-slug.md)
|
|
269
619
|
```
|
|
270
620
|
|
|
621
|
+
**If "No"**: Research is saved, exit gracefully.
|
|
622
|
+
|
|
623
|
+
**If "Yes"**: Continue to Step 10.
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
### Step 10: Enter Plan Mode and Gather Context
|
|
628
|
+
|
|
629
|
+
```xml
|
|
630
|
+
<invoke name="EnterPlanMode"/>
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
Then immediately gather project context:
|
|
634
|
+
|
|
635
|
+
```bash
|
|
636
|
+
node .agileflow/scripts/obtain-context.js babysit
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
Also read key files to understand the project:
|
|
640
|
+
- `CLAUDE.md` or `README.md` for project overview
|
|
641
|
+
- Relevant source files based on research topic
|
|
642
|
+
- Existing architecture/pattern files
|
|
643
|
+
|
|
644
|
+
**Goal**: Understand:
|
|
645
|
+
- Current project structure
|
|
646
|
+
- Existing patterns that apply
|
|
647
|
+
- Files that would be affected
|
|
648
|
+
- Current tech stack
|
|
649
|
+
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
### Step 11: Analyze and Present Implementation Plan
|
|
653
|
+
|
|
654
|
+
Based on the research content AND project context, prepare a detailed analysis:
|
|
655
|
+
|
|
656
|
+
```markdown
|
|
657
|
+
## Implementation Analysis
|
|
658
|
+
|
|
659
|
+
### 🎯 Benefits of Implementing This Research
|
|
660
|
+
|
|
661
|
+
**What you would gain:**
|
|
662
|
+
- [Benefit 1 - specific to this project]
|
|
663
|
+
- [Benefit 2 - quantifiable if possible]
|
|
664
|
+
- [Benefit 3 - addresses current gaps/pain points]
|
|
665
|
+
|
|
666
|
+
**Problems this solves:**
|
|
667
|
+
- [Current issue 1 this addresses]
|
|
668
|
+
- [Current issue 2 this addresses]
|
|
669
|
+
|
|
670
|
+
---
|
|
671
|
+
|
|
672
|
+
### 🔧 How It Would Be Implemented
|
|
673
|
+
|
|
674
|
+
**Files to modify:**
|
|
675
|
+
| File | Change | Effort |
|
|
676
|
+
|------|--------|--------|
|
|
677
|
+
| `path/to/file1.ts` | [What changes] | Low |
|
|
678
|
+
| `path/to/file2.ts` | [What changes] | Medium |
|
|
679
|
+
|
|
680
|
+
**New files to create:**
|
|
681
|
+
- `path/to/new/file.ts` - [Purpose]
|
|
682
|
+
|
|
683
|
+
**Implementation steps:**
|
|
684
|
+
1. [Step 1 - specific action]
|
|
685
|
+
2. [Step 2 - specific action]
|
|
686
|
+
3. [Step 3 - specific action]
|
|
687
|
+
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
### 🔄 What Would Change
|
|
691
|
+
|
|
692
|
+
**Behavior changes:**
|
|
693
|
+
- [User-facing change 1]
|
|
694
|
+
- [Developer experience change]
|
|
695
|
+
|
|
696
|
+
**Architecture impact:**
|
|
697
|
+
- [How this affects current architecture]
|
|
698
|
+
- [New patterns introduced]
|
|
699
|
+
|
|
700
|
+
**Dependencies:**
|
|
701
|
+
- [New packages needed, if any]
|
|
702
|
+
- [Internal dependencies affected]
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
### ⚠️ Risks & Considerations
|
|
707
|
+
|
|
708
|
+
- [Risk 1 - migration complexity, breaking changes, etc.]
|
|
709
|
+
- [Risk 2 - learning curve, team adoption]
|
|
710
|
+
- [Mitigation strategy for each]
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
714
|
+
### ⏱️ Effort Estimate
|
|
715
|
+
|
|
716
|
+
**Scope**: [Small/Medium/Large]
|
|
717
|
+
**Suggested approach**: [Epic with stories / Single story / Quick fix]
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Present this analysis to the user.
|
|
721
|
+
|
|
722
|
+
---
|
|
723
|
+
|
|
724
|
+
### Step 12: Confirm Interest in Implementing
|
|
725
|
+
|
|
726
|
+
```xml
|
|
727
|
+
<invoke name="AskUserQuestion">
|
|
728
|
+
<parameter name="questions">[{
|
|
729
|
+
"question": "Based on this analysis, would you like to proceed with implementation?",
|
|
730
|
+
"header": "Proceed?",
|
|
731
|
+
"multiSelect": false,
|
|
732
|
+
"options": [
|
|
733
|
+
{"label": "Yes - Create implementation artifacts", "description": "I'll suggest the best artifact type based on scope"},
|
|
734
|
+
{"label": "Modify approach first", "description": "Let's adjust the plan before creating artifacts"},
|
|
735
|
+
{"label": "Save analysis only", "description": "Exit plan mode, keep research + analysis for later"},
|
|
736
|
+
{"label": "Cancel", "description": "Exit plan mode, research already saved"}
|
|
737
|
+
]
|
|
738
|
+
}]</parameter>
|
|
739
|
+
</invoke>
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
**If "Modify approach"**: Discuss changes, update analysis, re-ask.
|
|
743
|
+
**If "Save analysis only"**: Append analysis to the research file, exit plan mode.
|
|
744
|
+
**If "Cancel"**: Exit plan mode, done.
|
|
745
|
+
**If "Yes"**: Continue to Step 13.
|
|
746
|
+
|
|
747
|
+
---
|
|
748
|
+
|
|
749
|
+
### Step 13: Intelligently Suggest Artifact Type
|
|
750
|
+
|
|
751
|
+
Based on the research content and analysis, determine the BEST artifact to create:
|
|
752
|
+
|
|
753
|
+
| Research Type | Suggested Artifact | Indicators |
|
|
754
|
+
|---------------|-------------------|------------|
|
|
755
|
+
| Architecture/technology decision | **ADR** | "Should we use X or Y?", trade-offs, alternatives |
|
|
756
|
+
| Large feature with multiple parts | **Epic + Stories** | 5+ implementation steps, multiple domains |
|
|
757
|
+
| Single focused improvement | **Story** | Clear scope, 1-3 files, can be done in one session |
|
|
758
|
+
| Best practices/patterns | **Practice doc** | "How to do X", guidelines, not feature work |
|
|
759
|
+
| Code quality improvement | **Tech debt item** | Refactoring, cleanup, no user-facing change |
|
|
760
|
+
|
|
761
|
+
Present the recommendation:
|
|
762
|
+
|
|
763
|
+
```xml
|
|
764
|
+
<invoke name="AskUserQuestion">
|
|
765
|
+
<parameter name="questions">[{
|
|
766
|
+
"question": "Based on the scope, I recommend creating: [ARTIFACT TYPE]. What would you like to do?",
|
|
767
|
+
"header": "Create",
|
|
768
|
+
"multiSelect": false,
|
|
769
|
+
"options": [
|
|
770
|
+
{"label": "[Recommended artifact] (Recommended)", "description": "[Why this is the right choice]"},
|
|
771
|
+
{"label": "Create ADR instead", "description": "Document this as an architecture decision"},
|
|
772
|
+
{"label": "Create Epic + Stories instead", "description": "Break down into trackable work items"},
|
|
773
|
+
{"label": "Create single Story instead", "description": "Track as a single work item"},
|
|
774
|
+
{"label": "Skip artifact creation", "description": "Research and analysis are enough for now"}
|
|
775
|
+
]
|
|
776
|
+
}]</parameter>
|
|
777
|
+
</invoke>
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
---
|
|
781
|
+
|
|
782
|
+
### Step 14: Create Selected Artifact
|
|
783
|
+
|
|
784
|
+
**If ADR selected**:
|
|
785
|
+
- Use `/agileflow:adr` command format
|
|
786
|
+
- Reference the research file
|
|
787
|
+
- Include key decisions from analysis
|
|
788
|
+
|
|
789
|
+
**If Epic + Stories selected**:
|
|
790
|
+
- Create epic in status.json
|
|
791
|
+
- Generate stories based on implementation steps
|
|
792
|
+
- Reference research in epic
|
|
793
|
+
|
|
794
|
+
**If Story selected**:
|
|
795
|
+
- Create single story with ACs from implementation steps
|
|
796
|
+
- Reference research
|
|
797
|
+
|
|
798
|
+
**If Practice doc selected**:
|
|
799
|
+
- Create doc in `docs/02-practices/`
|
|
800
|
+
- Format as guidelines/best practices
|
|
801
|
+
|
|
802
|
+
After creation, exit plan mode and confirm:
|
|
803
|
+
|
|
804
|
+
```
|
|
805
|
+
✅ Created [ARTIFACT] from research "[TOPIC]"
|
|
806
|
+
|
|
807
|
+
- Research: docs/10-research/YYYYMMDD-topic.md
|
|
808
|
+
- [Artifact]: [path or ID]
|
|
809
|
+
|
|
810
|
+
The implementation plan is now tracked and ready to execute.
|
|
811
|
+
```
|
|
812
|
+
|
|
271
813
|
---
|
|
272
814
|
|
|
273
815
|
## Rules
|
|
@@ -282,6 +824,7 @@ If linking, add to the target document:
|
|
|
282
824
|
|
|
283
825
|
## Related Commands
|
|
284
826
|
|
|
827
|
+
- `/agileflow:research:analyze` - Revisit existing research for implementation analysis
|
|
285
828
|
- `/agileflow:research:ask` - Generate research prompt for web AI
|
|
286
829
|
- `/agileflow:research:list` - Show research notes index
|
|
287
830
|
- `/agileflow:research:view` - Read specific research note
|