agileflow 3.1.0 → 3.2.1

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 (106) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +57 -85
  3. package/lib/dashboard-automations.js +130 -0
  4. package/lib/dashboard-git.js +254 -0
  5. package/lib/dashboard-inbox.js +64 -0
  6. package/lib/dashboard-protocol.js +1 -0
  7. package/lib/dashboard-server.js +114 -924
  8. package/lib/dashboard-session.js +136 -0
  9. package/lib/dashboard-status.js +72 -0
  10. package/lib/dashboard-terminal.js +354 -0
  11. package/lib/dashboard-websocket.js +88 -0
  12. package/lib/drivers/codex-driver.ts +4 -4
  13. package/lib/logger.js +106 -0
  14. package/package.json +4 -2
  15. package/scripts/agileflow-configure.js +2 -2
  16. package/scripts/agileflow-welcome.js +409 -434
  17. package/scripts/claude-tmux.sh +80 -2
  18. package/scripts/context-loader.js +4 -9
  19. package/scripts/lib/browser-qa-evidence.js +409 -0
  20. package/scripts/lib/browser-qa-status.js +192 -0
  21. package/scripts/lib/command-prereqs.js +280 -0
  22. package/scripts/lib/configure-detect.js +92 -2
  23. package/scripts/lib/configure-features.js +295 -1
  24. package/scripts/lib/context-formatter.js +468 -233
  25. package/scripts/lib/context-loader.js +27 -15
  26. package/scripts/lib/damage-control-utils.js +8 -1
  27. package/scripts/lib/feature-catalog.js +321 -0
  28. package/scripts/lib/portable-tasks-cli.js +274 -0
  29. package/scripts/lib/portable-tasks.js +479 -0
  30. package/scripts/lib/signal-detectors.js +1 -1
  31. package/scripts/lib/team-events.js +86 -1
  32. package/scripts/obtain-context.js +28 -4
  33. package/scripts/smart-detect.js +17 -0
  34. package/scripts/strip-ai-attribution.js +63 -0
  35. package/scripts/team-manager.js +7 -2
  36. package/scripts/welcome-deferred.js +437 -0
  37. package/src/core/agents/browser-qa.md +328 -0
  38. package/src/core/agents/perf-analyzer-assets.md +174 -0
  39. package/src/core/agents/perf-analyzer-bundle.md +165 -0
  40. package/src/core/agents/perf-analyzer-caching.md +160 -0
  41. package/src/core/agents/perf-analyzer-compute.md +165 -0
  42. package/src/core/agents/perf-analyzer-memory.md +182 -0
  43. package/src/core/agents/perf-analyzer-network.md +157 -0
  44. package/src/core/agents/perf-analyzer-queries.md +155 -0
  45. package/src/core/agents/perf-analyzer-rendering.md +156 -0
  46. package/src/core/agents/perf-consensus.md +280 -0
  47. package/src/core/agents/security-analyzer-api.md +199 -0
  48. package/src/core/agents/security-analyzer-auth.md +160 -0
  49. package/src/core/agents/security-analyzer-authz.md +168 -0
  50. package/src/core/agents/security-analyzer-deps.md +147 -0
  51. package/src/core/agents/security-analyzer-infra.md +176 -0
  52. package/src/core/agents/security-analyzer-injection.md +148 -0
  53. package/src/core/agents/security-analyzer-input.md +191 -0
  54. package/src/core/agents/security-analyzer-secrets.md +175 -0
  55. package/src/core/agents/security-consensus.md +276 -0
  56. package/src/core/agents/test-analyzer-assertions.md +181 -0
  57. package/src/core/agents/test-analyzer-coverage.md +183 -0
  58. package/src/core/agents/test-analyzer-fragility.md +185 -0
  59. package/src/core/agents/test-analyzer-integration.md +155 -0
  60. package/src/core/agents/test-analyzer-maintenance.md +173 -0
  61. package/src/core/agents/test-analyzer-mocking.md +178 -0
  62. package/src/core/agents/test-analyzer-patterns.md +189 -0
  63. package/src/core/agents/test-analyzer-structure.md +177 -0
  64. package/src/core/agents/test-consensus.md +294 -0
  65. package/src/core/commands/{legal/audit.md → audit/legal.md} +13 -13
  66. package/src/core/commands/{logic/audit.md → audit/logic.md} +12 -12
  67. package/src/core/commands/audit/performance.md +443 -0
  68. package/src/core/commands/audit/security.md +443 -0
  69. package/src/core/commands/audit/test.md +442 -0
  70. package/src/core/commands/babysit.md +505 -463
  71. package/src/core/commands/browser-qa.md +240 -0
  72. package/src/core/commands/configure.md +8 -8
  73. package/src/core/commands/research/ask.md +42 -9
  74. package/src/core/commands/research/import.md +14 -8
  75. package/src/core/commands/research/list.md +17 -16
  76. package/src/core/commands/research/synthesize.md +8 -8
  77. package/src/core/commands/research/view.md +28 -4
  78. package/src/core/commands/whats-new.md +2 -2
  79. package/src/core/experts/devops/expertise.yaml +13 -2
  80. package/src/core/experts/documentation/expertise.yaml +26 -4
  81. package/src/core/profiles/COMPARISON.md +170 -0
  82. package/src/core/profiles/README.md +178 -0
  83. package/src/core/profiles/claude-code.yaml +111 -0
  84. package/src/core/profiles/codex.yaml +103 -0
  85. package/src/core/profiles/cursor.yaml +134 -0
  86. package/src/core/profiles/examples.js +250 -0
  87. package/src/core/profiles/loader.js +235 -0
  88. package/src/core/profiles/windsurf.yaml +159 -0
  89. package/src/core/teams/logic-audit.json +6 -0
  90. package/src/core/teams/perf-audit.json +71 -0
  91. package/src/core/teams/security-audit.json +71 -0
  92. package/src/core/teams/test-audit.json +71 -0
  93. package/src/core/templates/browser-qa-spec.yaml +94 -0
  94. package/src/core/templates/command-prerequisites.yaml +169 -0
  95. package/src/core/templates/damage-control-patterns.yaml +9 -0
  96. package/tools/cli/installers/ide/_base-ide.js +33 -3
  97. package/tools/cli/installers/ide/claude-code.js +2 -69
  98. package/tools/cli/installers/ide/codex.js +9 -9
  99. package/tools/cli/installers/ide/cursor.js +165 -4
  100. package/tools/cli/installers/ide/windsurf.js +237 -6
  101. package/tools/cli/lib/content-transformer.js +234 -9
  102. package/tools/cli/lib/docs-setup.js +1 -1
  103. package/tools/cli/lib/ide-generator.js +357 -0
  104. package/tools/cli/lib/ide-registry.js +2 -2
  105. package/scripts/tmux-task-name.sh +0 -105
  106. package/scripts/tmux-task-watcher.sh +0 -344
