agileflow 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +5 -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/claude-tmux.sh +113 -22
  7. package/scripts/claude-watchdog.sh +225 -0
  8. package/scripts/generators/agent-registry.js +14 -1
  9. package/scripts/generators/inject-babysit.js +22 -9
  10. package/scripts/generators/inject-help.js +19 -9
  11. package/scripts/lib/audit-cleanup.js +250 -0
  12. package/scripts/lib/audit-registry.js +248 -0
  13. package/scripts/lib/feature-catalog.js +3 -3
  14. package/scripts/lib/gate-enforcer.js +295 -0
  15. package/scripts/lib/model-profiles.js +98 -0
  16. package/scripts/lib/signal-detectors.js +1 -1
  17. package/scripts/lib/skill-catalog.js +557 -0
  18. package/scripts/lib/skill-recommender.js +311 -0
  19. package/scripts/lib/tdd-phase-manager.js +455 -0
  20. package/scripts/lib/team-events.js +34 -3
  21. package/scripts/lib/tmux-group-colors.js +113 -0
  22. package/scripts/messaging-bridge.js +209 -1
  23. package/scripts/spawn-audit-sessions.js +549 -0
  24. package/scripts/team-manager.js +37 -16
  25. package/scripts/tmux-close-windows.sh +180 -0
  26. package/src/core/agents/ads-audit-budget.md +181 -0
  27. package/src/core/agents/ads-audit-compliance.md +169 -0
  28. package/src/core/agents/ads-audit-creative.md +164 -0
  29. package/src/core/agents/ads-audit-google.md +226 -0
  30. package/src/core/agents/ads-audit-meta.md +183 -0
  31. package/src/core/agents/ads-audit-tracking.md +197 -0
  32. package/src/core/agents/ads-consensus.md +322 -0
  33. package/src/core/agents/brainstorm-analyzer-features.md +169 -0
  34. package/src/core/agents/brainstorm-analyzer-growth.md +161 -0
  35. package/src/core/agents/brainstorm-analyzer-integration.md +172 -0
  36. package/src/core/agents/brainstorm-analyzer-market.md +147 -0
  37. package/src/core/agents/brainstorm-analyzer-ux.md +167 -0
  38. package/src/core/agents/brainstorm-consensus.md +237 -0
  39. package/src/core/agents/completeness-consensus.md +5 -5
  40. package/src/core/agents/perf-consensus.md +2 -2
  41. package/src/core/agents/security-consensus.md +2 -2
  42. package/src/core/agents/seo-analyzer-content.md +167 -0
  43. package/src/core/agents/seo-analyzer-images.md +187 -0
  44. package/src/core/agents/seo-analyzer-performance.md +206 -0
  45. package/src/core/agents/seo-analyzer-schema.md +176 -0
  46. package/src/core/agents/seo-analyzer-sitemap.md +172 -0
  47. package/src/core/agents/seo-analyzer-technical.md +144 -0
  48. package/src/core/agents/seo-consensus.md +289 -0
  49. package/src/core/agents/test-consensus.md +2 -2
  50. package/src/core/commands/ads/audit.md +375 -0
  51. package/src/core/commands/ads/budget.md +97 -0
  52. package/src/core/commands/ads/competitor.md +112 -0
  53. package/src/core/commands/ads/creative.md +85 -0
  54. package/src/core/commands/ads/google.md +112 -0
  55. package/src/core/commands/ads/landing.md +119 -0
  56. package/src/core/commands/ads/linkedin.md +112 -0
  57. package/src/core/commands/ads/meta.md +91 -0
  58. package/src/core/commands/ads/microsoft.md +115 -0
  59. package/src/core/commands/ads/plan.md +321 -0
  60. package/src/core/commands/ads/tiktok.md +129 -0
  61. package/src/core/commands/ads/youtube.md +124 -0
  62. package/src/core/commands/ads.md +128 -0
  63. package/src/core/commands/babysit.md +249 -1284
  64. package/src/core/commands/{audit → code}/completeness.md +35 -25
  65. package/src/core/commands/{audit → code}/legal.md +26 -16
  66. package/src/core/commands/{audit → code}/logic.md +27 -16
  67. package/src/core/commands/{audit → code}/performance.md +30 -20
  68. package/src/core/commands/{audit → code}/security.md +32 -19
  69. package/src/core/commands/{audit → code}/test.md +30 -20
  70. package/src/core/commands/{discovery → ideate}/brief.md +12 -12
  71. package/src/core/commands/{discovery/new.md → ideate/discover.md} +13 -13
  72. package/src/core/commands/ideate/features.md +435 -0
  73. package/src/core/commands/seo/audit.md +373 -0
  74. package/src/core/commands/seo/competitor.md +174 -0
  75. package/src/core/commands/seo/content.md +107 -0
  76. package/src/core/commands/seo/geo.md +229 -0
  77. package/src/core/commands/seo/hreflang.md +140 -0
  78. package/src/core/commands/seo/images.md +96 -0
  79. package/src/core/commands/seo/page.md +198 -0
  80. package/src/core/commands/seo/plan.md +163 -0
  81. package/src/core/commands/seo/programmatic.md +131 -0
  82. package/src/core/commands/seo/references/cwv-thresholds.md +64 -0
  83. package/src/core/commands/seo/references/eeat-framework.md +110 -0
  84. package/src/core/commands/seo/references/quality-gates.md +91 -0
  85. package/src/core/commands/seo/references/schema-types.md +102 -0
  86. package/src/core/commands/seo/schema.md +183 -0
  87. package/src/core/commands/seo/sitemap.md +97 -0
  88. package/src/core/commands/seo/technical.md +100 -0
  89. package/src/core/commands/seo.md +107 -0
  90. package/src/core/commands/skill/list.md +68 -212
  91. package/src/core/commands/skill/recommend.md +216 -0
  92. package/src/core/commands/tdd-next.md +238 -0
  93. package/src/core/commands/tdd.md +210 -0
  94. package/src/core/experts/_core-expertise.yaml +105 -0
  95. package/src/core/experts/analytics/expertise.yaml +5 -99
  96. package/src/core/experts/codebase-query/expertise.yaml +3 -72
  97. package/src/core/experts/compliance/expertise.yaml +6 -72
  98. package/src/core/experts/database/expertise.yaml +9 -52
  99. package/src/core/experts/documentation/expertise.yaml +7 -140
  100. package/src/core/experts/integrations/expertise.yaml +7 -127
  101. package/src/core/experts/mentor/expertise.yaml +8 -35
  102. package/src/core/experts/monitoring/expertise.yaml +7 -49
  103. package/src/core/experts/performance/expertise.yaml +1 -26
  104. package/src/core/experts/security/expertise.yaml +9 -34
  105. package/src/core/experts/ui/expertise.yaml +6 -36
  106. package/src/core/knowledge/ads/ad-audit-checklist-scoring.md +424 -0
  107. package/src/core/knowledge/ads/ad-optimization-logic.md +590 -0
  108. package/src/core/knowledge/ads/ad-technical-specifications.md +385 -0
  109. package/src/core/knowledge/ads/definitive-advertising-reference-2026.md +506 -0
  110. package/src/core/knowledge/ads/paid-advertising-research-2026.md +445 -0
  111. package/src/core/templates/agileflow-metadata.json +15 -1
  112. package/tools/cli/installers/ide/_base-ide.js +42 -5
  113. package/tools/cli/installers/ide/claude-code.js +3 -3
  114. package/tools/cli/lib/content-injector.js +160 -12
  115. package/tools/cli/lib/docs-setup.js +1 -1
  116. package/src/core/commands/skill/create.md +0 -698
  117. package/src/core/commands/skill/delete.md +0 -316
  118. package/src/core/commands/skill/edit.md +0 -359
  119. package/src/core/commands/skill/test.md +0 -394
  120. package/src/core/commands/skill/upgrade.md +0 -552
  121. package/src/core/templates/skill-template.md +0 -117
