GSC Autonomous SEO Engine

Source: /Users/jonathon/Auto1111/Claude/gsc-autonomous-seo/ project files, MEMORY.md project notes

An autonomous feedback loop that reads Google Search Console data, scores per-query optimization opportunities, generates Claude AI enhancements, and publishes to WordPress. Built for WEO Marketly’s weomedia.com pilot site with dental-industry-specific guardrails. The core philosophy: per-query tracking (not aggregate), surgical edits (never >40% page rewrite), and crawl-aware cooldowns so Google has time to re-index before the next enhancement pass.

What It Does

  • Reads GSC API v3 data for individual search queries (not just page-level aggregates)
  • Scores each query on a 5-component formula: position, impressions, CTR, clicks, opportunity
  • Identifies enhancement opportunities and generates improvements via Claude Sonnet 4.5 — the Blog-Agent-Worker can produce the enhanced content
  • Publishes optimized content to WordPress REST API
  • Monitors post-publish crawl status and enforces cooldowns before further changes

Stack

  • Runtime: Node.js ESM
  • Database: PostgreSQL 16 (per-query tracking, enhancement history, crawl status)
  • AI: Claude Sonnet 4.5 via Anthropic API
  • Data source: Google Search Console API v3
  • Publishing target: WordPress REST API (Yoast/RankMath compatible)
  • Client: WEO Marketly (weomedia.com pilot site)

5-Component Scoring Formula

Each query is scored individually, not aggregated at the page level:

  • Position — Current ranking position (lower is better, higher opportunity when close to page 1)
  • Impressions — Search volume proxy; high impressions with poor position = high opportunity
  • CTR — Click-through rate vs expected CTR for that position; underperforming CTR signals title/meta issues
  • Clicks — Absolute traffic value; validates that impressions translate to real volume
  • Opportunity — Composite score combining the above to prioritize which queries to optimize first

7 Enhancement Types

  1. Title/meta — Rewrite title tags and meta descriptions for CTR improvement
  2. Schema — Add or improve structured data markup
  3. Internal links — Insert contextual internal links to strengthen page authority
  4. FAQ — Add FAQ sections targeting PAA (People Also Ask) and featured snippet opportunities
  5. Stats refresh — Update outdated statistics with current data and citations
  6. Heading structure — Restructure H2/H3 hierarchy for better topical coverage
  7. Direct-answer formatting — Reformat content sections to win featured snippets and AI Overviews

Cooldown System

Cooldowns activate AFTER confirmed Google crawl (not after publishing):

  • 7 days — Schema-only changes (low risk, fast to evaluate)
  • 14 days — Meta/title changes (moderate impact, needs SERP cycling)
  • 60 days — Content body changes (high impact, needs full re-evaluation period)

The system checks Google’s crawl status via sitemaps. It uses natural re-crawling via sitemap submission — never the Indexing API, which Hunter explicitly rejected as too aggressive.

Design Principles (Hunter’s Requirements)

  • Per-query tracking — Hunter’s #1 requirement. Individual query performance, not page averages
  • Human review toggle — Every enhancement can be flagged for human review before publishing. Never remove this capability
  • Crawl-aware cooldowns — Don’t stack changes faster than Google can evaluate them
  • Surgical enhancement limit — Never rewrite more than 40% of a page in a single pass. Preserve the original writer’s voice
  • Natural re-crawling — Sitemap-based, not Indexing API. Let Google discover changes organically

Dental-Specific Guardrails

  • B2B audience — Target audience is dental practice owners and office managers, not patients
  • Medical safety in prompts — System prompts include dental content safety guidelines
  • Schema types — Never use HowTo schema for medical procedures (Google policy violation)
  • Statistic safety — All statistics must include citations and date ranges; no invented dental health claims

Current Status

  • Phase 1 MVP in development
  • Hunter setting up WordPress sandbox with 28 blog posts + Yoast/RankMath
  • PR #4 open for Hunter/Andy review
  • All 6 prompt types tuned, 18/18 tests passing
  • ANTHROPIC_API_KEY sourced from sibling ad-scraper project

Key Takeaways

  • Per-query tracking is fundamentally different from page-level SEO — it reveals which specific searches underperform and why
  • Cooldowns tied to confirmed crawl status prevent the “stack changes and hope” anti-pattern
  • The 40% rewrite limit is not just about quality — it prevents triggering Google’s content-change detection thresholds
  • Human review toggle is non-negotiable for client trust in autonomous systems
  • Dental B2B content has specific compliance requirements that generic SEO tools miss

Try It

  1. Review the PR #4 codebase at /Users/jonathon/Auto1111/Claude/gsc-autonomous-seo/
  2. Run the test suite: npm test (18 tests covering all 6 prompt types)
  3. Once Hunter’s WordPress sandbox is ready, configure .env with GSC and WP credentials
  4. Start with schema-only enhancements (7d cooldown) to validate the pipeline end-to-end before escalating to title/meta or content changes