Open-source SEO, GEO, and marketing skills for AI agents.
feat: require business context for SEO proposals
Tong5de0618c6c30
diff --git a/openclaw/bin/weekly_review.py b/openclaw/bin/weekly_review.pyindex fafff273..30542564 100755--- a/openclaw/bin/weekly_review.py+++ b/openclaw/bin/weekly_review.py@@ -189,6 +189,70 @@ def make_issue(+++LOCAL_INTENT_TERMS = {+ "near me",+ "seattle",+ "seatac",+ "tukwila",+ "ballard",+ "west seattle",+}+COMMERCIAL_SERVICE_TERMS = {+ "board",+ "boarding",+ "daycare",+ "grooming",+ "kennel",+ "pet hotel",+}+INFORMATIONAL_SERP_TERMS = {+ "how much",+ "average",+ "cost",+ "price",+ "prices",+ "per day",+ "per night",+ "for a week",+}+++def business_intent_for_query(query: str | None) -> tuple[float, str, list[str]]:+ """Estimate whether click upside is likely to map to revenue, not just visits.++ This is deliberately a soft judgment lever, not a hard rule. Informational+ price queries can be valuable, but they often have zero-click SERPs and need+ content/CTA packaging, not metadata-only edits.+ """+ if not query:+ return 0.7, "unknown", ["query intent unknown; validate before editing metadata"]++ q = query.lower()+ has_local = any(term in q for term in LOCAL_INTENT_TERMS)+ has_service = any(term in q for term in COMMERCIAL_SERVICE_TERMS)+ has_info = any(term in q for term in INFORMATIONAL_SERP_TERMS)++ if has_local and has_service:+ return 1.0, "local_commercial", []+ if "near me" in q:+ return 0.95, "local_commercial", []+ if has_service and not has_info:+ return 0.85, "commercial", []+ if has_info and has_service:+ return 0.7, "commercial_research", [+ "commercial research query; metadata alone is unproven",+ "possible zero-click/SERP-answer behavior; inspect SERP before assuming CTR lift",+ ]+ if has_info:+ return 0.55, "informational", [+ "informational query; click upside may not convert",+ "possible zero-click/SERP-answer behavior; inspect SERP before assuming CTR lift",+ ]+ return 0.75, "mixed", ["mixed intent; validate business value before content edits"]++def is_branded_query(query: str | None, brand_terms: list[str] | None) -> bool:if not query or not brand_terms:return False@@ -259,14 +323,25 @@ def ctr_gap_issue(gap: dict[str, Any], brand_terms: list[str] | None = None) ->incremental_clicks = max(impressions * ((expected_ctr - ctr) / 100), 0.0)impact_score = clamp(incremental_clicks / 50, 0.05, 2.0)confidence = sample_confidence(clicks=clicks, impressions=impressions)+ query = gap.get("query")+ business_intent_score, intent_class, intent_notes = business_intent_for_query(query)actionability_score = 0.95+ action_type = "meta_tags"+ action_notes = ["clear snippet/title lever with measurable upside"]+ if intent_class in {"commercial_research", "informational", "mixed", "unknown"}:+ action_type = "snippet_content_packaging"+ actionability_score = 0.75+ action_notes = [+ "low CTR is a hypothesis, not proof of bad metadata",+ "recommend SERP + snippet + above-the-fold content diagnosis before editing",+ ]url_quality = float(url_context(raw_target)["url_quality_score"])- query = gap.get("query")goal_alignment_score, goal_notes = goal_alignment_for_query(query, brand_terms)- score = impact_score * confidence * goal_alignment_score * actionability_score * url_quality+ score = impact_score * confidence * goal_alignment_score * actionability_score * url_quality * business_intent_scoreevidence = [f"{impressions:g} impressions with CTR {ctr}%.",- f"Average position {position:g}; conservative expected CTR {expected_ctr}% suggests ~{incremental_clicks:.0f} incremental-click upside.",+ f"Average position {position:g}; conservative expected CTR {expected_ctr}% suggests ~{incremental_clicks:.0f} incremental-click upside before intent/zero-click discount.",+ f"Query intent classified as {intent_class} with business intent score {business_intent_score:g}.",]if query:evidence.append(f"Underperforming query: {query}")@@ -275,19 +350,20 @@ def ctr_gap_issue(gap: dict[str, Any], brand_terms: list[str] | None = None) ->severity_from_score(score),confidence,evidence,- "meta_tags",+ action_type,target=raw_target,base_priority=impact_score,- expected_click_delta=round(incremental_clicks, 1),+ expected_click_delta=round(incremental_clicks * business_intent_score, 1),priority_score=round(score, 3),score_components={"expected_impact": round(impact_score, 3),"confidence_score": confidence,"goal_alignment_score": goal_alignment_score,+ "business_intent_score": business_intent_score,"actionability_score": actionability_score,"url_quality_score": url_quality,},- operator_judgment_notes=["clear snippet/title lever with measurable upside", *goal_notes],+ operator_judgment_notes=[*action_notes, *intent_notes, *goal_notes],)@@ -337,28 +413,32 @@ def query_ctr_issue(opp: dict[str, Any], brand_terms: list[str] | None = None) -impact_score = clamp(incremental_clicks / 65, 0.05, 1.3)confidence = sample_confidence(clicks=clicks, impressions=impressions)actionability_score = 0.55 # Query-only; needs page mapping before editing.- goal_alignment_score, goal_notes = goal_alignment_for_query(opp.get("query"), brand_terms)- score = impact_score * confidence * goal_alignment_score * actionability_score+ query = opp.get("query")+ business_intent_score, intent_class, intent_notes = business_intent_for_query(query)+ goal_alignment_score, goal_notes = goal_alignment_for_query(query, brand_terms)+ score = impact_score * confidence * goal_alignment_score * actionability_score * business_intent_scorereturn make_issue(- f"Query-level CTR opportunity: {opp.get('query')}",+ f"Query-level CTR opportunity: {query}",severity_from_score(score),confidence,[f"{impressions:g} impressions with CTR {ctr}%.",- f"Average position {position:g}; conservative expected CTR {expected_ctr}% suggests ~{incremental_clicks:.0f} incremental-click upside.",+ f"Average position {position:g}; conservative expected CTR {expected_ctr}% suggests ~{incremental_clicks:.0f} incremental-click upside before intent/zero-click discount.",+ f"Query intent classified as {intent_class} with business intent score {business_intent_score:g}.",],- "meta_tags",+ "query_intent_mapping",base_priority=impact_score,- expected_click_delta=round(incremental_clicks, 1),+ expected_click_delta=round(incremental_clicks * business_intent_score, 1),priority_score=round(score, 3),score_components={"expected_impact": round(impact_score, 3),"confidence_score": confidence,"goal_alignment_score": goal_alignment_score,+ "business_intent_score": business_intent_score,"actionability_score": actionability_score,"url_quality_score": 1.0,},- operator_judgment_notes=["query-level signal; map to a page before editing", *goal_notes],+ operator_judgment_notes=["query-level signal; map to a concrete page before editing", *intent_notes, *goal_notes],)@@ -438,7 +518,84 @@ def apply_prioritization(candidates: list[dict[str, Any]], learned: dict[str, Anranked.sort(key=lambda issue: issue["priority_score"], reverse=True)return ranked-def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Any], goal: dict[str, Any] | None) -> dict[str, Any]:+++BUSINESS_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.)",+ "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",+ "local_proof_points": "Local differentiators to use in snippets/content",+ "serp_competitor_positioning": "Competitor/SERP positioning for priority queries",+ "page_role_map": "Transactional vs informational role for important pages",+}+++def business_context_gaps(business_context: dict[str, Any] | None) -> list[dict[str, str]]:+ context = business_context or {}+ gaps = []+ for field, reason in BUSINESS_IMPACT_CONTEXT_FIELDS.items():+ value = context.get(field)+ if value in (None, "", [], {}):+ gaps.append({"field": field, "why_it_matters": reason})+ return gaps+++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.")+ 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?")+ if "location_priorities" in wanted:+ questions.append("Which locations should SEO prioritize right now, and are any capacity-constrained: Tukwila, Ballard, West Seattle?")+ 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?")+ 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.")+ 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?")+ 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?")+ if "page_role_map" in wanted:+ questions.append("Which pages are transactional landing pages vs informational support pages?")+ return questions+++def context_quality_check(business_context: dict[str, Any] | None) -> dict[str, Any]:+ gaps = business_context_gaps(business_context)+ missing = len(gaps)+ total = len(BUSINESS_IMPACT_CONTEXT_FIELDS)+ score = round((total - missing) / total, 3)+ status = "pass" if score >= 0.75 else "warning"+ return {+ "score": score,+ "status": status,+ "missing_fields": gaps,+ "questions": business_context_questions(gaps),+ }+++def build_business_context_request(site_id: str, context_check: dict[str, Any]) -> dict[str, Any] | None:+ if context_check["score"] >= 0.75:+ return None+ return {+ "item_id": f"context_request_{site_id}_business_impact",+ "type": "business_context_request",+ "status": "pending_input",+ "priority": "high",+ "notes": "Complete business-impact context before approving SEO content, snippet, metadata, redirect, or internal-link actions.",+ "business_context_score": context_check["score"],+ "business_context_gaps": context_check["missing_fields"],+ "business_context_questions": context_check["questions"],+ "output_path": f"~/.toprank/business-context/{site_id}.json",+ "blocks_auto_approval": True,+ }+++def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Any], goal: dict[str, Any] | None, business_context: dict[str, Any] | None = None) -> dict[str, Any]:metrics = metric_snapshot_from_analysis(analysis)primary_metric = Noneif goal and goal.get("primary_metric"):@@ -446,6 +603,7 @@ def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Anyif not primary_metric:primary_metric = DEFAULT_PRIMARY_METRIC if DEFAULT_PRIMARY_METRIC in metrics else next(iter(metrics.keys()), DEFAULT_PRIMARY_METRIC)+ context_check = context_quality_check(business_context)candidates = derive_candidate_issues(analysis)ranked = apply_prioritization(candidates, learned, primary_metric)top_issues = ranked[:3] if ranked else [@@ -471,6 +629,9 @@ def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Anynon_brand_clicks = metrics.get(primary_metric)action_entries = []queue_items = []+ context_request = build_business_context_request(site_id, context_check)+ if context_request:+ queue_items.append(context_request)for idx, issue in enumerate(top_issues, start=1):action_id = f"weekly_action_{idx:02d}"action_type = issue["recommended_action_type"]@@ -495,6 +656,7 @@ def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Any"canonical_target": issue.get("canonical_target"),"score_components": issue.get("score_components", {}),"operator_judgment_notes": issue.get("operator_judgment_notes", []),+ "needs_business_context": context_check["score"] < 0.75,"learned_multiplier": issue.get("learned_multiplier", 1.0),})@@ -519,6 +681,10 @@ def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Any"approval_required": True,"score_components": issue.get("score_components", {}),"operator_judgment_notes": issue.get("operator_judgment_notes", []),+ "business_context_score": context_check["score"],+ "business_context_gaps": context_check["missing_fields"],+ "business_context_questions": context_check["questions"],+ "approval_preconditions": ["complete_business_context"] if context_check["score"] < 0.75 else [],})@@ -562,6 +728,12 @@ def build_payload(site_id: str, analysis: dict[str, Any], learned: dict[str, Any"status": "pass" if top_issues[0].get("priority_score", 0) >= 0.35 else "warning","notes": "; ".join(top_issues[0].get("operator_judgment_notes", [])) or "Top action has explicit score components for operator review.",},+ {+ "name": "business impact context",+ "status": context_check["status"],+ "notes": f"Business-impact context completeness: {context_check['score']:.0%}. Missing: {', '.join(gap['field'] for gap in context_check['missing_fields']) or 'none'}.",+ "questions": context_check["questions"],+ },],"follow_up_due": None,},@@ -606,9 +778,20 @@ def main(argv: list[str]) -> int:analysis = run_analysis(site_property, args.days, brand_terms)analysis["_brand_terms"] = profile.get("brand_terms", [])- payload = build_payload(site_id, analysis, learned, active_goal)+ business_context_path = Path.home() / ".toprank" / "business-context" / f"{site_id}.json"+ business_context = load_json(business_context_path, {})+ payload = build_payload(site_id, analysis, learned, active_goal, business_context)result = persist_payload(args.site, payload, root=root)- result["primary_metric"] = payload["queue_items"][0]["primary_metric"] if payload.get("queue_items") else None+ metric_item = next((item for item in payload.get("queue_items", []) if item.get("primary_metric")), None)+ result["primary_metric"] = metric_item["primary_metric"] if metric_item else None+ context_request = next((item for item in payload.get("queue_items", []) if item.get("type") == "business_context_request"), None)+ if context_request:+ result["business_context_request"] = {+ "status": context_request["status"],+ "business_context_score": context_request["business_context_score"],+ "output_path": context_request["output_path"],+ "questions": context_request["business_context_questions"],+ }print(json.dumps(result, indent=2))return 0diff --git a/openclaw/shared/recommendation-quality.md b/openclaw/shared/recommendation-quality.mdindex 469e0efc..d853eebf 100644--- a/openclaw/shared/recommendation-quality.md+++ b/openclaw/shared/recommendation-quality.md@@ -14,6 +14,7 @@ Each recommendation should expose the inputs that drove ranking:- `confidence_score` — sample size and signal stability- `goal_alignment_score` — whether the signal supports the active goal, especially non-brand growth- `actionability_score` — whether there is a clear SEO lever vs a vague investigation+- `business_intent_score` — whether the query likely maps to revenue, not just informational visits- `url_quality_score` — whether the URL is canonical/actionable or a tracking/parameter variant- `learned_multiplier` — site-local prior from previous outcomes@@ -26,14 +27,17 @@ These are not hard approval rules. They are decision levers for the operator and- Branded/navigational query noise outranking non-brand growth opportunities- Cannibalization reports where the “winner” is not actually the intended page- Query-level opportunities that have not been mapped to a concrete page+- Treating high-impression informational/price queries as metadata-only wins without checking zero-click SERP behavior## Preferred behavior- Preserve the raw signal in evidence.- Canonicalize the action target when the raw URL is a tracking variant.- Reclassify tracking-param traffic drops as investigation work instead of content/page edits.-- Let high-impression, high-position, low-CTR opportunities outrank low-volume noisy regressions.+- Let high-impression, high-position, low-CTR opportunities outrank low-volume noisy regressions only when business intent and actionability are also strong.+- For informational price queries, classify the action as snippet/content packaging or query-intent mapping unless a SERP diagnosis proves metadata is the main lever.- Explain why the top action is actionable and what would make it unsafe or low-confidence.+- If business-impact context is incomplete, create an explicit `business_context_request` queue item and surface the questions in the runner result instead of burying them in verification warnings.## Approval boundarydiff --git a/openclaw/tests/test_weekly_review_scoring.py b/openclaw/tests/test_weekly_review_scoring.pyindex c35f5c3c..b86a96df 100644--- a/openclaw/tests/test_weekly_review_scoring.py+++ b/openclaw/tests/test_weekly_review_scoring.py@@ -50,13 +50,18 @@ class WeeklyReviewScoringTest(unittest.TestCase):top_action = payload["action_plan"]["actions"][0]issues = payload["audit"]["issues"]- self.assertEqual(top_action["type"], "meta_tags")+ self.assertEqual(top_action["type"], "snippet_content_packaging")self.assertEqual(top_action["target"], "https://www.example.com/blog/dog-boarding-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])- self.assertEqual(payload["queue_items"][0]["type"], "action_proposal")- self.assertEqual(payload["queue_items"][0]["status"], "pending_approval")- self.assertNotIn("due_at", payload["queue_items"][0])+ context_request = next(item for item in payload["queue_items"] if item["type"] == "business_context_request")+ proposal = next(item for item in payload["queue_items"] if item["type"] == "action_proposal")+ self.assertEqual(context_request["status"], "pending_input")+ self.assertTrue(context_request["business_context_questions"])+ self.assertEqual(proposal["status"], "pending_approval")+ self.assertIn("complete_business_context", proposal["approval_preconditions"])+ self.assertNotIn("due_at", proposal)def test_tracking_url_decline_keeps_raw_target_but_canonicalizes_action_target(self) -> None:issue = weekly_review.decline_issue(@@ -98,6 +103,82 @@ class WeeklyReviewScoringTest(unittest.TestCase):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",+ "clicks": 13,+ "impressions": 664,+ "ctr": 1.96,+ "position": 10.7,+ },+ [],+ )++ self.assertEqual(issue["recommended_action_type"], "meta_tags")+ self.assertEqual(issue["score_components"]["business_intent_score"], 1.0)+ self.assertFalse(any("metadata alone is unproven" in note for note in issue["operator_judgment_notes"]))++ 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",+ "clicks": 2,+ "impressions": 1681,+ "ctr": 0.12,+ "position": 2.8,+ },+ [],+ )++ self.assertEqual(issue["recommended_action_type"], "snippet_content_packaging")+ self.assertLess(issue["score_components"]["business_intent_score"], 1.0)+ self.assertTrue(any("metadata alone is unproven" in note for note in issue["operator_judgment_notes"]))++ 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",+ "clicks": 2,+ "impressions": 1804,+ "ctr": 0.11,+ "position": 3.5,+ },+ [],+ )++ self.assertEqual(issue["recommended_action_type"], "query_intent_mapping")+ self.assertIn("business_intent_score", issue["score_components"])+ self.assertTrue(any("concrete page" in note for note in issue["operator_judgment_notes"]))++ def test_action_proposal_surfaces_business_context_gaps(self) -> None:+ analysis = self.base_analysis()+ analysis["ctr_gaps_by_page"] = [+ {+ "query": "dog boarding cost",+ "page": "https://www.example.com/blog/dog-boarding-cost",+ "clicks": 2,+ "impressions": 1681,+ "ctr": 0.12,+ "position": 2.8,+ }+ ]++ payload = weekly_review.build_payload("example.com", analysis, {"priors": {}}, None, {"business_name": "Example"})+ context_request = next(item for item in payload["queue_items"] if item["type"] == "business_context_request")+ queue_item = next(item for item in payload["queue_items"] if item["type"] == "action_proposal")+ context_check = next(check for check in payload["verification"]["checks"] if check["name"] == "business impact context")++ self.assertEqual(context_check["status"], "warning")+ self.assertEqual(context_request["status"], "pending_input")+ self.assertEqual(context_request["output_path"], "~/.toprank/business-context/example.com.json")+ self.assertLess(queue_item["business_context_score"], 0.75)+ self.assertIn("complete_business_context", queue_item["approval_preconditions"])+ self.assertTrue(any(gap["field"] == "service_value_weights" for gap in context_request["business_context_gaps"]))+ self.assertTrue(context_request["business_context_questions"])+if __name__ == "__main__":unittest.main()diff --git a/seo/shared/business-context.md b/seo/shared/business-context.mdindex af05fb17..d6889a14 100644--- a/seo/shared/business-context.md+++ b/seo/shared/business-context.md@@ -63,7 +63,7 @@ From GSC + homepage, extract:### Step 2 — Ask minimal targeted questions-Ask all three in a single message. Questions 1 and 2 are optional — if the user skips them, fall back to your inferences from Step 1 (note this in the saved `notes` field).+Ask the short base profile questions first. Questions 1 and 2 are optional — if the user skips them, fall back to your inferences from Step 1 (note this in the saved `notes` field).> I'm building a business profile for **$DOMAIN** to make future audit recommendations more specific. Three quick questions — press Enter to skip any and I'll infer from your data:>@@ -72,6 +72,18 @@ Ask all three in a single message. Questions 1 and 2 are optional — if the use> `lead generation` · `ecommerce` · `SaaS / subscription` · `local business` · `content / media` · `other`> 3. **Main competitors** — 2–5 URLs or names *(optional)*+Then ask the business-impact profile questions when the operator needs to rank by value, not just traffic. Ask them as one compact checklist and let the user answer roughly; partial answers are better than no context:++> 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.+> 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.Wait for the user's response before continuing.@@ -103,6 +115,14 @@ target_locations = ["<top countries from GSC country split>"]brand_terms = ["<name variations from user answer 1 + GSC brand signal queries>"]competitors = ["<from user answer 3, or []>"]key_topics = ["<top 5-8 query clusters from GSC>"]+service_value_weights = {"<service>": "<relative value/margin/priority>"}+target_customer_priority = ["<highest-value customer segments>"]+location_priorities = {"<location>": {"priority": "high|medium|low", "notes": "<capacity/margin/strategic context>"}}+conversion_events = ["<events that indicate organic business value>"]+booking_intent_hierarchy = ["<highest-intent query patterns first>"]+local_proof_points = ["<differentiators to use in snippets/content>"]+serp_competitor_positioning = {"<priority query>": ["<competitors or SERP features to beat>"]}+page_role_map = {"<url or path>": "transactional|informational|supporting|unknown"}notes = "<note if answers were inferred rather than user-provided>"# ---------------------------------------------@@ -119,6 +139,14 @@ data = {"brand_terms": brand_terms,"competitors": competitors,"key_topics": key_topics,+ "service_value_weights": service_value_weights,+ "target_customer_priority": target_customer_priority,+ "location_priorities": location_priorities,+ "conversion_events": conversion_events,+ "booking_intent_hierarchy": booking_intent_hierarchy,+ "local_proof_points": local_proof_points,+ "serp_competitor_positioning": serp_competitor_positioning,+ "page_role_map": page_role_map,"notes": notes,}@@ -147,6 +175,14 @@ Once loaded or generated, these values inform every phase that follows:| `target_audience` | Cross-reference with Phase 3.7 personas — flag tension if personas don't match the stated audience || `key_topics` | Anchor content gap recommendations to confirmed topics, not speculative ones || `business_summary` | Open Phase 6 report with a one-liner so all recommendations read as contextual, not generic |+| `service_value_weights` | Convert SEO opportunity into business-impact priority instead of click priority |+| `target_customer_priority` | Penalize low-value segments and promote strategic customer journeys |+| `location_priorities` | Avoid pushing demand to locations that are capacity-constrained or lower priority |+| `conversion_events` | Define what success means after a proposed SEO action is approved |+| `booking_intent_hierarchy` | Score query opportunities by booking likelihood, not just impression volume |+| `local_proof_points` | Ground titles/snippets/content packaging in real differentiators |+| `serp_competitor_positioning` | Decide whether CTR gaps are metadata, SERP feature, competitor, or zero-click problems |+| `page_role_map` | Avoid treating informational blog pages like transactional landing pages |---diff --git a/test/openclaw/test_openclaw_mvp.py b/test/openclaw/test_openclaw_mvp.pyindex 7fdec928..85264bbb 100644--- a/test/openclaw/test_openclaw_mvp.py+++ b/test/openclaw/test_openclaw_mvp.py@@ -413,13 +413,18 @@ def test_weekly_review_uses_learned_priors_and_seeds_followup(tmp_path):run_dirs = sorted((tmp_path / 'runtime' / 'sites' / 'example.com' / 'runs').iterdir())run_dir = run_dirs[-1]action_plan = json.loads((run_dir / 'action-plan.json').read_text())- assert action_plan['actions'][0]['type'] == 'meta_tags'+ assert action_plan['actions'][0]['type'] == 'snippet_content_packaging'queue_files = list((tmp_path / 'runtime' / 'sites' / 'example.com' / 'queue').glob('*.json'))- assert len(queue_files) == 1- queue_item = json.loads(queue_files[0].read_text())+ queue_items = [json.loads(path.read_text()) for path in queue_files]+ queue_by_type = {item['type']: item for item in queue_items}+ assert set(queue_by_type) == {'business_context_request', 'action_proposal'}+ assert queue_by_type['business_context_request']['status'] == 'pending_input'+ assert queue_by_type['business_context_request']['business_context_questions']+ queue_item = queue_by_type['action_proposal']assert queue_item['baseline_metrics']['non_brand_clicks_28d'] == 110.0assert queue_item['primary_metric'] == 'non_brand_clicks_28d'- assert queue_item['action_type'] == 'meta_tags'+ assert queue_item['action_type'] == 'snippet_content_packaging'+ assert 'complete_business_context' in queue_item['approval_preconditions']def test_portfolio_review_ranks_sites(tmp_path):