openads-ai 0.2.15 → 0.2.18
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/dist/cli.js
CHANGED
|
@@ -103,6 +103,7 @@ function buildSystemPrompt(config) {
|
|
|
103
103
|
else {
|
|
104
104
|
parts.push('YOU ARE OPERATING IN AUDIT MODE (SAFE / READ-ONLY).', 'You are authorized to read campaigns, analyze performance data, find budget waste, and recommend copy or landing page changes.', 'CRITICAL SAFETY RULE: You are NOT authorized to make any active modifications to campaigns, budgets, or ad creative settings under any circumstances.', 'If the user asks you to pause a campaign, change a budget, or execute a write operation, explain politely that OpenAds is currently in Audit Mode (Safe/Read-only). Outline the exact steps you would take, and tell them to toggle to Launch Mode in Settings (`openads setup`) to execute them.');
|
|
105
105
|
}
|
|
106
|
+
parts.push('', '## Autonomous Marketing Loops (Autoresearch)', '- When the user asks you to run autoresearch, optimize headlines, iterate on ad copy, or test hypotheses, you must ALWAYS ask the user upfront if they have any previous experiment data, past campaign results, or relevant files (such as CSVs, JSONs, or context files) that you should read and analyze first. Do NOT just output a static list and stop.', '- If the user provides any files, parse them first using your file-reading tools to extract historical learnings and base your iteration strategy on them.', '- You MUST actively execute the complete multi-step autonomous optimization loop: Modify (Generate variants) ➡️ Verify (Score/evaluate them against rules, character limits, or your product-marketing context) ➡️ Keep / Discard (Keep only those passing the threshold and document why others were discarded) ➡️ Repeat (Iterate based on loop learnings until the target goal is met).', '- Keep the user updated on each cycle with a concise progress log (e.g. "Loop 1: Generated 10. 3 passed, 7 discarded. (Reason: too long)" and "Loop 2: Generated 10. ...").', '- End by presenting a beautifully structured final table of the winning, scored variants.', '');
|
|
106
107
|
parts.push('', '## Memory', '', `Your business context file is at: ${contextPath}`, 'This file contains everything you have learned about the user\'s business across sessions.', 'At the START of every conversation, read this file to recall past context.', 'At the END of a conversation (or when you learn something significant), APPEND new insights to the "## Learnings" section of that file.', 'Things worth remembering: product details, audience segments, campaign performance benchmarks, winning ad angles, competitor insights, budget constraints, seasonal patterns, and any preferences the user expresses.', 'Format each learning as a bullet point with a date, e.g.: "- (2026-05-24) Best-performing Meta creative uses customer testimonial videos."', 'Never overwrite existing learnings — only append new ones.', 'If the learnings section grows beyond 50 items, summarize the oldest 25 into a "## Summary" section at the top and remove the individual bullets.');
|
|
107
108
|
if (config?.productContext) {
|
|
108
109
|
parts.push(`\nThe user's business: ${config.productContext}`);
|
|
@@ -313,14 +314,25 @@ async function main() {
|
|
|
313
314
|
await runScheduleManager();
|
|
314
315
|
return;
|
|
315
316
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
317
|
+
if (action === 'audit') {
|
|
318
|
+
let auditTemplate = 'audit-google-ads';
|
|
319
|
+
if (config.metaToken && !config.connectGoogle) {
|
|
320
|
+
auditTemplate = 'audit-meta-ads';
|
|
321
|
+
}
|
|
322
|
+
else if (config.metaToken && config.connectGoogle) {
|
|
323
|
+
auditTemplate = 'audit-campaigns';
|
|
324
|
+
}
|
|
325
|
+
finalArgs = [auditTemplate];
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
const actionMap = {
|
|
329
|
+
chat: [],
|
|
330
|
+
copy: ['write-ad-copy'],
|
|
331
|
+
autoresearch: ['autoresearch-plan'],
|
|
332
|
+
gtm: ['go-to-market'],
|
|
333
|
+
};
|
|
334
|
+
finalArgs = actionMap[action] || [];
|
|
335
|
+
}
|
|
324
336
|
}
|
|
325
337
|
// ─── Loading Spinner ────────────────────────────────────────────
|
|
326
338
|
const spinner = ora({
|
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ Before starting the loop, you must define the boundaries. If the user hasn't pro
|
|
|
42
42
|
1. **Goal**: What are we trying to achieve? (e.g., "Generate 20 high-converting headlines")
|
|
43
43
|
2. **Metric**: How do we score them? (e.g., "Must pass PAS framework criteria and be under 30 characters")
|
|
44
44
|
3. **Scope**: What is out of bounds? (e.g., "Do not use the word 'Free'")
|
|
45
|
+
4. **Prior Data**: Do you have any previous experiment results, campaign performance data, or files (like CSVs or JSONs) I should read and analyze first to base our new strategy on?
|
|
45
46
|
|
|
46
47
|
(Tip: recommend the user type `/autoresearch:plan` to launch the configuration wizard).
|
|
47
48
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a comprehensive audit of all connected ad campaigns
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are the Lead Growth Marketing Auditor.
|
|
6
|
+
The user has requested a full audit of their advertising campaigns.
|
|
7
|
+
|
|
8
|
+
1. Identify connected platforms:
|
|
9
|
+
- Check if Meta Ads is connected. If yes, run the proactive sequence: call `get_ad_accounts()` to retrieve the literal account ID (e.g. `act_527976914813519`), call `list_campaigns(account_id)` to find campaigns, and immediately fetch performance metrics for active campaign IDs using `get_campaign_performance` or `get_insights` without stopping.
|
|
10
|
+
- Check if Google Ads is connected. If yes, use `list_accounts` to retrieve active account IDs, and query metrics for top campaigns using `get_campaign_performance` or `get_insights`.
|
|
11
|
+
2. Analyze the campaigns:
|
|
12
|
+
- Apply `meta-ads.md` skill to evaluate Meta creative structure, copy hooks, and ABO/CBO budgets.
|
|
13
|
+
- Apply `google-ads.md` skill to evaluate Google Ads campaign structure, keywords, match types, and bidding.
|
|
14
|
+
3. Provide a structured marketing report covering:
|
|
15
|
+
- 🔴 Critical Issues (e.g. active budget bleed, high keyword waste, high creative frequency)
|
|
16
|
+
- 🟡 Warnings (e.g. low quality scores, weak copy hooks, poor landing page message match)
|
|
17
|
+
- 🟢 Opportunities (e.g. budget reallocation, fresh creative concepts, target expansion)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Perform a comprehensive audit of Meta (Facebook/Instagram) ad campaigns
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are the Meta Ads Auditor.
|
|
6
|
+
The user has requested a full audit of their Meta Ads account.
|
|
7
|
+
|
|
8
|
+
1. Discover and query: Follow the proactive sequence to query live Meta Ads data. First, call `get_ad_accounts()` to get the connected ad account and retrieve the literal account ID (e.g. `act_527976914813519`). Then call `list_campaigns(account_id)` to list campaigns and retrieve active campaign IDs. Proactively query performance/insights for active campaign IDs using `get_campaign_performance` or `get_insights` without stopping to ask.
|
|
9
|
+
2. Apply the `meta-ads.md` skill to analyze campaign structure (ABO vs. CBO), creative hook formula, copy structure, and bidding.
|
|
10
|
+
3. Provide a structured marketing report with:
|
|
11
|
+
- 🔴 Critical Issues (e.g. ad sets bleeding budget, high frequency, lack of creative variety)
|
|
12
|
+
- 🟡 Warnings (e.g. missing hook formulas, poor CTA, low ROAS)
|
|
13
|
+
- 🟢 Opportunities (e.g. scaling winning ad sets, testing UGC style creatives, expanding ABO tests)
|