agileflow 3.4.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.
- package/CHANGELOG.md +5 -0
- package/README.md +4 -4
- package/package.json +1 -1
- package/scripts/agileflow-welcome.js +79 -0
- package/scripts/claude-tmux.sh +12 -36
- package/scripts/lib/ac-test-matcher.js +452 -0
- package/scripts/lib/audit-registry.js +58 -2
- package/scripts/lib/configure-features.js +35 -0
- package/scripts/lib/model-profiles.js +25 -5
- package/scripts/lib/quality-gates.js +163 -0
- package/scripts/lib/signal-detectors.js +43 -0
- package/scripts/lib/status-writer.js +255 -0
- package/scripts/lib/story-claiming.js +128 -45
- package/scripts/lib/task-sync.js +32 -38
- package/scripts/lib/tmux-audit-monitor.js +611 -0
- package/scripts/lib/tool-registry.yaml +241 -0
- package/scripts/lib/tool-shed.js +441 -0
- package/scripts/native-team-observer.js +219 -0
- package/scripts/obtain-context.js +14 -0
- package/scripts/ralph-loop.js +30 -5
- package/scripts/smart-detect.js +21 -0
- package/scripts/spawn-audit-sessions.js +372 -44
- package/scripts/team-manager.js +19 -0
- package/src/core/agents/a11y-analyzer-aria.md +155 -0
- package/src/core/agents/a11y-analyzer-forms.md +162 -0
- package/src/core/agents/a11y-analyzer-keyboard.md +175 -0
- package/src/core/agents/a11y-analyzer-semantic.md +153 -0
- package/src/core/agents/a11y-analyzer-visual.md +158 -0
- package/src/core/agents/a11y-consensus.md +248 -0
- package/src/core/agents/ads-consensus.md +74 -0
- package/src/core/agents/ads-generate.md +145 -0
- package/src/core/agents/ads-performance-tracker.md +197 -0
- package/src/core/agents/api-quality-analyzer-conventions.md +148 -0
- package/src/core/agents/api-quality-analyzer-docs.md +176 -0
- package/src/core/agents/api-quality-analyzer-errors.md +183 -0
- package/src/core/agents/api-quality-analyzer-pagination.md +171 -0
- package/src/core/agents/api-quality-analyzer-versioning.md +143 -0
- package/src/core/agents/api-quality-consensus.md +214 -0
- package/src/core/agents/arch-analyzer-circular.md +148 -0
- package/src/core/agents/arch-analyzer-complexity.md +171 -0
- package/src/core/agents/arch-analyzer-coupling.md +146 -0
- package/src/core/agents/arch-analyzer-layering.md +151 -0
- package/src/core/agents/arch-analyzer-patterns.md +162 -0
- package/src/core/agents/arch-consensus.md +227 -0
- package/src/core/commands/adr.md +1 -0
- package/src/core/commands/ads/generate.md +238 -0
- package/src/core/commands/ads/health.md +327 -0
- package/src/core/commands/ads/test-plan.md +317 -0
- package/src/core/commands/ads/track.md +288 -0
- package/src/core/commands/ads.md +28 -16
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/audit.md +43 -6
- package/src/core/commands/babysit.md +90 -6
- package/src/core/commands/baseline.md +1 -0
- package/src/core/commands/blockers.md +1 -0
- package/src/core/commands/board.md +1 -0
- package/src/core/commands/changelog.md +1 -0
- package/src/core/commands/choose.md +1 -0
- package/src/core/commands/ci.md +1 -0
- package/src/core/commands/code/accessibility.md +347 -0
- package/src/core/commands/code/api.md +297 -0
- package/src/core/commands/code/architecture.md +297 -0
- package/src/core/commands/code/completeness.md +43 -6
- package/src/core/commands/code/legal.md +43 -6
- package/src/core/commands/code/logic.md +43 -6
- package/src/core/commands/code/performance.md +43 -6
- package/src/core/commands/code/security.md +43 -6
- package/src/core/commands/code/test.md +43 -6
- package/src/core/commands/configure.md +1 -0
- package/src/core/commands/council.md +1 -0
- package/src/core/commands/deploy.md +1 -0
- package/src/core/commands/diagnose.md +1 -0
- package/src/core/commands/docs.md +1 -0
- package/src/core/commands/epic/edit.md +213 -0
- package/src/core/commands/epic.md +1 -0
- package/src/core/commands/export.md +238 -0
- package/src/core/commands/help.md +16 -1
- package/src/core/commands/ideate/discover.md +7 -3
- package/src/core/commands/ideate/features.md +65 -4
- package/src/core/commands/ideate/new.md +158 -124
- package/src/core/commands/impact.md +1 -0
- package/src/core/commands/learn/explain.md +118 -0
- package/src/core/commands/learn/glossary.md +135 -0
- package/src/core/commands/learn/patterns.md +138 -0
- package/src/core/commands/learn/tour.md +126 -0
- package/src/core/commands/migrate/codemods.md +151 -0
- package/src/core/commands/migrate/plan.md +131 -0
- package/src/core/commands/migrate/scan.md +114 -0
- package/src/core/commands/migrate/validate.md +119 -0
- package/src/core/commands/multi-expert.md +1 -0
- package/src/core/commands/pr.md +1 -0
- package/src/core/commands/review.md +1 -0
- package/src/core/commands/sprint.md +1 -0
- package/src/core/commands/status/undo.md +191 -0
- package/src/core/commands/status.md +1 -0
- package/src/core/commands/story/edit.md +204 -0
- package/src/core/commands/story/view.md +29 -7
- package/src/core/commands/story-validate.md +1 -0
- package/src/core/commands/story.md +1 -0
- package/src/core/commands/tdd.md +1 -0
- package/src/core/commands/team/start.md +10 -6
- package/src/core/commands/tests.md +1 -0
- package/src/core/commands/verify.md +27 -1
- package/src/core/commands/workflow.md +2 -0
- package/src/core/teams/backend.json +41 -0
- package/src/core/teams/frontend.json +41 -0
- package/src/core/teams/qa.json +41 -0
- package/src/core/teams/solo.json +35 -0
- package/src/core/templates/agileflow-metadata.json +5 -0
- package/tools/cli/commands/setup.js +85 -3
- package/tools/cli/commands/update.js +42 -0
- package/tools/cli/installers/ide/claude-code.js +68 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
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] [FOCUS=features|ux|market|growth|integration|all]"
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=features|ux|market|growth|integration|all] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
@@ -9,12 +9,13 @@ compact_context:
|
|
|
9
9
|
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Value scale: HIGH_VALUE > MEDIUM_VALUE > NICE_TO_HAVE > SPECULATIVE"
|
|
11
11
|
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), SPECULATIVE (1 weak)"
|
|
12
|
-
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (features|ux|market|growth|integration|all)"
|
|
12
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (features|ux|market|growth|integration|all), MODEL (haiku/sonnet/opus)"
|
|
13
13
|
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
14
14
|
state_fields:
|
|
15
15
|
- target_path
|
|
16
16
|
- depth
|
|
17
17
|
- focus_areas
|
|
18
|
+
- model
|
|
18
19
|
- analyzers_deployed
|
|
19
20
|
- findings_collected
|
|
20
21
|
---
|
|
@@ -35,6 +36,9 @@ Deploy multiple specialized brainstorm analyzers in parallel to find missing fea
|
|
|
35
36
|
/agileflow:ideate:features src/ FOCUS=features,ux # Focus on feature gaps and UX
|
|
36
37
|
/agileflow:ideate:features . DEPTH=deep FOCUS=all # Comprehensive brainstorm
|
|
37
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
|
|
38
42
|
```
|
|
39
43
|
|
|
40
44
|
---
|
|
@@ -76,8 +80,9 @@ Deploy multiple specialized brainstorm analyzers in parallel to find missing fea
|
|
|
76
80
|
| Argument | Values | Default | Description |
|
|
77
81
|
|----------|--------|---------|-------------|
|
|
78
82
|
| TARGET | file/directory | `.` | What to analyze |
|
|
79
|
-
| DEPTH | quick, deep | quick | quick = core 3
|
|
83
|
+
| DEPTH | quick, deep, ultradeep | quick | quick = core 3, deep = all 5, ultradeep = separate tmux sessions |
|
|
80
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. |
|
|
81
86
|
|
|
82
87
|
---
|
|
83
88
|
|
|
@@ -118,10 +123,65 @@ FOCUS = all (default) or comma-separated list
|
|
|
118
123
|
**DEPTH behavior**:
|
|
119
124
|
- `quick` (default): Deploy core 3 analyzers (features, ux, market). Focus on HIGH_VALUE and MEDIUM_VALUE ideas only.
|
|
120
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.
|
|
121
179
|
|
|
122
180
|
### STEP 2: Deploy Analyzers in Parallel
|
|
123
181
|
|
|
124
|
-
**
|
|
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.
|
|
125
185
|
|
|
126
186
|
**Prompt template for each analyzer**:
|
|
127
187
|
|
|
@@ -362,6 +422,7 @@ Running consensus...
|
|
|
362
422
|
/agileflow:ideate:features app/ # Quick scan (core 3 analyzers)
|
|
363
423
|
/agileflow:ideate:features . DEPTH=deep # All 5 analyzers
|
|
364
424
|
/agileflow:ideate:features src/ FOCUS=features,ux # Specific areas
|
|
425
|
+
/agileflow:ideate:features . DEPTH=ultradeep MODEL=opus # Ultradeep with Opus in tmux
|
|
365
426
|
```
|
|
366
427
|
|
|
367
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Generate categorized improvement ideas using multi-expert analysis
|
|
3
|
-
argument-hint: "[SCOPE=all|security|perf|code|ux] [DEPTH=quick|deep|ultradeep] [OUTPUT=report|stories|both] [HISTORY=true|false] [FOCUS=IDEA-XXXX]"
|
|
3
|
+
argument-hint: "[SCOPE=all|security|perf|code|ux] [DEPTH=quick|deep|ultradeep|extreme] [OUTPUT=report|stories|both] [HISTORY=true|false] [FOCUS=IDEA-XXXX] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
@@ -9,7 +9,7 @@ compact_context:
|
|
|
9
9
|
- "CRITICAL: Wait for all results before synthesis (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Confidence scoring varies by depth: quick/deep (HIGH=2+ agree) | ultradeep (HIGH=3+ agree)"
|
|
11
11
|
- "CRITICAL: Check ideation index for duplicates - show NEW vs RECURRING vs IMPLEMENTED"
|
|
12
|
-
- "MUST parse arguments: SCOPE (all/security/perf/code/ux) | DEPTH (quick/deep/ultradeep) | OUTPUT (report/stories/both) | HISTORY (true/false) | FOCUS (IDEA-XXXX)"
|
|
12
|
+
- "MUST parse arguments: SCOPE (all/security/perf/code/ux) | DEPTH (quick/deep/ultradeep) | OUTPUT (report/stories/both) | HISTORY (true/false) | FOCUS (IDEA-XXXX) | MODEL (haiku/sonnet/opus)"
|
|
13
13
|
- "FOCUS mode: All experts analyze the same recurring idea - generate Implementation Brief"
|
|
14
14
|
- "MUST categorize by domain: Security, Performance, Code Quality, UX, Testing, API/Architecture"
|
|
15
15
|
- "MUST estimate effort for each idea: High/Medium/Low impact"
|
|
@@ -21,6 +21,7 @@ compact_context:
|
|
|
21
21
|
- output_mode
|
|
22
22
|
- history_enabled
|
|
23
23
|
- focus_idea
|
|
24
|
+
- model
|
|
24
25
|
- selected_experts
|
|
25
26
|
- ideas_generated
|
|
26
27
|
- new_ideas
|
|
@@ -194,27 +195,36 @@ Be SPECIFIC - reference actual file paths, function names, and code patterns.
|
|
|
194
195
|
```
|
|
195
196
|
/agileflow:ideate:new SCOPE=all DEPTH=quick OUTPUT=report
|
|
196
197
|
/agileflow:ideate:new FOCUS=IDEA-0023 # Deep dive into specific idea
|
|
198
|
+
/agileflow:ideate:new DEPTH=ultradeep MODEL=opus # Ultradeep with Opus in tmux sessions
|
|
197
199
|
```
|
|
198
200
|
|
|
199
201
|
**What It Does**: Deploy 4-15 domain experts → Each generates 3-5 ideas → Synthesize with confidence scoring → Categorized report
|
|
200
202
|
|
|
201
203
|
**Arguments**:
|
|
202
204
|
- `SCOPE=all|security|perf|code|ux` (default: all)
|
|
203
|
-
- `DEPTH=quick|deep|ultradeep` (default: quick) — ultradeep
|
|
205
|
+
- `DEPTH=quick|deep|ultradeep` (default: quick) — ultradeep spawns 13 experts as tmux sessions
|
|
204
206
|
- `OUTPUT=report|stories|both` (default: report)
|
|
207
|
+
- `MODEL=haiku|sonnet|opus` (default: haiku) — model for expert subagents
|
|
205
208
|
|
|
206
209
|
### Tool Usage Examples
|
|
207
210
|
|
|
208
|
-
**Task** (deploy expert in parallel):
|
|
211
|
+
**Task** (deploy expert in parallel - include `model` if MODEL specified):
|
|
209
212
|
```xml
|
|
210
213
|
<invoke name="Task">
|
|
211
214
|
<parameter name="description">Security ideation analysis</parameter>
|
|
212
215
|
<parameter name="prompt">Generate 3-5 specific improvement ideas for this codebase from a SECURITY perspective...</parameter>
|
|
213
216
|
<parameter name="subagent_type">agileflow-security</parameter>
|
|
217
|
+
<parameter name="model">opus</parameter>
|
|
214
218
|
<parameter name="run_in_background">true</parameter>
|
|
215
219
|
</invoke>
|
|
216
220
|
```
|
|
217
221
|
|
|
222
|
+
**Ultradeep** (spawn tmux sessions):
|
|
223
|
+
```bash
|
|
224
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus --dry-run
|
|
225
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus
|
|
226
|
+
```
|
|
227
|
+
|
|
218
228
|
**TaskOutput** (collect results):
|
|
219
229
|
```xml
|
|
220
230
|
<invoke name="TaskOutput">
|
|
@@ -255,40 +265,46 @@ Be SPECIFIC - reference actual file paths, function names, and code patterns.
|
|
|
255
265
|
▼
|
|
256
266
|
┌─────────────────────────────────────────────────────────────┐
|
|
257
267
|
│ IDEATION ORCHESTRATOR │
|
|
258
|
-
│ 1. Parse SCOPE
|
|
259
|
-
│
|
|
268
|
+
│ 1. Parse SCOPE, DEPTH, MODEL │
|
|
269
|
+
│ 2a. quick/deep: Deploy 4-13 experts via Task (in-process) │
|
|
270
|
+
│ 2b. ultradeep: Spawn 13 tmux sessions via spawn-audit │
|
|
260
271
|
│ 3. Each expert generates 3-5 improvement ideas │
|
|
261
272
|
│ 4. Collect and synthesize with confidence scoring │
|
|
262
273
|
│ 5. Generate categorized report │
|
|
263
274
|
└─────────────────────────────────────────────────────────────┘
|
|
264
275
|
│
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
+
┌─────────────┴─────────────┐
|
|
277
|
+
▼ ▼
|
|
278
|
+
[quick/deep] [ultradeep]
|
|
279
|
+
Task calls (in-proc) tmux sessions (isolated)
|
|
280
|
+
┌───────┼───────┐ ┌───────┼───────┐
|
|
281
|
+
▼ ▼ ▼ ▼ ▼ ▼
|
|
282
|
+
┌───────────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
|
|
283
|
+
│ Security │ │Perf │ │ ... │ │ Sec │ │Perf │ │ ... │ x13
|
|
284
|
+
│ MODEL=X │ │ │ │ │ │ │ │ │ │ │
|
|
285
|
+
│ 3-5 ideas │ │ │ │ │ │ │ │ │ │ │
|
|
286
|
+
└───────────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘
|
|
287
|
+
│ │ │ │ │ │
|
|
288
|
+
└─────────┴───────┘ └───────┴───────┘
|
|
289
|
+
│ │
|
|
290
|
+
└────────────┬───────────┘
|
|
291
|
+
▼
|
|
276
292
|
┌─────────────────────────────────────────────────────────────┐
|
|
277
293
|
│ SYNTHESIS ENGINE │
|
|
278
|
-
│
|
|
279
|
-
│
|
|
280
|
-
│
|
|
281
|
-
│
|
|
282
|
-
│
|
|
294
|
+
│ - Find overlapping ideas (HIGH CONFIDENCE) │
|
|
295
|
+
│ - Flag unique insights with evidence (MEDIUM) │
|
|
296
|
+
│ - Discard vague suggestions (excluded) │
|
|
297
|
+
│ - Categorize by domain │
|
|
298
|
+
│ - Estimate effort for each idea │
|
|
283
299
|
└─────────────────────────────────────────────────────────────┘
|
|
284
|
-
|
|
285
|
-
|
|
300
|
+
│
|
|
301
|
+
▼
|
|
286
302
|
┌─────────────────────────────────────────────────────────────┐
|
|
287
303
|
│ IDEATION REPORT │
|
|
288
|
-
│
|
|
289
|
-
│
|
|
290
|
-
│
|
|
291
|
-
│
|
|
304
|
+
│ Total Ideas: X (High: Y, Medium: Z) │
|
|
305
|
+
│ High-Confidence Improvements (agreed by 2+/3+ experts) │
|
|
306
|
+
│ Medium-Confidence Opportunities (single expert) │
|
|
307
|
+
│ Suggested Stories (if OUTPUT=stories) │
|
|
292
308
|
└─────────────────────────────────────────────────────────────┘
|
|
293
309
|
```
|
|
294
310
|
|
|
@@ -316,19 +332,92 @@ Parse the input arguments:
|
|
|
316
332
|
**DEPTH**:
|
|
317
333
|
- `quick` (default): Each expert generates 3 ideas, focuses on high-impact only
|
|
318
334
|
- `deep`: Each expert generates 5 ideas, includes lower-priority items
|
|
319
|
-
- `ultradeep`:
|
|
335
|
+
- `ultradeep`: Spawn each expert as a separate Claude Code session in tmux. Uses 13 experts (SCOPE=all) with 5 ideas each (~65 ideas). Requires tmux. Falls back to `deep` if tmux unavailable.
|
|
336
|
+
|
|
337
|
+
> **Note**: `DEPTH=ultradeep` is recommended for comprehensive audits, pre-release reviews, or quarterly codebase assessments. Each expert gets its own Claude session with full context, producing higher-quality analysis than in-process subagents.
|
|
338
|
+
|
|
339
|
+
**MODEL** (default: haiku):
|
|
340
|
+
- `haiku`: Fast and cost-effective. Good for quick/deep ideation.
|
|
341
|
+
- `sonnet`: Balanced quality and speed. Good default for deep analysis.
|
|
342
|
+
- `opus`: Maximum quality. Recommended for ultradeep or high-stakes ideation.
|
|
320
343
|
|
|
321
|
-
>
|
|
344
|
+
> The MODEL parameter is passed to each expert subagent. For quick/deep depths, it sets the `model` parameter on Task calls. For ultradeep, it's passed to `spawn-audit-sessions.js` which sets `--model` on each tmux Claude session.
|
|
322
345
|
|
|
323
346
|
**OUTPUT**:
|
|
324
347
|
- `report` (default): Generate ideation report only
|
|
325
348
|
- `stories`: Generate stories for high-confidence items
|
|
326
349
|
- `both`: Report + stories
|
|
327
350
|
|
|
351
|
+
### STEP 1.5: ULTRADEEP MODE (DEPTH=ultradeep)
|
|
352
|
+
|
|
353
|
+
**If `DEPTH=ultradeep`**, use tmux-based session spawning instead of in-process Task calls:
|
|
354
|
+
|
|
355
|
+
1. Show cost estimate:
|
|
356
|
+
```bash
|
|
357
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=FOCUS_KEYS --model=MODEL --dry-run
|
|
358
|
+
```
|
|
359
|
+
2. Confirm with user before launching
|
|
360
|
+
3. Spawn sessions (use `--json` to capture trace ID):
|
|
361
|
+
```bash
|
|
362
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=FOCUS_KEYS --model=MODEL --json
|
|
363
|
+
```
|
|
364
|
+
Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
|
|
365
|
+
4. Wait for all analyzers to complete:
|
|
366
|
+
```bash
|
|
367
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
368
|
+
```
|
|
369
|
+
- Exit 0 = all complete (JSON results on stdout)
|
|
370
|
+
- Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
|
|
371
|
+
- To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
|
|
372
|
+
- To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
|
|
373
|
+
5. Parse `results` array from the JSON output and proceed to STEP 4 (Synthesis).
|
|
374
|
+
6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
|
|
375
|
+
|
|
376
|
+
**EXTREME mode** (DEPTH=extreme):
|
|
377
|
+
Partition-based multi-agent audit. Instead of 1 expert per tmux window, the codebase is split into partitions and each partition runs ALL experts.
|
|
378
|
+
1. Scan the target directory to understand the codebase structure:
|
|
379
|
+
- Use Glob to find top-level source directories
|
|
380
|
+
- Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
|
|
381
|
+
- If user provided PARTITIONS=N (a number), split into exactly N partitions
|
|
382
|
+
- If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
|
|
383
|
+
2. Show the partition plan and agent count to the user, confirm before launching:
|
|
384
|
+
Example: "5 partitions x 13 experts = 65 agents. Estimated cost: $X. Proceed?"
|
|
385
|
+
3. Spawn sessions with partitions:
|
|
386
|
+
```bash
|
|
387
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --focus=FOCUS_KEYS --model=MODEL --json
|
|
388
|
+
```
|
|
389
|
+
4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
|
|
390
|
+
5. Run synthesis on combined results from all partitions (proceed to STEP 4)
|
|
391
|
+
|
|
392
|
+
**PARTITIONS argument** (only used with DEPTH=extreme):
|
|
393
|
+
| Value | Behavior |
|
|
394
|
+
|-------|----------|
|
|
395
|
+
| Not set | AI decides partitions (3-7 based on codebase size) |
|
|
396
|
+
| `PARTITIONS=5` | AI creates exactly 5 partitions |
|
|
397
|
+
| `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
|
|
398
|
+
|
|
399
|
+
**FOCUS_KEYS mapping from SCOPE**:
|
|
400
|
+
|
|
401
|
+
| SCOPE | FOCUS_KEYS for spawn-audit-sessions.js |
|
|
402
|
+
|-------|---------------------------------------|
|
|
403
|
+
| `all` | `all` (uses all 13 experts) |
|
|
404
|
+
| `security` | `security,api,testing,compliance,monitoring` |
|
|
405
|
+
| `perf` | `performance,database,api,monitoring,analytics` |
|
|
406
|
+
| `code` | `refactor,testing,api,documentation,qa` |
|
|
407
|
+
| `ux` | `ui,accessibility,api,analytics` |
|
|
408
|
+
|
|
409
|
+
> **Skip to STEP 4** after ultradeep collection. Steps 2-3 are only for quick/deep modes.
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
328
413
|
### STEP 2: DEPLOY EXPERTS IN PARALLEL
|
|
329
414
|
|
|
415
|
+
**For quick/deep modes only** (ultradeep uses tmux sessions above).
|
|
416
|
+
|
|
330
417
|
**CRITICAL**: Deploy ALL experts in a SINGLE message with multiple Task tool calls.
|
|
331
418
|
|
|
419
|
+
**If MODEL is specified**, pass it to each Task call via the `model` parameter.
|
|
420
|
+
|
|
332
421
|
Use this prompt template for each expert:
|
|
333
422
|
|
|
334
423
|
```
|
|
@@ -364,13 +453,14 @@ FORMAT each idea as:
|
|
|
364
453
|
---
|
|
365
454
|
```
|
|
366
455
|
|
|
367
|
-
**Example deployment for SCOPE=all
|
|
456
|
+
**Example deployment for SCOPE=all** (add `<parameter name="model">{MODEL}</parameter>` if MODEL is specified):
|
|
368
457
|
|
|
369
458
|
```xml
|
|
370
459
|
<invoke name="Task">
|
|
371
460
|
<parameter name="description">Security ideation</parameter>
|
|
372
461
|
<parameter name="prompt">[prompt with domain=security]</parameter>
|
|
373
462
|
<parameter name="subagent_type">agileflow-security</parameter>
|
|
463
|
+
<parameter name="model">{MODEL}</parameter>
|
|
374
464
|
<parameter name="run_in_background">true</parameter>
|
|
375
465
|
</invoke>
|
|
376
466
|
|
|
@@ -378,6 +468,7 @@ FORMAT each idea as:
|
|
|
378
468
|
<parameter name="description">Performance ideation</parameter>
|
|
379
469
|
<parameter name="prompt">[prompt with domain=performance]</parameter>
|
|
380
470
|
<parameter name="subagent_type">agileflow-performance</parameter>
|
|
471
|
+
<parameter name="model">{MODEL}</parameter>
|
|
381
472
|
<parameter name="run_in_background">true</parameter>
|
|
382
473
|
</invoke>
|
|
383
474
|
|
|
@@ -385,6 +476,7 @@ FORMAT each idea as:
|
|
|
385
476
|
<parameter name="description">Code quality ideation</parameter>
|
|
386
477
|
<parameter name="prompt">[prompt with domain=refactor/code quality]</parameter>
|
|
387
478
|
<parameter name="subagent_type">agileflow-refactor</parameter>
|
|
479
|
+
<parameter name="model">{MODEL}</parameter>
|
|
388
480
|
<parameter name="run_in_background">true</parameter>
|
|
389
481
|
</invoke>
|
|
390
482
|
|
|
@@ -392,6 +484,7 @@ FORMAT each idea as:
|
|
|
392
484
|
<parameter name="description">UX ideation</parameter>
|
|
393
485
|
<parameter name="prompt">[prompt with domain=ui/ux]</parameter>
|
|
394
486
|
<parameter name="subagent_type">agileflow-ui</parameter>
|
|
487
|
+
<parameter name="model">{MODEL}</parameter>
|
|
395
488
|
<parameter name="run_in_background">true</parameter>
|
|
396
489
|
</invoke>
|
|
397
490
|
|
|
@@ -399,6 +492,7 @@ FORMAT each idea as:
|
|
|
399
492
|
<parameter name="description">Testing ideation</parameter>
|
|
400
493
|
<parameter name="prompt">[prompt with domain=testing]</parameter>
|
|
401
494
|
<parameter name="subagent_type">agileflow-testing</parameter>
|
|
495
|
+
<parameter name="model">{MODEL}</parameter>
|
|
402
496
|
<parameter name="run_in_background">true</parameter>
|
|
403
497
|
</invoke>
|
|
404
498
|
|
|
@@ -406,107 +500,42 @@ FORMAT each idea as:
|
|
|
406
500
|
<parameter name="description">API/Architecture ideation</parameter>
|
|
407
501
|
<parameter name="prompt">[prompt with domain=api/architecture]</parameter>
|
|
408
502
|
<parameter name="subagent_type">agileflow-api</parameter>
|
|
503
|
+
<parameter name="model">{MODEL}</parameter>
|
|
409
504
|
<parameter name="run_in_background">true</parameter>
|
|
410
505
|
</invoke>
|
|
411
506
|
```
|
|
412
507
|
|
|
413
|
-
**
|
|
414
|
-
|
|
415
|
-
```xml
|
|
416
|
-
<!-- Deploy ALL 13 experts in a SINGLE message -->
|
|
417
|
-
<invoke name="Task">
|
|
418
|
-
<parameter name="description">Security ideation</parameter>
|
|
419
|
-
<parameter name="prompt">[prompt with domain=security]</parameter>
|
|
420
|
-
<parameter name="subagent_type">agileflow-security</parameter>
|
|
421
|
-
<parameter name="run_in_background">true</parameter>
|
|
422
|
-
</invoke>
|
|
423
|
-
|
|
424
|
-
<invoke name="Task">
|
|
425
|
-
<parameter name="description">Performance ideation</parameter>
|
|
426
|
-
<parameter name="prompt">[prompt with domain=performance]</parameter>
|
|
427
|
-
<parameter name="subagent_type">agileflow-performance</parameter>
|
|
428
|
-
<parameter name="run_in_background">true</parameter>
|
|
429
|
-
</invoke>
|
|
430
|
-
|
|
431
|
-
<invoke name="Task">
|
|
432
|
-
<parameter name="description">Code quality ideation</parameter>
|
|
433
|
-
<parameter name="prompt">[prompt with domain=refactor]</parameter>
|
|
434
|
-
<parameter name="subagent_type">agileflow-refactor</parameter>
|
|
435
|
-
<parameter name="run_in_background">true</parameter>
|
|
436
|
-
</invoke>
|
|
437
|
-
|
|
438
|
-
<invoke name="Task">
|
|
439
|
-
<parameter name="description">UX ideation</parameter>
|
|
440
|
-
<parameter name="prompt">[prompt with domain=ui]</parameter>
|
|
441
|
-
<parameter name="subagent_type">agileflow-ui</parameter>
|
|
442
|
-
<parameter name="run_in_background">true</parameter>
|
|
443
|
-
</invoke>
|
|
444
|
-
|
|
445
|
-
<invoke name="Task">
|
|
446
|
-
<parameter name="description">Testing ideation</parameter>
|
|
447
|
-
<parameter name="prompt">[prompt with domain=testing]</parameter>
|
|
448
|
-
<parameter name="subagent_type">agileflow-testing</parameter>
|
|
449
|
-
<parameter name="run_in_background">true</parameter>
|
|
450
|
-
</invoke>
|
|
451
|
-
|
|
452
|
-
<invoke name="Task">
|
|
453
|
-
<parameter name="description">API/Architecture ideation</parameter>
|
|
454
|
-
<parameter name="prompt">[prompt with domain=api]</parameter>
|
|
455
|
-
<parameter name="subagent_type">agileflow-api</parameter>
|
|
456
|
-
<parameter name="run_in_background">true</parameter>
|
|
457
|
-
</invoke>
|
|
508
|
+
> **Note**: Only include the `<parameter name="model">` line if MODEL was explicitly specified. If not specified, omit it to use the default model.
|
|
458
509
|
|
|
459
|
-
|
|
460
|
-
<invoke name="Task">
|
|
461
|
-
<parameter name="description">Accessibility ideation</parameter>
|
|
462
|
-
<parameter name="prompt">[prompt with domain=accessibility]</parameter>
|
|
463
|
-
<parameter name="subagent_type">agileflow-accessibility</parameter>
|
|
464
|
-
<parameter name="run_in_background">true</parameter>
|
|
465
|
-
</invoke>
|
|
510
|
+
**Example deployment for SCOPE=all DEPTH=ultradeep** (13 experts via tmux):
|
|
466
511
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
<parameter name="subagent_type">agileflow-compliance</parameter>
|
|
471
|
-
<parameter name="run_in_background">true</parameter>
|
|
472
|
-
</invoke>
|
|
512
|
+
```bash
|
|
513
|
+
# 1. Dry run to show cost estimate
|
|
514
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus --dry-run
|
|
473
515
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
<parameter name="subagent_type">agileflow-database</parameter>
|
|
478
|
-
<parameter name="run_in_background">true</parameter>
|
|
479
|
-
</invoke>
|
|
516
|
+
# 2. After user confirms, spawn sessions
|
|
517
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus
|
|
518
|
+
```
|
|
480
519
|
|
|
481
|
-
|
|
482
|
-
<parameter name="description">Monitoring ideation</parameter>
|
|
483
|
-
<parameter name="prompt">[prompt with domain=monitoring]</parameter>
|
|
484
|
-
<parameter name="subagent_type">agileflow-monitoring</parameter>
|
|
485
|
-
<parameter name="run_in_background">true</parameter>
|
|
486
|
-
</invoke>
|
|
520
|
+
Each expert gets its own Claude Code tmux session with full context window. Use the monitor script to track progress:
|
|
487
521
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
522
|
+
```bash
|
|
523
|
+
# Check completion status
|
|
524
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID
|
|
525
|
+
# Wait for all to complete (blocks until done or timeout)
|
|
526
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
527
|
+
# Collect whatever results are ready
|
|
528
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js collect TRACE_ID
|
|
529
|
+
```
|
|
494
530
|
|
|
495
|
-
|
|
496
|
-
<parameter name="description">Analytics ideation</parameter>
|
|
497
|
-
<parameter name="prompt">[prompt with domain=analytics]</parameter>
|
|
498
|
-
<parameter name="subagent_type">agileflow-analytics</parameter>
|
|
499
|
-
<parameter name="run_in_background">true</parameter>
|
|
500
|
-
</invoke>
|
|
531
|
+
**For SCOPE-filtered ultradeep** (e.g., SCOPE=security):
|
|
501
532
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
<parameter name="prompt">[prompt with domain=documentation]</parameter>
|
|
505
|
-
<parameter name="subagent_type">agileflow-documentation</parameter>
|
|
506
|
-
<parameter name="run_in_background">true</parameter>
|
|
507
|
-
</invoke>
|
|
533
|
+
```bash
|
|
534
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=security,api,testing,compliance,monitoring --model=sonnet
|
|
508
535
|
```
|
|
509
536
|
|
|
537
|
+
> **Fallback**: If tmux is unavailable, fall back to DEPTH=deep with in-process Task calls (6 experts). Warn the user: "tmux not available, falling back to DEPTH=deep with 6 in-process experts"
|
|
538
|
+
|
|
510
539
|
### STEP 3: COLLECT RESULTS
|
|
511
540
|
|
|
512
541
|
Wait for all experts to complete:
|
|
@@ -745,13 +774,17 @@ After generating output, present options:
|
|
|
745
774
|
|
|
746
775
|
### Example: Ultradeep Execution
|
|
747
776
|
|
|
748
|
-
**User**: `/agileflow:ideate:new SCOPE=all DEPTH=ultradeep OUTPUT=both`
|
|
777
|
+
**User**: `/agileflow:ideate:new SCOPE=all DEPTH=ultradeep MODEL=opus OUTPUT=both`
|
|
749
778
|
|
|
750
|
-
**Step 1**: Parse → SCOPE=all (13 experts), DEPTH=ultradeep
|
|
779
|
+
**Step 1**: Parse → SCOPE=all (13 experts), DEPTH=ultradeep, MODEL=opus, OUTPUT=both
|
|
751
780
|
|
|
752
|
-
**Step
|
|
781
|
+
**Step 1.5**: Ultradeep mode detected:
|
|
782
|
+
- Run dry-run: `node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus --dry-run`
|
|
783
|
+
- Show cost estimate to user, confirm before launching
|
|
784
|
+
- Spawn 13 tmux sessions: `node .agileflow/scripts/spawn-audit-sessions.js --audit=ideate --target=. --focus=all --model=opus`
|
|
785
|
+
- Monitor `docs/09-agents/ultradeep/{trace_id}/` for sentinel files
|
|
753
786
|
|
|
754
|
-
**Step 3**: Collect results (~65 raw ideas)
|
|
787
|
+
**Step 3**: Collect results from sentinel files (~65 raw ideas)
|
|
755
788
|
|
|
756
789
|
**Step 4**: Synthesize with ultradeep thresholds:
|
|
757
790
|
- 8 ideas mentioned by 3+ experts → HIGH confidence
|
|
@@ -771,11 +804,12 @@ After generating output, present options:
|
|
|
771
804
|
| Argument | Values | Default | Description |
|
|
772
805
|
|----------|--------|---------|-------------|
|
|
773
806
|
| SCOPE | all, security, perf, code, ux | all | Which domains to analyze |
|
|
774
|
-
| DEPTH | quick, deep, ultradeep | quick | quick (3 ideas, 6 experts), deep (5 ideas, 6 experts), ultradeep (5 ideas, 13 experts) |
|
|
807
|
+
| DEPTH | quick, deep, ultradeep | quick | quick (3 ideas, 6 experts), deep (5 ideas, 6 experts), ultradeep (5 ideas, 13 experts via tmux) |
|
|
775
808
|
| OUTPUT | report, stories, both | report | What to generate |
|
|
776
809
|
| HISTORY | true, false | true | Enable deduplication and history tracking. Set to false for faster runs without history analysis |
|
|
777
810
|
| SHOW_IMPLEMENTED | true, false | false | Include already-implemented ideas in report (useful for tracking) |
|
|
778
811
|
| FOCUS | IDEA-XXXX | - | Focus on a specific recurring idea (activates Implementation Brief mode) |
|
|
812
|
+
| MODEL | haiku, sonnet, opus | haiku | Model for expert subagents. Passed to Task calls (quick/deep) or tmux sessions (ultradeep). |
|
|
779
813
|
|
|
780
814
|
{{argument}}
|
|
781
815
|
|