You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49fdef3
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: single source of truth for the AEO audit prompt
Every LLM engine was carrying its own SYSTEM_PROMPT — drifted prose,
different section lists, occasional one-off rules. Now the canonical
spec lives in lib/audit/prompt.ts::buildAEOUserPrompt() and goes out
as the USER turn for Claude / OpenAI / OA-compat (Qwen, Kimi, Gemini,
DeepSeek). Each engine's SYSTEM prompt is reduced to identity, its
tool / context guidance, and the JSON output schema — no more
duplicated section/data-point lists.
Also drops "AI Recognition" from the 10-section spec and renames
"Priority To-Do Checklist" → "Priority To-Do List" to match the
canonical prompt the user shipped on 2026-05-13.
- prompt.ts: SECTIONS back to 10, "Priority To-Do List" final name,
new buildAEOUserPrompt({ targetUrl, companyName }) function.
- claude-engine / openai-engine / oa-compat-engine: SYSTEM trimmed
to identity+tools+schema; USER = buildAEOUserPrompt(...).
- markdown.ts + engine.ts (rule path) updated to the new section
name so the rule report still renders the to-do under the right
header.
- Tests updated to reflect 10 sections and the renamed final header.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor. You analyze websites the way an LLM crawler — GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot — would discover and read them.
43
+
// Minimal system prompt — task content lives in buildAEOUserPrompt so every
44
+
// engine sends the same canonical AEO spec as its USER turn. System only
45
+
// covers identity, tool guidance specific to Claude, and the JSON output
46
+
// schema that messages.parse needs to populate.
47
+
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor — you analyze websites the way an LLM crawler (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot) would discover and read them.
44
48
45
-
For every audit:
46
-
1. Use \`web_fetch\` on the target URL (homepage).
49
+
Research method:
50
+
1. Use \`web_fetch\` on the homepage.
47
51
2. Use \`web_fetch\` on each well-known file: /robots.txt, /sitemap.xml, /llms.txt, /llms-full.txt, /skill.md, /.well-known/ai-plugin.json. Some will 404 — that's a finding.
48
-
3. Use \`web_fetch\` on up to 6 important linked pages found in the homepage nav/footer: /about, /pricing, /blog, /docs, /contact, /team, /customers, /security, /features, /changelog. Skip ones that don't exist on this site.
52
+
3. Use \`web_fetch\` on up to 6 important linked pages from the homepage nav/footer (/about, /pricing, /blog, /docs, /contact, /team, /customers, /security, /features, /changelog). Skip the ones that 404.
49
53
4. Optionally \`web_search\` for additional public context (press, social profiles, recent news).
50
54
51
-
Then produce a structured AEO audit. Findings must be assigned to one of these exact section names:
Follow the user's spec exactly for the report structure and Markdown output. Quote actual content from the site — don't paraphrase. Section ${SECTIONS.length} must be reusable checkboxes (\`- [ ] **P1** Add JSON-LD Organization schema\`). Use ✅ / ⚠️ / ❌ / ❓ status emojis throughout. Tone: direct, specific, no fluff.
53
56
54
-
Data Found must cover ALL of these data points (mark found:false if you couldn't find it):
55
-
${DATA_POINTS.map((d)=>` - ${d}`).join("\n")}
57
+
Findings JSON must match one of these exact section names:
- title: short headline that quotes specifics from this site (not generic)
62
-
- detail: one sentence with the WHY plus the specific evidence (e.g. the actual H1 text, the actual robots.txt line)
63
-
- priority: 1 (critical, breaks AEO entirely) to 5 (polish)
64
-
65
-
For the "AI Recognition" section, BEFORE doing any web_fetch / web_search, answer honestly from your own training data:
66
-
- Do you recognize this company / domain from training? (status: "pass" if yes with substantive recall, "warn" if vague, "fail" if not at all, "unknown" if uncertain)
67
-
- check_key: "recognition.training_data"
68
-
- title: "Familiar with <domain>" or "No prior knowledge of <domain>"
69
-
- detail: One sentence. If you recognize it, name 1–2 concrete things you remember (what they do, who they serve, notable products). If you don't, say so plainly — do NOT speculate or paraphrase web search results.
70
-
- priority: 3 (informational signal, not a defect)
71
-
72
-
This section is a signal of training-data presence, not a quality judgment. Sites that don't appear in training can still be excellent — but the user should know whether they're invisible to the dominant AI surfaces.
73
-
74
-
For score: weigh critical fails heavily. A site missing schema, blocking GPTBot in robots.txt, or hiding all content behind JS should score below 50. A clean, well-instrumented site should score 80+.
75
-
76
-
For summary.pass/warn/fail/unknown: count each across all findings.
77
-
78
-
For markdown: produce the complete report in Markdown with these exact section headers:
79
-
# AEO Audit for {{domain}}
80
-
81
-
**Target:** {url}
82
-
**Score:** {N} / 100
83
-
**Generated:** ISO timestamp
84
-
85
-
## 1. Crawl Summary
86
-
## 2. Data Found
87
-
(Use a Markdown table here: | Data Point | Found? | Source | Notes |)
88
-
## 3. Homepage Audit
89
-
## 4. Schema / Structured Data Audit
90
-
## 5. robots.txt and sitemap.xml Audit
91
-
## 6. LLM / AI Crawler Accessibility
92
-
## 7. AI Recognition
93
-
(One paragraph stating whether you recognize this site from training data, and what specifically you remember if so. No fluff.)
94
-
## 8. Positioning Clarity
95
-
## 9. Missing or Hard-to-Find Information
96
-
## 10. Recommended Fixes
97
-
## 11. Priority To-Do Checklist
98
-
99
-
Use ✅ / ⚠️ / ❌ / ❓ status emojis on each bullet. Quote actual content from the site. Section 10 must be reusable checkboxes ("- [ ] **P1** Add JSON-LD Organization schema").
- title: short headline quoting specifics from this site
65
+
- detail: one sentence with the WHY plus actual evidence (the H1 text, the robots.txt line, etc.)
66
+
- priority: 1 (critical — breaks AEO) to 5 (polish)
100
67
101
-
Tone: direct, specific, no fluff. This is a paid report — quality matters.`;
68
+
For score: critical fails dominate. Missing schema, blocking GPTBot, JS-only content → below 50. Clean instrumentation → 80+. For summary.pass/warn/fail/unknown: count each across all findings.`;
@@ -116,7 +83,7 @@ export async function claudeAudit(targetUrl: string): Promise<ClaudeAuditResult>
116
83
}
117
84
})();
118
85
119
-
constuserPrompt=`Audit this URL: ${targetUrl}\nCompany name (for the report header): ${company}\n\nPretend you've never heard of this company. Use only the public web. Use web_fetch and web_search.`;
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor. Analyze the website content the user provides — homepage HTML and well-known files — the way an LLM crawler (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot) would discover and read it.
52
+
// Identity + JSON schema only. The canonical AEO task lives in
53
+
// buildAEOUserPrompt and is sent as the USER turn. We pre-fetched
54
+
// homepage + well-known files for the model since it has no tool use
55
+
// — the user prompt is followed by the fetched context block.
56
+
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor — you analyze websites the way an LLM crawler (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot) would discover and read them.
53
57
54
-
Produce a structured AEO audit. Findings must be assigned to one of these exact section names:
The user message contains the audit spec followed by pre-fetched page content (homepage HTML, /robots.txt, /sitemap.xml, /llms.txt, /skill.md, and linked pages). Use only that content — you don't have tool access. If a file 404'd it'll say so; report that as a finding.
59
+
60
+
Follow the user's spec exactly for the report structure and Markdown output. Quote actual content from the pages — don't paraphrase. Section ${SECTIONS.length} must be reusable checkboxes (\`- [ ] **P1** Add JSON-LD Organization schema\`). Use ✅ / ⚠️ / ❌ / ❓ emojis throughout. Tone: direct, specific, no fluff.
56
61
57
-
Data Found must cover ALL of these data points (mark found:false if you couldn't find it):
58
-
${DATA_POINTS.map((d)=>` - ${d}`).join("\n")}
62
+
Findings JSON must match one of these exact section names:
- title: short headline quoting specifics from this site
65
70
- detail: one sentence with the WHY plus actual evidence
66
71
- priority: 1 (critical) to 5 (polish)
67
72
68
-
For score: weigh critical fails heavily. Missing schema, blocked AI bots, JS-only content → below 50. Clean instrumentation → 80+.
69
-
70
-
For markdown: produce the complete report in Markdown with the 10 numbered headers exactly. Use ✅ / ⚠️ / ❌ / ❓ emojis on each bullet. Include a Markdown "Data Found" table. Section 10 must be reusable checkboxes ("- [ ] **P1** Add JSON-LD Organization schema").
73
+
For score: critical fails dominate. Missing schema, blocked AI bots, JS-only content → below 50. Clean instrumentation → 80+.
71
74
72
75
OUTPUT FORMAT: Return ONLY a single JSON object matching this schema (no prose, no fences):
73
76
${SCHEMA_DESC}`;
@@ -169,6 +172,10 @@ export async function oaCompatAudit(
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor. Analyze websites the way an LLM crawler — GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot — would discover and read them.
// in buildAEOUserPrompt and is sent as the USER turn, identical across
47
+
// every LLM engine.
48
+
constSYSTEM_PROMPT=`You are CrawlProof, an AEO (Answer Engine Optimization) auditor — you analyze websites the way an LLM crawler (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot, Applebot-Extended, CCBot) would discover and read them.
46
49
47
50
Use the web_search tool to research the target. Pull the homepage, /robots.txt, /sitemap.xml, /llms.txt, /skill.md, and any About/Pricing/Blog/Contact pages you can find. Search for press, social profiles, and recent news as needed.
48
51
49
-
Produce a structured AEO audit. Findings must be assigned to one of these exact section names:
Follow the user's spec exactly for the report structure and Markdown output. Quote actual content from the site — don't paraphrase. Section ${SECTIONS.length} must be reusable checkboxes (\`- [ ] **P1** Add JSON-LD Organization schema\`). Use ✅ / ⚠️ / ❌ / ❓ emojis throughout. Tone: direct, specific, no fluff.
51
53
52
-
Data Found must cover ALL of these data points (mark found:false if you couldn't find it):
53
-
${DATA_POINTS.map((d)=>` - ${d}`).join("\n")}
54
+
Findings JSON must match one of these exact section names:
For markdown: produce the complete report following the section structure exactly. Use ✅ / ⚠️ / ❌ / ❓ status emojis. Include a "Data Found" markdown table in section 2. Section 10 must be reusable checkboxes ("- [ ] **P1** Add JSON-LD Organization schema").
66
-
67
-
Tone: direct, specific, no fluff. This is a paid report.`;
@@ -80,7 +78,7 @@ export async function openaiAudit(targetUrl: string): Promise<ClaudeAuditResult>
80
78
}
81
79
})();
82
80
83
-
constuserPrompt=`Audit this URL: ${targetUrl}\nCompany name (for the report header): ${company}\n\nPretend you've never heard of this company. Use only the public web. Use web_search to fetch pages.`;
0 commit comments