Open-source SEO, GEO, and marketing skills for AI agents.
fix: harden business context ranking
Tong765da0e4ccff
diff --git a/bin/toprank-change-watch b/bin/toprank-change-watchindex 32340b1e..6d878a77 100755--- a/bin/toprank-change-watch+++ b/bin/toprank-change-watch@@ -27,11 +27,11 @@# {# "id": "chg_1729872000000",# "timestamp": "2026-04-14T12:00:00Z",-# "summary": "Paused 3 zombie keywords in Tukwila Search",+# "summary": "Paused 3 zombie keywords in Example City Search",# "reviewAfter": "2026-04-21", # 7d for bid/keyword, 14d for structural# "reviewWindow": "7d",# "reviewed": false,-# "details": { "campaignName": "Tukwila Search" }+# "details": { "campaignName": "Example City Search" }# }# ]# }diff --git a/google-ads/audit/SKILL.md b/google-ads/audit/SKILL.mdindex 4256a169..402554ea 100644--- a/google-ads/audit/SKILL.md+++ b/google-ads/audit/SKILL.md@@ -59,7 +59,7 @@ If a critical query errors out (auth, schema), surface the error and stop — do## Phase 2 — Scope handling-If the user narrows the audit ("focus on grooming", "campaign X", "just check waste"):+If the user narrows the audit ("focus on one campaign", "campaign X", "just check waste"):- Match campaign names by case-insensitive substring. If no match, list available campaigns and ask.- Filter the in-memory dataset before scoring — no extra API calls.diff --git a/google-ads/audit/evals/evals.json b/google-ads/audit/evals/evals.jsonindex 3ea3031a..d064a4e1 100644--- a/google-ads/audit/evals/evals.json+++ b/google-ads/audit/evals/evals.json@@ -3,18 +3,18 @@"evals": [{"id": 1,- "prompt": "Run a full audit of my Google Ads account. Here's the data:\n\n```json\n{\"account\": {\"name\": \"Bay Area Dog Resort\", \"id\": \"9876543210\", \"currency\": \"USD\", \"timezone\": \"America/Los_Angeles\", \"auto_tagging\": true},\n\"campaigns\": [{\"name\": \"Brand\", \"spend\": 800, \"clicks\": 420, \"impressions\": 5200, \"conversions\": 38, \"cpa\": 21.05, \"ctr\": 8.1, \"budget_lost_is\": 5, \"rank_lost_is\": 10}, {\"name\": \"Dog Boarding\", \"spend\": 3200, \"clicks\": 580, \"impressions\": 14000, \"conversions\": 22, \"cpa\": 145.45, \"ctr\": 4.1, \"budget_lost_is\": 35, \"rank_lost_is\": 25}, {\"name\": \"Dog Grooming\", \"spend\": 1500, \"clicks\": 390, \"impressions\": 8800, \"conversions\": 28, \"cpa\": 53.57, \"ctr\": 4.4, \"budget_lost_is\": 12, \"rank_lost_is\": 15}],\n\"keywords\": [{\"campaign\": \"Dog Boarding\", \"keyword\": \"dog boarding near me\", \"spend\": 1100, \"clicks\": 180, \"conversions\": 12, \"qs\": 7}, {\"keyword\": \"luxury dog hotel\", \"campaign\": \"Dog Boarding\", \"spend\": 900, \"clicks\": 120, \"conversions\": 2, \"qs\": 4}, {\"keyword\": \"cheap dog boarding\", \"campaign\": \"Dog Boarding\", \"spend\": 650, \"clicks\": 140, \"conversions\": 0, \"qs\": 3}, {\"keyword\": \"dog kennel jobs\", \"campaign\": \"Dog Boarding\", \"spend\": 280, \"clicks\": 65, \"conversions\": 0, \"qs\": 2}, {\"keyword\": \"dog grooming san francisco\", \"campaign\": \"Dog Grooming\", \"spend\": 800, \"clicks\": 210, \"conversions\": 20, \"qs\": 9}],\n\"conversion_actions\": [{\"name\": \"Phone Call\", \"type\": \"PHONE_CALL\", \"status\": \"ENABLED\"}, {\"name\": \"Form Submit\", \"type\": \"WEBPAGE\", \"status\": \"ENABLED\"}],\n\"search_terms\": [{\"term\": \"dog boarding san francisco\", \"clicks\": 45, \"conversions\": 8, \"spend\": 270}, {\"term\": \"how to start a dog boarding business\", \"clicks\": 32, \"conversions\": 0, \"spend\": 190}, {\"term\": \"dog boarding prices\", \"clicks\": 28, \"conversions\": 3, \"spend\": 140}],\n\"ads_per_group\": {\"Dog Boarding - General\": 1, \"Dog Grooming - SF\": 3}}\n```",- "expected_output": "A comprehensive audit with a scorecard covering all 7 dimensions. Should identify: Dog Boarding campaign has 35% budget-lost IS (severe constraint) AND 25% rank-lost IS (both dimensions problematic). 'cheap dog boarding' and 'dog kennel jobs' are waste ($930 combined, 0 conversions). 'luxury dog hotel' has QS 4 and poor CPA. Dog Boarding ad group has only 1 RSA (needs more). Conversion tracking exists but is basic (no enhanced conversions). Should recommend adding 'dog boarding san francisco' as keyword (8 conversions). Should flag 'how to start a dog boarding business' as negative.",+ "prompt": "Run a full audit of my Google Ads account. Here's the data:\n\n```json\n{\"account\": {\"name\": \"Bay Area Roofing Co\", \"id\": \"9876543210\", \"currency\": \"USD\", \"timezone\": \"America/Los_Angeles\", \"auto_tagging\": true},\n\"campaigns\": [{\"name\": \"Brand\", \"spend\": 800, \"clicks\": 420, \"impressions\": 5200, \"conversions\": 38, \"cpa\": 21.05, \"ctr\": 8.1, \"budget_lost_is\": 5, \"rank_lost_is\": 10}, {\"name\": \"Roof Repair\", \"spend\": 3200, \"clicks\": 580, \"impressions\": 14000, \"conversions\": 22, \"cpa\": 145.45, \"ctr\": 4.1, \"budget_lost_is\": 35, \"rank_lost_is\": 25}, {\"name\": \"Gutter Cleaning\", \"spend\": 1500, \"clicks\": 390, \"impressions\": 8800, \"conversions\": 28, \"cpa\": 53.57, \"ctr\": 4.4, \"budget_lost_is\": 12, \"rank_lost_is\": 15}],\n\"keywords\": [{\"campaign\": \"Roof Repair\", \"keyword\": \"roof repair near me\", \"spend\": 1100, \"clicks\": 180, \"conversions\": 12, \"qs\": 7}, {\"keyword\": \"premium roof repair\", \"campaign\": \"Roof Repair\", \"spend\": 900, \"clicks\": 120, \"conversions\": 2, \"qs\": 4}, {\"keyword\": \"cheap roof repair\", \"campaign\": \"Roof Repair\", \"spend\": 650, \"clicks\": 140, \"conversions\": 0, \"qs\": 3}, {\"keyword\": \"roofing jobs\", \"campaign\": \"Roof Repair\", \"spend\": 280, \"clicks\": 65, \"conversions\": 0, \"qs\": 2}, {\"keyword\": \"gutter cleaning san francisco\", \"campaign\": \"Gutter Cleaning\", \"spend\": 800, \"clicks\": 210, \"conversions\": 20, \"qs\": 9}],\n\"conversion_actions\": [{\"name\": \"Phone Call\", \"type\": \"PHONE_CALL\", \"status\": \"ENABLED\"}, {\"name\": \"Form Submit\", \"type\": \"WEBPAGE\", \"status\": \"ENABLED\"}],\n\"search_terms\": [{\"term\": \"roof repair san francisco\", \"clicks\": 45, \"conversions\": 8, \"spend\": 270}, {\"term\": \"how to start a roofing business\", \"clicks\": 32, \"conversions\": 0, \"spend\": 190}, {\"term\": \"roof repair prices\", \"clicks\": 28, \"conversions\": 3, \"spend\": 140}],\n\"ads_per_group\": {\"Roof Repair - General\": 1, \"Gutter Cleaning - SF\": 3}}\n```",+ "expected_output": "A comprehensive audit with a scorecard covering all 7 dimensions. Should identify: Roof Repair campaign has 35% budget-lost IS (severe constraint) AND 25% rank-lost IS (both dimensions problematic). 'cheap roof repair' and 'roofing jobs' are waste ($930 combined, 0 conversions). 'premium roof repair' has QS 4 and poor CPA. Roof Repair ad group has only 1 RSA (needs more). Conversion tracking exists but is basic (no enhanced conversions). Should recommend adding 'roof repair san francisco' as keyword (8 conversions). Should flag 'how to start a roofing business' as negative.","files": [],"expectations": ["Produces a scorecard table with all 7 health dimensions scored","Calculates an overall health score (numeric)",- "Identifies Dog Boarding campaign's impression share problem using the 2x2 matrix (budget-lost 35% + rank-lost 25%)",- "Identifies 'cheap dog boarding' ($650, 0 conv) and 'dog kennel jobs' ($280, 0 conv) as wasted spend with specific dollar amounts",- "Flags 'luxury dog hotel' QS 4 as needing quality improvement",- "Notes Dog Boarding ad group has only 1 RSA and recommends adding more",- "Recommends adding 'dog boarding san francisco' as a keyword (8 conversions from search terms)",- "Recommends adding 'how to start a dog boarding business' as a negative keyword",+ "Identifies Roof Repair campaign's impression share problem using the 2x2 matrix (budget-lost 35% + rank-lost 25%)",+ "Identifies 'cheap roof repair' ($650, 0 conv) and 'roofing jobs' ($280, 0 conv) as wasted spend with specific dollar amounts",+ "Flags 'premium roof repair' QS 4 as needing quality improvement",+ "Notes Roof Repair ad group has only 1 RSA and recommends adding more",+ "Recommends adding 'roof repair san francisco' as a keyword (8 conversions from search terms)",+ "Recommends adding 'how to start a roofing business' as a negative keyword","Top 3 actions section is present with dollar amounts and expected impact"]},diff --git a/google-ads/audit/references/account-health-scoring.md b/google-ads/audit/references/account-health-scoring.mdindex 57d2b883..9592f70c 100644--- a/google-ads/audit/references/account-health-scoring.md+++ b/google-ads/audit/references/account-health-scoring.md@@ -264,7 +264,7 @@ Plus any **signal/tracking/policy fix** regardless of dollar value — these quaSort by dollar impact descending (signal fixes pinned to the top). Max 5 items. If none qualify, omit the section entirely — don't fabricate.Every Quick Win must be executable via a single `/google-ads` command where applicable and include the command text. Examples:-- `Add 7 negatives to Tukwila Search — saves ~$340/mo (<5 min) · /google-ads add negatives to Tukwila Search: jobs, careers, salary, diy, free, reddit, training`+- `Add 7 negatives to Example City Search — saves ~$340/mo (<5 min) · /google-ads add negatives to Example City Search: jobs, careers, salary, diy, free, reddit, training`- `Enable Enhanced Conversions — unblocks measurement (<15 min) · Configure in Google Ads UI (not /google-ads)`### `time_to_fix` field (kept — descriptive, not a rating)@@ -287,12 +287,12 @@ Persist the pulse metrics with their top contributors. No verdict, no grade, no"waste": {"usd_per_month": 1240,"pct_of_spend": 8.7,- "top_contributor": "keyword 'free dog food' — $340/mo",+ "top_contributor": "keyword 'free estimate' — $340/mo","tracking_blocker": false},"demand_captured": {"pct": 42.7,- "top_opportunity": "Tukwila Search — ~$2,100/mo headroom at 35% budget-lost IS",+ "top_opportunity": "Example City Search — ~$2,100/mo headroom at 35% budget-lost IS","rank_lost_blocker": false},"cpa": {@@ -304,8 +304,8 @@ Persist the pulse metrics with their top contributors. No verdict, no grade, no}},"top_actions": [- "Paused 'free dog food' keyword ($120 waste)",- "Budget-lost IS 40% on Tukwila Search at $14 CPA"+ "Paused 'free estimate' keyword ($120 waste)",+ "Budget-lost IS 40% on Example City Search at $14 CPA"],"next_milestone": null}@@ -314,7 +314,7 @@ Persist the pulse metrics with their top contributors. No verdict, no grade, noOn re-audits, diff the three metric lines directly — no abstract bucket movement:- `Waste: $640/mo (4.1%) _(was $1,240/mo — 3 fixes applied)_`-- `Demand captured: 58% _(was 42% — Tukwila budget increased)_`+- `Demand captured: 58% _(was 42% — Example City budget increased)_`- `CPA: $18.40 _(was $19.88 — stable)_`Three numbers, three deltas, zero artificial ratings. If a number didn't move, say "unchanged." If it moved the wrong way, show the delta without sugar-coating.diff --git a/google-ads/copy/evals/evals.json b/google-ads/copy/evals/evals.jsonindex ef3975f6..42047c26 100644--- a/google-ads/copy/evals/evals.json+++ b/google-ads/copy/evals/evals.json@@ -3,7 +3,7 @@"evals": [{"id": 1,- "prompt": "Write ad copy for a dog grooming business in Seattle called 'Pawfect Grooming'. They offer full grooming, nail trims, and teeth cleaning. They have 4.8 stars on Google with 200+ reviews. They've been in business for 12 years. Target ad group: 'Dog Grooming - Seattle'.",+ "prompt": "Write ad copy for a roof repair business in Portland called 'Acme Roofing'. They offer leak repair, shingle replacement, and roof inspections. They have 4.8 stars on Google with 200+ reviews. They've been in business for 12 years. Target ad group: 'Roof Repair - Portland'.","expected_output": "RSA copy with 2-3 variants, each with a distinct messaging angle. Every headline must show character count and be <= 30 chars. Every description must show character count and be <= 90 chars. Pin positions should be indicated. Variants should be named by their angle (e.g., 'Trust & Experience', 'Value & Convenience').","files": [],"expectations": [diff --git a/google-ads/landing/SKILL.md b/google-ads/landing/SKILL.mdindex 298fc4f5..d2684408 100644--- a/google-ads/landing/SKILL.md+++ b/google-ads/landing/SKILL.md@@ -132,7 +132,7 @@ Append the score to `{data_dir}/landing-page-history.json` so re-audits can show"psi_mobile_cls": 0.15,"psi_mobile_inp_ms": 320,"estimated_lift_usd_per_month": 380,- "ad_groups": ["Tukwila Search - Roofing"],+ "ad_groups": ["Example City Search - Roofing"],"monthly_spend": 1240.50,"monthly_cvr": 2.1,"biggest_leak": "Page Speed — LCP 4.2s on mobile"diff --git a/google-ads/landing/evals/evals.json b/google-ads/landing/evals/evals.jsonindex edcd4986..a2cde0ac 100644--- a/google-ads/landing/evals/evals.json+++ b/google-ads/landing/evals/evals.json@@ -3,7 +3,7 @@"evals": [{"id": 1,- "prompt": "audit this landing page for my Google Ads traffic: https://example.com/dog-training. CTR is solid but conversions are weak — tell me what's hurting the page and what to fix first.",+ "prompt": "audit this landing page for my Google Ads traffic: https://example.com/roof-repair. CTR is solid but conversions are weak — tell me what's hurting the page and what to fix first.","expected_output": "A landing-page diagnostic covering message match, speed/mobile UX, trust signals, CTA/form friction, and the single highest-impact fix.","files": [],"expectations": [diff --git a/google-ads/landing/references/scoring-rubric.md b/google-ads/landing/references/scoring-rubric.mdindex ddcc71f5..0445b2ad 100644--- a/google-ads/landing/references/scoring-rubric.md+++ b/google-ads/landing/references/scoring-rubric.md@@ -28,7 +28,7 @@ The ad promises something. The page must deliver it within 3 seconds of scroll-f|-------|--------|| 90-100 | Page H1 contains the ad's promise word-for-word or a tight synonym. Subhead reinforces. CTA matches the ad's action verb. Offer in ad (if any) is front-and-center on the page || 75-89 | H1 clearly relates to the ad's service and location. Primary CTA matches ad intent. Minor drift in tone or offer language |-| 60-74 | Page is on-topic but generic — H1 says "Quality Roofing Services" when the ad said "Emergency Roof Repair in Tukwila". User has to infer the connection |+| 60-74 | Page is on-topic but generic — H1 says "Quality Roofing Services" when the ad said "Emergency Roof Repair in Example City". User has to infer the connection || 45-59 | Page is about the business but not about the ad's specific angle. Ad pushed urgency, page is evergreen. Ad pushed a specific service, page is a services overview || <45 | Homepage, category page, or completely mismatched content. Ad said "free quote", page has no quote CTA. Ad said "24/7", page shows business hours |diff --git a/google-ads/manage/references/change-tracking.md b/google-ads/manage/references/change-tracking.mdindex 5441b361..508861ce 100644--- a/google-ads/manage/references/change-tracking.md+++ b/google-ads/manage/references/change-tracking.md@@ -11,7 +11,7 @@ Append to the `changes` array:"id": "chg_<unix_timestamp_ms>","timestamp": "<ISO 8601>","action": "<action_type>",- "summary": "<specific one-liner, e.g. 'Paused 5 non-converting keywords in Pet Daycare - Seattle saving ~$340/month'>",+ "summary": "<specific one-liner, e.g. 'Paused 5 non-converting keywords in Example Service - Local saving ~$340/month'>","details": {"campaignId": "<if applicable>","campaignName": "<if applicable>",diff --git a/google-ads/shared/ppc-math.md b/google-ads/shared/ppc-math.mdindex 62079e12..9169d6ec 100644--- a/google-ads/shared/ppc-math.md+++ b/google-ads/shared/ppc-math.md@@ -121,7 +121,7 @@ MER captures organic, brand, and retention — so it's higher than paid ROAS and> "Keyword 'emergency plumber seattle' has CPA of $72. Your Break-Even CPA is $72 (AOV $180 × 40% margin) — every conversion from this keyword nets $0 profit. Either improve CVR or pause."**Headroom example:**-> "Tukwila Search is profitable: CPA $18, Break-Even $72, **~$2,700/mo headroom** at 50 conversions. Budget-Lost IS is 35% — raising budget by $1,500/mo could capture ~$5,000 more revenue."+> "Example City Search is profitable: CPA $18, Break-Even $72, **~$2,700/mo headroom** at 50 conversions. Budget-Lost IS is 35% — raising budget by $1,500/mo could capture ~$5,000 more revenue."The second framing is concretely actionable. The first is a number without a verdict.diff --git a/openclaw/artifacts/examples/gsc-analysis-sample.json b/openclaw/artifacts/examples/gsc-analysis-sample.jsonindex 3809108a..215ff82e 100644--- a/openclaw/artifacts/examples/gsc-analysis-sample.json+++ b/openclaw/artifacts/examples/gsc-analysis-sample.json@@ -13,7 +13,7 @@},"ctr_gaps_by_page": [{- "page": "https://example.com/services/dog-daycare",+ "page": "https://example.com/services/roof-repair","clicks": 20,"impressions": 1200,"ctr": 1.67,@@ -22,7 +22,7 @@],"ctr_opportunities": [{- "query": "dog daycare seattle",+ "query": "roof repair local","clicks": 12,"impressions": 900,"ctr": 1.33,@@ -31,8 +31,8 @@],"cannibalization": [{- "query": "dog daycare pricing",- "winner_page": "https://example.com/services/dog-daycare",+ "query": "roof repair pricing",+ "winner_page": "https://example.com/services/roof-repair","loser_pages": ["https://example.com/pricing"]@@ -41,7 +41,7 @@"comparison": {"declining_pages": [{- "page": "https://example.com/services/dog-boarding",+ "page": "https://example.com/services/roof-repair","change_pct": -35.0,"clicks_now": 18,"clicks_prev": 28@@ -49,7 +49,7 @@],"declining_queries": [{- "query": "overnight dog boarding",+ "query": "emergency roof repair","change_pct": -28.0,"clicks_now": 9,"clicks_prev": 13diff --git a/openclaw/artifacts/examples/improve-page-payload.json b/openclaw/artifacts/examples/improve-page-payload.jsonindex 8afac00f..7f270e51 100644--- a/openclaw/artifacts/examples/improve-page-payload.json+++ b/openclaw/artifacts/examples/improve-page-payload.json@@ -2,7 +2,7 @@"generated_at": "2026-04-29T22:00:00Z","trigger": {"type": "improve_page",- "target": "https://example.com/services/dog-daycare",+ "target": "https://example.com/services/roof-repair","notes": "Improve a service page with weak CTR and missing schema."},"audit": {@@ -36,7 +36,7 @@},"proposal": {"proposal_type": "page_improvement",- "target": "https://example.com/services/dog-daycare",+ "target": "https://example.com/services/roof-repair","summary": "Generate 3 title/meta candidates and add schema markup recommendations.","requires_approval": true},diff --git a/openclaw/bin/weekly_review.py b/openclaw/bin/weekly_review.pyindex 7ca1d868..f522ff5d 100755--- a/openclaw/bin/weekly_review.py+++ b/openclaw/bin/weekly_review.py@@ -198,19 +198,22 @@ def make_issue(LOCAL_INTENT_TERMS = {"near me",- "seattle",- "seatac",- "tukwila",- "ballard",- "west seattle",+ "nearby",+ "local",+ "open now",}COMMERCIAL_SERVICE_TERMS = {- "board",- "boarding",- "daycare",- "grooming",- "kennel",- "pet hotel",+ "service",+ "services",+ "repair",+ "installation",+ "contractor",+ "company",+ "provider",+ "appointment",+ "booking",+ "quote",+ "consultation",}INFORMATIONAL_SERP_TERMS = {"how much",@@ -268,7 +271,7 @@ def zero_click_risk_for_query(query: str | None, intent_class: str | None = Noneif any(term in q for term in INFORMATIONAL_SERP_TERMS):risk_score += 1notes.append("price/how-much wording can trigger answer boxes or calculator-style snippets")- if any(term in q for term in {"near me", "seattle", "seatac", "tukwila", "ballard", "west seattle"}):+ if any(term in q for term in LOCAL_INTENT_TERMS):risk_score -= 1notes.append("local modifier increases booking intent and reduces pure zero-click risk")if risk_score >= 2:@@ -846,7 +849,7 @@ def deep_dive_diagnostic(issue: dict[str, Any], site_id: str, site_profile: dictchecks = {"serp_inspected": serp.get("status") == "ok" and bool(serp.get("results")),"current_snippet_inspected": snippet_snapshot.get("status") == "ok",- "above_the_fold_inspected": packaging.get("status") in {"ok", "partial"},+ "above_the_fold_inspected": packaging.get("status") == "ok","zero_click_risk_accounted_for": True,}return {@@ -973,7 +976,7 @@ def context_page_candidates(business_context: dict[str, Any] | None, reference_udef business_context_says_national_deprioritized(business_context: dict[str, Any] | None) -> bool:priority = (business_context or {}).get("target_customer_priority") or {}- deprioritized = priority.get("deprioritized", []) if isinstance(priority, dict) else priority+ deprioritized = priority.get("deprioritized", []) if isinstance(priority, dict) else []text = context_text(deprioritized)return "national" in text or "outside service area" in text or "non-local" in text@@ -1030,7 +1033,7 @@ def apply_business_context_to_issue(issue: dict[str, Any], business_context: dic}national_discount = score_components["national_click_discount"]raw_priority = float(issue.get("priority_score", 0))- updated["priority_score"] = round(max(raw_priority * national_discount, 0.35), 3)+ updated["priority_score"] = round(raw_priority * national_discount, 3)return updatedreturn issue@@ -1040,8 +1043,8 @@ def apply_business_context(candidates: list[dict[str, Any]], business_context: dBUSINESS_IMPACT_CONTEXT_FIELDS = {- "service_value_weights": "Relative revenue/margin value by service (boarding, daycare, grooming, airport layover, etc.)",- "target_customer_priority": "Priority customer segments (locals, travelers, airport layover, long-stay boarding, etc.)",+ "service_value_weights": "Relative revenue/margin value by service or product line",+ "target_customer_priority": "Priority customer segments (local buyers, high-margin segments, urgent-need customers, recurring customers, etc.)","location_priorities": "Location-level priority/capacity/margin context","conversion_events": "Organic conversion events or booking funnel signals","booking_intent_hierarchy": "Which query intents are most likely to become bookings",@@ -1065,19 +1068,19 @@ def business_context_questions(gaps: list[dict[str, str]]) -> list[str]:wanted = {gap["field"] for gap in gaps}questions = []if "service_value_weights" in wanted:- questions.append("Rank services by business value/margin: boarding, daycare, grooming, airport layover, pet taxi, etc.")+ questions.append("Rank services or product lines by business value/margin.")if "target_customer_priority" in wanted:- questions.append("Which customers matter most: locals, SeaTac travelers, airport layover/import/export customers, long-stay boarding, recurring daycare, grooming?")+ questions.append("Which customer segments matter most: local buyers, high-margin services, recurring customers, urgent-need customers, enterprise accounts, etc.?")if "location_priorities" in wanted:- questions.append("Which locations should SEO prioritize right now, and are any capacity-constrained: Tukwila, Ballard, West Seattle?")+ questions.append("Which markets or service areas should SEO prioritize right now, and are any capacity-constrained?")if "conversion_events" in wanted:- questions.append("What organic conversion signals should count: booking form starts, completed bookings, calls, quote requests, Gingr reservations, GA4 events?")+ questions.append("What organic conversion signals should count: form starts, completed purchases/bookings, calls, quote requests, CRM events, GA4 events?")if "booking_intent_hierarchy" in wanted:- questions.append("Give a rough intent ranking: e.g. dog boarding Seatac > dog boarding Seattle > dog boarding cost > dog boarding near me.")+ questions.append("Give a rough intent ranking: e.g. high-intent local/service query > category query > cost/research query > broad informational query.")if "local_proof_points" in wanted:- questions.append("What proof points should snippets emphasize: 5am-9pm pickup, 24/7 supervision, airport proximity, photo updates, private suites, multi-location coverage?")+ questions.append("What proof points should snippets emphasize: response time, certifications, warranty, reviews, pricing transparency, local coverage, multi-location coverage?")if "serp_competitor_positioning" in wanted:- questions.append("For priority queries, who must we beat or differentiate from: Rover, Wag, Camp Bow Wow, Dogtopia, local kennels, Google Business Profile results?")+ questions.append("For priority queries, who must we beat or differentiate from: direct competitors, marketplaces/directories, map-pack results, review sites, or national brands?")if "page_role_map" in wanted:questions.append("Which pages are transactional landing pages vs informational support pages?")return questionsdiff --git a/openclaw/tests/test_weekly_review_scoring.py b/openclaw/tests/test_weekly_review_scoring.pyindex 10033ae0..347d49d2 100644--- a/openclaw/tests/test_weekly_review_scoring.py+++ b/openclaw/tests/test_weekly_review_scoring.py@@ -38,8 +38,8 @@ class WeeklyReviewScoringTest(unittest.TestCase):]analysis["ctr_gaps_by_page"] = [{- "query": "dog boarding cost",- "page": "https://www.example.com/blog/dog-boarding-cost",+ "query": "roof repair cost",+ "page": "https://www.example.com/blog/roof-repair-cost","clicks": 2,"impressions": 1681,"ctr": 0.12,@@ -52,7 +52,7 @@ class WeeklyReviewScoringTest(unittest.TestCase):issues = payload["audit"]["issues"]self.assertEqual(top_action["type"], "snippet_content_packaging")- self.assertEqual(top_action["target"], "https://www.example.com/blog/dog-boarding-cost")+ self.assertEqual(top_action["target"], "https://www.example.com/blog/roof-repair-cost")self.assertIn("business_intent_score", top_action["score_components"])self.assertGreater(issues[0]["priority_score"], issues[1]["priority_score"])self.assertIn("score_components", issues[0])@@ -90,7 +90,7 @@ class WeeklyReviewScoringTest(unittest.TestCase):"change_pct": -76.9,},{- "page": "https://www.example.com/blog/dog-sitting-costs",+ "page": "https://www.example.com/blog/roof-repair-costs","clicks_now": 58,"clicks_prev": 103,"change_pct": -43.7,@@ -100,15 +100,15 @@ class WeeklyReviewScoringTest(unittest.TestCase):payload = weekly_review.build_payload("example.com", analysis, {"priors": {}}, None)top_action = payload["action_plan"]["actions"][0]- self.assertEqual(top_action["target"], "https://www.example.com/blog/dog-sitting-costs")+ self.assertEqual(top_action["target"], "https://www.example.com/blog/roof-repair-costs")self.assertEqual(top_action["type"], "page_improvement")self.assertIn("45", top_action["expected_impact"])def test_local_commercial_ctr_gap_can_stay_metadata_action(self) -> None:issue = weekly_review.ctr_gap_issue({- "query": "dog boarding seattle",- "page": "https://www.example.com/dog-boarding-seattle",+ "query": "roof repair near me",+ "page": "https://www.example.com/roof-repair","clicks": 13,"impressions": 664,"ctr": 1.96,@@ -124,8 +124,8 @@ class WeeklyReviewScoringTest(unittest.TestCase):def test_informational_ctr_gap_is_not_metadata_only(self) -> None:issue = weekly_review.ctr_gap_issue({- "query": "how much does it cost to board a dog",- "page": "https://www.example.com/blog/dog-boarding-cost",+ "query": "how much does roof repair cost",+ "page": "https://www.example.com/blog/roof-repair-cost","clicks": 2,"impressions": 1681,"ctr": 0.12,@@ -141,7 +141,7 @@ class WeeklyReviewScoringTest(unittest.TestCase):def test_query_only_ctr_gap_is_mapping_not_metadata_action(self) -> None:issue = weekly_review.query_ctr_issue({- "query": "how much does it cost to board a dog",+ "query": "how much does roof repair cost","clicks": 2,"impressions": 1804,"ctr": 0.11,@@ -158,8 +158,8 @@ class WeeklyReviewScoringTest(unittest.TestCase):analysis = self.base_analysis()analysis["ctr_gaps_by_page"] = [{- "query": "how much does it cost to board a dog",- "page": "https://www.example.com/blog/dog-boarding-cost",+ "query": "how much does roof repair cost",+ "page": "https://www.example.com/blog/roof-repair-cost","clicks": 2,"impressions": 1681,"ctr": 0.12,@@ -168,17 +168,17 @@ class WeeklyReviewScoringTest(unittest.TestCase):]business_context = {"target_customer_priority": {- "primary": ["Seattle-area local dog owners"],+ "primary": ["local homeowners"],"deprioritized": ["national informational readers outside service area"],},"booking_intent_hierarchy": {- "highest_priority": ["dog boarding seattle", "dog boarding seatac"],- "supporting_only": ["how much does it cost to board a dog", "dog boarding cost"],+ "highest_priority": ["emergency roof repair portland", "roof repair near me"],+ "supporting_only": ["how much does roof repair cost", "roof repair cost"],},"page_role_map": {- "/blog/dog-boarding-cost": "supporting informational page",- "/blog/dog-boarding-price-seattle": "local commercial-research page",- "/dog-boarding-seattle": "transactional local landing page",+ "/blog/roof-repair-cost": "supporting informational page",+ "/blog/roof-repair-prices-portland": "local commercial-research page",+ "/emergency-roof-repair-portland": "transactional local landing page",},}@@ -187,19 +187,144 @@ class WeeklyReviewScoringTest(unittest.TestCase):proposal = next(item for item in payload["queue_items"] if item["type"] == "action_proposal")self.assertEqual(top_action["type"], "local_intent_ownership")- self.assertEqual(top_action["target"], "https://www.example.com/blog/dog-boarding-price-seattle")- self.assertEqual(top_action["source_target"], "https://www.example.com/blog/dog-boarding-cost")+ self.assertEqual(top_action["target"], "https://www.example.com/blog/roof-repair-prices-portland")+ self.assertEqual(top_action["source_target"], "https://www.example.com/blog/roof-repair-cost")self.assertEqual(proposal["action_type"], "local_intent_ownership")self.assertIn("national_click_discount", proposal["score_components"])- self.assertEqual(proposal["consolidation_targets"]["conversion_target"], "https://www.example.com/dog-boarding-seattle")+ self.assertEqual(proposal["consolidation_targets"]["conversion_target"], "https://www.example.com/emergency-roof-repair-portland")self.assertTrue(any("national informational" in note for note in top_action["operator_judgment_notes"]))++ def test_priority_list_does_not_mean_national_is_deprioritized(self) -> None:+ issue = {+ "recommended_action_type": "snippet_content_packaging",+ "primary_query": "how much does roof repair cost",+ "target": "https://www.example.com/blog/roof-repair-cost",+ "canonical_target": "https://www.example.com/blog/roof-repair-cost",+ "priority_score": 0.6,+ "score_components": {},+ "operator_judgment_notes": [],+ }+ business_context = {+ "target_customer_priority": ["national customers", "local customers"],+ "booking_intent_hierarchy": {"supporting_only": ["how much does roof repair cost"]},+ }++ updated = weekly_review.apply_business_context_to_issue(issue, business_context, site_id="example.com")++ self.assertEqual(updated["recommended_action_type"], "snippet_content_packaging")+ self.assertNotIn("national_click_discount", updated.get("score_components", {}))++ def test_national_click_discount_demotes_ranking_score_without_floor_boost(self) -> None:+ issue = {+ "recommended_action_type": "snippet_content_packaging",+ "primary_query": "how much does roof repair cost",+ "target": "https://www.example.com/blog/roof-repair-cost",+ "canonical_target": "https://www.example.com/blog/roof-repair-cost",+ "priority_score": 0.007,+ "score_components": {},+ "operator_judgment_notes": [],+ }+ business_context = {+ "target_customer_priority": {"deprioritized": ["national informational readers outside service area"]},+ "booking_intent_hierarchy": {"supporting_only": ["how much does roof repair cost"]},+ "page_role_map": {+ "/blog/roof-repair-cost": "supporting informational page",+ "/roof-repair-prices": "local commercial-research page",+ },+ }++ updated = weekly_review.apply_business_context_to_issue(issue, business_context, site_id="example.com")++ self.assertEqual(updated["recommended_action_type"], "local_intent_ownership")+ self.assertEqual(updated["score_components"]["national_click_discount"], 0.25)+ self.assertEqual(updated["priority_score"], 0.002)++ def test_discounted_support_query_does_not_outrank_local_candidate(self) -> None:+ candidates = [+ {+ "recommended_action_type": "snippet_content_packaging",+ "primary_query": "how much does roof repair cost",+ "target": "https://www.example.com/blog/roof-repair-cost",+ "canonical_target": "https://www.example.com/blog/roof-repair-cost",+ "priority_score": 0.8,+ "score_components": {},+ "operator_judgment_notes": [],+ },+ {+ "recommended_action_type": "meta_tags",+ "primary_query": "roof repair near me",+ "target": "https://www.example.com/roof-repair",+ "canonical_target": "https://www.example.com/roof-repair",+ "priority_score": 0.3,+ "score_components": {},+ "operator_judgment_notes": [],+ },+ ]+ business_context = {+ "target_customer_priority": {"deprioritized": ["national informational readers outside service area"]},+ "booking_intent_hierarchy": {+ "highest_priority": ["roof repair near me"],+ "supporting_only": ["how much does roof repair cost"],+ },+ "page_role_map": {+ "/blog/roof-repair-cost": "supporting informational page",+ "/roof-repair-prices": "local commercial-research page",+ "/roof-repair": "transactional local landing page",+ },+ }++ adjusted = weekly_review.dedupe_candidates(weekly_review.apply_business_context(candidates, business_context, site_id="example.com"))+ ranked = weekly_review.apply_prioritization(adjusted, {"priors": {}}, "non_brand_clicks_28d")++ self.assertEqual(ranked[0]["primary_query"], "roof repair near me")+ self.assertEqual(ranked[1]["recommended_action_type"], "local_intent_ownership")++ def test_retargeted_business_context_issues_are_deduped(self) -> None:+ candidates = [+ {+ "recommended_action_type": "snippet_content_packaging",+ "primary_query": "how much does roof repair cost",+ "target": "https://www.example.com/blog/roof-repair-cost",+ "canonical_target": "https://www.example.com/blog/roof-repair-cost",+ "priority_score": 0.6,+ "score_components": {},+ "operator_judgment_notes": [],+ "title": "Support query A",+ },+ {+ "recommended_action_type": "query_intent_mapping",+ "primary_query": "roof repair cost",+ "target": "https://www.example.com/blog/roof-repair-pricing",+ "canonical_target": "https://www.example.com/blog/roof-repair-pricing",+ "priority_score": 0.5,+ "score_components": {},+ "operator_judgment_notes": [],+ "title": "Support query B",+ },+ ]+ business_context = {+ "target_customer_priority": {"deprioritized": ["national informational readers outside service area"]},+ "booking_intent_hierarchy": {"supporting_only": ["how much does roof repair cost", "roof repair cost"]},+ "page_role_map": [+ {"path": "/blog/roof-repair-cost", "role": "supporting informational page"},+ {"path": "/blog/roof-repair-pricing", "role": "supporting informational page"},+ {"path": "/roof-repair-prices", "role": "local commercial-research page"},+ ],+ }++ adjusted = weekly_review.apply_business_context(candidates, business_context, site_id="example.com")+ deduped = weekly_review.dedupe_candidates(adjusted)++ self.assertEqual(len(deduped), 1)+ self.assertEqual(deduped[0]["canonical_target"], "https://www.example.com/roof-repair-prices")+def test_action_proposal_includes_deep_dive_diagnostics_before_approval(self) -> None:analysis = self.base_analysis()analysis["ctr_gaps_by_page"] = [{- "query": "how much does it cost to board a dog",- "page": "https://www.example.com/blog/dog-boarding-cost",+ "query": "how much does roof repair cost",+ "page": "https://www.example.com/blog/roof-repair-cost","clicks": 2,"impressions": 1681,"ctr": 0.12,@@ -210,14 +335,14 @@ class WeeklyReviewScoringTest(unittest.TestCase):root = Path(tmp)source = root / "content" / "blogs"source.mkdir(parents=True)- (source / "dog-boarding-cost.mdx").write_text(+ (source / "roof-repair-cost.mdx").write_text("---\n"- "title: \"Dog Boarding Cost in 2026\"\n"- "description: \"Compare dog boarding prices and hidden fees.\"\n"+ "title: \"Roof Repair Cost in 2026\"\n"+ "description: \"Compare roof repair prices and hidden fees.\"\n""---\n\n"- "# Dog Boarding Cost in 2026\n\n"- "This guide explains fees first. Book a boarding visit when ready.\n\n"- "Prices are $55-$90 per night in Seattle.\n",+ "# Roof Repair Cost in 2026\n\n"+ "This guide explains fees first. Request a repair quote when ready.\n\n"+ "Prices are $55-$90 per project in the local market.\n",encoding="utf-8",)original = weekly_review.serp_snapshot_for_query@@ -225,7 +350,7 @@ class WeeklyReviewScoringTest(unittest.TestCase):"source": "test_serp","status": "ok","query": query,- "results": [{"title": "Dog Boarding Cost", "domain": "example.com", "snippet": "$55-$90 per night"}],+ "results": [{"title": "Roof Repair Cost", "domain": "example.com", "snippet": "$55-$90 per project"}],"answer_like_serp": True,}try:@@ -247,7 +372,7 @@ class WeeklyReviewScoringTest(unittest.TestCase):self.assertTrue(deep_dive["checks"]["current_snippet_inspected"])self.assertTrue(deep_dive["checks"]["above_the_fold_inspected"])self.assertTrue(deep_dive["checks"]["zero_click_risk_accounted_for"])- self.assertEqual(deep_dive["current_snippet"]["title"], "Dog Boarding Cost in 2026")+ self.assertEqual(deep_dive["current_snippet"]["title"], "Roof Repair Cost in 2026")self.assertTrue(deep_dive["above_the_fold"]["has_fast_price_answer_above_fold"])self.assertIn("complete_business_context", proposal["approval_preconditions"])@@ -255,8 +380,8 @@ class WeeklyReviewScoringTest(unittest.TestCase):analysis = self.base_analysis()analysis["ctr_gaps_by_page"] = [{- "query": "dog boarding cost",- "page": "https://www.example.com/blog/dog-boarding-cost",+ "query": "roof repair cost",+ "page": "https://www.example.com/blog/roof-repair-cost","clicks": 2,"impressions": 1681,"ctr": 0.12,diff --git a/seo/content-writer/evals/evals.json b/seo/content-writer/evals/evals.jsonindex 24de73d1..bbad0905 100644--- a/seo/content-writer/evals/evals.json+++ b/seo/content-writer/evals/evals.json@@ -18,7 +18,7 @@},{"id": 2,- "prompt": "Improve this landing page content for our dog grooming service. Target keyword: 'dog grooming austin'. Here's the current page:\n\n# Dog Grooming\n\nWe groom dogs. Our groomers are experienced. We offer baths, haircuts, and nail trims.\n\nCall us today!\n\nPrices start at $40.",+ "prompt": "Improve this landing page content for our roof repair service. Target keyword: 'roof repair austin'. Here's the current page:\n\n# Roof Repair\n\nWe fix roofs. Our technicians are experienced. We offer leak repair, shingle replacement, and inspections.\n\nCall us today!\n\nPrices start at $400.","expected_output": "A rewritten landing page that is conversion-focused, includes the target keyword naturally, adds social proof sections, has a clear CTA, includes service details with pricing structure, and addresses customer pain points. Should identify that the original is thin content with no location specificity, no trust signals, and no differentiation.","files": [],"expectations": [diff --git a/seo/keyword-research/evals/evals.json b/seo/keyword-research/evals/evals.jsonindex 4e75e176..7f0daa27 100644--- a/seo/keyword-research/evals/evals.json+++ b/seo/keyword-research/evals/evals.json@@ -3,14 +3,14 @@"evals": [{"id": 1,- "prompt": "Find keyword opportunities for a boutique pet boarding facility in Austin, TX. We specialize in cage-free boarding and dog daycare.",- "expected_output": "A keyword research report with seed keywords expanded into clusters, intent classification for each keyword, difficulty assessment, and prioritized recommendations. Should include local keywords (Austin-specific), service keywords (cage-free, daycare), and long-tail opportunities.",+ "prompt": "Find keyword opportunities for a boutique roof repair company in Austin, TX. We specialize in emergency leak repair and roof inspections.",+ "expected_output": "A keyword research report with seed keywords expanded into clusters, intent classification for each keyword, difficulty assessment, and prioritized recommendations. Should include local keywords (Austin-specific), service keywords (emergency leak repair, inspections), and long-tail opportunities.","files": [],"expectations": ["Generates 20+ keyword suggestions organized into topic clusters","Classifies each keyword by search intent (informational, commercial, transactional)","Includes local keyword variants with 'Austin' and 'near me'",- "Identifies long-tail opportunities (e.g., 'cage-free dog boarding austin tx')",+ "Identifies long-tail opportunities (e.g., 'emergency roof repair austin tx')","Prioritizes keywords by a scoring framework (not just listed randomly)","Suggests content types for each cluster (blog post, landing page, FAQ)"]diff --git a/seo/seo-analysis/SKILL.md b/seo/seo-analysis/SKILL.mdindex a33d6fdc..5da8422e 100644--- a/seo/seo-analysis/SKILL.md+++ b/seo/seo-analysis/SKILL.md@@ -479,7 +479,7 @@ From these signals, identify the 2-3 most distinct visitor segments. For each:| **Language** | Specific words, phrases, jargon they use | Direct input to title/description rewrites || **Decision trigger** | What makes them convert or return | Shapes CTA and landing page copy |-Be specific. "Small business owner comparing dog boarding software for a 3-location+Be specific. "Small business owner comparing field-service software for a 3-locationoperation" is useful. "Users who want to learn more" is not. Ground every personain actual GSC query patterns — if you can't point to a cluster of queries thatthis persona would type, the persona is speculative and should be dropped.diff --git a/seo/seo-page/SKILL.md b/seo/seo-page/SKILL.mdindex b52d045e..5bab19bf 100644--- a/seo/seo-page/SKILL.md+++ b/seo/seo-page/SKILL.md@@ -508,10 +508,10 @@ Based on findings, offer relevant next steps:1. **Every score needs evidence.** Don't assign a 7/10 without citing what earnedthe 7 and what prevented an 8. Quote actual content from the page.2. **Fixes must be specific.** "Improve the title tag" is useless. "Change the- title from 'Services' to 'Dog Grooming Services in Portland — Same-Day- Appointments | Example Pet Care' (68 chars)" is actionable.+ title from 'Services' to 'Emergency Roof Repair in Portland — Same-Day+ Appointments | Example Roofing' (68 chars)" is actionable.3. **Use GSC data to ground recommendations.** If you know the page ranks #7 for- "dog grooming portland" with 1,200 impressions and 2.1% CTR, say that — and+ "roof repair portland" with 1,200 impressions and 2.1% CTR, say that — andestimate the click gain from moving to #3.4. **Compare to competitors.** A "good" page can still be below the bar if everycompetitor is better. Context matters.diff --git a/seo/seo-page/evals/evals.json b/seo/seo-page/evals/evals.jsonindex ef3a4adb..14fdc167 100644--- a/seo/seo-page/evals/evals.json+++ b/seo/seo-page/evals/evals.json@@ -9,7 +9,7 @@},{"id": 2,- "prompt": "can you check this page for me? https://www.examplepetcare.com/services/dog-grooming — I want to know if the content is good enough to rank",+ "prompt": "can you check this page for me? https://www.example-roofing.com/services/roof-repair — I want to know if the content is good enough to rank","expected_output": "A comprehensive page analysis with E-E-A-T scores, search intent analysis (transactional intent for service page), content quality assessment, competitive comparison, and specific fixes","files": []},diff --git a/seo/shared/business-context.md b/seo/shared/business-context.mdindex d6889a14..93a252d2 100644--- a/seo/shared/business-context.md+++ b/seo/shared/business-context.md@@ -76,12 +76,12 @@ Then ask the business-impact profile questions when the operator needs to rank b> To rank SEO work by business impact instead of clicks, I also need these if you know them:>-> 1. **Service value / margin ranking** — e.g. boarding > grooming > daycare > airport layover.-> 2. **Priority customers** — locals, SeaTac travelers, airport layover/import/export, long-stay boarding, recurring daycare, grooming, etc.-> 3. **Location priorities / capacity** — Tukwila, Ballard, West Seattle; note any capacity constraints.-> 4. **Conversion events** — booking starts, completed bookings, calls, quote requests, Gingr reservations, GA4 events.-> 5. **Booking-intent hierarchy** — e.g. `dog boarding seatac` > `dog boarding seattle` > `dog boarding cost`.-> 6. **Local proof points** — hours, 24/7 supervision, photo updates, airport proximity, pickup/dropoff flexibility, private suites.+> 1. **Service value / margin ranking** — e.g. emergency service > recurring service > one-time consultation.+> 2. **Priority customers** — local buyers, high-margin segments, urgent-need customers, recurring customers, enterprise accounts, etc.+> 3. **Location priorities / capacity** — priority markets, service areas, or regions; note any capacity constraints.+> 4. **Conversion events** — form starts, completed purchases/bookings, calls, quote requests, CRM events, GA4 events.+> 5. **Booking-intent hierarchy** — e.g. `emergency service near me` > `service in city` > `service cost`.+> 6. **Local proof points** — hours, certifications, response time, warranty, reviews, local coverage, pickup/dropoff flexibility.> 7. **Transactional vs informational pages** — which pages are meant to book customers vs support research.If `CACHE_STATUS=stale`, pre-fill the question with the cached values so the user can confirm or correct rather than re-enter from scratch.diff --git a/test/openclaw/test_openclaw_mvp.py b/test/openclaw/test_openclaw_mvp.pyindex 85264bbb..24a93dff 100644--- a/test/openclaw/test_openclaw_mvp.py+++ b/test/openclaw/test_openclaw_mvp.py@@ -122,13 +122,13 @@ def test_improve_page_persists_proposal_and_patch_set(tmp_path):str(REPO_ROOT / 'openclaw' / 'bin' / 'improve_page.py'),'example.com','--url',- 'https://example.com/services/dog-daycare',+ 'https://example.com/services/roof-repair','--issue-summary','Service page CTR is low and schema is missing.','--proposal-summary','Draft new title/meta candidates and add LocalBusiness schema.','--patch-path',- 'pages/services/dog-daycare.tsx',+ 'pages/services/roof-repair.tsx','--patch-summary','Add schema and update metadata fields.',],@@ -141,9 +141,9 @@ def test_improve_page_persists_proposal_and_patch_set(tmp_path):assert (run_dir / 'proposal.json').exists()assert (run_dir / 'patch-set.json').exists()proposal = json.loads((run_dir / 'proposal.json').read_text())- assert proposal['target'] == 'https://example.com/services/dog-daycare'+ assert proposal['target'] == 'https://example.com/services/roof-repair'patch_set = json.loads((run_dir / 'patch-set.json').read_text())- assert patch_set['patches'][0]['path'] == 'pages/services/dog-daycare.tsx'+ assert patch_set['patches'][0]['path'] == 'pages/services/roof-repair.tsx'def test_investigate_drop_creates_recovery_plan_and_followups(tmp_path):@@ -162,7 +162,7 @@ def test_investigate_drop_creates_recovery_plan_and_followups(tmp_path):'--likely-cause','Homepage CTR declined after a copy update.','--target-url',- 'https://example.com/services/dog-daycare',+ 'https://example.com/services/roof-repair',],check=True,env=env,