@@ -0,0 +1,240 @@
1
+ ---
2
+ description: Run agentic browser tests against a running web application using YAML test scenarios
3
+ argument-hint: "[SCENARIO=<path.yaml>] [URL=<base-url>] [STORY=<US-ID>] [RETRIES=<1-3>]"
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:browser-qa - Agentic browser testing orchestration"
8
+ - "MUST verify Playwright is installed before running"
9
+ - "MUST create evidence directory before test execution"
10
+ - "80% pass rate threshold for validation"
11
+ - "Results are informational - NEVER block CI merge"
12
+ - "Store all evidence in .agileflow/ui-review/runs/<timestamp>/"
13
+ state_fields:
14
+ - scenarios_found
15
+ - execution_results
16
+ - evidence_path
17
+ ---
18
+
19
+ # /agileflow-browser-qa
20
+
21
+ Run agentic browser tests using the Bowser four-layer pattern. Discovers YAML test specs, executes them via Playwright, captures screenshot evidence, and reports results.
22
+
23
+ <!-- COMPACT_SUMMARY_START -->
24
+ ## Compact Summary
25
+ **Command**: `/agileflow:browser-qa` - Agentic browser testing
26
+ **Quick Usage**: `/agileflow:browser-qa SCENARIO=specs/login-flow.yaml URL=http://localhost:3000`
27
+ **What It Does**: Execute browser test scenarios, capture screenshots, report with pass rates
28
+ <!-- COMPACT_SUMMARY_END -->
29
+
30
+ ## When to Use
31
+
32
+ - Validate user stories with real browser interaction
33
+ - Capture visual evidence for UAT sign-off
34
+ - Run exploratory tests on complex multi-step workflows
35
+ - Check accessibility in a running application
36
+ - Verify design tokens in computed styles
37
+
38
+ ## Prompt
39
+
40
+ ROLE: Browser QA Orchestrator - you coordinate agentic browser testing using the Bowser four-layer pattern.
41
+
42
+ ### STEP 0: Gather Context
43
+
44
+ ```bash
45
+ node .agileflow/scripts/obtain-context.js browser-qa
46
+ ```
47
+
48
+ ### STEP 1: Verify Prerequisites
49
+
50
+ Check that Playwright is available:
51
+
52
+ ```bash
53
+ npx playwright --version 2>/dev/null || echo "PLAYWRIGHT_NOT_FOUND"
54
+ ```
55
+
56
+ If Playwright is not found, inform the user:
57
+
58
+ ```
59
+ Playwright is required for browser-qa testing.
60
+
61
+ Install it:
62
+ npm install --save-optional playwright
63
+ npx playwright install chromium
64
+
65
+ Then retry: /agileflow:browser-qa
66
+ ```
67
+
68
+ **STOP HERE** if Playwright is not available. Do not proceed without it.
69
+
70
+ ### STEP 2: Discover Test Scenarios
71
+
72
+ If `SCENARIO` argument is provided:
73
+ - Read the specified YAML file
74
+ - Validate it has required fields: `test_id`, `name`, `steps`, `url`
75
+
76
+ If no `SCENARIO` provided:
77
+ - Search for specs: `Glob ".agileflow/ui-review/specs/**/*.yaml"`
78
+ - Also check: `Glob "docs/07-testing/agentic/**/*.yaml"`
79
+ - List found scenarios and ask user which to run (or "all")
80
+
81
+ If `STORY` argument is provided:
82
+ - Filter scenarios matching that story_id
83
+ - If none found, suggest creating a spec from the story's acceptance criteria
84
+
85
+ ### STEP 3: Create Evidence Directory
86
+
87
+ ```bash
88
+ mkdir -p .agileflow/ui-review/runs/$(date +%Y-%m-%d_%H-%M-%S)
89
+ ```
90
+
91
+ Store the timestamp path for later use.
92
+
93
+ ### STEP 4: Execute Scenarios
94
+
95
+ For each scenario, spawn a browser-qa agent:
96
+
97
+ ```
98
+ Task(
99
+ description: "Browser QA: {scenario_name}",
100
+ prompt: "Execute browser test scenario.
101
+
102
+ SCENARIO FILE: {scenario_path}
103
+ BASE URL: {url_override_or_from_spec}
104
+ EVIDENCE DIR: {evidence_dir}/{test_id}/
105
+ MAX RETRIES: {retries_arg_or_2}
106
+
107
+ Steps:
108
+ 1. Read the scenario YAML
109
+ 2. Navigate to the base URL
110
+ 3. Execute each step in order
111
+ 4. Capture screenshots at marked steps
112
+ 5. Record timing and pass/fail for each step
113
+ 6. On failure: classify error, retry if attempts remain
114
+ 7. Generate results.json in evidence directory
115
+ 8. Return summary with pass rate
116
+
117
+ IMPORTANT:
118
+ - Use Playwright CLI commands (npx playwright screenshot, etc.)
119
+ - Capture screenshot evidence at EVERY step marked screenshot: true
120
+ - If URL is not reachable, report as infrastructure error and skip
121
+ - 80% pass rate threshold for validation",
122
+ subagent_type: "agileflow-browser-qa",
123
+ run_in_background: true
124
+ )
125
+ ```
126
+
127
+ **CRITICAL**: If multiple scenarios, deploy ALL agents in a SINGLE message (parallel execution).
128
+
129
+ ### STEP 5: Collect Results
130
+
131
+ Wait for all browser-qa agents to complete:
132
+
133
+ ```
134
+ TaskOutput(task_id: "...", block: true)
135
+ ```
136
+
137
+ ### STEP 6: Synthesize Results
138
+
139
+ Combine all scenario results into a summary report:
140
+
141
+ ```markdown
142
+ ## Browser QA Summary
143
+
144
+ **Run**: {timestamp}
145
+ **Scenarios**: {total} executed
146
+ **Overall**: {passed}/{total} scenarios validated
147
+
148
+ | Scenario | Story | Pass Rate | Status | Evidence |
149
+ |----------|-------|-----------|--------|----------|
150
+ | Login Flow | US-0050 | 87% | VALIDATED | runs/2026.../AGENTIC-001/ |
151
+ | Signup Flow | US-0051 | 67% | WARNING | runs/2026.../AGENTIC-002/ |
152
+
153
+ ### Evidence Directory
154
+ `.agileflow/ui-review/runs/{timestamp}/`
155
+
156
+ ### Recommendations
157
+ - [scenario-specific recommendations]
158
+ ```
159
+
160
+ ### STEP 7: Update Status
161
+
162
+ If scenarios have `story_id` fields, update `docs/09-agents/status.json`:
163
+ - Add `agentic_test_status` field: `"validated"`, `"failed"`, or `"warning"`
164
+ - Do NOT modify existing `test_status` field (that's for Jest tests)
165
+
166
+ ### STEP 8: Cleanup Old Evidence
167
+
168
+ Run retention cleanup - remove evidence older than 30 days:
169
+
170
+ ```bash
171
+ find .agileflow/ui-review/runs/ -maxdepth 1 -type d -mtime +30 -exec rm -rf {} + 2>/dev/null || true
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Arguments
177
+
178
+ | Argument | Required | Description | Default |
179
+ |----------|----------|-------------|---------|
180
+ | `SCENARIO` | No | Path to YAML test spec | Auto-discover |
181
+ | `URL` | No | Base URL override | From spec file |
182
+ | `STORY` | No | Filter by story ID | All scenarios |
183
+ | `RETRIES` | No | Max retries per scenario (1-3) | 2 |
184
+
185
+ ---
186
+
187
+ ## Expected Output
188
+
189
+ ### Success - All Scenarios Pass
190
+
191
+ ```
192
+ Browser QA Complete
193
+ ====================================
194
+
195
+ Run: 2026-02-16 14:30:00
196
+ Evidence: .agileflow/ui-review/runs/2026-02-16_14-30-00/
197
+
198
+ Results:
199
+ VALIDATED Login Flow (87% pass rate) - US-0050
200
+ VALIDATED Signup Flow (93% pass rate) - US-0051
201
+ VALIDATED Dashboard Nav (80% pass rate) - US-0052
202
+
203
+ Overall: 3/3 scenarios validated
204
+ Status: docs/09-agents/status.json updated
205
+ ```
206
+
207
+ ### Partial - Some Scenarios Fail
208
+
209
+ ```
210
+ Browser QA Complete (with warnings)
211
+ ====================================
212
+
213
+ Results:
214
+ VALIDATED Login Flow (87% pass rate)
215
+ WARNING Signup Flow (73% pass rate) - investigate
216
+ FAILED Checkout (50% pass rate) - potential bug
217
+
218
+ Overall: 1/3 validated, 1 warning, 1 failed
219
+ Action: Review failed scenarios in evidence directory
220
+ ```
221
+
222
+ ### Error - Playwright Not Found
223
+
224
+ ```
225
+ Playwright not installed.
226
+
227
+ Install: npm install --save-optional playwright
228
+ npx playwright install chromium
229
+
230
+ Then retry: /agileflow:browser-qa
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Related Commands
236
+
237
+ - `/agileflow:verify` - Run deterministic tests (Jest)
238
+ - `/agileflow:multi-expert` - Multi-expert analysis
239
+ - `/agileflow:review` - Code review
240
+ - `/agileflow:status` - Update story status
@@ -37,12 +37,12 @@ Main Menu → "What would you like to configure?"
37
37
  ├─ Profiles → Apply preset | Apply custom | Save current | Manage
38
38
  │ ├─ Presets: Full | Basic | Minimal | None
39
39
  │ └─ Custom: Save, Export, Import, Delete
40
- ├─ Features → Enable | Disable | View status
41
- │ └─ Hooks (4) + Other Features (4)
40
+ ├─ Features → Enable | Disable | Context Verbosity | View status
41
+ │ └─ Hooks (4) + Other Features (4) + Context Verbosity (full/lite/minimal)
42
42
  ├─ Sessions → Startup mode and Agent Teams configuration
43
43
  │ ├─ Startup Mode: Normal | Skip permissions | Accept edits | No Claude
44
44
  │ └─ Agent Teams: Enable/disable native multi-agent orchestration
45
- ├─ Infrastructure → Visual E2E | Damage Control | CI/CD | Quality Gates
45
+ ├─ Infrastructure → UI Testing | Damage Control | CI/CD | Quality Gates
46
46
  └─ Maintenance → Fix format | Upgrade | Repair | Check status
47
47
  ```
48
48
 
@@ -137,7 +137,7 @@ After handling issues (or if none), present the main category menu:
137
137
  {"label": "Profiles", "description": "Quick setup with preset configurations (full, basic, minimal)"},
138
138
  {"label": "Features", "description": "Enable or disable individual hooks and features"},
139
139
  {"label": "Sessions", "description": "Configure default startup mode for new sessions"},
140
- {"label": "Infrastructure", "description": "Set up Visual E2E, Damage Control, or CI/CD"},
140
+ {"label": "Infrastructure", "description": "Set up UI Testing, Damage Control, or CI/CD"},
141
141
  {"label": "Maintenance", "description": "Fix issues, repair scripts, or check status"}
142
142
  ]
143
143
  }]</parameter>
@@ -612,7 +612,7 @@ Then re-ask the enable/disable question.
612
612
  "header": "Setup",
613
613
  "multiSelect": false,
614
614
  "options": [
615
- {"label": "Visual E2E Testing", "description": "Playwright + screenshot verification workflow"},
615
+ {"label": "UI Testing (Bowser)", "description": "Agentic browser testing + visual verification with Playwright"},
616
616
  {"label": "Damage Control", "description": "Block destructive commands, protect sensitive paths"},
617
617
  {"label": "CI/CD Workflow", "description": "GitHub Actions for automated testing"},
618
618
  {"label": "Quality Gates", "description": "Configure TeammateIdle and TaskCompleted gate thresholds"}
@@ -623,7 +623,7 @@ Then re-ask the enable/disable question.
623
623
 
624
624
  Handle each selection directly:
625
625
 
626
- - **Visual E2E**: `node .agileflow/scripts/agileflow-configure.js --enable=visuale2e`
626
+ - **UI Testing (Bowser)**: `node .agileflow/scripts/agileflow-configure.js --enable=browserqa`
627
627
  - **Damage Control**: `node .agileflow/scripts/agileflow-configure.js --enable=damagecontrol`
628
628
  - **CI/CD**: `node .agileflow/scripts/agileflow-configure.js --enable=ci`
629
629
  - **Quality Gates**: Update `docs/00-meta/agileflow-metadata.json` under the `quality_gates` key with enable/disable for tests, lint, types gates per hook and coverage thresholds
@@ -1120,7 +1120,7 @@ Installed Features:
1120
1120
  ✅ damage-control (v2.94.1) - 31 patterns
1121
1121
  ✅ precompact (v2.94.1) - context preservation
1122
1122
  ✅ status-line (v2.94.1) - story tracking
1123
- visual-e2e (not installed)
1123
+ browserqa (not installed)
1124
1124
  ⚪ hooks (not installed)
1125
1125
 
1126
1126
  Scripts:
@@ -1139,7 +1139,7 @@ Available features:
1139
1139
  - damage-control: Protect against destructive commands
1140
1140
  - precompact: Context preservation during compaction
1141
1141
  - status-line: Story status in Claude Code UI
1142
- - visual-e2e: Screenshot-based testing
1142
+ - browserqa: Agentic browser testing + visual verification
1143
1143
  - hooks: Event-driven automation
1144
1144
  - ci: CI/CD workflow setup
1145
1145
 
@@ -11,7 +11,7 @@ compact_context:
11
11
  - "MUST include exact error messages verbatim if troubleshooting"
12
12
  - "MUST list 2+ approaches already tried with detailed results"
13
13
  - "MUST ask 3+ specific questions (not vague)"
14
- - "NO FILE WRITES - output only, user will copy/paste to external AI"
14
+ - "OUTPUT-ONLY by default - optional save to docs/10-research/prompts/"
15
15
  - "Validation required before output: length, code snippets, error details, attempts, questions"
16
16
  - "If validation fails: gather missing info and regenerate"
17
17
  state_fields:
@@ -202,15 +202,21 @@ Every research prompt MUST have:
202
202
 
203
203
  ---
204
204
 
205
- ### 🚨 RULE #7: NO FILE WRITES
205
+ ### 🚨 RULE #7: OUTPUT-ONLY BY DEFAULT (OPTIONAL SAVE)
206
206
 
207
- **This command outputs a prompt only. User will copy/paste to ChatGPT/Claude/Perplexity.**
207
+ **This command generates a prompt for copy/paste. Optionally save to prompts directory after displaying.**
208
208
 
209
209
  ```
210
- ❌ WRONG: Write prompt to file
211
- ✅ RIGHT: Output prompt in code block, instruct user to copy
210
+ ❌ WRONG: Save prompt WITHOUT also displaying for copy/paste
211
+ ✅ RIGHT: Output prompt in code block, then offer to save to docs/10-research/prompts/
212
212
  ```
213
213
 
214
+ **Save flow (if user selects save):**
215
+ 1. Create `docs/10-research/prompts/` directory if needed
216
+ 2. Save as `docs/10-research/prompts/YYYYMMDD-prompt-<topic-slug>.md`
217
+ 3. Update `docs/10-research/README.md` with 5-column entry (Type=Prompt)
218
+ 4. Confirm save location
219
+
214
220
  ---
215
221
 
216
222
  ### VALIDATION CHECKLIST (BEFORE OUTPUT)
@@ -240,7 +246,7 @@ Every research prompt MUST have:
240
246
  ❌ List no or vague attempted solutions
241
247
  ❌ Ask generic questions without context
242
248
  ❌ Output prompt shorter than 200 lines
243
- ❌ Save prompt to file instead of displaying for copy/paste
249
+ ❌ Save prompt WITHOUT also displaying for copy/paste
244
250
  ❌ Skip validation before outputting
245
251
 
246
252
  ### DO THESE INSTEAD
@@ -252,6 +258,7 @@ Every research prompt MUST have:
252
258
  ✅ Ask 3+ specific, contextualized questions
253
259
  ✅ Validate prompt quality before outputting
254
260
  ✅ Display prompt in code block for user copy/paste
261
+ ✅ Offer to save prompt to docs/10-research/prompts/ after displaying
255
262
  ✅ Instruct user where to paste results back
256
263
 
257
264
  ---
@@ -287,6 +294,7 @@ Every research prompt MUST have:
287
294
  18. Display prompt in code block
288
295
  19. Instruct user: "Copy this prompt and paste into ChatGPT/Claude/Perplexity"
289
296
  20. Provide post-answer instructions: "When you get results, use /agileflow:research:import to save"
297
+ 21. Offer to save prompt to `docs/10-research/prompts/YYYYMMDD-prompt-<topic-slug>.md`
290
298
 
291
299
  ---
292
300
 
@@ -372,7 +380,7 @@ Actual: [What actually happens]
372
380
  - MUST list 2+ attempts with detailed results
373
381
  - MUST ask 3+ specific questions
374
382
  - Validate all checks BEFORE outputting
375
- - NO file writes - output for user to copy/paste
383
+ - Output-only by default - optional save to docs/10-research/prompts/
376
384
  - After user gets results, they use /agileflow:research:import to save
377
385
 
378
386
  <!-- COMPACT_SUMMARY_END -->
@@ -607,6 +615,31 @@ Copy this prompt and paste it into ChatGPT, Claude web, Perplexity, or Gemini.
607
615
  When you get the answer, paste the results here and I'll save them to your research folder using `/agileflow:research:import`.
608
616
  ```
609
617
 
618
+ ### Step 8b: Save Prompt (if user selects save)
619
+
620
+ If the user selects "Save prompt to docs/10-research/prompts/":
621
+
622
+ 1. **Create directories** if they don't exist:
623
+ - Ensure `docs/10-research/` exists (create if needed on fresh projects)
624
+ - Ensure `docs/10-research/prompts/` exists
625
+
626
+ 2. **Generate filename**: `YYYYMMDD-prompt-<topic-slug>.md`
627
+ - Use today's date
628
+ - Slugify the TOPIC (lowercase, hyphens, no special chars)
629
+
630
+ 3. **Save the prompt** to `docs/10-research/prompts/YYYYMMDD-prompt-<topic-slug>.md`
631
+
632
+ 4. **Update README index** - Add entry to `docs/10-research/README.md`:
633
+ ```markdown
634
+ | YYYY-MM-DD | [TOPIC] Research Prompt | Prompt | [prompts/YYYYMMDD-prompt-topic-slug.md](./prompts/YYYYMMDD-prompt-topic-slug.md) | Research prompt for [TOPIC]: [N] files referenced, [M] questions |
635
+ ```
636
+
637
+ 5. **Confirm save**:
638
+ ```
639
+ Saved prompt to docs/10-research/prompts/YYYYMMDD-prompt-<topic-slug>.md
640
+ Updated research index (README.md)
641
+ ```
642
+
610
643
  ---
611
644
 
612
645
  ## Anti-Pattern: Lazy Prompts
@@ -772,7 +805,7 @@ After clicking "Sign in with Google", immediately get unauthorized_client error.
772
805
 
773
806
  ## Rules
774
807
 
775
- - **NO file writes** - This is output-only
808
+ - **Output-only by default** - Display prompt for copy/paste, optionally save to prompts/
776
809
  - **MUST validate quality** before outputting
777
810
  - **MUST include actual code** from the codebase
778
811
  - **MUST be detailed** - 200+ lines minimum
@@ -792,8 +825,8 @@ After generating the research prompt, suggest contextual next steps:
792
825
  "multiSelect": false,
793
826
  "options": [
794
827
  {"label": "Copy & paste to ChatGPT/Perplexity (Recommended)", "description": "Prompt covers [N] files and [M] specific questions - ready to paste"},
828
+ {"label": "Save prompt to docs/10-research/prompts/", "description": "Save as prompts/YYYYMMDD-prompt-[topic-slug].md and update README index"},
795
829
  {"label": "Regenerate with more detail", "description": "Add [missing element: more code from X / error details / attempted solutions]"},
796
- {"label": "Save prompt to docs/10-research/", "description": "Save as [YYYYMMDD]-prompt-[topic-slug].md for later use"},
797
830
  {"label": "Done", "description": "Prompt generated, no further action needed"}
798
831
  ]
799
832
  }]</parameter>
