Build AI-powered SEO content engine with GSC feedback loops
14 diagnostic scripts and configs for an AI content engine that took a site from 604K to 4.62M monthly impressions.
1.0.0Add to Favorites
Why it matters
Build and operate a complete AI-driven content engine that uses Google Search Console data to continuously optimize content performance, automate quality gates, and scale from zero to millions of monthly impressions through systematic feedback loops and multi-model agent orchestration.
Outcomes
What it gets done
Detect and fix keyword cannibalization, orphan pages, and AI template fingerprints across your site
Generate weekly SEO reports with title rewrite candidates, striking distance pages, and query gap opportunities
Orchestrate multi-model AI pipelines with quality gates, anti-AI detection, and structured data validation
Automate content refresh cycles, internal linking, instant indexing via WebSub, and build cost controls
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Overview
Ai Seo Playbook
AI SEO Playbook is a toolkit of 14 diagnostic scripts and quality-gate configs implementing a Google Search Console feedback loop for an AI content engine, built from the system behind a site's growth from 604K to 4.62M monthly impressions. Use it to build or audit an AI-assisted content pipeline with an existing GSC property, running the feedback loop of measurement, fixes, and republishing on a recurring cadence.
What it does
AI SEO Playbook is the toolkit behind an AI-powered content engine built on ValueAddVC.com that grew from 604K to 4.62M monthly impressions in three months, using AI agents, a Google Search Console (GSC) feedback loop, and automated quality gates. It ships 14 diagnostic scripts, 9 configuration files covering safety guards, agent orchestration, and quality gates, structured data schema examples, and CI automation - not just prompts or theory, but the operating system behind those results. On the source site, the system drove daily clicks from about 50 to a peak of 854, average position from 12+ to 7.5, 92 title rewrites, 21 fixed cannibalization clusters, 191 previously-orphaned pages linked, and over 500 AI template phrases purged to zero.
When to use - and when NOT to
Use it to build or audit an AI-generated content operation: finding title-rewrite opportunities on pages ranking position 4-20 with high impressions but low click-through, detecting pages that cannibalize each other's rankings, scanning content for the repeated phrases that signal scaled-AI-content abuse to Google, and mining GSC data for queries you already rank for informally but have no dedicated page targeting. It is not a plug-and-play SEO tool for a site with no existing GSC property or content pipeline - it assumes a Google Cloud project with the Search Console API enabled, a Node.js content workflow, and a willingness to run the feedback loop (GSC data feeds scripts, scripts surface fixes, AI agents apply fixes through quality gates, results feed back into GSC) on a recurring, at least weekly, cadence.
Inputs and outputs
git clone https://github.com/TraceCohenTech/ai-seo-playbook.git
cd ai-seo-playbook
npm install
After authenticating against the GSC API, key scripts include npm run rewrite-candidates -- --site sc-domain:yoursite.com (title rewrite opportunities), npm run template-scan -- --dir ./your-content-directory (AI fingerprint scan), npm run find-cannibals, npm run content-audit (scores every page into KILL/MERGE/UPDATE/PROMOTE/KEEP), npm run find-orphans (pages with zero inbound internal links), npm run query-gaps (retroactive keyword discovery), npm run striking-distance (position 5-20 opportunities), and npm run weekly-report. Each script has a sample output file under /samples so you can see the expected format before running anything against real data.
Integrations
Configuration files define the operating rules: format-rotation.json (a 5-format content system), quality-gates.json (publish gates including cannibalization checks and source verification), anti-ai-rules.json (a blocklist of AI template phrases and human-sounding style rules), keyword-anticipation.json (an event calendar to publish before demand spikes), and agent-orchestration.json (a multi-model pipeline: Opus/Fable for planning, Sonnet for writing, Haiku for mechanical tasks, capped at 3 concurrent agents). A bundled GitHub Action (weekly-seo-report.yml) runs the weekly report every Sunday, commits results, and can open a GitHub issue with the summary; websub-ping.mjs and indexing-submitter.mjs push updated content to Google for near-instant crawling. Licensed under MIT.
Who it's for
Content and SEO teams running an AI-assisted publishing pipeline who want the measurement, quality-gate, and feedback-loop infrastructure that turns AI content output into sustained organic growth, rather than a one-off batch of AI-written pages.
Source README
AI SEO Playbook
The complete playbook for building an AI-powered content engine that actually ranks - from zero to 5.6M impressions in 4 months.
This is the methodology, the toolkit, and the hard-won lessons from building a content engine on ValueAddVC.com using AI agents, GSC feedback loops, and automated quality gates. 20 diagnostic scripts, 14 battle-tested configs (safety guards, agent orchestration, quality gates, anti-AI detection, AEO rules, schema validation, title engineering, noindex strategy, bot traffic, vertical expansion), structured data schemas, a prompt library, and CI automation - everything you need to replicate the system.
Not theory. Not prompts. The actual operating system behind a site that went from 604K to 5.63M monthly impressions.
Built by Trace Cohen at ValueAddVC.com.
What This Playbook Covers
- The Content Engine - AI agent orchestration (multi-model pipelines: Opus/Fable for planning, Sonnet for writing, Haiku for grunt work), 5-format content rotation, voice training, anti-AI fingerprint detection
- The GSC Feedback Loop - Weekly automated reports, title rewrite candidates, CTR rescue batches, cannibalization detection, query gap mining, striking distance optimization
- The Quality System - 9 publish gates, template phrase blocklists, source verification, fact-checking, structured data validation, meta length enforcement
- The Safety Layer - Repo locks, rebase guards, build cost control ([nobuild] tags, deploy-tick), self-healing heartbeats, content writer isolation from git, data verification on refreshes
- The Growth Loop - Keyword anticipation (publish before demand spikes), living page refreshes, internal link graph optimization, news sitemap + WebSub for instant crawling, vertical expansion with saturation audits
- The Pruning System - Thin content detection, noindex strategy, soft-404 fixes, crawl budget optimization, bot traffic identification
How It Works
flowchart LR
GSC[Google Search Console API] --> Report[Weekly Report]
Report --> Triage{Triage}
Triage --> Rewrite[Title Rewrites]
Triage --> Merge[Merge Cannibals]
Triage --> Refresh[Refresh Stale Pages]
Triage --> Kill[Kill Dead Weight]
Content[Content Pipeline] --> Gates[Quality Gates]
Gates --> |Pass| Publish[Publish]
Gates --> |Fail| Fix[Fix & Retry]
Publish --> GSC
Rewrite --> GSC
Merge --> GSC
Refresh --> GSC
style GSC fill:#0d7377,color:#fff
style Gates fill:#0d7377,color:#fff
style Publish fill:#15803d,color:#fff
style Kill fill:#b91c1c,color:#fff
The feedback loop: GSC data feeds diagnostic scripts → scripts surface what needs fixing → AI agents make the fixes through quality gates → improved rankings produce better GSC data → repeat. Every week the system gets smarter.
What's Inside
Scripts (/scripts)
| Script | What It Does |
|---|---|
gsc-rewrite-candidates.mjs |
Finds title rewrite opportunities from GSC data - pages ranking position 4-20 with high impressions but low CTR |
template-detector.mjs |
Scans your content for AI template fingerprints - the repeated phrases that signal scaled-content-abuse to Google |
cannibalization-detector.mjs |
Finds pages on your site competing for the same queries, splitting authority and ranking worse than one consolidated page would |
weekly-report.mjs |
Generates a weekly SEO performance report with trending queries, dropping pages, CTR triage candidates, and query monopolies |
orphan-finder.mjs |
Finds pages with zero inbound internal links - invisible to Google's link-graph crawler |
content-audit.mjs |
Scores every page into KILL / MERGE / UPDATE / PROMOTE / KEEP buckets based on GSC data + content quality |
redirect-checker.mjs |
Finds URLs in your sitemap that return 301/302/308 instead of 200 - these break GSC validation and waste crawl budget |
refresh-tracker.mjs |
Identifies high-traffic pages that haven't been updated recently - candidates for the "refresh drip" strategy |
query-gap-miner.mjs |
The retroactive keyword discovery engine - finds queries with real demand where you have no dedicated page. Google is telling you what to write. |
striking-distance.mjs |
Finds pages ranking position 5-20 with real impressions - the cheapest wins in SEO. Estimates click gain if improved. |
rewrite-measurer.mjs |
Before/after tracking for title rewrites. Take a baseline, make changes, measure impact 2-4 weeks later. |
websub-ping.mjs |
Notifies Google's hub that your feeds changed - triggers immediate crawl instead of waiting hours. Run after every publish. |
indexing-submitter.mjs |
Submits URLs to Google's Indexing API for near-instant crawling. 200 URLs/day quota. |
broken-link-checker.mjs |
Scans all content for outbound links and checks for 404s, timeouts, and redirect chains. Exits non-zero for CI. |
schema-validator.mjs |
Validates JSON-LD structured data across your site - catches duplicate FAQPage schemas (triggers Google penalty), missing required fields, and wrong schema types for page types |
factual-density-scorer.mjs |
Scores content by factual density - the ratio of specific data points (numbers, $, %, dates) to word count. AI engines cite high-density pages 3-5x more often. |
ai-citation-tracker.mjs |
Checks whether your pages are being cited by AI search engines (Perplexity). The newest, hardest-to-track SEO metric. |
ctr-audit.mjs |
Scores every page by "wasted impressions" - the gap between expected clicks (based on position) and actual clicks. Tiers pages into High/Med/Low priority for title rewrite batches. |
meta-length-checker.mjs |
Finds titles exceeding 60 characters and descriptions exceeding 160 characters. Google truncates both, silently killing your CTR. Exits non-zero for CI. |
thin-content-detector.mjs |
Identifies thin pages (low word count, empty hubs, boilerplate-heavy) that should be noindexed to protect crawl budget and site quality signals. |
Configuration (/config)
| File | Purpose |
|---|---|
format-rotation.json |
The 5-format content system: Deep Explainer, News Analysis, Ranked List, Question-Led, Contrarian Take - with per-format word counts, chart requirements, and selection weights |
quality-gates.json |
Publish gate rules: cannibalization check, source URL verification, template phrase detection, shared closer detection, typecheck |
anti-ai-rules.json |
The complete blocklist of AI template phrases + style rules for making AI content sound human |
refresh-rules.json |
Rules for the refresh drip strategy - staleness thresholds by content type, refresh triggers, and a refresh checklist |
keyword-anticipation.json |
Event calendar methodology - publish content before IPOs, earnings, funding rounds, regulations so you're ranked when demand spikes |
health-checks.json |
Live-site health checks: leaked template variables, broken OG images, injected ad links, thin content, dead pages |
content-pipeline-guards.json |
Safety guards: repo locks, rebase guards, cannibalization checks, build cost control, self-healing heartbeats |
agent-orchestration.json |
Multi-model AI pipeline rules: Opus/Fable for planning, Sonnet for writing, Haiku for mechanical tasks. Max 3 concurrent agents. |
aeo-rules.json |
AI Engine Optimization rules: quick-answer block requirements, factual density minimums, entity clarity, schema requirements for AI citation |
schema-rules.json |
Schema deployment map: which of the 7 JSON-LD types goes where, per-type placement rules, duplicate detection, required fields |
title-engineering.json |
Numbers-first title rewrite formula: format rules, banned words, rewrite workflow, CTR benchmarks by title type, before/after examples |
noindex-strategy.json |
Thin content thresholds, soft-404 patterns (Next.js PPR gotcha), crawl budget hygiene, and the step-by-step noindex workflow |
bot-traffic-rules.json |
How to identify bot traffic inflation (GA4 vs GSC ratios), which metrics to trust, AI referral tracking benchmarks |
vertical-expansion.json |
Pre-build saturation audit methodology, paced batch deployment, cannibalization prevention for new content verticals |
Schema Examples (/schemas)
| File | Schema Type |
|---|---|
article-with-author.json |
Article + Person author entity (the E-E-A-T foundation) |
faq-page.json |
FAQPage for blog posts - drives FAQ rich results |
item-list.json |
ItemList for ranking/comparison pages - the format sponsors want |
news-article.json |
NewsArticle + news sitemap template for real-time content |
Examples (/examples)
sitemap.ts- Next.js dynamic sitemap with honest lastmod datesnews-sitemap.ts- 48-hour rolling news sitemap for Google News/Discoverinternal-link-component.tsx- React component for related posts + a build-time internal link insertervercel-ignore.sh- Build skip logic for Vercel: [nobuild] tags, content-only detection, deploy-tick pattern (saves $$$)conversion-events.ts- GA4 custom event tracking helpers: newsletter signup, tool completion, and affiliate click tracking with position tagging
Sample Output (/samples)
Every script has a sample output file so you can see what to expect before running anything:
weekly-report.json- Full weekly report with trending queries, dropping pages, CTR triagerewrite-candidates.json- Title rewrite opportunities with per-query diagnosiscontent-audit.json- KILL/MERGE/UPDATE/PROMOTE/KEEP bucket assignmentscannibal-clusters.json- Cannibalization clusters with wasted impression estimatestemplate-scan.json- AI fingerprint scan with per-file phrase locationsorphan-pages.json- Orphan, low-link, and dead-end page reportsgrowth-review.md- Sample growth review narrative with key metrics and trends
Documentation (/docs)
setup-gsc.md- Step-by-step Google Search Console API setup (local auth + service account for CI)prompt-library.md- 13 production-tested prompts: title rewrites, CTR rescue batches, schema generation, AEO optimization, content auditing, vertical expansion audits, noindex triage, internal linking, competitive gap analysis, and morebot-traffic.md- How to identify bot traffic inflation, which metrics to trust (GSC clicks, not GA4 sessions), AI referral benchmarks, and setting up conversion tracking
Automation (.github/workflows)
weekly-seo-report.yml- GitHub Action that runs the weekly report every Sunday, commits results, and optionally creates a GitHub issue with the summary
Quick Start
# Clone the repo
git clone https://github.com/TraceCohenTech/ai-seo-playbook.git
cd ai-seo-playbook
# Install dependencies
npm install
# Set up Google Search Console API access
# (requires a Google Cloud project with Search Console API enabled)
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/webmasters.readonly,https://www.googleapis.com/auth/cloud-platform
# Find title rewrite opportunities
npm run rewrite-candidates -- --site sc-domain:yoursite.com
# Scan for AI template fingerprints
npm run template-scan -- --dir ./your-content-directory
# Find cannibalization clusters
npm run find-cannibals -- --site sc-domain:yoursite.com
# Run a full content audit
npm run content-audit -- --site sc-domain:yoursite.com --dir ./your-content-directory
# Find orphan pages (no internal links)
npm run find-orphans -- --dir ./your-content-directory
# Generate weekly report
npm run weekly-report -- --site sc-domain:yoursite.com
# Discover keywords you're already ranking for but have no page targeting
npm run query-gaps -- --site sc-domain:yoursite.com --dir ./your-content-directory
# Find "almost page 1" pages where a small nudge = big click gains
npm run striking-distance -- --site sc-domain:yoursite.com
# Find stale pages that need refreshing
npm run refresh-tracker -- --site sc-domain:yoursite.com --dir ./your-content-directory
# Check for redirect problems in your sitemap
npm run check-redirects -- --site sc-domain:yoursite.com --sitemap https://yoursite.com/sitemap.xml
# Ping Google to crawl your updated feeds immediately
npm run websub-ping -- --feeds https://yoursite.com/sitemap.xml,https://yoursite.com/feed.xml
# Validate JSON-LD schemas across your content
npm run validate-schemas -- --dir ./your-content-directory
# Score content by factual density (AEO optimization)
npm run density-score -- --dir ./your-content-directory
# Track AI citations (requires queries file or GSC access)
npm run ai-citations -- --domain yoursite.com --site sc-domain:yoursite.com
# NEW: Score pages by wasted impressions for CTR rescue batches
npm run ctr-audit -- --site sc-domain:yoursite.com
# NEW: Find titles/descriptions that Google will truncate
npm run check-meta -- --dir ./your-content-directory
# NEW: Find thin content candidates for noindexing
npm run thin-content -- --dir ./your-content-directory
New to the GSC API? See
docs/setup-gsc.mdfor a step-by-step setup guide.
The Playbook
These tools are one half of the system. The methodology - why these specific metrics matter, how to interpret the results, and how to build the feedback loop that makes your content engine self-improving - is in the full guide:
The AI SEO Playbook: How I Used AI to Build a Content Engine That Hit 5.6M Impressions in 4 Months
The guide covers:
- Building the content engine (architecture, voice training, format rotation)
- The GSC reckoning (the AI-overview discovery, title rewrites, cannibalization)
- The iteration loop (keyword anticipation, living pages, technical SEO bugs)
- The system (quality gates, weekly reviews, cost control)
Results
These tools were built and refined on ValueAddVC.com over 3 months:
| Metric | Week 1 (May '26) | Now (Aug '26) |
|---|---|---|
| 3-Month Impressions | - | 5.63M |
| 3-Month Clicks | - | 22.7K |
| 28-Day Clicks | - | 12,737 |
| Daily Clicks (peak) | ~50 | 894 |
| Average Position | 12+ | 7.9 |
| CTR | 0.93% | 0.47% |
| Posts Audited | 480 | 960+ |
| Title Rewrites | 0 | 151 |
| Cannibalization Clusters Fixed | 0 | 21 |
| Template Phrases Purged | 500+ | 0 |
| Orphan Pages Linked | 0 | 191 |
| Thin Pages Noindexed | 0 | 316 |
| Meta Violations Fixed | 0 | 299 |
*CTR is 0.47% because impressions grew ~8x - largely from AI-overview citations (GEO traffic) that don't produce clicks by nature. Human-intent CTR improved: ranked lists hit 6.8%, question-led posts hit 3.2%. Only 6.6% of impressions come from named queries. On named page-1 queries, actual clicks are 31% of what positions should produce - AI Overviews and machine queries inflate impressions ~3x. AI referral traffic (ChatGPT, Claude, Gemini) averages 171-second sessions - the longest of any channel.
How to Set Up the Weekly Cron
Option 1: GitHub Actions (recommended)
- Create a Google Cloud service account with Search Console API access
- Add the service account JSON as a GitHub secret named
GSC_CREDENTIALS - Set the repository variable
GSC_SITEto your GSC property (e.g.,sc-domain:yoursite.com) - Set
CONTENT_DIRto your content directory path (e.g.,./src/app/blog) - Optionally set
CREATE_ISSUEStotruefor weekly GitHub issue summaries - The workflow runs every Sunday at 9:30 AM ET automatically
Option 2: Local cron (macOS launchd)
# Create a plist in ~/Library/LaunchAgents/
# Schedule: every Sunday at 9:30 AM
# Script runs: node scripts/weekly-report.mjs --site sc-domain:yoursite.com
# Commits results to git
Option 3: Any CI/CD system
The scripts are standalone Node.js - run them anywhere you can install googleapis and authenticate with Google Cloud.
Project Structure
ai-seo-playbook/
├── scripts/ # 20 diagnostic & tracking scripts
│ ├── weekly-report.mjs # Weekly GSC performance report
│ ├── gsc-rewrite-candidates.mjs # Find title rewrite opportunities
│ ├── rewrite-measurer.mjs # Before/after rewrite tracking
│ ├── query-gap-miner.mjs # Retroactive keyword discovery
│ ├── striking-distance.mjs # Position 5-20 opportunities
│ ├── template-detector.mjs # Scan for AI template phrases
│ ├── cannibalization-detector.mjs # Find competing pages
│ ├── content-audit.mjs # KILL/MERGE/UPDATE/PROMOTE scoring
│ ├── orphan-finder.mjs # Find unlinked pages
│ ├── refresh-tracker.mjs # Stale page detection
│ ├── redirect-checker.mjs # Sitemap redirect problems
│ ├── broken-link-checker.mjs # 404s and dead outbound links
│ ├── websub-ping.mjs # Notify Google of feed changes
│ ├── indexing-submitter.mjs # Google Indexing API submissions
│ ├── schema-validator.mjs # JSON-LD schema validation
│ ├── factual-density-scorer.mjs # AEO factual density scoring
│ ├── ai-citation-tracker.mjs # AI search citation tracking
│ ├── ctr-audit.mjs # Wasted impression scorer for CTR rescue
│ ├── meta-length-checker.mjs # Title/description length violations
│ └── thin-content-detector.mjs # Thin content noindex candidates
├── config/ # Quality gates, format system, anti-AI rules, AEO, schemas, title engineering, noindex, bot traffic, vertical expansion
├── schemas/ # JSON-LD structured data examples
├── examples/ # Next.js sitemaps + React components
├── samples/ # Example output from every script
├── docs/ # Setup guides, prompt library, bot traffic guide
└── .github/workflows/ # Weekly automated report CI
Built On
This toolkit was built and battle-tested on ValueAddVC.com - a venture capital content platform that went from 604K monthly impressions to 5.63M in 4 months using these exact scripts and methodology.
| May 2026 | August 2026 | |
|---|---|---|
| Daily clicks | ~50 | 894 (peak) |
| 3-month impressions | 604K | 5.63M |
| Position | 12+ | 7.9 |
| Template phrases | 500+ | 0 |
| Orphan pages | 191 | 0 |
| Thin pages noindexed | 0 | 316 |
The full methodology is in the companion guide: The AI SEO Playbook
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.