agileflow 3.3.0 → 3.4.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 (210) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -6
  3. package/lib/skill-loader.js +0 -1
  4. package/package.json +1 -1
  5. package/scripts/agileflow-statusline.sh +81 -0
  6. package/scripts/agileflow-welcome.js +79 -0
  7. package/scripts/claude-tmux.sh +90 -23
  8. package/scripts/claude-watchdog.sh +225 -0
  9. package/scripts/generators/agent-registry.js +14 -1
  10. package/scripts/generators/inject-babysit.js +22 -9
  11. package/scripts/generators/inject-help.js +19 -9
  12. package/scripts/lib/ac-test-matcher.js +452 -0
  13. package/scripts/lib/audit-cleanup.js +250 -0
  14. package/scripts/lib/audit-registry.js +304 -0
  15. package/scripts/lib/configure-features.js +35 -0
  16. package/scripts/lib/feature-catalog.js +3 -3
  17. package/scripts/lib/gate-enforcer.js +295 -0
  18. package/scripts/lib/model-profiles.js +118 -0
  19. package/scripts/lib/quality-gates.js +163 -0
  20. package/scripts/lib/signal-detectors.js +44 -1
  21. package/scripts/lib/skill-catalog.js +557 -0
  22. package/scripts/lib/skill-recommender.js +311 -0
  23. package/scripts/lib/status-writer.js +255 -0
  24. package/scripts/lib/story-claiming.js +128 -45
  25. package/scripts/lib/task-sync.js +32 -38
  26. package/scripts/lib/tdd-phase-manager.js +455 -0
  27. package/scripts/lib/team-events.js +34 -3
  28. package/scripts/lib/tmux-audit-monitor.js +611 -0
  29. package/scripts/lib/tmux-group-colors.js +113 -0
  30. package/scripts/lib/tool-registry.yaml +241 -0
  31. package/scripts/lib/tool-shed.js +441 -0
  32. package/scripts/messaging-bridge.js +209 -1
  33. package/scripts/native-team-observer.js +219 -0
  34. package/scripts/obtain-context.js +14 -0
  35. package/scripts/ralph-loop.js +30 -5
  36. package/scripts/smart-detect.js +21 -0
  37. package/scripts/spawn-audit-sessions.js +877 -0
  38. package/scripts/team-manager.js +56 -16
  39. package/scripts/tmux-close-windows.sh +180 -0
  40. package/src/core/agents/a11y-analyzer-aria.md +155 -0
  41. package/src/core/agents/a11y-analyzer-forms.md +162 -0
  42. package/src/core/agents/a11y-analyzer-keyboard.md +175 -0
  43. package/src/core/agents/a11y-analyzer-semantic.md +153 -0
  44. package/src/core/agents/a11y-analyzer-visual.md +158 -0
  45. package/src/core/agents/a11y-consensus.md +248 -0
  46. package/src/core/agents/ads-audit-budget.md +181 -0
  47. package/src/core/agents/ads-audit-compliance.md +169 -0
  48. package/src/core/agents/ads-audit-creative.md +164 -0
  49. package/src/core/agents/ads-audit-google.md +226 -0
  50. package/src/core/agents/ads-audit-meta.md +183 -0
  51. package/src/core/agents/ads-audit-tracking.md +197 -0
  52. package/src/core/agents/ads-consensus.md +396 -0
  53. package/src/core/agents/ads-generate.md +145 -0
  54. package/src/core/agents/ads-performance-tracker.md +197 -0
  55. package/src/core/agents/api-quality-analyzer-conventions.md +148 -0
  56. package/src/core/agents/api-quality-analyzer-docs.md +176 -0
  57. package/src/core/agents/api-quality-analyzer-errors.md +183 -0
  58. package/src/core/agents/api-quality-analyzer-pagination.md +171 -0
  59. package/src/core/agents/api-quality-analyzer-versioning.md +143 -0
  60. package/src/core/agents/api-quality-consensus.md +214 -0
  61. package/src/core/agents/arch-analyzer-circular.md +148 -0
  62. package/src/core/agents/arch-analyzer-complexity.md +171 -0
  63. package/src/core/agents/arch-analyzer-coupling.md +146 -0
  64. package/src/core/agents/arch-analyzer-layering.md +151 -0
  65. package/src/core/agents/arch-analyzer-patterns.md +162 -0
  66. package/src/core/agents/arch-consensus.md +227 -0
  67. package/src/core/agents/brainstorm-analyzer-features.md +169 -0
  68. package/src/core/agents/brainstorm-analyzer-growth.md +161 -0
  69. package/src/core/agents/brainstorm-analyzer-integration.md +172 -0
  70. package/src/core/agents/brainstorm-analyzer-market.md +147 -0
  71. package/src/core/agents/brainstorm-analyzer-ux.md +167 -0
  72. package/src/core/agents/brainstorm-consensus.md +237 -0
  73. package/src/core/agents/completeness-consensus.md +5 -5
  74. package/src/core/agents/perf-consensus.md +2 -2
  75. package/src/core/agents/security-consensus.md +2 -2
  76. package/src/core/agents/seo-analyzer-content.md +167 -0
  77. package/src/core/agents/seo-analyzer-images.md +187 -0
  78. package/src/core/agents/seo-analyzer-performance.md +206 -0
  79. package/src/core/agents/seo-analyzer-schema.md +176 -0
  80. package/src/core/agents/seo-analyzer-sitemap.md +172 -0
  81. package/src/core/agents/seo-analyzer-technical.md +144 -0
  82. package/src/core/agents/seo-consensus.md +289 -0
  83. package/src/core/agents/test-consensus.md +2 -2
  84. package/src/core/commands/adr.md +1 -0
  85. package/src/core/commands/ads/audit.md +375 -0
  86. package/src/core/commands/ads/budget.md +97 -0
  87. package/src/core/commands/ads/competitor.md +112 -0
  88. package/src/core/commands/ads/creative.md +85 -0
  89. package/src/core/commands/ads/generate.md +238 -0
  90. package/src/core/commands/ads/google.md +112 -0
  91. package/src/core/commands/ads/health.md +327 -0
  92. package/src/core/commands/ads/landing.md +119 -0
  93. package/src/core/commands/ads/linkedin.md +112 -0
  94. package/src/core/commands/ads/meta.md +91 -0
  95. package/src/core/commands/ads/microsoft.md +115 -0
  96. package/src/core/commands/ads/plan.md +321 -0
  97. package/src/core/commands/ads/test-plan.md +317 -0
  98. package/src/core/commands/ads/tiktok.md +129 -0
  99. package/src/core/commands/ads/track.md +288 -0
  100. package/src/core/commands/ads/youtube.md +124 -0
  101. package/src/core/commands/ads.md +140 -0
  102. package/src/core/commands/assign.md +1 -0
  103. package/src/core/commands/audit.md +43 -6
  104. package/src/core/commands/babysit.md +315 -1266
  105. package/src/core/commands/baseline.md +1 -0
  106. package/src/core/commands/blockers.md +1 -0
  107. package/src/core/commands/board.md +1 -0
  108. package/src/core/commands/changelog.md +1 -0
  109. package/src/core/commands/choose.md +1 -0
  110. package/src/core/commands/ci.md +1 -0
  111. package/src/core/commands/code/accessibility.md +347 -0
  112. package/src/core/commands/code/api.md +297 -0
  113. package/src/core/commands/code/architecture.md +297 -0
  114. package/src/core/commands/{audit → code}/completeness.md +72 -25
  115. package/src/core/commands/{audit → code}/legal.md +63 -16
  116. package/src/core/commands/{audit → code}/logic.md +64 -16
  117. package/src/core/commands/{audit → code}/performance.md +67 -20
  118. package/src/core/commands/{audit → code}/security.md +69 -19
  119. package/src/core/commands/{audit → code}/test.md +67 -20
  120. package/src/core/commands/configure.md +1 -0
  121. package/src/core/commands/council.md +1 -0
  122. package/src/core/commands/deploy.md +1 -0
  123. package/src/core/commands/diagnose.md +1 -0
  124. package/src/core/commands/docs.md +1 -0
  125. package/src/core/commands/epic/edit.md +213 -0
  126. package/src/core/commands/epic.md +1 -0
  127. package/src/core/commands/export.md +238 -0
  128. package/src/core/commands/help.md +16 -1
  129. package/src/core/commands/{discovery → ideate}/brief.md +12 -12
  130. package/src/core/commands/{discovery/new.md → ideate/discover.md} +20 -16
  131. package/src/core/commands/ideate/features.md +496 -0
  132. package/src/core/commands/ideate/new.md +158 -124
  133. package/src/core/commands/impact.md +1 -0
  134. package/src/core/commands/learn/explain.md +118 -0
  135. package/src/core/commands/learn/glossary.md +135 -0
  136. package/src/core/commands/learn/patterns.md +138 -0
  137. package/src/core/commands/learn/tour.md +126 -0
  138. package/src/core/commands/migrate/codemods.md +151 -0
  139. package/src/core/commands/migrate/plan.md +131 -0
  140. package/src/core/commands/migrate/scan.md +114 -0
  141. package/src/core/commands/migrate/validate.md +119 -0
  142. package/src/core/commands/multi-expert.md +1 -0
  143. package/src/core/commands/pr.md +1 -0
  144. package/src/core/commands/review.md +1 -0
  145. package/src/core/commands/seo/audit.md +373 -0
  146. package/src/core/commands/seo/competitor.md +174 -0
  147. package/src/core/commands/seo/content.md +107 -0
  148. package/src/core/commands/seo/geo.md +229 -0
  149. package/src/core/commands/seo/hreflang.md +140 -0
  150. package/src/core/commands/seo/images.md +96 -0
  151. package/src/core/commands/seo/page.md +198 -0
  152. package/src/core/commands/seo/plan.md +163 -0
  153. package/src/core/commands/seo/programmatic.md +131 -0
  154. package/src/core/commands/seo/references/cwv-thresholds.md +64 -0
  155. package/src/core/commands/seo/references/eeat-framework.md +110 -0
  156. package/src/core/commands/seo/references/quality-gates.md +91 -0
  157. package/src/core/commands/seo/references/schema-types.md +102 -0
  158. package/src/core/commands/seo/schema.md +183 -0
  159. package/src/core/commands/seo/sitemap.md +97 -0
  160. package/src/core/commands/seo/technical.md +100 -0
  161. package/src/core/commands/seo.md +107 -0
  162. package/src/core/commands/skill/list.md +68 -212
  163. package/src/core/commands/skill/recommend.md +216 -0
  164. package/src/core/commands/sprint.md +1 -0
  165. package/src/core/commands/status/undo.md +191 -0
  166. package/src/core/commands/status.md +1 -0
  167. package/src/core/commands/story/edit.md +204 -0
  168. package/src/core/commands/story/view.md +29 -7
  169. package/src/core/commands/story-validate.md +1 -0
  170. package/src/core/commands/story.md +1 -0
  171. package/src/core/commands/tdd-next.md +238 -0
  172. package/src/core/commands/tdd.md +211 -0
  173. package/src/core/commands/team/start.md +10 -6
  174. package/src/core/commands/tests.md +1 -0
  175. package/src/core/commands/verify.md +27 -1
  176. package/src/core/commands/workflow.md +2 -0
  177. package/src/core/experts/_core-expertise.yaml +105 -0
  178. package/src/core/experts/analytics/expertise.yaml +5 -99
  179. package/src/core/experts/codebase-query/expertise.yaml +3 -72
  180. package/src/core/experts/compliance/expertise.yaml +6 -72
  181. package/src/core/experts/database/expertise.yaml +9 -52
  182. package/src/core/experts/documentation/expertise.yaml +7 -140
  183. package/src/core/experts/integrations/expertise.yaml +7 -127
  184. package/src/core/experts/mentor/expertise.yaml +8 -35
  185. package/src/core/experts/monitoring/expertise.yaml +7 -49
  186. package/src/core/experts/performance/expertise.yaml +1 -26
  187. package/src/core/experts/security/expertise.yaml +9 -34
  188. package/src/core/experts/ui/expertise.yaml +6 -36
  189. package/src/core/knowledge/ads/ad-audit-checklist-scoring.md +424 -0
  190. package/src/core/knowledge/ads/ad-optimization-logic.md +590 -0
  191. package/src/core/knowledge/ads/ad-technical-specifications.md +385 -0
  192. package/src/core/knowledge/ads/definitive-advertising-reference-2026.md +506 -0
  193. package/src/core/knowledge/ads/paid-advertising-research-2026.md +445 -0
  194. package/src/core/teams/backend.json +41 -0
  195. package/src/core/teams/frontend.json +41 -0
  196. package/src/core/teams/qa.json +41 -0
  197. package/src/core/teams/solo.json +35 -0
  198. package/src/core/templates/agileflow-metadata.json +20 -1
  199. package/tools/cli/commands/setup.js +85 -3
  200. package/tools/cli/commands/update.js +42 -0
  201. package/tools/cli/installers/ide/_base-ide.js +42 -5
  202. package/tools/cli/installers/ide/claude-code.js +71 -3
  203. package/tools/cli/lib/content-injector.js +160 -12
  204. package/tools/cli/lib/docs-setup.js +1 -1
  205. package/src/core/commands/skill/create.md +0 -698
  206. package/src/core/commands/skill/delete.md +0 -316
  207. package/src/core/commands/skill/edit.md +0 -359
  208. package/src/core/commands/skill/test.md +0 -394
  209. package/src/core/commands/skill/upgrade.md +0 -552
  210. package/src/core/templates/skill-template.md +0 -117
