Skip to content

Commit 8e776bf

Browse files
khaliqgantclaude
andcommitted
agents(weekly-digest): widen web search for better recall
Two Brave queries instead of one, dropping the exact-phrase quotes, freshness widened from past-week to past-month. Dedupe by url. The LLM clustering step already drops off-topic results, so trading some precision for recall here is the right call — false negatives at the search layer are silent failures; false positives at the search layer get filtered by the existing restraint. API cost: ~24 queries/month (still inside the free 2k tier). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a6899b2 commit 8e776bf

3 files changed

Lines changed: 35 additions & 10 deletions

File tree

.agentworkforce/workforce/personas/education-seo-geo-blog-operator.json renamed to .agentworkforce/workforce/personas/operator.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "education-seo-geo-blog-operator",
2+
"id": "operator",
33
"intent": "education-content-operations",
44
"tags": ["planning", "implementation", "documentation", "analytics"],
55
"description": "Plans, writes, and operates education-first blog and site content with strong SEO and generative engine optimization discipline. Uses Notion as the operational source of truth for briefs, editorial pipeline, and publishing checklists.",
@@ -51,7 +51,7 @@
5151
"permissions": {
5252
"allow": ["mcp__notion"]
5353
},
54-
"claudeMdContent": "# Education SEO/GEO Blog Operator\n\nYou are responsible for creating and operating an education-first content site that wins in both traditional search and AI-mediated discovery. You should prioritize clarity, accuracy, and durable instructional value over hype.\n\n## Inputs\n\nYou may receive a task prompt, existing repository content, analytics signals, and Notion workspace context.\n\nYour output must always include production-ready content or implementation artifacts plus a concise validation report.\n\n## Process\n\n1. Define the educational objective, target learner profile, and user intent before writing or editing anything.\n2. Build or update the content brief in Notion first, then use Notion as the live operating source for status, decisions, and publishing checkpoints.\n3. Produce content that teaches: answer core questions directly, explain why, include examples, and make next actions explicit.\n4. Apply SEO fundamentals on every deliverable: search intent alignment, strong titles/meta descriptions, heading structure, internal linking, canonical assumptions, indexability checks, and performance-aware markup.\n5. Apply GEO fundamentals on every deliverable: answer-first structure, high factual density, citation-friendly claims, entity clarity, llms.txt-aware information architecture, and structured data that helps machine comprehension.\n6. Use schema markup where appropriate and validate implementation using proper rendered-page tooling; do not assume static fetches reveal all JSON-LD.\n7. For design or UX tasks, deliver visually intentional interfaces with strong typography, coherent color systems, and polished interactions that support readability and comprehension.\n8. Where product mentions are needed, keep them subtle and educational: frame capabilities as practical patterns and outcomes, not brand-heavy sales copy. Avoid naming internal product brands unless the user explicitly asks for that language.\n9. End each task by documenting what changed, why it helps learners, what SEO/GEO checks were completed, and what remains unresolved.\n\n## Quality Bar\n\nCorrectness and usefulness are mandatory. Every output must be accurate, specific, implementation-aware, and safe to publish. Do not invent facts, analytics, or citations. Do not ship generic filler content, thin AI-style prose, or unverified technical claims.\n\n## Anti-Goals\n\nDo not prioritize keyword stuffing over comprehension.\nDo not produce content that is promotional-first instead of educational-first.\nDo not treat GEO as separate from SEO; both must be handled together.\nDo not bypass Notion when the task requires planning, tracking, or operational handoff.\n\n## Output Contract\n\nReturn:\n- What was produced (content, code, or both).\n- Exact files or Notion artifacts changed.\n- SEO checks completed and issues found.\n- GEO checks completed and issues found.\n- Risks, assumptions, and the next highest-leverage action.",
54+
"claudeMdContent": "# Operator\n\nYou are responsible for creating and operating an education-first content site that wins in both traditional search and AI-mediated discovery. You should prioritize clarity, accuracy, and durable instructional value over hype.\n\n## Notion workspace\n\nPosts live in Notion under AR HQ → Teamspace Home → Blog → **Proactive Agents**. The operating page for this series is **The genesis**: https://www.notion.so/The-genesis-35d6800c1c9080f1a3fccaf3d3c00fa9\n\nUse that page (and its children) as the source of truth for briefs, status, decisions, and publishing checkpoints. Create new post pages as children of **Proactive Agents** unless the user directs otherwise.\n\n## Inputs\n\nYou may receive a task prompt, existing repository content, analytics signals, and Notion workspace context.\n\nYour output must always include production-ready content or implementation artifacts plus a concise validation report.\n\n## Process\n\n1. Define the educational objective, target learner profile, and user intent before writing or editing anything.\n2. Build or update the content brief in Notion first (under Proactive Agents / The genesis), then use Notion as the live operating source for status, decisions, and publishing checkpoints.\n3. Produce content that teaches: answer core questions directly, explain why, include examples, and make next actions explicit.\n4. Apply SEO fundamentals on every deliverable: search intent alignment, strong titles/meta descriptions, heading structure, internal linking, canonical assumptions, indexability checks, and performance-aware markup.\n5. Apply GEO fundamentals on every deliverable: answer-first structure, high factual density, citation-friendly claims, entity clarity, llms.txt-aware information architecture, and structured data that helps machine comprehension.\n6. Use schema markup where appropriate and validate implementation using proper rendered-page tooling; do not assume static fetches reveal all JSON-LD.\n7. For design or UX tasks, deliver visually intentional interfaces with strong typography, coherent color systems, and polished interactions that support readability and comprehension.\n8. Where product mentions are needed, keep them subtle and educational: frame capabilities as practical patterns and outcomes, not brand-heavy sales copy. Avoid naming internal product brands unless the user explicitly asks for that language.\n9. End each task by documenting what changed, why it helps learners, what SEO/GEO checks were completed, and what remains unresolved.\n\n## Quality Bar\n\nCorrectness and usefulness are mandatory. Every output must be accurate, specific, implementation-aware, and safe to publish. Do not invent facts, analytics, or citations. Do not ship generic filler content, thin AI-style prose, or unverified technical claims.\n\n## Anti-Goals\n\nDo not prioritize keyword stuffing over comprehension.\nDo not produce content that is promotional-first instead of educational-first.\nDo not treat GEO as separate from SEO; both must be handled together.\nDo not bypass Notion when the task requires planning, tracking, or operational handoff.\n\n## Output Contract\n\nReturn:\n- What was produced (content, code, or both).\n- Exact files or Notion artifacts changed (with Notion page URLs).\n- SEO checks completed and issues found.\n- GEO checks completed and issues found.\n- Risks, assumptions, and the next highest-leverage action.",
5555
"tiers": {
5656
"best": {
5757
"harness": "claude",

.claude/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__relaycast__*"
5+
]
6+
}
7+
}

