# 📡 AI Radar

> Scan your site. See who can find you. Checks AI crawler access, schema markup, content structure, and technical readiness — then fixes what it can.

| Field | Value |
|-------|-------|
| Slug | `ai-radar` |
| Version | 1.1.0 |
| Category | SEO |
| Author | Agentic Community |
| Required Capabilities | `manage_options` |

## What It Does

AI Radar scans your WordPress site's readiness to be discovered, cited, and recommended by AI search platforms — ChatGPT, Claude, Gemini, Perplexity, and Grok. It produces a visibility score from 0 to 100 across four categories: AI crawler access (30 pts), schema markup (25 pts), content structure (25 pts), and technical readiness (20 pts).

The agent goes beyond basic robots.txt checking. It simulates AI crawler requests to detect server-level blocks, WAF challenges, and content differences that only affect AI bots. It inspects HTTP headers and meta tags for AI-specific directives like X-Robots-Tag noai and Cloudflare bot-fight headers. And it evaluates your content structure for AI extraction readiness — FAQ formatting, heading hierarchy, entity clarity, and freshness signals.

When issues are found, AI Radar can fix them: it can update robots.txt to allow AI crawlers (always previewing the diff first) and generate an llms.txt file that tells AI platforms about your site and its key pages. Weekly automated scans track your score over time and alert you when it changes significantly.

### llms.txt Generation

The `generate_llms_txt` and `preview_llms_txt` tools produce files aligned with the [llmstxt.org specification](https://llmstxt.org/) by Jeremy Howard:

- H1 site title and blockquote summary
- H2-delimited link sections (`## Key Pages`, `## Recent Content`, `## Optional`)
- `[title](url): description` link format per spec — descriptions sourced from SEO meta (Yoast, Rank Math, AIOSEO), post excerpt, or content (shortcodes stripped, 160 char max)
- Sitemap placed in `## Optional` so LLMs can skip it for shorter context
- Standard CommonMark Markdown, no HTML

## Tools

| Tool | Risk | Description |
|------|------|-------------|
| `run_ai_radar_scan` | None | Run a full AI visibility scan across all four categories. Returns a score 0-100 with a letter grade and prioritised action items. |
| `check_robots_txt` | None | Read and parse the site's robots.txt. Returns the access status for each AI bot, whether a blanket block exists, the raw content, and the file source. |
| `check_schema_markup` | None | Fetch the homepage HTML and analyse JSON-LD structured data. Returns detected schema types, installed schema plugins, and a score out of 25. |
| `check_content_structure` | None | Analyse published posts and pages for AI extraction readiness: FAQ-formatted content, heading hierarchy, content freshness, entity clarity, and thin content. |
| `check_technical_readiness` | None | Check technical AI readiness signals: HTTPS, sitemap.xml, noindex settings, llms.txt presence. Returns a score out of 20. |
| `preview_robots_txt_update` | None | Preview proposed robots.txt changes that would allow AI search bots. Shows a diff without writing anything. |
| `update_robots_txt` | High | Write updated robots.txt that allows AI search bots. Always use `preview_robots_txt_update` first. |
| `preview_llms_txt` | None | Preview the llms.txt content that would be generated for the site. Read-only — does not write any files. |
| `generate_llms_txt` | High | Write the llms.txt file to the WordPress root. Always use `preview_llms_txt` first. |
| `get_last_scan` | None | Retrieve the most recent AI Radar scan results from cache. |
| `simulate_ai_crawler` | None | Fetch a page as each major AI bot and compare to a normal browser request. Detects server-level blocks, WAF challenges, and content differences. |
| `check_ai_headers` | None | Inspect a page's HTTP response headers and HTML meta tags for AI-specific directives: X-Robots-Tag, meta robots, Cloudflare bot-fight headers. |

## Example Prompts

- "Scan my site for AI visibility"
- "Check if ChatGPT and Claude can crawl my site"
- "Fix my robots.txt to allow all AI crawlers"
- "Generate an llms.txt file for my site"
- "Does my homepage have proper schema markup for AI search?"
- "Simulate what Perplexity and GPTBot actually see when they visit my site"
- "Compare my latest scan results to last week — did anything change?"
- "Analyse the content structure of my blog posts for AI readability"

## Scheduled Tasks

| Task | Schedule | Description |
|------|----------|-------------|
| Weekly AI Radar Scan | Weekly | Full AI visibility scan every 7 days. Posts an admin notice only if the score changed by 5+ points. |

## Event Listeners

| Event | Hook | Description |
|-------|------|-------------|
| Robots.txt option changed | `updated_option` | Re-checks AI crawler access when an SEO plugin updates robots.txt settings. |
| Plugin activated | `activated_plugin` | Checks if a schema plugin was installed or removed. |
| Plugin deactivated | `deactivated_plugin` | Checks if a schema plugin was removed. |

---

_Generated by Agent Builder for WordPress_
