openads-ai 0.2.32 → 0.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.
- package/README.md +110 -20
- package/dist/cli.js +777 -54
- package/dist/doctor.js +39 -0
- package/dist/mcp-extension.js +19 -7
- package/dist/schedule.js +58 -5
- package/dist/setup.js +48 -8
- package/package.json +1 -1
- package/skills/analytics/analytics.md +92 -22
- package/skills/automation/autoresearch-debug.md +41 -0
- package/skills/automation/autoresearch-evals.md +34 -0
- package/skills/automation/autoresearch-fix.md +40 -0
- package/skills/automation/autoresearch-improve.md +39 -0
- package/skills/automation/autoresearch-learn.md +31 -0
- package/skills/automation/autoresearch-plan.md +52 -0
- package/skills/automation/autoresearch-predict.md +32 -0
- package/skills/automation/autoresearch-probe.md +39 -0
- package/skills/automation/autoresearch-reason.md +37 -0
- package/skills/automation/autoresearch-scenario.md +43 -0
- package/skills/automation/autoresearch-security.md +43 -0
- package/skills/automation/autoresearch-ship.md +38 -0
- package/skills/automation/autoresearch.md +41 -54
- package/skills/express/analytics.md +23 -0
- package/skills/express/audit.md +28 -0
- package/skills/express/autoresearch.md +32 -0
- package/skills/express/copywriting.md +31 -0
- package/skills/express/cro.md +26 -0
- package/skills/express/product.md +11 -0
- package/skills/express/research.md +26 -0
- package/skills/express/strategy.md +28 -0
- package/skills/research/competitors.md +74 -33
- package/skills/research/customer-research.md +70 -22
package/dist/doctor.js
CHANGED
|
@@ -92,6 +92,45 @@ export async function runDoctor() {
|
|
|
92
92
|
console.log(` ${chalk.red('✗')} uvx: Not installed. Run 'curl -LsSf https://astral.sh/uv/install.sh | sh'`);
|
|
93
93
|
hasErrors = true;
|
|
94
94
|
}
|
|
95
|
+
// ─── Local AI Check ────────────────────────────────────────────────
|
|
96
|
+
if (config?.localBaseUrl) {
|
|
97
|
+
console.log(`\n${chalk.bold('Local AI')}`);
|
|
98
|
+
const baseUrl = config.localBaseUrl.replace(/\/$/, '');
|
|
99
|
+
// 1. Check if the endpoint is reachable
|
|
100
|
+
try {
|
|
101
|
+
const tagsUrl = `${baseUrl.replace('/v1', '')}/api/tags`;
|
|
102
|
+
const res = await fetch(tagsUrl, { signal: AbortSignal.timeout(3000) });
|
|
103
|
+
if (res.ok) {
|
|
104
|
+
const data = await res.json();
|
|
105
|
+
const models = (data.models || []).map((m) => m.name || m.model || '');
|
|
106
|
+
console.log(` ${chalk.green('✓')} Ollama server: Reachable at ${baseUrl}`);
|
|
107
|
+
// 2. Check if the configured model is pulled
|
|
108
|
+
const configuredModel = config.provider.includes('/')
|
|
109
|
+
? config.provider.split('/').pop()
|
|
110
|
+
: config.provider;
|
|
111
|
+
const modelFound = models.some(m => m === configuredModel || m.startsWith(configuredModel.split(':')[0]));
|
|
112
|
+
if (modelFound) {
|
|
113
|
+
console.log(` ${chalk.green('✓')} Model: ${chalk.cyan(configuredModel)} is available`);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
console.log(` ${chalk.red('✗')} Model: ${chalk.cyan(configuredModel)} not found in Ollama`);
|
|
117
|
+
console.log(` ${chalk.gray('Available models:')} ${models.length > 0 ? models.join(', ') : 'none'}`);
|
|
118
|
+
console.log(` ${chalk.gray(`Run: ollama pull ${configuredModel}`)}`);
|
|
119
|
+
hasErrors = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
console.log(` ${chalk.red('✗')} Ollama server: Not reachable at ${baseUrl}`);
|
|
124
|
+
console.log(` ${chalk.gray('Start Ollama with: ollama serve')}`);
|
|
125
|
+
hasErrors = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
console.log(` ${chalk.red('✗')} Ollama server: Connection failed — ${e.message}`);
|
|
130
|
+
console.log(` ${chalk.gray('Make sure Ollama is running: ollama serve')}`);
|
|
131
|
+
hasErrors = true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
95
134
|
if (hasErrors) {
|
|
96
135
|
console.log(`\n${chalk.red('Some checks failed. Please run `openads setup` to configure your environment.')}`);
|
|
97
136
|
process.exit(1);
|
package/dist/mcp-extension.js
CHANGED
|
@@ -4,16 +4,20 @@ import { hasGlobalRtk } from "./token-optimizer.js";
|
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import os from "os";
|
|
7
|
-
// ───
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
|
|
7
|
+
// ─── Tier-Based Tool Filtering ──────────────────────────────────────
|
|
8
|
+
// Express → skip MCP entirely (handled by OPENADS_SKIP_MCP env var)
|
|
9
|
+
// Standard → 6 read-only discovery + performance tools
|
|
10
|
+
// Full → 11 tools (read + write operations)
|
|
11
|
+
const STANDARD_META_TOOLS = new Set([
|
|
11
12
|
"get_ad_accounts",
|
|
12
13
|
"list_campaigns",
|
|
13
14
|
"get_campaign",
|
|
14
15
|
"get_campaign_performance",
|
|
15
16
|
"get_insights",
|
|
16
|
-
"list_ad_sets"
|
|
17
|
+
"list_ad_sets"
|
|
18
|
+
]);
|
|
19
|
+
const FULL_META_TOOLS = new Set([
|
|
20
|
+
...STANDARD_META_TOOLS,
|
|
17
21
|
"list_ads",
|
|
18
22
|
"get_creative_performance",
|
|
19
23
|
"pause_campaign",
|
|
@@ -33,6 +37,12 @@ export default async function (pi) {
|
|
|
33
37
|
catch (e) {
|
|
34
38
|
return;
|
|
35
39
|
}
|
|
40
|
+
// Skip MCP tool registration during Autoresearch.
|
|
41
|
+
// The model never needs live ad platform tools when generating hypotheses,
|
|
42
|
+
// and each tool schema consumes ~150 tokens of scarce context.
|
|
43
|
+
if (process.env.OPENADS_SKIP_MCP === '1') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
36
46
|
const clients = [];
|
|
37
47
|
// ─── Google Ads MCP ───────────────────────────────────────────────
|
|
38
48
|
if (config.connectGoogle) {
|
|
@@ -77,12 +87,14 @@ export default async function (pi) {
|
|
|
77
87
|
}
|
|
78
88
|
}
|
|
79
89
|
// ─── Dynamically Register Tools ──────────────────────────────────
|
|
90
|
+
const tier = process.env.OPENADS_TIER || 'standard';
|
|
91
|
+
const allowedMetaTools = tier === 'full' ? FULL_META_TOOLS : STANDARD_META_TOOLS;
|
|
80
92
|
for (const { name: serverName, client } of clients) {
|
|
81
93
|
try {
|
|
82
94
|
const toolsResult = await client.listTools();
|
|
83
95
|
for (const tool of toolsResult.tools) {
|
|
84
|
-
// Filter
|
|
85
|
-
if (serverName === "meta-ads" && !
|
|
96
|
+
// Filter Meta tools by tier (standard=6 read-only, full=11 read+write)
|
|
97
|
+
if (serverName === "meta-ads" && !allowedMetaTools.has(tool.name)) {
|
|
86
98
|
continue;
|
|
87
99
|
}
|
|
88
100
|
pi.registerTool({
|
package/dist/schedule.js
CHANGED
|
@@ -206,6 +206,8 @@ function uninstallCrontab(name) {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
// ─── Run a Scheduled Task ────────────────────────────────────────────
|
|
209
|
+
// Applies the same mode-aware prompt + selective skill loading as the main CLI
|
|
210
|
+
// so scheduled tasks work reliably on local models.
|
|
209
211
|
export async function runScheduledTask(name) {
|
|
210
212
|
const schedules = loadSchedules();
|
|
211
213
|
const schedule = schedules.find(s => s.name === name);
|
|
@@ -247,23 +249,74 @@ export async function runScheduledTask(name) {
|
|
|
247
249
|
env.OPENAI_BASE_URL = config.localBaseUrl;
|
|
248
250
|
env.OPENAI_API_KEY = env.OPENAI_API_KEY || 'sk-local-ai-key-placeholder';
|
|
249
251
|
}
|
|
250
|
-
const skillsDir = path.resolve(pkgDir, 'skills');
|
|
251
|
-
const contextDir = path.join(CONFIG_DIR, 'context');
|
|
252
|
-
const cleanModel = config.provider;
|
|
253
252
|
const isLocal = !!config.localBaseUrl;
|
|
253
|
+
const cleanModel = config.provider;
|
|
254
254
|
const modelIdForPi = isLocal && cleanModel.includes('/') ? cleanModel.split('/')[1] : cleanModel;
|
|
255
|
+
const skillsDir = path.resolve(pkgDir, 'skills');
|
|
256
|
+
const contextDir = path.join(CONFIG_DIR, 'context');
|
|
257
|
+
// ─── Mode-aware system prompt ───────────────────────────────────────
|
|
258
|
+
// Scheduled audit tasks use the 'default' prompt mode (they need MCP tools).
|
|
259
|
+
// Write a temporary system prompt file for this run.
|
|
260
|
+
const agentDir = path.join(CONFIG_DIR, 'agent');
|
|
261
|
+
if (!fs.existsSync(agentDir))
|
|
262
|
+
fs.mkdirSync(agentDir, { recursive: true });
|
|
263
|
+
const homeDir = os.homedir();
|
|
264
|
+
const contextPath = path.join(CONFIG_DIR, 'context', 'my-business.md');
|
|
265
|
+
const isLaunchMode = config.mode === 'launch';
|
|
266
|
+
const scheduleSystemPrompt = [
|
|
267
|
+
'You are OpenAds, an AI marketing assistant. You are running a scheduled automated task.',
|
|
268
|
+
'Your job: execute the task concisely and produce a clean, structured markdown report.',
|
|
269
|
+
'Use MCP tools to query live campaign data. Never use placeholder IDs.',
|
|
270
|
+
'',
|
|
271
|
+
'## Platform Tools',
|
|
272
|
+
'- For Meta: call get_ad_accounts() first (no params), then list_campaigns(account_id), then get_campaign_performance or get_insights.',
|
|
273
|
+
'- Anti-loop rule: never call the same tool twice in one turn.',
|
|
274
|
+
'',
|
|
275
|
+
'## Output Rules',
|
|
276
|
+
'- Structure your output as a clean markdown report with headers, tables, and bullet points.',
|
|
277
|
+
'- Flag issues clearly: 🔴 Critical | 🟡 Warning | 🟢 Opportunity.',
|
|
278
|
+
'- End with a numbered list of recommended actions.',
|
|
279
|
+
'',
|
|
280
|
+
`## Safety`,
|
|
281
|
+
`- Home directory: ${homeDir}. Never use placeholder paths.`,
|
|
282
|
+
isLaunchMode
|
|
283
|
+
? '- Mode: Launch (Read-Write). Show a preview card and get Y/N before any write operation.'
|
|
284
|
+
: '- Mode: Audit (Read-Only). You can only read and analyze — no writes.',
|
|
285
|
+
'',
|
|
286
|
+
`## Business Context`,
|
|
287
|
+
fs.existsSync(contextPath)
|
|
288
|
+
? `Read your business context file at ${contextPath} before starting.`
|
|
289
|
+
: 'No business context file found. Proceed with the task using available data.',
|
|
290
|
+
].join('\n');
|
|
291
|
+
const scheduleSysPromptPath = path.join(agentDir, 'SCHEDULE-SYSTEM.md');
|
|
292
|
+
fs.writeFileSync(scheduleSysPromptPath, scheduleSystemPrompt);
|
|
293
|
+
// ─── Selective skill loading ────────────────────────────────────────
|
|
294
|
+
// Scheduled tasks are audit-type by default → load only the 3 ad platform skills.
|
|
295
|
+
// This saves ~7K tokens vs loading all 24 skills.
|
|
296
|
+
const scheduleSkills = [
|
|
297
|
+
path.join(skillsDir, 'ads', 'google-ads.md'),
|
|
298
|
+
path.join(skillsDir, 'ads', 'meta-ads.md'),
|
|
299
|
+
path.join(skillsDir, 'product-marketing.md'),
|
|
300
|
+
].filter(p => fs.existsSync(p));
|
|
301
|
+
const skillArgs = [];
|
|
302
|
+
for (const skill of scheduleSkills) {
|
|
303
|
+
skillArgs.push('--skill', skill);
|
|
304
|
+
}
|
|
255
305
|
const args = [
|
|
256
306
|
piCliPath,
|
|
257
307
|
'--model', modelIdForPi,
|
|
258
|
-
'--
|
|
308
|
+
'--system-prompt', scheduleSysPromptPath,
|
|
309
|
+
...skillArgs,
|
|
259
310
|
...(fs.existsSync(contextDir) ? ['--skill', contextDir] : []),
|
|
260
311
|
'--print',
|
|
261
312
|
schedule.prompt,
|
|
262
313
|
];
|
|
314
|
+
// Local models may be slow — give them up to 10 minutes
|
|
315
|
+
const timeoutMs = isLocal ? 600000 : 300000;
|
|
263
316
|
const result = spawnSync('node', args, {
|
|
264
317
|
env,
|
|
265
318
|
encoding: 'utf8',
|
|
266
|
-
timeout:
|
|
319
|
+
timeout: timeoutMs,
|
|
267
320
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
268
321
|
});
|
|
269
322
|
if (result.stdout) {
|
package/dist/setup.js
CHANGED
|
@@ -33,7 +33,7 @@ export async function runSetup() {
|
|
|
33
33
|
catch (e) { }
|
|
34
34
|
}
|
|
35
35
|
// Step 1: Model Selection
|
|
36
|
-
console.log(chalk.cyan('Step 1/
|
|
36
|
+
console.log(chalk.cyan('Step 1/6: Choose your AI model\n'));
|
|
37
37
|
const providerChoices = [
|
|
38
38
|
{ name: 'google', message: 'Google (Gemini)' },
|
|
39
39
|
{ name: 'openai', message: 'OpenAI (ChatGPT)' },
|
|
@@ -210,8 +210,47 @@ export async function runSetup() {
|
|
|
210
210
|
console.log(chalk.green(`\n✓ Local AI configured — ready to connect to ${localBaseUrl}.\n`));
|
|
211
211
|
}
|
|
212
212
|
console.log(chalk.gray('─────────────────────────────────────────\n'));
|
|
213
|
-
// Step 2:
|
|
214
|
-
console.log(chalk.cyan('Step 2/
|
|
213
|
+
// Step 2: Experience Tier
|
|
214
|
+
console.log(chalk.cyan('Step 2/6: Choose your experience tier\n'));
|
|
215
|
+
console.log(' OpenAds adapts its depth based on your model\'s capability:\n');
|
|
216
|
+
console.log(` ${chalk.yellow('⚡ Express')} — Fast & reliable. Compact prompts, structured output.`);
|
|
217
|
+
console.log(` ${chalk.blue('📊 Standard')} — Balanced depth. Live data tools, detailed reports.`);
|
|
218
|
+
console.log(` ${chalk.magenta('🚀 Full')} — Maximum depth. Multi-step analysis, creative exploration.\n`);
|
|
219
|
+
// Auto-detect recommended tier based on model choice
|
|
220
|
+
const isLocalSetup = provider === 'local';
|
|
221
|
+
const modelLower = (selectedModel || localModelName || customModel || '').toLowerCase();
|
|
222
|
+
let suggestedTier = 'full';
|
|
223
|
+
if (isLocalSetup) {
|
|
224
|
+
suggestedTier = (modelLower.includes('70b') || modelLower.includes('72b') || modelLower.includes('405b')) ? 'standard' : 'express';
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
const isLiteTier = modelLower.includes('flash') || modelLower.includes('mini') || modelLower.includes('haiku');
|
|
228
|
+
suggestedTier = isLiteTier ? 'standard' : 'full';
|
|
229
|
+
}
|
|
230
|
+
const tierChoices = [
|
|
231
|
+
{ name: 'express', message: `${chalk.yellow('⚡')} Express — Best for: Llama 8B, Mistral 7B, Phi-3 ${suggestedTier === 'express' ? chalk.green('← Recommended') : ''}` },
|
|
232
|
+
{ name: 'standard', message: `${chalk.blue('📊')} Standard — Best for: Gemini Flash, GPT-4o Mini, Llama 70B ${suggestedTier === 'standard' ? chalk.green('← Recommended') : ''}` },
|
|
233
|
+
{ name: 'full', message: `${chalk.magenta('🚀')} Full — Best for: GPT-4o, Claude Sonnet, Gemini Pro ${suggestedTier === 'full' ? chalk.green('← Recommended') : ''}` },
|
|
234
|
+
];
|
|
235
|
+
let initialTierIndex = tierChoices.findIndex(c => c.name === (existingConfig.tier || suggestedTier));
|
|
236
|
+
if (initialTierIndex === -1)
|
|
237
|
+
initialTierIndex = tierChoices.findIndex(c => c.name === suggestedTier);
|
|
238
|
+
const { selectedTier } = await enquirer.prompt({
|
|
239
|
+
type: 'select',
|
|
240
|
+
name: 'selectedTier',
|
|
241
|
+
message: 'Select your experience tier:',
|
|
242
|
+
choices: tierChoices,
|
|
243
|
+
initial: initialTierIndex
|
|
244
|
+
});
|
|
245
|
+
const tierLabels = {
|
|
246
|
+
express: `${chalk.yellow('⚡ Express')}`,
|
|
247
|
+
standard: `${chalk.blue('📊 Standard')}`,
|
|
248
|
+
full: `${chalk.magenta('🚀 Full')}`,
|
|
249
|
+
};
|
|
250
|
+
console.log(chalk.green(`\n✓ Experience tier: ${tierLabels[selectedTier]}.\n`));
|
|
251
|
+
console.log(chalk.gray('─────────────────────────────────────────\n'));
|
|
252
|
+
// Step 3: Choose operational mode
|
|
253
|
+
console.log(chalk.cyan('Step 3/6: Choose operational mode\n'));
|
|
215
254
|
console.log('OpenAds has two operational modes:');
|
|
216
255
|
console.log(` - ${chalk.green.bold('Audit Mode (Safe / Read-only)')}: AI can analyze performance, find budget waste, and recommend strategies. Zero risk.`);
|
|
217
256
|
console.log(` - ${chalk.red.bold('Launch Mode (Read-Write)')}: AI is authorized to optimize bids, modify budgets, and launch ads (always requires confirmation).\n`);
|
|
@@ -228,8 +267,8 @@ export async function runSetup() {
|
|
|
228
267
|
mode = modeAnswers.selectedMode;
|
|
229
268
|
console.log(chalk.green(`\n✓ Operational mode configured: ${mode === 'launch' ? 'Launch Mode (Read-Write)' : 'Audit Mode (Safe / Read-only)'}.\n`));
|
|
230
269
|
console.log(chalk.gray('─────────────────────────────────────────\n'));
|
|
231
|
-
// Step
|
|
232
|
-
console.log(chalk.cyan('Step
|
|
270
|
+
// Step 4: Google Ads
|
|
271
|
+
console.log(chalk.cyan('Step 4/6: Connect Google Ads (optional)\n'));
|
|
233
272
|
console.log('OpenAds can read and analyze your Google Ads campaigns, keywords, and performance.\n');
|
|
234
273
|
const { connectGoogle } = await enquirer.prompt({
|
|
235
274
|
type: 'confirm',
|
|
@@ -268,7 +307,7 @@ export async function runSetup() {
|
|
|
268
307
|
}
|
|
269
308
|
console.log(chalk.gray('─────────────────────────────────────────\n'));
|
|
270
309
|
// Step 4: Meta Ads
|
|
271
|
-
console.log(chalk.cyan('Step
|
|
310
|
+
console.log(chalk.cyan('Step 5/6: Connect Meta Ads (optional)\n'));
|
|
272
311
|
console.log('OpenAds can read your Meta campaigns, creatives, and audience performance.\n');
|
|
273
312
|
let metaToken = '';
|
|
274
313
|
const { connectMeta } = await enquirer.prompt({
|
|
@@ -374,8 +413,8 @@ export async function runSetup() {
|
|
|
374
413
|
}
|
|
375
414
|
}
|
|
376
415
|
console.log(chalk.gray('─────────────────────────────────────────\n'));
|
|
377
|
-
// Step
|
|
378
|
-
console.log(chalk.cyan('Step
|
|
416
|
+
// Step 6: Business Context
|
|
417
|
+
console.log(chalk.cyan('Step 6/6: Tell me about your business\n'));
|
|
379
418
|
const { productContext } = await enquirer.prompt({
|
|
380
419
|
type: 'input',
|
|
381
420
|
name: 'productContext',
|
|
@@ -398,6 +437,7 @@ export async function runSetup() {
|
|
|
398
437
|
provider: finalModel,
|
|
399
438
|
apiKey,
|
|
400
439
|
localBaseUrl,
|
|
440
|
+
tier: selectedTier,
|
|
401
441
|
mode,
|
|
402
442
|
connectGoogle,
|
|
403
443
|
metaToken,
|
package/package.json
CHANGED
|
@@ -1,32 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analytics
|
|
3
|
-
description: Set up tracking, analyze traffic, and fix attribution gaps.
|
|
3
|
+
description: Set up tracking, analyze traffic, interpret GA4 data, and fix attribution gaps.
|
|
4
4
|
---
|
|
5
5
|
# Analytics Skill
|
|
6
6
|
|
|
7
7
|
## When to Use This Skill
|
|
8
8
|
|
|
9
|
-
Activate when
|
|
9
|
+
Activate when the user is:
|
|
10
|
+
- Setting up or auditing GA4 or Google Analytics tracking
|
|
11
|
+
- Diagnosing traffic drops, conversion rate changes, or attribution issues
|
|
12
|
+
- Analyzing funnel performance, event data, or audience behavior
|
|
13
|
+
- Building dashboards or interpreting key marketing metrics
|
|
14
|
+
|
|
15
|
+
Read `product-marketing.md` first to understand which metrics matter most for this business.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## GA4 Audit Checklist
|
|
20
|
+
|
|
21
|
+
Before drawing conclusions, verify these foundational items:
|
|
22
|
+
|
|
23
|
+
| Check | How to Verify |
|
|
24
|
+
|-------|---------------|
|
|
25
|
+
| GA4 tag firing | Check Realtime > Events — do page_view events appear? |
|
|
26
|
+
| Conversion events | Confirm key_events are marked in Admin > Events |
|
|
27
|
+
| Cross-domain tracking | Use DebugView to verify cookies persist across domains |
|
|
28
|
+
| Bot traffic exclusion | Admin > Data Filters — is "Internal traffic" excluded? |
|
|
29
|
+
| Sampling thresholds | Use smaller date ranges or BigQuery for sampled reports |
|
|
10
30
|
|
|
11
31
|
---
|
|
12
32
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
## Core Metrics to Always Report
|
|
34
|
+
|
|
35
|
+
When summarizing analytics, structure findings around these:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Sessions | The entry point — is traffic growing or shrinking?
|
|
39
|
+
Engaged rate | >50% is healthy. <30% is a red flag.
|
|
40
|
+
Avg. engagement| Low time on page = message mismatch or poor UX
|
|
41
|
+
Key events | Purchases, signups, demo requests — the real measure
|
|
42
|
+
Conversion rate| Key events / Sessions. Benchmark vs. industry.
|
|
43
|
+
Bounce rate | (GA4 definition differs from UA — clarify which)
|
|
44
|
+
Source/Medium | Which channels drive quality vs. volume?
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Attribution Models
|
|
50
|
+
|
|
51
|
+
Explain these to the user when comparing channel performance:
|
|
52
|
+
|
|
53
|
+
- **Last Click** (default): Credits the last touchpoint before conversion. Biased toward bottom-of-funnel channels (search, retargeting).
|
|
54
|
+
- **First Click**: Credits the first touchpoint. Biased toward top-of-funnel (social, display).
|
|
55
|
+
- **Data-Driven** (GA4 default): ML-based, distributes credit across touchpoints. Best for accounts with >1K conversions/month.
|
|
56
|
+
- **Linear**: Equal credit to all touchpoints. Simple but rarely accurate.
|
|
57
|
+
|
|
58
|
+
> Always ask: "Are you comparing channels using the same attribution model?" Mixing models is a common mistake.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Diagnosing Traffic Drops
|
|
63
|
+
|
|
64
|
+
If the user reports a traffic or conversion drop:
|
|
65
|
+
|
|
66
|
+
1. **Isolate the time range**: Compare week-over-week and year-over-year to rule out seasonality.
|
|
67
|
+
2. **Segment by channel**: Did organic, paid, or direct drop? Or all of them?
|
|
68
|
+
3. **Check for tracking breaks**: Did the drop coincide with a code deploy or tag manager update?
|
|
69
|
+
4. **Look at landing pages**: Which pages lost traffic? Is it a crawling/indexing issue?
|
|
70
|
+
5. **Compare device segments**: Did mobile drop while desktop held? Could be a UX or load speed issue.
|
|
71
|
+
6. **Check Search Console**: Organic impressions vs. clicks — ranking drop or CTR drop?
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
|
|
77
|
+
When reporting analytics findings, use this structure:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Analytics Summary — [Date Range]
|
|
81
|
+
|
|
82
|
+
### 📊 Traffic Overview
|
|
83
|
+
| Metric | This Period | Prior Period | Change |
|
|
84
|
+
|--------|-------------|--------------|--------|
|
|
85
|
+
| Sessions | | | |
|
|
86
|
+
| Engaged Rate | | | |
|
|
87
|
+
| Key Events | | | |
|
|
88
|
+
| CVR | | | |
|
|
89
|
+
|
|
90
|
+
### 🔴 Critical Issues
|
|
91
|
+
- [Issue]: [Impact] → [Recommended Action]
|
|
92
|
+
|
|
93
|
+
### 🟡 Warnings
|
|
94
|
+
- [Issue]: [Impact] → [Recommended Action]
|
|
95
|
+
|
|
96
|
+
### 🟢 Opportunities
|
|
97
|
+
- [Opportunity]: [Potential Impact] → [Next Step]
|
|
98
|
+
|
|
99
|
+
### 📋 Recommended Actions (Priority Order)
|
|
100
|
+
1. [Action] — [Expected Impact]
|
|
101
|
+
2. [Action] — [Expected Impact]
|
|
102
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-debug
|
|
3
|
+
description: Hypothesis-driven root cause analysis to diagnose underperforming marketing campaigns or landing pages.
|
|
4
|
+
---
|
|
5
|
+
# Autoresearch: Debug Underperformance (`/autoresearch:debug`)
|
|
6
|
+
|
|
7
|
+
## When to Use This Skill
|
|
8
|
+
|
|
9
|
+
Activate this skill when the user triggers `/autoresearch:debug` or selects "Debug underperformance" from the submenu. Use this when a campaign, landing page, or funnel experiences a sudden drop or prolonged stagnation in performance and the user wants to identify the root cause.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 8 Diagnostics Hypotheses
|
|
14
|
+
|
|
15
|
+
The debugging engine tests the problem against 8 potential root causes:
|
|
16
|
+
|
|
17
|
+
1. **Creative Fatigue**: High frequency has exhausted creative interest, leading to lower CTR.
|
|
18
|
+
2. **Audience Saturation**: The targeted audience pool is depleted; conversion costs are climbing.
|
|
19
|
+
3. **Competitor Entry**: A new competitor has launched a aggressive offer or outbid your key terms.
|
|
20
|
+
4. **Seasonality / Macro**: Holiday shifts, weekend drops, or economic news are depressing demand.
|
|
21
|
+
5. **Platform Algorithm**: Ad delivery optimization has shifted or a bidding policy change has occurred.
|
|
22
|
+
6. **Landing Page Regression**: Recent code/content updates have broken checkout or slowed down page load.
|
|
23
|
+
7. **Tracking Break**: Pixels are not firing; conversion events are missing or duplicated in reporting.
|
|
24
|
+
8. **Message-Market Misfit**: The ad message does not align with landing page expectations, causing high bounce rates.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## The 15-Iteration Diagnostic Loop
|
|
29
|
+
|
|
30
|
+
- **Iterations 1-8**: Systematically test each of the 8 hypotheses against the campaign's symptoms and metrics.
|
|
31
|
+
- **Iterations 9-12**: Gather additional evidence, narrowing the suspects down to the primary root cause.
|
|
32
|
+
- **Iterations 13-15**: Generate a targeted recovery roadmap to fix the issue and restore performance.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Output Deliverables
|
|
37
|
+
|
|
38
|
+
1. **Root Cause Diagnostic Table**:
|
|
39
|
+
- A list of the tested hypotheses, matched with the observed evidence and rated by likelihood (Primary Cause / Contributing / Ruled Out).
|
|
40
|
+
2. **Campaign Recovery Plan**:
|
|
41
|
+
- Immediate actions to take (e.g. refresh creative, fix pixel, adjust target bid) to get the campaign back on track.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-evals
|
|
3
|
+
description: Analyze past experiment and campaign results to extract patterns and recommend the next test.
|
|
4
|
+
---
|
|
5
|
+
# Autoresearch: Analyze Past Results (`/autoresearch:evals`)
|
|
6
|
+
|
|
7
|
+
## When to Use This Skill
|
|
8
|
+
|
|
9
|
+
Activate this skill when the user triggers `/autoresearch:evals` or selects "Analyze past results" from the submenu. Use this to audit and evaluate past campaign data, CSV experiment logs, or prior loop results to see what worked, what failed, and what to do next.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Analysis Methodology
|
|
14
|
+
|
|
15
|
+
Analyze the user's prior data looking for five critical structural indicators:
|
|
16
|
+
|
|
17
|
+
1. **Winning Patterns**: What commonalities exist in top performers? (e.g. "Action-oriented CTAs drove 40% higher click rates", "Testimonial copy outperformed benefit claims").
|
|
18
|
+
2. **Losing Patterns**: What should we stop doing? (e.g. "Discount offers attracted low-LTV customers", "Passive hooks underperformed across all demographics").
|
|
19
|
+
3. **Trends**: How is performance moving over time? Are click costs increasing while conversions decrease?
|
|
20
|
+
4. **Plateaus**: Identify where optimization gains have stalled (e.g. "CTR has remained flat at 1.2% for 4 weeks despite creative testing").
|
|
21
|
+
5. **Channel Gaps**: Where are we missing attribution or volume?
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Output Deliverables
|
|
26
|
+
|
|
27
|
+
Provide a comprehensive **Experiment Evals Report**:
|
|
28
|
+
|
|
29
|
+
1. **Performance Trend Summary**:
|
|
30
|
+
- A concise paragraph outlining the direction of performance, summarizing details from the ingested data.
|
|
31
|
+
2. **Winners & Losers Table**:
|
|
32
|
+
- A table contrasting winning elements (e.g., specific angles, offers, hooks) with losing elements, showing concrete data patterns.
|
|
33
|
+
3. **The Next Move Recommendation**:
|
|
34
|
+
- The exact next experiment to run based on these findings. This should define: the new hypothesis to test, the target metric, and how to set it up in the core loop.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-fix
|
|
3
|
+
description: Systematically audit and resolve issues in marketing assets one-by-one.
|
|
4
|
+
---
|
|
5
|
+
# Autoresearch: Fix Issues One-by-One (`/autoresearch:fix`)
|
|
6
|
+
|
|
7
|
+
## When to Use This Skill
|
|
8
|
+
|
|
9
|
+
Activate this skill when the user triggers `/autoresearch:fix` or selects "Fix issues one-by-one" from the submenu. Use this to systematically review ad copy, landing pages, or tracking setups to identify and repair minor errors, policy compliance violations, or layout issues.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 6 Common Asset Issue Classes
|
|
14
|
+
|
|
15
|
+
The engine checks and corrects issues in 6 areas:
|
|
16
|
+
|
|
17
|
+
1. **Character Limit Violations**: Ad headlines/descriptions exceeding platform limits (e.g. Meta 40-char headline; Google 30-char headline).
|
|
18
|
+
2. **Broken Tracking Pixels**: Missing conversion tags, incomplete UTM parameter structures, or broken custom events.
|
|
19
|
+
3. **Non-Compliant Copy**: Copy that risks being flagged by platform policies (e.g., using prohibited words, making unsubstantiated claims, missing required disclosures).
|
|
20
|
+
4. **Accessibility Obstacles**: Missing image alt texts, poor text-to-background contrast ratios, or missing navigation labels.
|
|
21
|
+
5. **Broken Links & Redirects**: Non-functioning URLs or loops in redirects.
|
|
22
|
+
6. **Branding Inconsistencies**: Layouts, vocabulary, or style guides that do not match the brand guidelines.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## The 20-Iteration Systematic Repair Loop
|
|
27
|
+
|
|
28
|
+
The engine operates on a strict **Identify ➡️ Fix ➡️ Verify ➡️ Repeat** iteration cycle for 20 rounds:
|
|
29
|
+
- **Phase 1 (Iterations 1-8)**: Crawl the assets to build a checklist of all existing errors.
|
|
30
|
+
- **Phase 2 (Iterations 9-16)**: Resolve the issues one-by-one.
|
|
31
|
+
- **Phase 3 (Iterations 17-20)**: Re-test all corrected items to verify they are perfectly resolved.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Output Deliverables
|
|
36
|
+
|
|
37
|
+
1. **Resolved Issues Registry**:
|
|
38
|
+
- A table listing the issues found, their severity, the exact fix applied, and the verification status (Resolved / Verification Passed).
|
|
39
|
+
2. **Hardened Asset Package**:
|
|
40
|
+
- The final, cleaned-up copy or configuration code ready for immediate use.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-improve
|
|
3
|
+
description: Research ICP pain points, competitor gaps, and trends to generate growth briefs and PRDs.
|
|
4
|
+
---
|
|
5
|
+
# Autoresearch: Research ICP & Growth (`/autoresearch:improve`)
|
|
6
|
+
|
|
7
|
+
## When to Use This Skill
|
|
8
|
+
|
|
9
|
+
Activate this skill when the user triggers `/autoresearch:improve` or selects "Research ICP & growth" from the submenu. This command runs a deep research and growth discovery engine across 15 iterations, producing prioritized Product Requirement Documents (PRDs) and campaign briefs for marketing.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 5 Focus Pillars for Research
|
|
14
|
+
|
|
15
|
+
The loop runs for **15 iterations**, systematically exploring five categories of opportunities:
|
|
16
|
+
|
|
17
|
+
1. **ICP Pain Points**: Deep-dive into ideal customer profile challenges, jobs-to-be-done, unmet needs, and common buying friction points.
|
|
18
|
+
2. **Competitor Gaps**: Identify what competitors are weak at, what messaging angles they are missing, and where their positioning leaves room to win.
|
|
19
|
+
3. **Market Timing**: Analyze seasonal trends, cultural moments, emerging consumer behaviors, and market-level signals.
|
|
20
|
+
4. **Channel & Experience**: Uncover platform-specific channel opportunities (e.g. YouTube shorts, TikTok hook styles) and funnel/UX improvement gaps.
|
|
21
|
+
5. **Revenue & Growth**: Identify monetization, pricing, bundles, upselling, or retention/referral loops that can scale revenue.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## The 15-Iteration Loop
|
|
26
|
+
|
|
27
|
+
Run 15 iterations internally, refining and prioritizing the discoveries:
|
|
28
|
+
- **Phase 1 (Iterations 1-5)**: Scout and extract raw opportunities in each category.
|
|
29
|
+
- **Phase 2 (Iterations 6-10)**: Evaluate and score opportunities based on potential impact, confidence, and ease of execution (ICE framework).
|
|
30
|
+
- **Phase 3 (Iterations 11-15)**: Flesh out the top scoring opportunity into a complete, professional **Marketing Campaign Brief / PRD**.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Deliverables
|
|
35
|
+
|
|
36
|
+
1. **Prioritized Opportunity Matrix**:
|
|
37
|
+
- A markdown table listing the top opportunities, categorized, scored by potential impact (High/Medium/Low), and showing target customer value.
|
|
38
|
+
2. **Campaign Brief / PRD**:
|
|
39
|
+
- For the highest scoring opportunity, output a comprehensive deployment brief covering: Target Audience, Value Proposition, Creative/Ad Concept, Recommended Channels, Metric/Measurement Plan, and a detailed Implementation Checklist.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autoresearch-learn
|
|
3
|
+
description: Competitive intelligence engine to analyze competitor assets and generate messaging playbooks.
|
|
4
|
+
---
|
|
5
|
+
# Autoresearch: Learn from the Market (`/autoresearch:learn`)
|
|
6
|
+
|
|
7
|
+
## When to Use This Skill
|
|
8
|
+
|
|
9
|
+
Activate this skill when the user triggers `/autoresearch:learn` or selects "Learn from the market" from the submenu. This runs a competitive intelligence loop across 10 iterations, analyzing competitor landing pages, ad copy, positioning, and strategies to generate a **Competitive Messaging Playbook**.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 10-Iteration Competitive Research Loop
|
|
14
|
+
|
|
15
|
+
The engine operates over **10 iterations** to scout, distill, and adapt market insights:
|
|
16
|
+
|
|
17
|
+
- **Iterations 1-3 (Scout)**: Analyze known competitors, searching for their active ad variants, main landing page structures, and core hooks. Identify their primary and secondary hooks (e.g. price-focused vs quality-focused).
|
|
18
|
+
- **Iterations 4-6 (Analyze & Score)**: Map out competitor messaging positioning. Identify where they are strong (e.g. powerful social proof) and where they are weak (e.g. slow page speed, generic CTAs).
|
|
19
|
+
- **Iterations 7-9 (Differentiate)**: Formulate counter-positioning angles. How can the user's brand stand out? What specific benefit can we highlight that competitors ignore?
|
|
20
|
+
- **Iteration 10 (Consolidate)**: Synthesize insights into a highly actionable playbook.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Output Deliverables
|
|
25
|
+
|
|
26
|
+
1. **Competitor Mapping Table**:
|
|
27
|
+
- A comparison table comparing the user's business with 2-3 key competitors on value proposition, main CTA, and core ad hook.
|
|
28
|
+
2. **Competitive Messaging Playbook**:
|
|
29
|
+
- **Gaps Identified**: Messaging spaces left wide open by competitors.
|
|
30
|
+
- **Recommended Messaging Angles**: 3 concrete, counter-positioning headlines/angles to test immediately in your campaigns to steal market share.
|
|
31
|
+
- **SWOT-Style Summary**: Strategic cheat sheet for your marketing team.
|