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.
- package/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/skill-loader.js +0 -1
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +81 -0
- package/scripts/agileflow-welcome.js +79 -0
- package/scripts/claude-tmux.sh +90 -23
- package/scripts/claude-watchdog.sh +225 -0
- package/scripts/generators/agent-registry.js +14 -1
- package/scripts/generators/inject-babysit.js +22 -9
- package/scripts/generators/inject-help.js +19 -9
- package/scripts/lib/ac-test-matcher.js +452 -0
- package/scripts/lib/audit-cleanup.js +250 -0
- package/scripts/lib/audit-registry.js +304 -0
- package/scripts/lib/configure-features.js +35 -0
- package/scripts/lib/feature-catalog.js +3 -3
- package/scripts/lib/gate-enforcer.js +295 -0
- package/scripts/lib/model-profiles.js +118 -0
- package/scripts/lib/quality-gates.js +163 -0
- package/scripts/lib/signal-detectors.js +44 -1
- package/scripts/lib/skill-catalog.js +557 -0
- package/scripts/lib/skill-recommender.js +311 -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/tdd-phase-manager.js +455 -0
- package/scripts/lib/team-events.js +34 -3
- package/scripts/lib/tmux-audit-monitor.js +611 -0
- package/scripts/lib/tmux-group-colors.js +113 -0
- package/scripts/lib/tool-registry.yaml +241 -0
- package/scripts/lib/tool-shed.js +441 -0
- package/scripts/messaging-bridge.js +209 -1
- 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 +877 -0
- package/scripts/team-manager.js +56 -16
- package/scripts/tmux-close-windows.sh +180 -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-audit-budget.md +181 -0
- package/src/core/agents/ads-audit-compliance.md +169 -0
- package/src/core/agents/ads-audit-creative.md +164 -0
- package/src/core/agents/ads-audit-google.md +226 -0
- package/src/core/agents/ads-audit-meta.md +183 -0
- package/src/core/agents/ads-audit-tracking.md +197 -0
- package/src/core/agents/ads-consensus.md +396 -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/agents/brainstorm-analyzer-features.md +169 -0
- package/src/core/agents/brainstorm-analyzer-growth.md +161 -0
- package/src/core/agents/brainstorm-analyzer-integration.md +172 -0
- package/src/core/agents/brainstorm-analyzer-market.md +147 -0
- package/src/core/agents/brainstorm-analyzer-ux.md +167 -0
- package/src/core/agents/brainstorm-consensus.md +237 -0
- package/src/core/agents/completeness-consensus.md +5 -5
- package/src/core/agents/perf-consensus.md +2 -2
- package/src/core/agents/security-consensus.md +2 -2
- package/src/core/agents/seo-analyzer-content.md +167 -0
- package/src/core/agents/seo-analyzer-images.md +187 -0
- package/src/core/agents/seo-analyzer-performance.md +206 -0
- package/src/core/agents/seo-analyzer-schema.md +176 -0
- package/src/core/agents/seo-analyzer-sitemap.md +172 -0
- package/src/core/agents/seo-analyzer-technical.md +144 -0
- package/src/core/agents/seo-consensus.md +289 -0
- package/src/core/agents/test-consensus.md +2 -2
- package/src/core/commands/adr.md +1 -0
- package/src/core/commands/ads/audit.md +375 -0
- package/src/core/commands/ads/budget.md +97 -0
- package/src/core/commands/ads/competitor.md +112 -0
- package/src/core/commands/ads/creative.md +85 -0
- package/src/core/commands/ads/generate.md +238 -0
- package/src/core/commands/ads/google.md +112 -0
- package/src/core/commands/ads/health.md +327 -0
- package/src/core/commands/ads/landing.md +119 -0
- package/src/core/commands/ads/linkedin.md +112 -0
- package/src/core/commands/ads/meta.md +91 -0
- package/src/core/commands/ads/microsoft.md +115 -0
- package/src/core/commands/ads/plan.md +321 -0
- package/src/core/commands/ads/test-plan.md +317 -0
- package/src/core/commands/ads/tiktok.md +129 -0
- package/src/core/commands/ads/track.md +288 -0
- package/src/core/commands/ads/youtube.md +124 -0
- package/src/core/commands/ads.md +140 -0
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/audit.md +43 -6
- package/src/core/commands/babysit.md +315 -1266
- 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/{audit → code}/completeness.md +72 -25
- package/src/core/commands/{audit → code}/legal.md +63 -16
- package/src/core/commands/{audit → code}/logic.md +64 -16
- package/src/core/commands/{audit → code}/performance.md +67 -20
- package/src/core/commands/{audit → code}/security.md +69 -19
- package/src/core/commands/{audit → code}/test.md +67 -20
- 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/{discovery → ideate}/brief.md +12 -12
- package/src/core/commands/{discovery/new.md → ideate/discover.md} +20 -16
- package/src/core/commands/ideate/features.md +496 -0
- 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/seo/audit.md +373 -0
- package/src/core/commands/seo/competitor.md +174 -0
- package/src/core/commands/seo/content.md +107 -0
- package/src/core/commands/seo/geo.md +229 -0
- package/src/core/commands/seo/hreflang.md +140 -0
- package/src/core/commands/seo/images.md +96 -0
- package/src/core/commands/seo/page.md +198 -0
- package/src/core/commands/seo/plan.md +163 -0
- package/src/core/commands/seo/programmatic.md +131 -0
- package/src/core/commands/seo/references/cwv-thresholds.md +64 -0
- package/src/core/commands/seo/references/eeat-framework.md +110 -0
- package/src/core/commands/seo/references/quality-gates.md +91 -0
- package/src/core/commands/seo/references/schema-types.md +102 -0
- package/src/core/commands/seo/schema.md +183 -0
- package/src/core/commands/seo/sitemap.md +97 -0
- package/src/core/commands/seo/technical.md +100 -0
- package/src/core/commands/seo.md +107 -0
- package/src/core/commands/skill/list.md +68 -212
- package/src/core/commands/skill/recommend.md +216 -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-next.md +238 -0
- package/src/core/commands/tdd.md +211 -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/experts/_core-expertise.yaml +105 -0
- package/src/core/experts/analytics/expertise.yaml +5 -99
- package/src/core/experts/codebase-query/expertise.yaml +3 -72
- package/src/core/experts/compliance/expertise.yaml +6 -72
- package/src/core/experts/database/expertise.yaml +9 -52
- package/src/core/experts/documentation/expertise.yaml +7 -140
- package/src/core/experts/integrations/expertise.yaml +7 -127
- package/src/core/experts/mentor/expertise.yaml +8 -35
- package/src/core/experts/monitoring/expertise.yaml +7 -49
- package/src/core/experts/performance/expertise.yaml +1 -26
- package/src/core/experts/security/expertise.yaml +9 -34
- package/src/core/experts/ui/expertise.yaml +6 -36
- package/src/core/knowledge/ads/ad-audit-checklist-scoring.md +424 -0
- package/src/core/knowledge/ads/ad-optimization-logic.md +590 -0
- package/src/core/knowledge/ads/ad-technical-specifications.md +385 -0
- package/src/core/knowledge/ads/definitive-advertising-reference-2026.md +506 -0
- package/src/core/knowledge/ads/paid-advertising-research-2026.md +445 -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 +20 -1
- package/tools/cli/commands/setup.js +85 -3
- package/tools/cli/commands/update.js +42 -0
- package/tools/cli/installers/ide/_base-ide.js +42 -5
- package/tools/cli/installers/ide/claude-code.js +71 -3
- package/tools/cli/lib/content-injector.js +160 -12
- package/tools/cli/lib/docs-setup.js +1 -1
- package/src/core/commands/skill/create.md +0 -698
- package/src/core/commands/skill/delete.md +0 -316
- package/src/core/commands/skill/edit.md +0 -359
- package/src/core/commands/skill/test.md +0 -394
- package/src/core/commands/skill/upgrade.md +0 -552
- package/src/core/templates/skill-template.md +0 -117
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Multi-agent analysis for forgotten features, dead handlers, stub code, and incomplete implementations
|
|
3
|
-
argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=handlers|routes|api|stubs|state|imports|conditional|all]"
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=handlers|routes|api|stubs|state|imports|conditional|all] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
7
|
-
- "ACTIVE COMMAND: /agileflow:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:code:completeness - Multi-agent forgotten features analysis"
|
|
8
8
|
- "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
|
|
9
9
|
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Severity scale: BROKEN > INCOMPLETE > PLACEHOLDER > DORMANT"
|
|
11
11
|
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
|
|
12
|
-
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (handlers|routes|api|stubs|state|imports|conditional|all)"
|
|
12
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (handlers|routes|api|stubs|state|imports|conditional|all)"
|
|
13
13
|
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
14
14
|
state_fields:
|
|
15
15
|
- target_path
|
|
@@ -19,7 +19,7 @@ compact_context:
|
|
|
19
19
|
- findings_collected
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
# /agileflow:
|
|
22
|
+
# /agileflow:code:completeness
|
|
23
23
|
|
|
24
24
|
Deploy multiple specialized completeness analyzers in parallel to find forgotten features, dead handlers, stub code, and incomplete implementations, then synthesize results through consensus voting into a prioritized Completeness Audit Report.
|
|
25
25
|
|
|
@@ -28,11 +28,11 @@ Deploy multiple specialized completeness analyzers in parallel to find forgotten
|
|
|
28
28
|
## Quick Reference
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
/agileflow:
|
|
32
|
-
/agileflow:
|
|
33
|
-
/agileflow:
|
|
34
|
-
/agileflow:
|
|
35
|
-
/agileflow:
|
|
31
|
+
/agileflow:code:completeness app/ # Analyze app directory (quick, core 5 analyzers)
|
|
32
|
+
/agileflow:code:completeness . DEPTH=deep # Deep analysis - all 7 analyzers
|
|
33
|
+
/agileflow:code:completeness src/ FOCUS=handlers,routes # Focus on specific areas
|
|
34
|
+
/agileflow:code:completeness . DEPTH=deep FOCUS=all # Comprehensive full audit
|
|
35
|
+
/agileflow:code:completeness components/ FOCUS=stubs,state # Check stubs and unused state
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
---
|
|
@@ -41,7 +41,7 @@ Deploy multiple specialized completeness analyzers in parallel to find forgotten
|
|
|
41
41
|
|
|
42
42
|
```
|
|
43
43
|
┌─────────────────────────────────────────────────────────────┐
|
|
44
|
-
│ /agileflow:
|
|
44
|
+
│ /agileflow:code:completeness │
|
|
45
45
|
│ │
|
|
46
46
|
│ 1. Parse arguments (target, depth, focus) │
|
|
47
47
|
│ 2. Deploy analyzers IN PARALLEL │
|
|
@@ -74,8 +74,9 @@ Deploy multiple specialized completeness analyzers in parallel to find forgotten
|
|
|
74
74
|
| Argument | Values | Default | Description |
|
|
75
75
|
|----------|--------|---------|-------------|
|
|
76
76
|
| TARGET | file/directory | `.` | What to analyze |
|
|
77
|
-
| DEPTH | quick, deep | quick | quick = core 5
|
|
77
|
+
| DEPTH | quick, deep, ultradeep | quick | quick = core 5, deep = all 7, ultradeep = separate tmux sessions |
|
|
78
78
|
| FOCUS | handlers,routes,api,stubs,state,imports,conditional,all | all | Which analyzers to deploy |
|
|
79
|
+
| MODEL | haiku, sonnet, opus | haiku | Model for analyzer subagents. Default preserves existing behavior. |
|
|
79
80
|
|
|
80
81
|
---
|
|
81
82
|
|
|
@@ -118,6 +119,52 @@ FOCUS = all (default) or comma-separated list
|
|
|
118
119
|
**DEPTH behavior**:
|
|
119
120
|
- `quick` (default): Deploy core 5 analyzers. Focus on BROKEN/INCOMPLETE issues only.
|
|
120
121
|
- `deep`: Deploy all 7 analyzers. Include PLACEHOLDER/DORMANT findings.
|
|
122
|
+
- `ultradeep`: Spawn each analyzer as a separate Claude Code session in tmux. Requires tmux. Uses model profiles from metadata. Falls back to `deep` if tmux unavailable.
|
|
123
|
+
|
|
124
|
+
**ULTRADEEP mode** (DEPTH=ultradeep):
|
|
125
|
+
1. Show cost estimate:
|
|
126
|
+
```bash
|
|
127
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=completeness --target=TARGET --focus=FOCUS --model=MODEL --dry-run
|
|
128
|
+
```
|
|
129
|
+
2. Confirm with user before launching
|
|
130
|
+
3. Spawn sessions (use `--json` to capture trace ID):
|
|
131
|
+
```bash
|
|
132
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=completeness --target=TARGET --focus=FOCUS --model=MODEL --json
|
|
133
|
+
```
|
|
134
|
+
Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
|
|
135
|
+
4. Wait for all analyzers to complete:
|
|
136
|
+
```bash
|
|
137
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
138
|
+
```
|
|
139
|
+
- Exit 0 = all complete (JSON results on stdout)
|
|
140
|
+
- Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
|
|
141
|
+
- To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
|
|
142
|
+
- To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
|
|
143
|
+
5. Parse `results` array from the JSON output. Pass all findings to consensus coordinator (same as deep mode).
|
|
144
|
+
6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
|
|
145
|
+
|
|
146
|
+
**EXTREME mode** (DEPTH=extreme):
|
|
147
|
+
Partition-based multi-agent audit. Instead of 1 analyzer per tmux window, the codebase is split into partitions and each partition runs ALL analyzers.
|
|
148
|
+
1. Scan the target directory to understand the codebase structure:
|
|
149
|
+
- Use Glob to find top-level source directories
|
|
150
|
+
- Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
|
|
151
|
+
- If user provided PARTITIONS=N (a number), split into exactly N partitions
|
|
152
|
+
- If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
|
|
153
|
+
2. Show the partition plan and agent count to the user, confirm before launching:
|
|
154
|
+
Example: "5 partitions x 7 analyzers = 35 agents. Estimated cost: $X. Proceed?"
|
|
155
|
+
3. Spawn sessions with partitions:
|
|
156
|
+
```bash
|
|
157
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=completeness --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --model=MODEL --json
|
|
158
|
+
```
|
|
159
|
+
4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
|
|
160
|
+
5. Run consensus on combined results from all partitions
|
|
161
|
+
|
|
162
|
+
**PARTITIONS argument** (only used with DEPTH=extreme):
|
|
163
|
+
| Value | Behavior |
|
|
164
|
+
|-------|----------|
|
|
165
|
+
| Not set | AI decides partitions (3-7 based on codebase size) |
|
|
166
|
+
| `PARTITIONS=5` | AI creates exactly 5 partitions |
|
|
167
|
+
| `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
|
|
121
168
|
|
|
122
169
|
### STEP 2: Deploy Analyzers in Parallel
|
|
123
170
|
|
|
@@ -377,13 +424,13 @@ Total: 10 findings (3 intentional exclusions)
|
|
|
377
424
|
<!-- COMPACT_SUMMARY_START -->
|
|
378
425
|
## Compact Summary
|
|
379
426
|
|
|
380
|
-
**Command**: `/agileflow:
|
|
427
|
+
**Command**: `/agileflow:code:completeness` - Multi-agent forgotten features analysis with consensus
|
|
381
428
|
|
|
382
429
|
**Quick Usage**:
|
|
383
430
|
```
|
|
384
|
-
/agileflow:
|
|
385
|
-
/agileflow:
|
|
386
|
-
/agileflow:
|
|
431
|
+
/agileflow:code:completeness app/ # Quick scan (core 5 analyzers)
|
|
432
|
+
/agileflow:code:completeness . DEPTH=deep # All 7 analyzers
|
|
433
|
+
/agileflow:code:completeness src/ FOCUS=handlers,routes # Specific areas
|
|
387
434
|
```
|
|
388
435
|
|
|
389
436
|
**What It Does**: Deploy completeness analyzers in parallel -> Each finds different incomplete implementation classes -> Consensus coordinator validates, filters by project type, classifies user impact -> Actionable Completeness Audit Report
|
|
@@ -417,11 +464,11 @@ Total: 10 findings (3 intentional exclusions)
|
|
|
417
464
|
|
|
418
465
|
## Boundary Rules (No Overlap)
|
|
419
466
|
|
|
420
|
-
- **vs
|
|
421
|
-
- **vs
|
|
422
|
-
- **vs
|
|
423
|
-
- **vs
|
|
424
|
-
- **vs
|
|
467
|
+
- **vs code:security**: No vulnerabilities, XSS, injection, auth bypass - those are security domain
|
|
468
|
+
- **vs code:logic**: No race conditions, type bugs, edge cases, control flow - those are logic domain
|
|
469
|
+
- **vs code:performance**: No slow queries, memory leaks, bundle size - those are performance domain
|
|
470
|
+
- **vs code:test**: No missing tests, weak assertions, test patterns - those are test domain
|
|
471
|
+
- **vs code:legal**: No compliance, GDPR, licensing - those are legal domain
|
|
425
472
|
- **This audit asks**: Are features fully wired up? Do buttons work? Is stub code shipped?
|
|
426
473
|
|
|
427
474
|
---
|
|
@@ -447,10 +494,10 @@ Fix before merging? [Y/n]
|
|
|
447
494
|
|
|
448
495
|
## Related Commands
|
|
449
496
|
|
|
450
|
-
- `/agileflow:
|
|
451
|
-
- `/agileflow:
|
|
452
|
-
- `/agileflow:
|
|
453
|
-
- `/agileflow:
|
|
454
|
-
- `/agileflow:
|
|
497
|
+
- `/agileflow:code:security` - Security vulnerability analysis (similar architecture)
|
|
498
|
+
- `/agileflow:code:logic` - Logic bug analysis (similar architecture)
|
|
499
|
+
- `/agileflow:code:performance` - Performance bottleneck analysis (similar architecture)
|
|
500
|
+
- `/agileflow:code:test` - Test quality analysis (similar architecture)
|
|
501
|
+
- `/agileflow:code:legal` - Legal compliance analysis (similar architecture)
|
|
455
502
|
- `/agileflow:review` - Code review (includes some completeness checks)
|
|
456
503
|
- `/agileflow:multi-expert` - General multi-expert analysis
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Multi-agent legal risk analysis with consensus voting for finding compliance gaps
|
|
3
|
-
argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=privacy|terms|a11y|licensing|consumer|security|ai|content|international|all]"
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=privacy|terms|a11y|licensing|consumer|security|ai|content|international|all] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
7
|
-
- "ACTIVE COMMAND: /agileflow:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:code:legal - Multi-agent legal risk analysis"
|
|
8
8
|
- "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
|
|
9
9
|
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
|
|
11
|
-
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (privacy|terms|a11y|licensing|consumer|security|ai|content|international|all)"
|
|
11
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (privacy|terms|a11y|licensing|consumer|security|ai|content|international|all)"
|
|
12
12
|
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
13
13
|
state_fields:
|
|
14
14
|
- target_path
|
|
@@ -18,7 +18,7 @@ compact_context:
|
|
|
18
18
|
- findings_collected
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# /agileflow:
|
|
21
|
+
# /agileflow:code:legal
|
|
22
22
|
|
|
23
23
|
Deploy multiple specialized legal risk analyzers in parallel to find compliance gaps, then synthesize results through consensus voting into a prioritized Legal Risk Report.
|
|
24
24
|
|
|
@@ -27,11 +27,11 @@ Deploy multiple specialized legal risk analyzers in parallel to find compliance
|
|
|
27
27
|
## Quick Reference
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
/agileflow:
|
|
31
|
-
/agileflow:
|
|
32
|
-
/agileflow:
|
|
33
|
-
/agileflow:
|
|
34
|
-
/agileflow:
|
|
30
|
+
/agileflow:code:legal app/ # Analyze app directory (quick, core 5 analyzers)
|
|
31
|
+
/agileflow:code:legal . DEPTH=deep # Deep analysis - all 9 analyzers
|
|
32
|
+
/agileflow:code:legal src/ FOCUS=privacy,a11y # Focus on specific areas
|
|
33
|
+
/agileflow:code:legal . DEPTH=deep FOCUS=all # Comprehensive full audit
|
|
34
|
+
/agileflow:code:legal app/page.tsx FOCUS=ai # Check single file for AI compliance
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -40,7 +40,7 @@ Deploy multiple specialized legal risk analyzers in parallel to find compliance
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
┌─────────────────────────────────────────────────────────────┐
|
|
43
|
-
│ /agileflow:
|
|
43
|
+
│ /agileflow:code:legal │
|
|
44
44
|
│ │
|
|
45
45
|
│ 1. Parse arguments (target, depth, focus) │
|
|
46
46
|
│ 2. Deploy analyzers IN PARALLEL │
|
|
@@ -73,8 +73,9 @@ Deploy multiple specialized legal risk analyzers in parallel to find compliance
|
|
|
73
73
|
| Argument | Values | Default | Description |
|
|
74
74
|
|----------|--------|---------|-------------|
|
|
75
75
|
| TARGET | file/directory | `.` | What to analyze |
|
|
76
|
-
| DEPTH | quick, deep | quick | quick = core 5
|
|
76
|
+
| DEPTH | quick, deep, ultradeep | quick | quick = core 5, deep = all 9, ultradeep = separate tmux sessions |
|
|
77
77
|
| FOCUS | privacy,terms,a11y,licensing,consumer,security,ai,content,international,all | all | Which analyzers to deploy |
|
|
78
|
+
| MODEL | haiku, sonnet, opus | haiku | Model for analyzer subagents. Default preserves existing behavior. |
|
|
78
79
|
|
|
79
80
|
---
|
|
80
81
|
|
|
@@ -108,6 +109,52 @@ FOCUS = all (default) or comma-separated list
|
|
|
108
109
|
**DEPTH behavior**:
|
|
109
110
|
- `quick` (default): Deploy core 5 analyzers. Focus on CRITICAL/HIGH issues only.
|
|
110
111
|
- `deep`: Deploy all 9 analyzers. Include MEDIUM/LOW findings.
|
|
112
|
+
- `ultradeep`: Spawn each analyzer as a separate Claude Code session in tmux. Requires tmux. Uses model profiles from metadata. Falls back to `deep` if tmux unavailable.
|
|
113
|
+
|
|
114
|
+
**ULTRADEEP mode** (DEPTH=ultradeep):
|
|
115
|
+
1. Show cost estimate:
|
|
116
|
+
```bash
|
|
117
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=legal --target=TARGET --focus=FOCUS --model=MODEL --dry-run
|
|
118
|
+
```
|
|
119
|
+
2. Confirm with user before launching
|
|
120
|
+
3. Spawn sessions (use `--json` to capture trace ID):
|
|
121
|
+
```bash
|
|
122
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=legal --target=TARGET --focus=FOCUS --model=MODEL --json
|
|
123
|
+
```
|
|
124
|
+
Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
|
|
125
|
+
4. Wait for all analyzers to complete:
|
|
126
|
+
```bash
|
|
127
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
128
|
+
```
|
|
129
|
+
- Exit 0 = all complete (JSON results on stdout)
|
|
130
|
+
- Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
|
|
131
|
+
- To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
|
|
132
|
+
- To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
|
|
133
|
+
5. Parse `results` array from the JSON output. Pass all findings to consensus coordinator (same as deep mode).
|
|
134
|
+
6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
|
|
135
|
+
|
|
136
|
+
**EXTREME mode** (DEPTH=extreme):
|
|
137
|
+
Partition-based multi-agent audit. Instead of 1 analyzer per tmux window, the codebase is split into partitions and each partition runs ALL analyzers.
|
|
138
|
+
1. Scan the target directory to understand the codebase structure:
|
|
139
|
+
- Use Glob to find top-level source directories
|
|
140
|
+
- Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
|
|
141
|
+
- If user provided PARTITIONS=N (a number), split into exactly N partitions
|
|
142
|
+
- If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
|
|
143
|
+
2. Show the partition plan and agent count to the user, confirm before launching:
|
|
144
|
+
Example: "5 partitions x 9 analyzers = 45 agents. Estimated cost: $X. Proceed?"
|
|
145
|
+
3. Spawn sessions with partitions:
|
|
146
|
+
```bash
|
|
147
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=legal --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --model=MODEL --json
|
|
148
|
+
```
|
|
149
|
+
4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
|
|
150
|
+
5. Run consensus on combined results from all partitions
|
|
151
|
+
|
|
152
|
+
**PARTITIONS argument** (only used with DEPTH=extreme):
|
|
153
|
+
| Value | Behavior |
|
|
154
|
+
|-------|----------|
|
|
155
|
+
| Not set | AI decides partitions (3-7 based on codebase size) |
|
|
156
|
+
| `PARTITIONS=5` | AI creates exactly 5 partitions |
|
|
157
|
+
| `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
|
|
111
158
|
|
|
112
159
|
### STEP 2: Deploy Analyzers in Parallel
|
|
113
160
|
|
|
@@ -379,13 +426,13 @@ Total: 10 findings (3 false positives excluded)
|
|
|
379
426
|
<!-- COMPACT_SUMMARY_START -->
|
|
380
427
|
## Compact Summary
|
|
381
428
|
|
|
382
|
-
**Command**: `/agileflow:
|
|
429
|
+
**Command**: `/agileflow:code:legal` - Multi-agent legal risk analysis with consensus
|
|
383
430
|
|
|
384
431
|
**Quick Usage**:
|
|
385
432
|
```
|
|
386
|
-
/agileflow:
|
|
387
|
-
/agileflow:
|
|
388
|
-
/agileflow:
|
|
433
|
+
/agileflow:code:legal app/ # Quick scan (core 5 analyzers)
|
|
434
|
+
/agileflow:code:legal . DEPTH=deep # All 9 analyzers
|
|
435
|
+
/agileflow:code:legal src/ FOCUS=privacy,a11y # Specific areas
|
|
389
436
|
```
|
|
390
437
|
|
|
391
438
|
**What It Does**: Deploy legal analyzers in parallel → Each finds different compliance gaps → Consensus coordinator validates, filters by project type, prioritizes → Actionable Legal Risk Report
|
|
@@ -440,7 +487,7 @@ Fix before launch? [Y/n]
|
|
|
440
487
|
|
|
441
488
|
## Related Commands
|
|
442
489
|
|
|
443
|
-
- `/agileflow:
|
|
490
|
+
- `/agileflow:code:logic` - Logic bug analysis (similar architecture)
|
|
444
491
|
- `/agileflow:review` - Code review (includes some compliance checks)
|
|
445
492
|
- `/agileflow:multi-expert` - General multi-expert analysis
|
|
446
493
|
- `/agileflow:verify` - Run tests
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Multi-agent logic analysis with consensus voting for finding logic bugs
|
|
3
|
-
argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=edge|invariant|flow|type|race|all]"
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=edge|invariant|flow|type|race|all] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
7
|
-
- "ACTIVE COMMAND: /agileflow:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:code:logic - Multi-agent logic analysis"
|
|
8
8
|
- "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
|
|
9
9
|
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
|
|
11
|
-
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (edge/invariant/flow/type/race/all)"
|
|
11
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (edge/invariant/flow/type/race/all)"
|
|
12
12
|
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
13
13
|
state_fields:
|
|
14
14
|
- target_path
|
|
@@ -18,7 +18,7 @@ compact_context:
|
|
|
18
18
|
- findings_collected
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# /agileflow:
|
|
21
|
+
# /agileflow:code:logic
|
|
22
22
|
|
|
23
23
|
Deploy multiple specialized logic analyzers in parallel to find bugs, then synthesize results through consensus voting.
|
|
24
24
|
|
|
@@ -27,10 +27,12 @@ Deploy multiple specialized logic analyzers in parallel to find bugs, then synth
|
|
|
27
27
|
## Quick Reference
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
/agileflow:
|
|
31
|
-
/agileflow:
|
|
32
|
-
/agileflow:
|
|
33
|
-
/agileflow:
|
|
30
|
+
/agileflow:code:logic src/utils.js # Analyze single file
|
|
31
|
+
/agileflow:code:logic src/ DEPTH=deep # Deep analysis of directory
|
|
32
|
+
/agileflow:code:logic . FOCUS=race,type # Focus on race conditions and type issues
|
|
33
|
+
/agileflow:code:logic src/cart.js DEPTH=quick # Quick scan of specific file
|
|
34
|
+
/agileflow:code:logic . DEPTH=ultradeep # Each analyzer in its own tmux session
|
|
35
|
+
/agileflow:code:logic src/ MODEL=sonnet # Use Sonnet for all analyzers
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
---
|
|
@@ -39,7 +41,7 @@ Deploy multiple specialized logic analyzers in parallel to find bugs, then synth
|
|
|
39
41
|
|
|
40
42
|
```
|
|
41
43
|
┌─────────────────────────────────────────────────────────────┐
|
|
42
|
-
│ /agileflow:
|
|
44
|
+
│ /agileflow:code:logic │
|
|
43
45
|
│ │
|
|
44
46
|
│ 1. Parse arguments (target, depth, focus) │
|
|
45
47
|
│ 2. Deploy 5 analyzers IN PARALLEL │
|
|
@@ -69,8 +71,9 @@ Deploy multiple specialized logic analyzers in parallel to find bugs, then synth
|
|
|
69
71
|
| Argument | Values | Default | Description |
|
|
70
72
|
|----------|--------|---------|-------------|
|
|
71
73
|
| TARGET | file/directory | `.` | What to analyze |
|
|
72
|
-
| DEPTH | quick, deep | quick | quick = high-impact only, deep = comprehensive |
|
|
74
|
+
| DEPTH | quick, deep, ultradeep | quick | quick = high-impact only, deep = comprehensive, ultradeep = separate tmux sessions |
|
|
73
75
|
| FOCUS | edge,invariant,flow,type,race,all | all | Which analyzers to deploy |
|
|
76
|
+
| MODEL | haiku, sonnet, opus | haiku | Model for analyzer subagents. Default preserves existing behavior. |
|
|
74
77
|
|
|
75
78
|
---
|
|
76
79
|
|
|
@@ -80,10 +83,55 @@ Deploy multiple specialized logic analyzers in parallel to find bugs, then synth
|
|
|
80
83
|
|
|
81
84
|
```
|
|
82
85
|
TARGET = first argument or current directory
|
|
83
|
-
DEPTH = quick (default) or
|
|
86
|
+
DEPTH = quick (default), deep, or ultradeep
|
|
84
87
|
FOCUS = all (default) or comma-separated list
|
|
85
88
|
```
|
|
86
89
|
|
|
90
|
+
**ULTRADEEP mode** (DEPTH=ultradeep):
|
|
91
|
+
1. Show cost estimate:
|
|
92
|
+
```bash
|
|
93
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=logic --target=TARGET --focus=FOCUS --model=MODEL --dry-run
|
|
94
|
+
```
|
|
95
|
+
2. Confirm with user before launching
|
|
96
|
+
3. Spawn sessions (use `--json` to capture trace ID):
|
|
97
|
+
```bash
|
|
98
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=logic --target=TARGET --focus=FOCUS --model=MODEL --json
|
|
99
|
+
```
|
|
100
|
+
Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
|
|
101
|
+
4. Wait for all analyzers to complete:
|
|
102
|
+
```bash
|
|
103
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
104
|
+
```
|
|
105
|
+
- Exit 0 = all complete (JSON results on stdout)
|
|
106
|
+
- Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
|
|
107
|
+
- To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
|
|
108
|
+
- To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
|
|
109
|
+
5. Parse `results` array from the JSON output. Pass all findings to consensus coordinator (same as deep mode).
|
|
110
|
+
6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
|
|
111
|
+
|
|
112
|
+
**EXTREME mode** (DEPTH=extreme):
|
|
113
|
+
Partition-based multi-agent audit. Instead of 1 analyzer per tmux window, the codebase is split into partitions and each partition runs ALL analyzers.
|
|
114
|
+
1. Scan the target directory to understand the codebase structure:
|
|
115
|
+
- Use Glob to find top-level source directories
|
|
116
|
+
- Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
|
|
117
|
+
- If user provided PARTITIONS=N (a number), split into exactly N partitions
|
|
118
|
+
- If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
|
|
119
|
+
2. Show the partition plan and agent count to the user, confirm before launching:
|
|
120
|
+
Example: "5 partitions x 5 analyzers = 25 agents. Estimated cost: $X. Proceed?"
|
|
121
|
+
3. Spawn sessions with partitions:
|
|
122
|
+
```bash
|
|
123
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=logic --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --model=MODEL --json
|
|
124
|
+
```
|
|
125
|
+
4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
|
|
126
|
+
5. Run consensus on combined results from all partitions
|
|
127
|
+
|
|
128
|
+
**PARTITIONS argument** (only used with DEPTH=extreme):
|
|
129
|
+
| Value | Behavior |
|
|
130
|
+
|-------|----------|
|
|
131
|
+
| Not set | AI decides partitions (3-7 based on codebase size) |
|
|
132
|
+
| `PARTITIONS=5` | AI creates exactly 5 partitions |
|
|
133
|
+
| `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
|
|
134
|
+
|
|
87
135
|
**Analyzer Selection by FOCUS**:
|
|
88
136
|
|
|
89
137
|
| FOCUS | Analyzers |
|
|
@@ -307,13 +355,13 @@ Total: 7 findings (2 false positives excluded)
|
|
|
307
355
|
<!-- COMPACT_SUMMARY_START -->
|
|
308
356
|
## Compact Summary
|
|
309
357
|
|
|
310
|
-
**Command**: `/agileflow:
|
|
358
|
+
**Command**: `/agileflow:code:logic` - Multi-agent logic analysis with consensus
|
|
311
359
|
|
|
312
360
|
**Quick Usage**:
|
|
313
361
|
```
|
|
314
|
-
/agileflow:
|
|
315
|
-
/agileflow:
|
|
316
|
-
/agileflow:
|
|
362
|
+
/agileflow:code:logic src/utils.js # Single file
|
|
363
|
+
/agileflow:code:logic src/ DEPTH=deep # Deep analysis
|
|
364
|
+
/agileflow:code:logic . FOCUS=race,type # Specific analyzers
|
|
317
365
|
```
|
|
318
366
|
|
|
319
367
|
**What It Does**: Deploy 5 logic analyzers in parallel → Each finds different bug classes → Consensus coordinator validates and prioritizes → Actionable report
|
|
@@ -354,7 +402,7 @@ Proceed with tests? [Y/n]
|
|
|
354
402
|
|
|
355
403
|
To integrate with babysit, add to implementation workflow:
|
|
356
404
|
1. Complete implementation
|
|
357
|
-
2. Run `/agileflow:
|
|
405
|
+
2. Run `/agileflow:code:logic {changed_files} DEPTH=quick`
|
|
358
406
|
3. If critical issues → block, show findings
|
|
359
407
|
4. If no critical → proceed to tests
|
|
360
408
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Multi-agent performance bottleneck analysis with consensus voting for finding optimization opportunities
|
|
3
|
-
argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=queries|rendering|memory|bundle|compute|network|caching|assets|all]"
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep|ultradeep|extreme] [FOCUS=queries|rendering|memory|bundle|compute|network|caching|assets|all] [MODEL=haiku|sonnet|opus]"
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
7
|
-
- "ACTIVE COMMAND: /agileflow:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:code:performance - Multi-agent performance bottleneck analysis"
|
|
8
8
|
- "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
|
|
9
9
|
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
10
|
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
|
|
11
|
-
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (queries|rendering|memory|bundle|compute|network|caching|assets|all)"
|
|
11
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep/ultradeep), FOCUS (queries|rendering|memory|bundle|compute|network|caching|assets|all)"
|
|
12
12
|
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
13
13
|
state_fields:
|
|
14
14
|
- target_path
|
|
@@ -18,7 +18,7 @@ compact_context:
|
|
|
18
18
|
- findings_collected
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# /agileflow:
|
|
21
|
+
# /agileflow:code:performance
|
|
22
22
|
|
|
23
23
|
Deploy multiple specialized performance analyzers in parallel to find bottlenecks and optimization opportunities, then synthesize results through consensus voting into a prioritized Performance Audit Report.
|
|
24
24
|
|
|
@@ -27,11 +27,11 @@ Deploy multiple specialized performance analyzers in parallel to find bottleneck
|
|
|
27
27
|
## Quick Reference
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
/agileflow:
|
|
31
|
-
/agileflow:
|
|
32
|
-
/agileflow:
|
|
33
|
-
/agileflow:
|
|
34
|
-
/agileflow:
|
|
30
|
+
/agileflow:code:performance app/ # Analyze app directory (quick, core 5 analyzers)
|
|
31
|
+
/agileflow:code:performance . DEPTH=deep # Deep analysis - all 8 analyzers
|
|
32
|
+
/agileflow:code:performance src/ FOCUS=queries,memory # Focus on specific areas
|
|
33
|
+
/agileflow:code:performance . DEPTH=deep FOCUS=all # Comprehensive full audit
|
|
34
|
+
/agileflow:code:performance app/api/ FOCUS=queries # Check API queries specifically
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
---
|
|
@@ -40,7 +40,7 @@ Deploy multiple specialized performance analyzers in parallel to find bottleneck
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
+-------------------------------------------------------------+
|
|
43
|
-
| /agileflow:
|
|
43
|
+
| /agileflow:code:performance |
|
|
44
44
|
| |
|
|
45
45
|
| 1. Parse arguments (target, depth, focus) |
|
|
46
46
|
| 2. Deploy analyzers IN PARALLEL |
|
|
@@ -73,8 +73,9 @@ Deploy multiple specialized performance analyzers in parallel to find bottleneck
|
|
|
73
73
|
| Argument | Values | Default | Description |
|
|
74
74
|
|----------|--------|---------|-------------|
|
|
75
75
|
| TARGET | file/directory | `.` | What to analyze |
|
|
76
|
-
| DEPTH | quick, deep | quick | quick = core 5
|
|
76
|
+
| DEPTH | quick, deep, ultradeep | quick | quick = core 5, deep = all 8, ultradeep = separate tmux sessions |
|
|
77
77
|
| FOCUS | queries,rendering,memory,bundle,compute,network,caching,assets,all | all | Which analyzers to deploy |
|
|
78
|
+
| MODEL | haiku, sonnet, opus | haiku | Model for analyzer subagents. Default preserves existing behavior. |
|
|
78
79
|
|
|
79
80
|
---
|
|
80
81
|
|
|
@@ -107,6 +108,52 @@ FOCUS = all (default) or comma-separated list
|
|
|
107
108
|
**DEPTH behavior**:
|
|
108
109
|
- `quick` (default): Deploy core 5 analyzers. Focus on CRITICAL/HIGH issues only.
|
|
109
110
|
- `deep`: Deploy all 8 analyzers. Include MEDIUM/LOW findings.
|
|
111
|
+
- `ultradeep`: Spawn each analyzer as a separate Claude Code session in tmux. Requires tmux. Uses model profiles from metadata. Falls back to `deep` if tmux unavailable.
|
|
112
|
+
|
|
113
|
+
**ULTRADEEP mode** (DEPTH=ultradeep):
|
|
114
|
+
1. Show cost estimate:
|
|
115
|
+
```bash
|
|
116
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=performance --target=TARGET --focus=FOCUS --model=MODEL --dry-run
|
|
117
|
+
```
|
|
118
|
+
2. Confirm with user before launching
|
|
119
|
+
3. Spawn sessions (use `--json` to capture trace ID):
|
|
120
|
+
```bash
|
|
121
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=performance --target=TARGET --focus=FOCUS --model=MODEL --json
|
|
122
|
+
```
|
|
123
|
+
Parse the JSON output to get `traceId`. Example: `{"ok":true,"traceId":"abc123ef",...}`
|
|
124
|
+
4. Wait for all analyzers to complete:
|
|
125
|
+
```bash
|
|
126
|
+
node .agileflow/scripts/lib/tmux-audit-monitor.js wait TRACE_ID --timeout=1800
|
|
127
|
+
```
|
|
128
|
+
- Exit 0 = all complete (JSON results on stdout)
|
|
129
|
+
- Exit 1 = timeout (partial results on stdout, `missing` array shows what's left)
|
|
130
|
+
- To check progress without blocking: `node .agileflow/scripts/lib/tmux-audit-monitor.js status TRACE_ID`
|
|
131
|
+
- To retry stalled analyzers: `node .agileflow/scripts/lib/tmux-audit-monitor.js retry TRACE_ID`
|
|
132
|
+
5. Parse `results` array from the JSON output. Pass all findings to consensus coordinator (same as deep mode).
|
|
133
|
+
6. If tmux unavailable (spawn exits code 2), fall back to `DEPTH=deep` with warning
|
|
134
|
+
|
|
135
|
+
**EXTREME mode** (DEPTH=extreme):
|
|
136
|
+
Partition-based multi-agent audit. Instead of 1 analyzer per tmux window, the codebase is split into partitions and each partition runs ALL analyzers.
|
|
137
|
+
1. Scan the target directory to understand the codebase structure:
|
|
138
|
+
- Use Glob to find top-level source directories
|
|
139
|
+
- Group related directories into 3-7 logical partitions (coherent domains: auth, api, ui, etc.)
|
|
140
|
+
- If user provided PARTITIONS=N (a number), split into exactly N partitions
|
|
141
|
+
- If user provided PARTITIONS=dir1,dir2,dir3, use those exact directories
|
|
142
|
+
2. Show the partition plan and agent count to the user, confirm before launching:
|
|
143
|
+
Example: "5 partitions x 8 analyzers = 40 agents. Estimated cost: $X. Proceed?"
|
|
144
|
+
3. Spawn sessions with partitions:
|
|
145
|
+
```bash
|
|
146
|
+
node .agileflow/scripts/spawn-audit-sessions.js --audit=performance --target=TARGET --depth=extreme --partitions=dir1,dir2,dir3 --model=MODEL --json
|
|
147
|
+
```
|
|
148
|
+
4. Wait and collect results (same as ultradeep - use tmux-audit-monitor.js)
|
|
149
|
+
5. Run consensus on combined results from all partitions
|
|
150
|
+
|
|
151
|
+
**PARTITIONS argument** (only used with DEPTH=extreme):
|
|
152
|
+
| Value | Behavior |
|
|
153
|
+
|-------|----------|
|
|
154
|
+
| Not set | AI decides partitions (3-7 based on codebase size) |
|
|
155
|
+
| `PARTITIONS=5` | AI creates exactly 5 partitions |
|
|
156
|
+
| `PARTITIONS=src/auth,src/api,lib` | Use these exact directories |
|
|
110
157
|
|
|
111
158
|
### STEP 2: Deploy Analyzers in Parallel
|
|
112
159
|
|
|
@@ -368,13 +415,13 @@ FIX THIS SPRINT
|
|
|
368
415
|
<!-- COMPACT_SUMMARY_START -->
|
|
369
416
|
## Compact Summary
|
|
370
417
|
|
|
371
|
-
**Command**: `/agileflow:
|
|
418
|
+
**Command**: `/agileflow:code:performance` - Multi-agent performance bottleneck analysis with consensus
|
|
372
419
|
|
|
373
420
|
**Quick Usage**:
|
|
374
421
|
```
|
|
375
|
-
/agileflow:
|
|
376
|
-
/agileflow:
|
|
377
|
-
/agileflow:
|
|
422
|
+
/agileflow:code:performance app/ # Quick scan (core 5 analyzers)
|
|
423
|
+
/agileflow:code:performance . DEPTH=deep # All 8 analyzers
|
|
424
|
+
/agileflow:code:performance src/ FOCUS=queries,memory # Specific areas
|
|
378
425
|
```
|
|
379
426
|
|
|
380
427
|
**What It Does**: Deploy performance analyzers in parallel -> Each finds different bottleneck classes -> Consensus coordinator validates, filters by project type, estimates impact -> Actionable Performance Audit Report
|
|
@@ -409,8 +456,8 @@ FIX THIS SPRINT
|
|
|
409
456
|
|
|
410
457
|
## Boundary Rules (No Overlap)
|
|
411
458
|
|
|
412
|
-
- **vs
|
|
413
|
-
- **vs
|
|
459
|
+
- **vs code:logic**: No correctness bugs — only performance implications
|
|
460
|
+
- **vs code:security**: No vulnerability analysis — only efficiency
|
|
414
461
|
- **vs performance agent**: The `performance.md` agent is a team member for story work. This is an on-demand analysis tool
|
|
415
462
|
|
|
416
463
|
---
|
|
@@ -436,8 +483,8 @@ Fix before merging? [Y/n]
|
|
|
436
483
|
|
|
437
484
|
## Related Commands
|
|
438
485
|
|
|
439
|
-
- `/agileflow:
|
|
440
|
-
- `/agileflow:
|
|
441
|
-
- `/agileflow:
|
|
486
|
+
- `/agileflow:code:logic` - Logic bug analysis (similar architecture)
|
|
487
|
+
- `/agileflow:code:security` - Security vulnerability analysis (similar architecture)
|
|
488
|
+
- `/agileflow:code:legal` - Legal compliance analysis (similar architecture)
|
|
442
489
|
- `/agileflow:multi-expert` - General multi-expert analysis
|
|
443
490
|
- `/agileflow:verify` - Run tests
|