@@ -0,0 +1,496 @@
1
+ ---
2
+ description: Multi-agent feature brainstorming audit - analyzes your app and suggests new features, UX improvements, integrations, and growth opportunities
3
+ argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=features|ux|market|growth|integration|all] [MODEL=haiku|sonnet|opus]"
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:ideate:features - Multi-agent feature brainstorming audit"
8
+ - "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
9
+ - "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
10
+ - "CRITICAL: Value scale: HIGH_VALUE > MEDIUM_VALUE > NICE_TO_HAVE > SPECULATIVE"
11
+ - "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), SPECULATIVE (1 weak)"
12
+ - "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (features|ux|market|growth|integration|all), MODEL (haiku/sonnet/opus)"
13
+ - "Pass consensus all analyzer outputs, let it synthesize the final report"
14
+ state_fields:
15
+ - target_path
16
+ - depth
17
+ - focus_areas
18
+ - model
19
+ - analyzers_deployed
20
+ - findings_collected
21
+ ---
22
+
23
+ # /agileflow:ideate:features
24
+
25
+ Deploy multiple specialized brainstorm analyzers in parallel to find missing features, UX improvements, market-standard patterns, growth opportunities, and integration gaps, then synthesize results through consensus into a prioritized Feature Brainstorm Report.
26
+
27
+ **Key difference from `/ideate:new`**: Ideation finds technical improvements to existing code (refactoring, security fixes, performance). Brainstorm audit finds **new product features** the app should have — what to build, not what to fix.
28
+
29
+ ---
30
+
31
+ ## Quick Reference
32
+
33
+ ```
34
+ /agileflow:ideate:features app/ # Analyze app (quick, core 3 analyzers)
35
+ /agileflow:ideate:features . DEPTH=deep # Deep analysis - all 5 analyzers
36
+ /agileflow:ideate:features src/ FOCUS=features,ux # Focus on feature gaps and UX
37
+ /agileflow:ideate:features . DEPTH=deep FOCUS=all # Comprehensive brainstorm
38
+ /agileflow:ideate:features components/ FOCUS=ux # UX-only audit of components
39
+ /agileflow:ideate:features . DEPTH=ultradeep # Each analyzer in its own tmux session
40
+ /agileflow:ideate:features src/ MODEL=sonnet # Use Sonnet for all analyzers
41
+ /agileflow:ideate:features . DEPTH=ultradeep MODEL=opus # Ultradeep with Opus
42
+ ```
43
+
44
+ ---
45
+
46
+ ## How It Works
47
+
48
+ ```
49
+ ┌─────────────────────────────────────────────────────────────┐
50
+ │ /agileflow:ideate:features │
51
+ │ │
52
+ │ 1. Parse arguments (target, depth, focus) │
53
+ │ 2. Deploy brainstorm analyzers IN PARALLEL │
54
+ │ 3. Collect all feature suggestions │
55
+ │ 4. Run consensus coordinator to deduplicate & prioritize │
56
+ │ 5. Generate actionable Feature Brainstorm Report │
57
+ └─────────────────────────────────────────────────────────────┘
58
+
59
+ ┌──────────┐ ┌────────┐ ┌────────┐
60
+ │ Features │ │ UX │ │ Market │
61
+ └────┬─────┘ └───┬────┘ └───┬────┘
62
+ │ │ │
63
+ ┌────┴───┐ ┌─────┴──────────┘ (deep only)
64
+ │ Growth │ │Integration│
65
+ └────┬───┘ └─────┬─────┘
66
+ │ │
67
+ └─────┬─────┘
68
+
69
+ ┌──────────────────────┐
70
+ │ Consensus Coordinator │
71
+ │ (deduplicates, votes,│
72
+ │ prioritizes report) │
73
+ └──────────────────────┘
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Arguments
79
+
80
+ | Argument | Values | Default | Description |
81
+ |----------|--------|---------|-------------|
82
+ | TARGET | file/directory | `.` | What to analyze |
83
+ | DEPTH | quick, deep, ultradeep | quick | quick = core 3, deep = all 5, ultradeep = separate tmux sessions |
84
+ | FOCUS | features,ux,market,growth,integration,all | all | Which analyzers to deploy |
85
+ | MODEL | haiku, sonnet, opus | haiku | Model for analyzer subagents. Passed to Task calls or tmux sessions. |
86
+
87
+ ---
88
+
89
+ ## Value Scale (Feature Priority)
90
+
91
+ | Value | Definition | Example |
92
+ |-------|-----------|---------|
93
+ | **HIGH_VALUE** | Users actively need this or will leave without it | Missing search on a list of 100+ items |
94
+ | **MEDIUM_VALUE** | Improves the experience significantly | Export to CSV for data portability |
95
+ | **NICE_TO_HAVE** | Polish that delights users | Dark mode, keyboard shortcuts |
96
+ | **SPECULATIVE** | Might be useful, needs validation | AI-powered suggestions |
97
+
98
+ ---
99
+
100
+ ## Step-by-Step Process
101
+
102
+ ### STEP 1: Parse Arguments
103
+
104
+ ```
105
+ TARGET = first argument or current directory
106
+ DEPTH = quick (default) or deep
107
+ FOCUS = all (default) or comma-separated list
108
+ ```
109
+
110
+ **Analyzer Selection**:
111
+
112
+ | Condition | Analyzers Deployed |
113
+ |-----------|-------------------|
114
+ | `DEPTH=quick` + `FOCUS=all` | features, ux, market (core 3) |
115
+ | `DEPTH=deep` + `FOCUS=all` | All 5 analyzers |
116
+ | `FOCUS=features` | brainstorm-analyzer-features only |
117
+ | `FOCUS=ux` | brainstorm-analyzer-ux only |
118
+ | `FOCUS=market` | brainstorm-analyzer-market only |
119
+ | `FOCUS=growth` | brainstorm-analyzer-growth only |
120
+ | `FOCUS=integration` | brainstorm-analyzer-integration only |
121
+ | `FOCUS=features,ux` | Comma-separated: deploy specified analyzers |
122
+
123
+ **DEPTH behavior**:
124
+ - `quick` (default): Deploy core 3 analyzers (features, ux, market). Focus on HIGH_VALUE and MEDIUM_VALUE ideas only.
125
+ - `deep`: Deploy all 5 analyzers. Include NICE_TO_HAVE and SPECULATIVE ideas.
126
+ - `ultradeep`: Spawn each analyzer as a separate Claude Code session in tmux. Uses all 5 analyzers. Requires tmux. Falls back to `deep` if tmux unavailable.
127
+
128
+ **MODEL** (default: haiku):
129
+ - `haiku`: Fast and cost-effective.
130
+ - `sonnet`: Balanced quality and speed.
131
+ - `opus`: Maximum quality. Recommended for ultradeep.
132
+
133
+ **ULTRADEEP mode** (DEPTH=ultradeep):
134
+ 1. Show cost estimate:
135
+ ```bash
136
+ node .agileflow/scripts/spawn-audit-sessions.js --audit=brainstorm --target=TARGET --focus=FOCUS --model=MODEL --dry-run
137
+ ```
138
+ 2. Confirm with user before launching
139
+ 3. Spawn sessions (use `--json` to capture trace ID):
140
+ ```bash
141
+ node .agileflow/scripts/spawn-audit-sessions.js --audit=brainstorm --target=TARGET --focus=FOCUS --model=MODEL --json
142
+ ```
143
+ Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
144
+ 4. Wait for all analyzers to complete:
145
+ ```bash
146
+ node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
147
+ ```
148
+ - Exit 0 = all complete (JSON results on stdout)
149
+ - Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
150
+ - To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
151
+ - To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
152
+ 5. Parse `results` array from the JSON output. Pass all findings to consensus coordinator (same as deep mode).
153
+ 6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
154
+
155
+ **EXTREME mode** (DEPTH=extreme):
156
+ Partition-based multi-agent audit. Instead of 1 analyzer per tmux window, the codebase is split into partitions and each partition runs ALL analyzers.
157
+ 1. Scan the target directory to understand the codebase structure:
158
+ - Use Glob to find top-level source directories
159
+ - Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
160
+ - If user provided PARTITIONS=N (a number), split into exactly N partitions
161
+ - If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
162
+ 2. Show the partition plan and agent count to the user, confirm before launching:
163
+ Example: "5 partitions x 5 analyzers = 25 agents. Estimated cost: $X. Proceed?"
164
+ 3. Spawn sessions with partitions:
165
+ ```bash
166
+ node .agileflow/scripts/spawn-audit-sessions.js --audit=brainstorm --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --model=MODEL --json
167
+ ```
168
+ 4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
169
+ 5. Run consensus on combined results from all partitions
170
+
171
+ **PARTITIONS argument** (only used with DEPTH=extreme):
172
+ | Value | Behavior |
173
+ |-------|----------|
174
+ | Not set | AI decides partitions (3-7 based on codebase size) |
175
+ | `PARTITIONS=5` | AI creates exactly 5 partitions |
176
+ | `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
177
+
178
+ > **Skip to STEP 4** after ultradeep collection. Steps 2-3 are only for quick/deep modes.
179
+
180
+ ### STEP 2: Deploy Analyzers in Parallel
181
+
182
+ **For quick/deep modes only** (ultradeep uses tmux sessions above).
183
+
184
+ **CRITICAL**: Deploy ALL selected analyzers in a SINGLE message with multiple Task calls. **If MODEL is specified**, pass it to each Task call via the `model` parameter.
185
+
186
+ **Prompt template for each analyzer**:
187
+
188
+ ```
189
+ TASK: Analyze the following app for {BRAINSTORM_DOMAIN} opportunities.
190
+
191
+ TARGET: {file_path or directory}
192
+ DEPTH: {quick|deep}
193
+
194
+ {For quick depth}: Focus on HIGH_VALUE and MEDIUM_VALUE features only. Skip NICE_TO_HAVE and SPECULATIVE.
195
+ {For deep depth}: Be comprehensive. Include all value levels.
196
+
197
+ Read the target files to understand what the app does, then apply your analysis methodology to find missing features and improvement opportunities.
198
+
199
+ OUTPUT your findings in your standard format (FINDING-N with location, category, value, effort, description, user impact, implementation hint).
200
+
201
+ If no opportunities found, output: "No {BRAINSTORM_DOMAIN} opportunities found in {TARGET}"
202
+ ```
203
+
204
+ **Example deployment (DEPTH=quick, FOCUS=all - deploys core 3)**:
205
+
206
+ ```xml
207
+ <invoke name="Task">
208
+ <parameter name="description">Feature gap analysis</parameter>
209
+ <parameter name="prompt">TASK: Analyze the following app for MISSING FEATURES AND INCOMPLETE WORKFLOWS.
210
+ TARGET: {target}
211
+ DEPTH: quick
212
+ Focus on HIGH_VALUE and MEDIUM_VALUE features only...
213
+ Read the target files to understand what the app does, its routes, components, models, and APIs. Then identify missing CRUD operations, half-built features, absent common patterns (search, pagination, filters), dead-end workflows, missing data features (export/import), and absent configuration options.
214
+ OUTPUT findings in your standard FINDING-N format.</parameter>
215
+ <parameter name="subagent_type">brainstorm-analyzer-features</parameter>
216
+ <parameter name="run_in_background">true</parameter>
217
+ </invoke>
218
+
219
+ <invoke name="Task">
220
+ <parameter name="description">UX improvement analysis</parameter>
221
+ <parameter name="prompt">TASK: Analyze the following app for UX IMPROVEMENT OPPORTUNITIES.
222
+ TARGET: {target}
223
+ DEPTH: quick
224
+ Focus on HIGH_VALUE and MEDIUM_VALUE improvements only...
225
+ Read the target UI files to understand the user experience. Then identify missing feedback states (loading, success, error), empty states, navigation gaps, accessibility issues, responsive design gaps, and missing user guidance (onboarding, tooltips, help text).
226
+ OUTPUT findings in your standard FINDING-N format.</parameter>
227
+ <parameter name="subagent_type">brainstorm-analyzer-ux</parameter>
228
+ <parameter name="run_in_background">true</parameter>
229
+ </invoke>
230
+
231
+ <invoke name="Task">
232
+ <parameter name="description">Market feature analysis</parameter>
233
+ <parameter name="prompt">TASK: Analyze the following app for MARKET-STANDARD FEATURES that are missing.
234
+ TARGET: {target}
235
+ DEPTH: quick
236
+ Focus on HIGH_VALUE and MEDIUM_VALUE features only...
237
+ Read the project files to infer the app category (SaaS, e-commerce, blog, tool, etc.). Then identify table-stakes features users expect in this category, competitive features that differentiate good apps, and potential differentiators.
238
+ OUTPUT findings in your standard FINDING-N format.</parameter>
239
+ <parameter name="subagent_type">brainstorm-analyzer-market</parameter>
240
+ <parameter name="run_in_background">true</parameter>
241
+ </invoke>
242
+ ```
243
+
244
+ **For DEPTH=deep, also deploy**:
245
+
246
+ ```xml
247
+ <invoke name="Task">
248
+ <parameter name="description">Growth feature analysis</parameter>
249
+ <parameter name="prompt">TASK: Analyze the following app for GROWTH AND ENGAGEMENT features that are missing.
250
+ TARGET: {target}
251
+ DEPTH: deep
252
+ Be comprehensive - include all value levels...
253
+ Read the codebase to map the user lifecycle (acquisition, activation, retention, revenue, referral). Then identify missing onboarding flows, notification systems, sharing mechanics, personalization features, retention hooks, and user management features.
254
+ OUTPUT findings in your standard FINDING-N format.</parameter>
255
+ <parameter name="subagent_type">brainstorm-analyzer-growth</parameter>
256
+ <parameter name="run_in_background">true</parameter>
257
+ </invoke>
258
+
259
+ <invoke name="Task">
260
+ <parameter name="description">Integration opportunity analysis</parameter>
261
+ <parameter name="prompt">TASK: Analyze the following app for MISSING INTEGRATIONS AND API EXTENSIBILITY.
262
+ TARGET: {target}
263
+ DEPTH: deep
264
+ Be comprehensive - include all value levels...
265
+ Check package.json and code for existing integrations. Then identify missing auth providers, service integrations (email, storage, analytics), data portability (import/export), API extensibility (webhooks, public API), payment integrations, and communication channels (Slack, Discord).
266
+ OUTPUT findings in your standard FINDING-N format.</parameter>
267
+ <parameter name="subagent_type">brainstorm-analyzer-integration</parameter>
268
+ <parameter name="run_in_background">true</parameter>
269
+ </invoke>
270
+ ```
271
+
272
+ ### STEP 3: Collect Results
273
+
274
+ Wait for all analyzers to complete:
275
+
276
+ ```xml
277
+ <invoke name="TaskOutput">
278
+ <parameter name="task_id">{features_id}</parameter>
279
+ <parameter name="block">true</parameter>
280
+ </invoke>
281
+
282
+ <invoke name="TaskOutput">
283
+ <parameter name="task_id">{ux_id}</parameter>
284
+ <parameter name="block">true</parameter>
285
+ </invoke>
286
+
287
+ <!-- ... collect all results ... -->
288
+ ```
289
+
290
+ ### STEP 4: Run Consensus Coordinator
291
+
292
+ Pass all analyzer outputs to the consensus coordinator:
293
+
294
+ ```xml
295
+ <invoke name="Task">
296
+ <parameter name="description">Brainstorm audit consensus</parameter>
297
+ <parameter name="prompt">You are the Brainstorm Consensus Coordinator.
298
+
299
+ TARGET: {target_path}
300
+ DEPTH: {depth}
301
+
302
+ ## Analyzer Outputs
303
+
304
+ ### Features Analyzer Results:
305
+ {features_output}
306
+
307
+ ### UX Analyzer Results:
308
+ {ux_output}
309
+
310
+ ### Market Analyzer Results:
311
+ {market_output}
312
+
313
+ {If deep depth, also include:}
314
+ ### Growth Analyzer Results:
315
+ {growth_output}
316
+
317
+ ### Integration Analyzer Results:
318
+ {integration_output}
319
+
320
+ ---
321
+
322
+ Follow your consensus process:
323
+ 1. Detect app category from the codebase
324
+ 2. Parse all findings into normalized structure
325
+ 3. Deduplicate overlapping suggestions from different analyzers
326
+ 4. Vote on confidence (CONFIRMED if 2+ suggest similar feature, LIKELY if 1 with evidence)
327
+ 5. Filter by app category relevance
328
+ 6. Prioritize by value/effort ratio (Quick Wins first)
329
+ 7. Generate the final Feature Brainstorm Report
330
+ 8. Save report to docs/08-project/brainstorm-audits/brainstorm-audit-{YYYYMMDD}.md
331
+ </parameter>
332
+ <parameter name="subagent_type">brainstorm-consensus</parameter>
333
+ </invoke>
334
+ ```
335
+
336
+ ### STEP 5: Present Results
337
+
338
+ After consensus completes, show the report summary and offer next steps:
339
+
340
+ ```xml
341
+ <invoke name="AskUserQuestion">
342
+ <parameter name="questions">[{
343
+ "question": "Brainstorm audit complete: [N] feature ideas ([quick_wins] quick wins, [strategic] strategic). App type: [type]. [analyzers] analyzers deployed.",
344
+ "header": "Next steps",
345
+ "multiSelect": false,
346
+ "options": [
347
+ {"label": "Create stories for top [quick_wins] quick wins (Recommended)", "description": "[top_feature_summary] - highest value, lowest effort"},
348
+ {"label": "Create epic: 'Feature improvements'", "description": "Bundle all [N] ideas into a trackable epic with stories"},
349
+ {"label": "Re-run with DEPTH=deep on [target]", "description": "Current was quick (3 analyzers) - deep adds Growth, Integration"},
350
+ {"label": "Save report and done", "description": "Report saved to docs/08-project/brainstorm-audits/"}
351
+ ]
352
+ }]</parameter>
353
+ </invoke>
354
+ ```
355
+
356
+ ---
357
+
358
+ ## Example Output
359
+
360
+ ```
361
+ 💡 Feature Brainstorm Audit: app/
362
+ ══════════════════════════════════════════════════════════════
363
+
364
+ Deploying 3 brainstorm analyzers (quick mode)...
365
+ ✓ Features Analyzer
366
+ ✓ UX Analyzer
367
+ ✓ Market Analyzer
368
+
369
+ Running consensus...
370
+ ✓ Consensus complete
371
+ ✓ App category detected: AI/ML Web Application
372
+
373
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
374
+ 📊 BRAINSTORM SUMMARY
375
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
376
+
377
+ 18 raw suggestions → 12 unique features (6 merged duplicates)
378
+ - 4 CONFIRMED (2+ analyzers agree)
379
+ - 5 LIKELY (strong single-analyzer evidence)
380
+ - 3 SPECULATIVE (filtered out)
381
+
382
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
383
+ ★ QUICK WINS (High Value, Low Effort)
384
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
385
+
386
+ 1. Add loading spinner during model inference [CONFIRMED by Features, UX]
387
+ Value: HIGH | Effort: SMALL (hours)
388
+ Users see frozen UI while model processes — think the app is broken
389
+
390
+ 2. Add drag-and-drop image upload [CONFIRMED by UX, Market]
391
+ Value: HIGH | Effort: SMALL (hours)
392
+ Users expect drag-and-drop in 2026 — file input feels dated
393
+
394
+ 3. Show confidence explanation after prediction [LIKELY - UX]
395
+ Value: MEDIUM | Effort: SMALL (hours)
396
+ Users don't understand what "73% Cancer Cell" means in context
397
+
398
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
399
+ 🎯 STRATEGIC FEATURES
400
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
401
+
402
+ 4. Batch image analysis [CONFIRMED by Features, Market]
403
+ Value: HIGH | Effort: MEDIUM (days)
404
+ Analyze multiple images at once — standard in medical imaging tools
405
+
406
+ 5. Result history with comparison [LIKELY - Features]
407
+ Value: HIGH | Effort: MEDIUM (days)
408
+ Users can't review past analyses or compare results over time
409
+
410
+ [Full report saved to docs/08-project/brainstorm-audits/brainstorm-audit-20260226.md]
411
+ ```
412
+
413
+ ---
414
+
415
+ <!-- COMPACT_SUMMARY_START -->
416
+ ## Compact Summary
417
+
418
+ **Command**: `/agileflow:ideate:features` - Multi-agent feature brainstorming audit with consensus
419
+
420
+ **Quick Usage**:
421
+ ```
422
+ /agileflow:ideate:features app/ # Quick scan (core 3 analyzers)
423
+ /agileflow:ideate:features . DEPTH=deep # All 5 analyzers
424
+ /agileflow:ideate:features src/ FOCUS=features,ux # Specific areas
425
+ /agileflow:ideate:features . DEPTH=ultradeep MODEL=opus # Ultradeep with Opus in tmux
426
+ ```
427
+
428
+ **What It Does**: Deploy brainstorm analyzers in parallel -> Each finds different feature opportunities -> Consensus coordinator deduplicates, filters by app type, prioritizes -> Actionable Feature Brainstorm Report
429
+
430
+ **Key Difference from /ideate:new**: Ideation finds technical improvements to existing code. Brainstorm audit finds **new product features** the app should have.
431
+
432
+ **Analyzers (Core 3 - quick mode)**:
433
+ - `brainstorm-analyzer-features` - Missing CRUD, half-built features, incomplete workflows
434
+ - `brainstorm-analyzer-ux` - Missing feedback states, accessibility, navigation, responsive design
435
+ - `brainstorm-analyzer-market` - Table-stakes features for the app's category, competitive gaps
436
+
437
+ **Analyzers (Deep mode adds 2 more)**:
438
+ - `brainstorm-analyzer-growth` - Onboarding, notifications, sharing, retention hooks
439
+ - `brainstorm-analyzer-integration` - Auth providers, third-party services, data portability, API extensibility
440
+
441
+ **Value Scale**:
442
+ - HIGH_VALUE: Users actively need this or will leave
443
+ - MEDIUM_VALUE: Significantly improves the experience
444
+ - NICE_TO_HAVE: Polish that delights users
445
+ - SPECULATIVE: Might be useful, needs validation
446
+
447
+ **Confidence Levels**:
448
+ - CONFIRMED: 2+ analyzers agree -> High priority
449
+ - LIKELY: 1 analyzer with evidence -> Medium priority
450
+ - SPECULATIVE: 1 analyzer, weak evidence -> Low priority
451
+
452
+ **Output**: `docs/08-project/brainstorm-audits/brainstorm-audit-{YYYYMMDD}.md`
453
+ <!-- COMPACT_SUMMARY_END -->
454
+
455
+ ---
456
+
457
+ ## Boundary Rules (No Overlap)
458
+
459
+ - **vs code:security**: No vulnerabilities, auth bypass, injection — those are security domain
460
+ - **vs code:logic**: No race conditions, type bugs, edge cases — those are logic domain
461
+ - **vs code:performance**: No slow queries, memory leaks, bundle size — those are performance domain
462
+ - **vs code:test**: No missing tests, weak assertions — those are test domain
463
+ - **vs code:completeness**: No dead code, empty handlers, stub code — those are completeness domain
464
+ - **vs ideate:new**: No code refactoring, pattern improvements — those are technical ideation
465
+ - **This audit asks**: What features should the app have? What would make users happier?
466
+
467
+ ---
468
+
469
+ ## Integration with Babysit
470
+
471
+ When `/agileflow:babysit` is active, suggest brainstorm audit for greenfield projects or when user says "what should I build next":
472
+
473
+ ```
474
+ 📍 No active story. Would you like to brainstorm features?
475
+
476
+ 🔍 Running quick brainstorm audit...
477
+
478
+ 💡 3 quick win feature ideas found:
479
+ 1. Add search to project list (HIGH_VALUE, SMALL effort)
480
+ 2. Add loading states to API calls (HIGH_VALUE, SMALL effort)
481
+ 3. Add CSV export for reports (MEDIUM_VALUE, SMALL effort)
482
+
483
+ Create stories for these? [Y/n]
484
+ ```
485
+
486
+ ---
487
+
488
+ ## Related Commands
489
+
490
+ - `/agileflow:ideate:new` - Technical improvement ideation (code quality, not features)
491
+ - `/agileflow:code:completeness` - Find broken/incomplete existing features
492
+ - `/agileflow:code:security` - Security vulnerability analysis
493
+ - `/agileflow:code:performance` - Performance bottleneck analysis
494
+ - `/agileflow:ideate:discover` - Full discovery workflow for a specific idea
495
+ - `/agileflow:story` - Create user stories from brainstorm findings
496
+ - `/agileflow:epic` - Create epic for grouped features