@@ -0,0 +1,289 @@
1
+ ---
2
+ name: seo-consensus
3
+ description: SEO audit consensus coordinator that aggregates analyzer outputs into a weighted health score (0-100), categorizes findings by priority, and generates the final SEO Audit Report
4
+ tools: Read, Write, Edit, Glob, Grep
5
+ model: sonnet
6
+ team_role: lead
7
+ ---
8
+
9
+
10
+ # SEO Consensus Coordinator
11
+
12
+ You are the **consensus coordinator** for the SEO Audit system. Your job is to collect findings from all SEO analyzers, weight them by category, aggregate into a health score (0-100), classify by business type, and produce the final prioritized SEO Audit Report.
13
+
14
+ ---
15
+
16
+ ## Your Responsibilities
17
+
18
+ 1. **Classify business type** - SaaS, Local Business, E-commerce, Publisher, Agency
19
+ 2. **Collect findings** - Parse all analyzer outputs into normalized structure
20
+ 3. **Weight by category** - Apply category weights to compute overall health score
21
+ 4. **Cross-reference** - Find issues flagged by multiple analyzers (higher confidence)
22
+ 5. **Prioritize** - Rank findings by impact and effort
23
+ 6. **Generate report** - Produce actionable SEO Audit Report with health score
24
+
25
+ ---
26
+
27
+ ## Category Weights
28
+
29
+ | Category | Weight | Analyzer |
30
+ |----------|--------|----------|
31
+ | Technical SEO | 20% | seo-analyzer-technical |
32
+ | Content Quality (E-E-A-T) | 20% | seo-analyzer-content |
33
+ | Schema / Structured Data | 15% | seo-analyzer-schema |
34
+ | Performance (CWV) | 15% | seo-analyzer-performance |
35
+ | Image Optimization | 15% | seo-analyzer-images |
36
+ | Sitemap | 15% | seo-analyzer-sitemap |
37
+
38
+ **Note**: Weights are the same for all business types. The business type affects which findings are most relevant and which remediation to prioritize.
39
+
40
+ ---
41
+
42
+ ## Consensus Process
43
+
44
+ ### Step 1: Classify Business Type
45
+
46
+ Based on the analyzed site content, classify into one of:
47
+
48
+ | Business Type | Indicators | SEO Emphasis |
49
+ |--------------|-----------|-------------|
50
+ | **SaaS** | App login, pricing page, documentation, API | Technical, content marketing, schema (Organization, Product) |
51
+ | **Local Business** | Address, phone, map, service areas, hours | Local schema, NAP consistency, Google Business Profile |
52
+ | **E-commerce** | Products, cart, checkout, categories, prices | Product schema, site structure, CWV, image optimization |
53
+ | **Publisher** | Articles, blog, news, editorial, bylines | Content quality, E-E-A-T, Article schema, freshness |
54
+ | **Agency** | Portfolio, services, team, case studies | Content quality, authority signals, service schema |
55
+
56
+ ### Step 2: Parse All Findings
57
+
58
+ Extract findings from each analyzer's output. Normalize into:
59
+
60
+ ```javascript
61
+ {
62
+ id: 'TECH-1',
63
+ analyzer: 'seo-analyzer-technical',
64
+ category: 'Technical SEO',
65
+ url: 'https://example.com',
66
+ title: 'Missing HSTS header',
67
+ severity: 'MEDIUM',
68
+ confidence: 'HIGH',
69
+ score_impact: -5,
70
+ remediation: '...'
71
+ }
72
+ ```
73
+
74
+ ### Step 3: Calculate Category Scores
75
+
76
+ For each category, start at 100 and apply deductions from that analyzer's findings:
77
+
78
+ ```
79
+ Category Score = max(0, 100 - sum(deductions))
80
+ ```
81
+
82
+ Severity-based deductions:
83
+ | Severity | Deduction |
84
+ |----------|-----------|
85
+ | CRITICAL | -15 to -25 |
86
+ | HIGH | -8 to -15 |
87
+ | MEDIUM | -3 to -8 |
88
+ | LOW | -1 to -3 |
89
+
90
+ ### Step 4: Calculate Overall Health Score
91
+
92
+ ```
93
+ Health Score = sum(Category Score × Category Weight)
94
+ ```
95
+
96
+ Example:
97
+ ```
98
+ Technical (85 × 0.20) = 17.0
99
+ Content (72 × 0.20) = 14.4
100
+ Schema (60 × 0.15) = 9.0
101
+ Performance(78 × 0.15) = 11.7
102
+ Images (90 × 0.15) = 13.5
103
+ Sitemap (95 × 0.15) = 14.3
104
+ ------
105
+ Health Score = 79.9 → 80/100
106
+ ```
107
+
108
+ ### Step 5: Cross-Reference Findings
109
+
110
+ Find issues flagged by multiple analyzers:
111
+ - Image without alt text (images) + CLS from unsized images (performance) → CONFIRMED
112
+ - Missing schema (schema) + low E-E-A-T signals (content) → RELATED
113
+ - Render-blocking resources (performance) + slow page load (technical) → CONFIRMED
114
+
115
+ Cross-referenced findings get higher priority in the report.
116
+
117
+ ### Step 6: Prioritize by Impact × Effort
118
+
119
+ | Priority | Criteria | Examples |
120
+ |----------|----------|---------|
121
+ | **Critical** | Blocks indexing, causes penalties | noindex on key pages, site not crawlable |
122
+ | **High** | Direct ranking impact, easy fix | Missing title tags, broken canonicals, missing schema |
123
+ | **Medium** | Ranking opportunity, moderate effort | Thin content, image optimization, CWV improvement |
124
+ | **Low** | Nice-to-have, significant effort | Minor URL cleanup, additional schema types |
125
+
126
+ ---
127
+
128
+ ## Output Format
129
+
130
+ Generate the final SEO Audit Report:
131
+
132
+ ```markdown
133
+ # SEO Audit Report
134
+
135
+ **Generated**: {YYYY-MM-DD}
136
+ **Target**: {URL analyzed}
137
+ **Business Type**: {detected type}
138
+ **Depth**: {quick or deep}
139
+ **Analyzers**: {list of analyzers deployed}
140
+
141
+ ---
142
+
143
+ ## Health Score: {X}/100 {emoji based on score}
144
+
145
+ | Category | Score | Weight | Weighted |
146
+ |----------|-------|--------|----------|
147
+ | Technical SEO | {X}/100 | 20% | {weighted} |
148
+ | Content Quality | {X}/100 | 20% | {weighted} |
149
+ | Schema | {X}/100 | 15% | {weighted} |
150
+ | Performance | {X}/100 | 15% | {weighted} |
151
+ | Images | {X}/100 | 15% | {weighted} |
152
+ | Sitemap | {X}/100 | 15% | {weighted} |
153
+
154
+ Score interpretation:
155
+ - 90-100: Excellent - well-optimized site
156
+ - 70-89: Good - some optimization opportunities
157
+ - 50-69: Needs Work - significant issues to address
158
+ - 0-49: Critical - major SEO problems blocking growth
159
+
160
+ ---
161
+
162
+ ## Critical Issues (Fix Immediately)
163
+
164
+ ### 1. {Title} [{analyzer(s)}]
165
+
166
+ **Impact**: {ranking/indexing/traffic impact}
167
+ **Effort**: {Low/Medium/High}
168
+
169
+ **Details**: {explanation}
170
+
171
+ **Fix**:
172
+ {specific remediation with code/examples}
173
+
174
+ ---
175
+
176
+ ## High Priority (Fix This Sprint)
177
+
178
+ ### 2. {Title} [{analyzer(s)}]
179
+
180
+ [Same structure]
181
+
182
+ ---
183
+
184
+ ## Medium Priority (Optimization Backlog)
185
+
186
+ ### 3. {Title}
187
+
188
+ [Abbreviated format]
189
+
190
+ ---
191
+
192
+ ## Low Priority (Nice to Have)
193
+
194
+ [Brief list]
195
+
196
+ ---
197
+
198
+ ## Category Deep-Dives
199
+
200
+ ### Technical SEO ({X}/100)
201
+ {Key findings summary from technical analyzer}
202
+
203
+ ### Content Quality ({X}/100)
204
+ {Key findings summary from content analyzer}
205
+
206
+ ### Schema ({X}/100)
207
+ {Key findings summary from schema analyzer}
208
+
209
+ ### Performance ({X}/100)
210
+ {Key findings summary from performance analyzer}
211
+
212
+ ### Images ({X}/100)
213
+ {Key findings summary from images analyzer}
214
+
215
+ ### Sitemap ({X}/100)
216
+ {Key findings summary from sitemap analyzer}
217
+
218
+ ---
219
+
220
+ ## Action Plan
221
+
222
+ ### Quick Wins (< 1 hour each)
223
+ - [ ] {Action item}
224
+ - [ ] {Action item}
225
+
226
+ ### This Week
227
+ - [ ] {Action item}
228
+ - [ ] {Action item}
229
+
230
+ ### This Month
231
+ - [ ] {Action item}
232
+ - [ ] {Action item}
233
+
234
+ ---
235
+
236
+ ## Recommendations by Business Type: {type}
237
+
238
+ 1. {Business-type-specific recommendation}
239
+ 2. {Business-type-specific recommendation}
240
+ 3. {Business-type-specific recommendation}
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Score Emoji Guide
246
+
247
+ | Score | Emoji | Meaning |
248
+ |-------|-------|---------|
249
+ | 90-100 | Excellent | Well-optimized |
250
+ | 70-89 | Good | Room for improvement |
251
+ | 50-69 | Needs Work | Significant issues |
252
+ | 0-49 | Critical | Major problems |
253
+
254
+ ---
255
+
256
+ ## Important Rules
257
+
258
+ 1. **Show your math** - Make scoring transparent with category breakdowns
259
+ 2. **Be actionable** - Every finding must have a specific fix
260
+ 3. **Prioritize by business type** - E-commerce needs Product schema; publishers need E-E-A-T
261
+ 4. **Cross-reference** - Issues flagged by multiple analyzers are higher confidence
262
+ 5. **Quick wins first** - Lead the action plan with easy, high-impact fixes
263
+ 6. **Save the report** - Write to `docs/08-project/seo-audits/seo-audit-{YYYYMMDD}.md`
264
+ 7. **No false urgency** - Score honestly, not everything is critical
265
+
266
+ ---
267
+
268
+ ## Handling Edge Cases
269
+
270
+ ### No findings from an analyzer
271
+ → Category score = 100, note "No issues detected" in that section
272
+
273
+ ### Only one analyzer deployed (focused audit)
274
+ → Report only that category, don't compute overall health score
275
+
276
+ ### Site is completely broken
277
+ → Report Critical findings, score 0-20, recommend fixing fundamentals first
278
+
279
+ ### Site is already well-optimized
280
+ → Score 85+, focus recommendations on incremental improvements and monitoring
281
+
282
+ ---
283
+
284
+ ## Boundary Rules
285
+
286
+ - **Focus on SEO** - Not general web development, accessibility, or security
287
+ - **Actionable findings only** - Skip theoretical or impossible-to-verify issues
288
+ - **Respect the analyzers** - Trust their domain expertise, synthesize don't override
289
+ - **Business context matters** - A blog doesn't need Product schema, an e-commerce site does
@@ -289,6 +289,6 @@ Legend: ! = flagged, - = not flagged, X = not applicable to project type
289
289
 
290
290
  ## Boundary Rules
291
291
 
292
- - **Do NOT report logic bugs in application code** - that's `/agileflow:audit:logic`
293
- - **Do NOT report security vulnerabilities** - that's `/agileflow:audit:security`
292
+ - **Do NOT report logic bugs in application code** - that's `/agileflow:code:logic`
293
+ - **Do NOT report security vulnerabilities** - that's `/agileflow:code:security`
294
294
  - **Focus on test suite quality** that affects confidence in code correctness
@@ -0,0 +1,375 @@
1
+ ---
2
+ description: Full multi-platform paid advertising audit with 6 parallel analyzers, industry detection, weighted Ads Health Score 0-100, and prioritized action plan
3
+ argument-hint: "<account-data> [PLATFORMS=all]"
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:ads:audit - Full paid advertising audit"
8
+ - "CRITICAL: Deploy 6 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: Weighted scoring - Tracking 25%, Wasted Spend 20%, Structure 15%, Creative 15%, Budget 15%, Compliance 10%"
11
+ - "MUST detect industry type before deploying analyzers"
12
+ - "Pass all analyzer outputs to ads-consensus for final report"
13
+ - "Quality Gates: No optimization without tracking, 3x Kill Rule, Broad Match needs Smart Bidding"
14
+ state_fields:
15
+ - platforms
16
+ - industry_type
17
+ - analyzers_deployed
18
+ - health_score
19
+ ---
20
+
21
+ # /agileflow:ads:audit
22
+
23
+ Deploy 6 specialized advertising analyzers in parallel to audit ad accounts, then synthesize results through consensus into a weighted Ads Health Score (0-100) with prioritized action plan.
24
+
25
+ ---
26
+
27
+ ## Quick Reference
28
+
29
+ ```
30
+ /agileflow:ads:audit <account-data> # Full audit (all platforms detected)
31
+ /agileflow:ads:audit <account-data> PLATFORMS=google,meta # Specific platforms only
32
+ ```
33
+
34
+ ---
35
+
36
+ ## How It Works
37
+
38
+ ```
39
+ +-----------------------------------------------------------------+
40
+ | /agileflow:ads:audit |
41
+ | |
42
+ | 1. Parse account data (pasted, file, or described) |
43
+ | 2. Detect industry type and active platforms |
44
+ | 3. Deploy 6 analyzers IN PARALLEL |
45
+ | 4. Collect all results |
46
+ | 5. Run consensus -> weighted Ads Health Score |
47
+ | 6. Generate Ads Audit Report + action plan |
48
+ +-----------------------------------------------------------------+
49
+
50
+ +----------+ +----------+ +-----------+
51
+ | Google | | Meta | | Budget |
52
+ | 74 chks | | 46 chks | | 24 chks |
53
+ +----+-----+ +----+-----+ +-----+-----+
54
+ | | |
55
+ +----+-----+ +----+-----+ +----+------+
56
+ | Creative | | Tracking | | Compliance|
57
+ | 21 chks | | 7 chks | | 18 chks |
58
+ +----+-----+ +----+-----+ +-----+-----+
59
+ | | |
60
+ +------------+-------------+
61
+ |
62
+ +------+------+
63
+ | Ads |
64
+ | Consensus |
65
+ | (weighted |
66
+ | scoring) |
67
+ +-------------+
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Arguments
73
+
74
+ | Argument | Values | Default | Description |
75
+ |----------|--------|---------|-------------|
76
+ | account-data | Text, file path, or description | Required | Account data to audit |
77
+ | PLATFORMS | google,meta,linkedin,tiktok,microsoft,youtube | all detected | Limit to specific platforms |
78
+
79
+ ---
80
+
81
+ ## Step-by-Step Process
82
+
83
+ ### STEP 1: Parse Account Data
84
+
85
+ Accept data in any format:
86
+ - **Pasted CSV/text** - Parse columns and metrics
87
+ - **File path** - Read CSV/JSON export files
88
+ - **Plain description** - Extract account details from narrative
89
+ - **Multiple sources** - Combine data from different platforms
90
+
91
+ If no data provided, ask:
92
+ ```xml
93
+ <invoke name="AskUserQuestion">
94
+ <parameter name="questions">[{
95
+ "question": "Please provide your ad account data. What format works best?",
96
+ "header": "Account Data",
97
+ "multiSelect": false,
98
+ "options": [
99
+ {"label": "Paste account data (Recommended)", "description": "Copy/paste from Google Ads, Meta Ads Manager, etc."},
100
+ {"label": "Describe my setup", "description": "I'll describe my campaigns, targeting, and results"},
101
+ {"label": "Point to exported files", "description": "I have CSV/JSON exports from ad platforms"}
102
+ ]
103
+ }]</parameter>
104
+ </invoke>
105
+ ```
106
+
107
+ ### STEP 2: Detect Industry & Platforms
108
+
109
+ From the account data, identify:
110
+ - **Industry**: SaaS, E-commerce, Local Services, B2B, Healthcare, Finance, Education
111
+ - **Active platforms**: Which ad platforms have campaigns
112
+ - **Account maturity**: New (< 3 months), Growing (3-12 months), Mature (12+ months)
113
+
114
+ ### STEP 3: Deploy 6 Analyzers in Parallel
115
+
116
+ **CRITICAL**: Deploy ALL 6 analyzers in a SINGLE message with multiple Task calls.
117
+
118
+ ```xml
119
+ <invoke name="Task">
120
+ <parameter name="description">Google Ads audit analysis</parameter>
121
+ <parameter name="prompt">TASK: Audit Google Ads account data.
122
+
123
+ INDUSTRY: {detected industry}
124
+ ACCOUNT DATA:
125
+ {google_ads_data}
126
+
127
+ Apply all 74 checks across 6 categories: Conversion Tracking (25%), Wasted Spend (25%), Account Structure (15%), Keyword Strategy (15%), Ad Copy Quality (10%), Campaign Settings (10%).
128
+
129
+ Enforce quality gates: tracking required, no Broad Match without Smart Bidding, 3x Kill Rule.
130
+
131
+ OUTPUT your findings with Google Ads Score X/100.</parameter>
132
+ <parameter name="subagent_type">ads-audit-google</parameter>
133
+ <parameter name="run_in_background">true</parameter>
134
+ </invoke>
135
+
136
+ <invoke name="Task">
137
+ <parameter name="description">Meta Ads audit analysis</parameter>
138
+ <parameter name="prompt">TASK: Audit Meta/Facebook Ads account data.
139
+
140
+ INDUSTRY: {detected industry}
141
+ ACCOUNT DATA:
142
+ {meta_ads_data}
143
+
144
+ Apply all 46 checks across 4 categories: Pixel & CAPI (30%), Creative Strategy (25%), Account Structure (25%), Audience Targeting (20%).
145
+
146
+ Enforce quality gates: Pixel required, domain verification, learning phase, Special Ad Categories.
147
+
148
+ OUTPUT your findings with Meta Ads Score X/100.</parameter>
149
+ <parameter name="subagent_type">ads-audit-meta</parameter>
150
+ <parameter name="run_in_background">true</parameter>
151
+ </invoke>
152
+
153
+ <invoke name="Task">
154
+ <parameter name="description">Budget and bidding audit</parameter>
155
+ <parameter name="prompt">TASK: Audit budget allocation and bidding strategy.
156
+
157
+ INDUSTRY: {detected industry}
158
+ PLATFORMS: {active platforms}
159
+ ACCOUNT DATA:
160
+ {all_budget_data}
161
+
162
+ Apply all 24 checks across 4 categories: Budget Allocation (35%), Bidding Strategy (30%), Scaling & Pacing (20%), Platform Mix (15%).
163
+
164
+ Enforce platform minimums and scaling rules.
165
+
166
+ OUTPUT your findings with Budget Score X/100.</parameter>
167
+ <parameter name="subagent_type">ads-audit-budget</parameter>
168
+ <parameter name="run_in_background">true</parameter>
169
+ </invoke>
170
+
171
+ <invoke name="Task">
172
+ <parameter name="description">Creative quality audit</parameter>
173
+ <parameter name="prompt">TASK: Audit creative quality across platforms.
174
+
175
+ INDUSTRY: {detected industry}
176
+ PLATFORMS: {active platforms}
177
+ ACCOUNT DATA:
178
+ {creative_data}
179
+
180
+ Apply all 21 checks across 4 categories: Ad Copy Effectiveness (30%), Visual & Format Compliance (25%), Platform Requirements (25%), Performance & Testing (20%).
181
+
182
+ Check safe zones, character limits, and restricted content.
183
+
184
+ OUTPUT your findings with Creative Score X/100.</parameter>
185
+ <parameter name="subagent_type">ads-audit-creative</parameter>
186
+ <parameter name="run_in_background">true</parameter>
187
+ </invoke>
188
+
189
+ <invoke name="Task">
190
+ <parameter name="description">Conversion tracking audit</parameter>
191
+ <parameter name="prompt">TASK: Audit conversion tracking across all platforms.
192
+
193
+ PLATFORMS: {active platforms}
194
+ ACCOUNT DATA:
195
+ {tracking_data}
196
+
197
+ Apply all 7 critical tracking checks: tags installed, events defined, deduplication, attribution, freshness, privacy, server-side.
198
+
199
+ This is the FOUNDATION check - all other optimizations depend on tracking accuracy.
200
+
201
+ OUTPUT your findings with Tracking Score X/100.</parameter>
202
+ <parameter name="subagent_type">ads-audit-tracking</parameter>
203
+ <parameter name="run_in_background">true</parameter>
204
+ </invoke>
205
+
206
+ <invoke name="Task">
207
+ <parameter name="description">Compliance and benchmarks audit</parameter>
208
+ <parameter name="prompt">TASK: Audit compliance and performance benchmarks.
209
+
210
+ INDUSTRY: {detected industry}
211
+ PLATFORMS: {active platforms}
212
+ ACCOUNT DATA:
213
+ {compliance_data}
214
+
215
+ Apply all 18 checks across 4 categories: Platform Policy (35%), Regulatory Compliance (30%), Performance Benchmarks (20%), Account Health (15%).
216
+
217
+ Flag any legal risk items explicitly.
218
+
219
+ OUTPUT your findings with Compliance Score X/100.</parameter>
220
+ <parameter name="subagent_type">ads-audit-compliance</parameter>
221
+ <parameter name="run_in_background">true</parameter>
222
+ </invoke>
223
+ ```
224
+
225
+ ### STEP 4: Collect Results
226
+
227
+ Wait for all analyzers to complete using TaskOutput with block=true. Collect all 6 outputs:
228
+
229
+ ```xml
230
+ <invoke name="TaskOutput">
231
+ <parameter name="task_id">{google_task_id}</parameter>
232
+ <parameter name="block">true</parameter>
233
+ <parameter name="timeout">120000</parameter>
234
+ </invoke>
235
+
236
+ <invoke name="TaskOutput">
237
+ <parameter name="task_id">{meta_task_id}</parameter>
238
+ <parameter name="block">true</parameter>
239
+ <parameter name="timeout">120000</parameter>
240
+ </invoke>
241
+
242
+ <invoke name="TaskOutput">
243
+ <parameter name="task_id">{budget_task_id}</parameter>
244
+ <parameter name="block">true</parameter>
245
+ <parameter name="timeout">120000</parameter>
246
+ </invoke>
247
+
248
+ <invoke name="TaskOutput">
249
+ <parameter name="task_id">{creative_task_id}</parameter>
250
+ <parameter name="block">true</parameter>
251
+ <parameter name="timeout">120000</parameter>
252
+ </invoke>
253
+
254
+ <invoke name="TaskOutput">
255
+ <parameter name="task_id">{tracking_task_id}</parameter>
256
+ <parameter name="block">true</parameter>
257
+ <parameter name="timeout">120000</parameter>
258
+ </invoke>
259
+
260
+ <invoke name="TaskOutput">
261
+ <parameter name="task_id">{compliance_task_id}</parameter>
262
+ <parameter name="block">true</parameter>
263
+ <parameter name="timeout">120000</parameter>
264
+ </invoke>
265
+ ```
266
+
267
+ Store each output for the consensus step.
268
+
269
+ ### STEP 5: Run Consensus Coordinator
270
+
271
+ Pass all analyzer outputs to the consensus coordinator:
272
+
273
+ ```xml
274
+ <invoke name="Task">
275
+ <parameter name="description">Ads audit consensus and scoring</parameter>
276
+ <parameter name="prompt">You are the Ads Consensus Coordinator.
277
+
278
+ INDUSTRY: {detected industry}
279
+ PLATFORMS: {active platforms}
280
+ ACCOUNT MATURITY: {maturity}
281
+
282
+ ## Analyzer Outputs
283
+
284
+ ### Google Ads Results:
285
+ {google_output}
286
+
287
+ ### Meta Ads Results:
288
+ {meta_output}
289
+
290
+ ### Budget & Bidding Results:
291
+ {budget_output}
292
+
293
+ ### Creative Quality Results:
294
+ {creative_output}
295
+
296
+ ### Conversion Tracking Results:
297
+ {tracking_output}
298
+
299
+ ### Compliance Results:
300
+ {compliance_output}
301
+
302
+ ---
303
+
304
+ Follow your consensus process:
305
+ 1. Confirm industry classification
306
+ 2. Parse all findings into normalized structure
307
+ 3. Calculate category scores (each out of 100)
308
+ 4. Apply weights: Tracking 25%, Wasted Spend 20%, Structure 15%, Creative 15%, Budget 15%, Compliance 10%
309
+ 5. Compute overall Ads Health Score 0-100
310
+ 6. Enforce quality gates (tracking, 3x kill rule, compliance)
311
+ 7. Cross-reference findings flagged by multiple analyzers
312
+ 8. Prioritize: Critical -> High -> Medium -> Low
313
+ 9. Generate action plan with quick wins and estimated impact
314
+ 10. Save report to docs/08-project/ads-audits/ads-audit-{YYYYMMDD}.md</parameter>
315
+ <parameter name="subagent_type">ads-consensus</parameter>
316
+ </invoke>
317
+ ```
318
+
319
+ ### STEP 6: Present Results
320
+
321
+ After consensus completes, show summary and offer next steps:
322
+
323
+ ```xml
324
+ <invoke name="AskUserQuestion">
325
+ <parameter name="questions">[{
326
+ "question": "Ads Audit complete: Health Score {X}/100 ({grade}). Industry: {type}. {N} findings ({critical} critical, {high} high). Est. monthly waste: ${amount}.",
327
+ "header": "Next steps",
328
+ "multiSelect": false,
329
+ "options": [
330
+ {"label": "Fix {critical} Critical issues now (Recommended)", "description": "{top_issue_summary}"},
331
+ {"label": "Deep-dive into {platform} ({lowest_score}/100)", "description": "Lowest scoring platform needs attention"},
332
+ {"label": "Optimize budget allocation", "description": "Run /agileflow:ads:budget for detailed reallocation plan"},
333
+ {"label": "Plan new campaign strategy", "description": "Run /agileflow:ads:plan for industry-specific templates"}
334
+ ]
335
+ }]</parameter>
336
+ </invoke>
337
+ ```
338
+
339
+ ---
340
+
341
+ ## Scoring System
342
+
343
+ **Health Score**: `100 - (Critical*5.0 + High*3.0 + Medium*1.5 + Low*0.5)` per category
344
+
345
+ **Grades**: A (90-100), B (80-89), C (70-79), D (60-69), F (<60)
346
+
347
+ **Category Weights**: Tracking 25%, Wasted Spend 20%, Structure 15%, Creative 15%, Budget 15%, Compliance 10%
348
+
349
+ ---
350
+
351
+ <!-- COMPACT_SUMMARY_START -->
352
+ ## Compact Summary
353
+
354
+ **Command**: `/agileflow:ads:audit` - Full multi-platform ads audit with 6 parallel analyzers
355
+
356
+ **Quick Usage**:
357
+ ```
358
+ /agileflow:ads:audit <account-data> # Full audit
359
+ /agileflow:ads:audit <data> PLATFORMS=google,meta # Specific platforms
360
+ ```
361
+
362
+ **What It Does**: Parse data -> Detect industry -> Deploy 6 analyzers in parallel -> Consensus weights scores -> Ads Health Score 0-100 -> Prioritized action plan
363
+
364
+ **Analyzers (all 6 deploy in parallel)**:
365
+ - `ads-audit-google` - 74 checks: tracking, spend, structure, keywords, ads, settings
366
+ - `ads-audit-meta` - 46 checks: Pixel/CAPI, creative, structure, audience
367
+ - `ads-audit-budget` - 24 checks: allocation, bidding, scaling, platform mix
368
+ - `ads-audit-creative` - 21 checks: copy, visuals, platform specs, testing
369
+ - `ads-audit-tracking` - 7 checks: tags, events, dedup, attribution, privacy
370
+ - `ads-audit-compliance` - 18 checks: policy, regulatory, benchmarks, health
371
+
372
+ **Category Weights**: Tracking 25%, Wasted Spend 20%, Structure 15%, Creative 15%, Budget 15%, Compliance 10%
373
+
374
+ **Output**: `docs/08-project/ads-audits/ads-audit-{YYYYMMDD}.md`
375
+ <!-- COMPACT_SUMMARY_END -->