@@ -163,14 +163,20 @@ Phase 4: IMPLEMENTATION IDEATION (If Requested)
163
163
 
164
164
  **After saving, ALWAYS update `docs/10-research/README.md` with new entry.**
165
165
 
166
- Add entry to the top of the table:
166
+ Add entry to the top of the table (5-column format with Type):
167
167
  ```markdown
168
- | Date | Topic | File | Summary |
169
- |------|-------|------|---------|
170
- | 2026-01-07 | New Research Title | 20260107-topic-slug.md | One-line summary |
168
+ | Date | Topic | Type | Path | Summary |
169
+ |------|-------|------|------|---------|
170
+ | 2026-01-07 | New Research Title | Research | [20260107-topic-slug.md](./20260107-topic-slug.md) | One-line summary |
171
171
  | [older entries...] |
172
172
  ```
173
173
 
174
+ **Note**: If existing README.md uses 4-column format (no Type column), migrate first:
175
+ 1. Insert `Type` as the 3rd column in the header row (between Topic and Path)
176
+ 2. Add `------|` to the separator row in the same position
177
+ 3. For existing entries, assign Type = `Research` (safe default)
178
+ 4. Then insert the new 5-column entry
179
+
174
180
  **Never skip this step.** Index is how users discover research.
175
181
 