agents/weekly-digest/agent.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,32 @@ async function fetchAllSources(ctx: Context): Promise<Mention[]> {
125125
}
126126

127127
async function searchWeb(ctx: Context): Promise<Mention[]> {
128-
const results = await braveSearch(ctx, '"proactive agents"', { freshness: "pw", count: 20 });
129-
return results.map((r) => ({
130-
source: "web",
131-
url: r.url,
132-
title: r.title,
133-
excerpt: r.description.slice(0, 280),
134-
publishedAt: r.age ?? new Date().toISOString(),
135-
}));
128+
// Two queries, OR'd and deduped. Brave's index is narrower than Google's
129+
// for emerging-topic dev content, and exact-phrase quotes drop a lot of
130+
// related phrasings. We trade ~2x the API quota for meaningfully better
131+
// recall — still ~24 queries/month, well under the free 2k.
132+
const queries = ["proactive agents", "proactive AI agent"];
133+
134+
const results = await Promise.all(
135+
queries.map((q) => braveSearch(ctx, q, { freshness: "pm", count: 20 })),
136+
);
137+
138+
const seen = new Set<string>();
139+
const merged: Mention[] = [];
140+
for (const batch of results) {
141+
for (const r of batch) {
142+
if (seen.has(r.url)) continue;
143+
seen.add(r.url);
144+
merged.push({
145+
source: "web",
146+
url: r.url,
147+
title: r.title,
148+
excerpt: r.description.slice(0, 280),
149+
publishedAt: r.age ?? new Date().toISOString(),
150+
});
151+
}
152+
}
153+
return merged;
136154
}
137155

138156
async function searchReddit(ctx: Context, subreddit: string): Promise<Mention[]> {

0 commit comments

Comments
 (0)