176
182
  ---
@@ -647,12 +653,12 @@ If YES:
647
653
 
648
654
  ### Step 8: Update Index
649
655
 
650
- Add entry to `docs/10-research/README.md`:
656
+ Add entry to `docs/10-research/README.md` (5-column format):
651
657
 
652
658
  ```markdown
653
- | Date | Topic | File | Summary |
654
- |------|-------|------|---------|
655
- | YYYY-MM-DD | [Topic] | [filename.md] | [One-line summary] |
659
+ | Date | Topic | Type | Path | Summary |
660
+ |------|-------|------|------|---------|
661
+ | YYYY-MM-DD | [Topic] | Research | [filename.md](./filename.md) | [One-line summary] |
656
662
  ```
657
663
 
658
664
  Insert newest entries at the top of the table.
@@ -65,18 +65,19 @@ node .agileflow/scripts/obtain-context.js research:list
65
65
 
66
66
  ### 🚨 RULE #2: READ INDEX FROM docs/10-research/README.md
67
67
 
68
- **Primary source: `docs/10-research/README.md` should contain a table:**
68
+ **Primary source: `docs/10-research/README.md` should contain a 5-column table:**
69
69
 
70
70
  ```markdown
71
71
  ## Research Notes
72
72
 
73
- | Date | Topic | File | Summary |
74
- |------|-------|------|---------|
75
- | 2026-01-07 | OAuth Integration | 20260107-oauth.md | Setup Google OAuth |
76
- | 2026-01-06 | Performance Tips | 20260106-perf.md | Caching strategies |
73
+ | Date | Topic | Type | Path | Summary |
74
+ |------|-------|------|------|---------|
75
+ | 2026-01-07 | OAuth Integration | Research | 20260107-oauth.md | Setup Google OAuth |
76
+ | 2026-01-06 | Performance Tips | Research | 20260106-perf.md | Caching strategies |
77
77
  ```
78
78
 
79
- **If README doesn't exist:** List files from the directory directly.
79
+ **If README doesn't exist:** List files from `docs/10-research/` directory and from `docs/10-research/prompts/` (if it exists), merging results sorted by date.
80
+ **If README uses old 4-column format (no Type):** Handle gracefully - display without Type column and note the format is outdated.
80
81
 
81
82
  ---
82
83
 
@@ -102,11 +103,11 @@ Quick start:
102
103
  Research Notes
103
104
  ==============
104
105
 
105
- | Date | Topic | File |
106
- |------------|------------------------|-----------------------------|
107
- | 2026-01-07 | OAuth Integration | 20260107-oauth.md |
108
- | 2026-01-06 | Performance Tips | 20260106-perf.md |
109
- | 2026-01-05 | Database Migrations | 20260105-migrations.md |
106
+ | Date | Topic | Type | File |
107
+ |------------|------------------------|----------|-----------------------------|
108
+ | 2026-01-07 | OAuth Integration | Research | 20260107-oauth.md |
109
+ | 2026-01-06 | Performance Tips | Research | 20260106-perf.md |
110
+ | 2026-01-05 | DB Migration Guide | Prompt | prompts/20260105-prompt-db-migrations.md |
110
111
 
111
112
  Total: 3 research notes
112
113
  ```
@@ -231,11 +232,11 @@ Format output:
231
232
  ```
232
233
  ## Research Notes
233
234
 
234
- | Date | Topic | File |
235
- |------|-------|------|
236
- | 2024-12-31 | OAuth 2.0 Setup | 20241231-oauth-setup.md |
237
- | 2024-12-30 | Session Tracking | 20241230-session-tracking.md |
238
- | 2024-12-28 | Mermaid Diagrams | 20241228-mermaid-diagrams.md |
235
+ | Date | Topic | Type | File |
236
+ |------|-------|------|------|
237
+ | 2024-12-31 | OAuth 2.0 Setup | Research | 20241231-oauth-setup.md |
238
+ | 2024-12-30 | Session Tracking | Research | 20241230-session-tracking.md |
239
+ | 2024-12-28 | Mermaid Diagrams | Research | 20241228-mermaid-diagrams.md |
239
240
 
240
241
  Total: 3 research notes
241
242
 
@@ -88,13 +88,13 @@ If neither provided, ask user:
88
88
  ### 🚨 RULE #2: SEARCH OR SELECT RESEARCH FILES
89
89
 
90
90
  **If TOPIC provided:**
91
- 1. Search `docs/10-research/*.md` for files containing keyword
91
+ 1. Search `docs/10-research/*.md` AND `docs/10-research/prompts/*.md` for files containing keyword
92
92
  2. Check filename, title (# header), key findings, summary
93
93
  3. Present matching files to user for confirmation
94
94
 
95
95
  **If FILES provided:**
96
- 1. Validate each file exists in `docs/10-research/`
97
- 2. Warn if any file not found
96
+ 1. Validate each file exists in `docs/10-research/` or `docs/10-research/prompts/`
97
+ 2. Warn if any file not found in either location
98
98
  3. Proceed with valid files
99
99
 
100
100
  **Auto-select if <5 matches. Ask user to confirm if 5+ matches.**
@@ -470,7 +470,7 @@ Upon invocation, execute these steps:
470
470
  ### Step 3: Search/Select Research Files
471
471
 
472
472
  **If TOPIC search:**
473
- 1. List all files in `docs/10-research/`
473
+ 1. List all files in `docs/10-research/` and `docs/10-research/prompts/` (if exists)
474
474
  2. For each file, check if topic keyword appears in:
475
475
  - Filename
476
476
  - First `# ` header (title)
@@ -888,11 +888,11 @@ If user chooses to save:
888
888
 
889
889
  **Filename format**: `YYYYMMDD-synthesis-[topic-slug].md`
890
890
 
891
- **Add to docs/10-research/README.md index:**
891
+ **Add to docs/10-research/README.md index (5-column format):**
892
892
  ```markdown
893
- | Date | Topic | File | Summary |
894
- |------|-------|------|---------|
895
- | 2026-01-17 | Synthesis: Authentication | 20260117-synthesis-authentication.md | Cross-research synthesis of N files... |
893
+ | Date | Topic | Type | Path | Summary |
894
+ |------|-------|------|------|---------|
895
+ | 2026-01-17 | Synthesis: Authentication | Synthesis | [20260117-synthesis-authentication.md](./20260117-synthesis-authentication.md) | Cross-research synthesis of N files... |
896
896
  ```
897
897
 
898
898
  **Mark as synthesis type** in file header:
@@ -233,10 +233,16 @@ If FILE not provided, show available files:
233
233
 
234
234
  Read `docs/10-research/[FILE]`.
235
235
 
236
- If file doesn't exist:
236
+ If file doesn't exist, check `docs/10-research/prompts/[FILE]` as a fallback (prompts are stored in a subdirectory).
237
+
238
+ If file doesn't exist in either location:
237
239
  ```
238
240
  Research note not found: [FILE]
239
241
 
242
+ Checked:
243
+ - docs/10-research/[FILE]
244
+ - docs/10-research/prompts/[FILE]
245
+
240
246
  Use /agileflow:research:list to see available notes.
241
247
  ```
242
248
 
@@ -246,8 +252,9 @@ Output the full content of the research note.
246
252
 
247
253
  ### Step 4: Suggest Actions
248
254
 
249
- After displaying, offer contextual actions based on the research content:
255
+ After displaying, count action items (lines starting with `- [ ]` in the file) and build contextual options:
250
256
 
257
+ **If N > 0 action items found:**
251
258
  ```xml
252
259
  <invoke name="AskUserQuestion">
253
260
  <parameter name="questions">[{
@@ -256,15 +263,32 @@ After displaying, offer contextual actions based on the research content:
256
263
  "multiSelect": false,
257
264
  "options": [
258
265
  {"label": "Analyze for implementation in [current epic/project] (Recommended)", "description": "Deploy multi-expert analysis to map research to your codebase"},
259
- {"label": "Synthesize with related notes on [detected topic]", "description": "Cross-reference with [count] other notes on similar topics"},
260
266
  {"label": "Create story from [N] action items", "description": "Turn research action items into trackable stories"},
267
+ {"label": "Synthesize with related notes on [detected topic]", "description": "Cross-reference with [count] other notes on similar topics"},
268
+ {"label": "View another note", "description": "Browse other research notes"}
269
+ ]
270
+ }]</parameter>
271
+ </invoke>
272
+ ```
273
+
274
+ **If N = 0 (no action items - informational research):**
275
+ ```xml
276
+ <invoke name="AskUserQuestion">
277
+ <parameter name="questions">[{
278
+ "question": "Viewed '[TOPIC]' research (reference material). What next?",
279
+ "header": "Actions",
280
+ "multiSelect": false,
281
+ "options": [
282
+ {"label": "Analyze for implementation in [current epic/project] (Recommended)", "description": "Deploy multi-expert analysis to map research to your codebase"},
283
+ {"label": "Import additional research on [detected topic]", "description": "Gather more detailed research to build on this note"},
284
+ {"label": "Synthesize with related notes on [detected topic]", "description": "Cross-reference with [count] other notes on similar topics"},
261
285
  {"label": "View another note", "description": "Browse other research notes"}
262
286
  ]
263
287
  }]</parameter>
264
288
  </invoke>
265
289
  ```
266
290
 
267
- **Key**: Always include specific counts (action items found), detected topics, and reference the current epic if one is active. If no action items exist, replace that option with "Import additional research on [topic]".
291
+ **Key**: Always populate placeholders - `[TOPIC]` from file title, `[N]` from action item count, `[detected topic]` from content keywords, `[current epic/project]` from status.json (or "your project" if none active), `[count]` from related file count.
268
292
 
269
293
  If "Analyze for implementation" selected, invoke:
270
294
  ```
@@ -83,7 +83,7 @@ Parse the CHANGELOG.md and display:
83
83
  ## v2.56.0 (2025-12-27)
84
84
 
85
85
  ### Added
86
- • Dynamic IDE discovery - Codex CLI now in setup
86
+ • Dynamic IDE discovery - OpenAI Codex now in setup
87
87
 
88
88
  ### Changed
89
89
  • Replaced hardcoded IDE list with dynamic loading
@@ -147,7 +147,7 @@ If a newer version exists, show:
147
147
  ## v2.56.0 (2025-12-27)
148
148
 
149
149
  ### Added
150
- • Dynamic IDE discovery - Codex CLI now in setup
150
+ • Dynamic IDE discovery - OpenAI Codex now in setup
151
151
 
152
152
  ### Changed
153
153
  • Replaced hardcoded IDE list with dynamic loading
@@ -1,6 +1,7 @@
1
1
  domain: devops
2
- last_updated: 2025-12-21
3
- version: 1.1
2
+ last_updated: 2026-02-15
3
+ last_audit_date: 2026-02-15
4
+ version: 1.2
4
5
 
5
6
  # AgileFlow-specific file structure (learned from actual codebase)
6
7
  files:
@@ -103,3 +104,13 @@ learnings:
103
104
  context: "Analyzed session hooks"
104
105
  insight: "get-env.js outputs project info on session start; archive-completed-stories.sh runs automatically"
105
106
  source: "CLAUDE.md, .claude/settings.json"
107
+
108
+ - date: 2026-02-15
109
+ context: "Analyzed Claude Code Feb 2026 planning/hooks/MCP research"
110
+ insight: "plansDirectory, PostToolUse ExitPlanMode, --init/--maintenance flags, MCP tool search align well with AgileFlow architecture. Ready for Phase 1 implementation: 2 weeks, 28-40 hours"
111
+ source: "docs/10-research/20260215-claude-code-planning-hooks-mcp-updates.md"
112
+
113
+ - date: 2026-02-15
114
+ context: "Planned Claude Code feature integration"
115
+ insight: "5 features categorized: Phase 1 (plansDirectory, PostToolUse, MCP search - high priority), Phase 2 (--init/--maintenance, PreToolUse context - medium priority). Effort estimate: 13-18 days, 56-76 hours total"
116
+ source: "docs/10-research/20260215-devops-analysis-claude-code-features.md"