=== LazyGEO - AI Search Optimization & llms.txt ===
Contributors: lazyjon
Tags: geo, llms-txt, ai-seo, schema, faq
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Local GEO readiness scoring, llms.txt & llms-full.txt Studio, AI crawler controls, FAQ/Schema markup, and optional LazyGEO Cloud AI optimization.

== Description ==

**LazyGEO** prepares your WordPress site for Generative Engine Optimization (GEO) — helping AI answer engines like ChatGPT Search, Perplexity, Claude, and Google AI Overviews read, understand, and cite your content accurately.

### 100% Free Local Tools (No Account Required)
* **Local GEO Readiness Scorer (0–100):** Audits every post and page across 8 deterministic citation signals (Direct-Answer Opening, Q&A/FAQ Structure, Factual & Numeric Density, Structured Lists/Tables, Heading Hierarchy, Entity & Author Clarity, Image Alt Coverage, and Schema/Meta Summary).
* **Site-Wide GEO Health Scan:** Instant local audit across your published content showing Critical, Needs Work, and Ready buckets plus Quick-Win opportunities.
* **`llms.txt` & `llms-full.txt` Studio:** Guided Brand Profile builder, priority page pinning, post-type controls, local quality linter, pure-PHP HTML-to-Markdown conversion, and fast cached endpoints at `/llms.txt` and `/llms-full.txt`.
* **Manual GEO Editor:** Write and manage TL;DR summaries, Key Takeaways, FAQ accordions, and custom `/llms.txt` 1-line summaries right inside Gutenberg or Classic Editor.
* **Non-Destructive Frontend Rendering & JSON-LD:** Displays styled TL;DR + FAQ `<details>` boxes via `the_content` filter or `[lazygeo_summary]` / `[lazygeo_faq]` shortcodes without altering `post_content` in your database, and outputs clean `FAQPage`, `Article`, `ImageObject`, and entity `mentions` schema (with Yoast/RankMath coexistence mode).
* **AI Crawler Governance:** Manage `robots.txt` directives for `GPTBot`, `OAI-SearchBot`, `ChatGPT-User`, `PerplexityBot`, `ClaudeBot`, `Google-Extended`, and `CCBot`, plus an optional strictly local bot hit counter.

### Optional LazyGEO Cloud AI (Explicit Opt-In, Pay-As-You-Go)
Connect your site to LazyGEO Cloud (`https://lazyjon.com/geo`) only when you choose to unlock AI-powered automation (includes 30 free domain-verified trial credits):
* **1-Click Post & Page AI GEO:** Generate citation-ready TL;DRs, Key Takeaways, FAQs, Entities, and Image/Chart insights (`Text-Only` or `Visual + Key Images` mode) with a non-destructive preview before applying.
* **Bulk GEO Optimizer:** Up-front exact credit calculator with live chunked queue execution.
* **AI Site Profile & `llms-full.txt` Distillation:** Auto-fill your Brand Profile and compress verbose pages into high-density Markdown.
* **Whole-Site Stratified GEO Assessment:** Executive audit report with Grade, Critical Gaps, Entity Positioning, and 3-phase action roadmap.

== External Services ==

LazyGEO is designed to work 100% locally by default. **No external API calls are made on plugin activation, deactivation, frontend page loads, or routine admin page loads.**

An external connection to the **LazyGEO Cloud API** (`https://lazyjon.com/geo`) is only initiated when a site administrator explicitly clicks an action button:

1. **Connect & Claim Trial Credits (`POST /api/v1/sites/connect`):** Sends the administrator email entered in the form, site URL, site name, WordPress version, and plugin version to issue a site token and grant eligible domain-verified trial credits.
2. **Sync Balance & Live Pricing (`GET /api/v1/sites/status`, `GET /api/v1/pricing`):** Sends the site authentication token to fetch current credit balance, recent job telemetry, and credit pack pricing.
3. **Optimize Post / Bulk Optimize (`POST /api/v1/geo/optimize`):** Sends the selected post's ID, URL, title, post type, clean Markdown content, excerpt, brand context, and (in Visual mode only) up to 5 content image URLs to generate GEO suggestions.
4. **AI Auto-Fill Site Profile (`POST /api/v1/geo/site-profile`):** Sends site name, URL, tagline, and summaries of up to 5 core pages to draft your Brand Profile.
5. **AI Distill `llms-full.txt` (`POST /api/v1/geo/llms-distill`):** Sends clean Markdown of up to 25 selected pages per batch to generate a compact `llms-full.txt`.
6. **Whole-Site Stratified Assessment (`POST /api/v1/geo/site-assess`):** Sends local site health counts, taxonomy names, and a stratified sample of published page summaries to produce an executive GEO audit report.
7. **Buy Credits (`POST /api/v1/billing/checkout`):** Sends the selected credit pack slug and WP Admin return URL to create a Stripe Checkout session.

**Zero-Text Retention:** LazyGEO Cloud processes submitted text and images transiently in memory and does not store post content, images, or AI completions in its database. Only operational telemetry (site ID, action type, word/image counts, credit usage, and timestamps) is retained.

* Service Provider: LazyJon / LazyGEO (`https://geo.lazyjon.com`)
* Terms of Service: https://geo.lazyjon.com/terms
* Privacy Policy: https://geo.lazyjon.com/privacy

== Installation ==

1. Upload the `lazygeo` folder to `/wp-content/plugins/` or install the ZIP via **Plugins -> Add New -> Upload Plugin**.
2. Activate **LazyGEO** through the **Plugins** menu in WordPress.
3. Visit **LazyGEO** in the WordPress Admin sidebar to run your free local site scan and configure `/llms.txt` and AI crawler rules.
4. (Optional) Visit **LazyGEO -> Account & Billing** to connect to LazyGEO Cloud for AI-powered optimization.

== Frequently Asked Questions ==

= Does LazyGEO require a paid account to use? =
No. The Local GEO Scorer, Site-Wide Health Scan, `/llms.txt` & `/llms-full.txt` Studio, Manual GEO Editor, Frontend TL;DR & FAQ rendering, Schema JSON-LD, and AI Crawler `robots.txt` manager are 100% free and run locally on your WordPress server.

= Does LazyGEO modify my original post content in the database? =
Never. TL;DRs, Key Takeaways, and FAQs are stored cleanly in `_lazygeo_*` post meta and rendered dynamically via `the_content` filter or shortcodes (`[lazygeo_summary]`, `[lazygeo_faq]`).

= Will LazyGEO conflict with Yoast SEO or Rank Math? =
No. LazyGEO includes a **Yoast / RankMath Schema Coexistence** mode (enabled by default) that avoids duplicating `Article` or `Organization` schema when an SEO plugin is active, while still contributing `FAQPage`, `ImageObject`, and entity `mentions`.

= Why do `/llms.txt` or `/llms-full.txt` return 404 right after installation? =
Visit **Settings -> Permalinks** and click **Save Changes** to flush WordPress rewrite rules if your server configuration prevented automatic flushing during activation.

== Screenshots ==

1. Overview & Site Health dashboard with local GEO Score gauge and Quick-Win opportunities.
2. Post Editor metabox showing 8-signal GEO breakdown, manual editor, and non-destructive AI Preview.
3. llms.txt Studio with guided Brand Profile, local quality linter, and live Markdown preview.
4. AI Crawlers & Frontend Display controls.

== Changelog ==

= 1.0.0 =
* Initial public release for WordPress.org.
* Added 8-signal local GEO Scorer and Site-Wide Health Scan.
* Added `/llms.txt` and `/llms-full.txt` Studio with local linter and HTML-to-Markdown converter.
* Added AI Crawler `robots.txt` manager and local hit counter.
* Added non-destructive Frontend TL;DR/FAQ renderer, shortcodes, and JSON-LD schema with Yoast/RankMath coexistence.
* Added Gutenberg & Classic Editor metabox, list-table GEO Score column, and bulk queue link.
* Added optional explicit opt-in LazyGEO Cloud AI integration (Optimize, Bulk Queue, Site Profile, AI Distill, Whole-Site Assessment, Stripe Credit Packs).

== Upgrade Notice ==

= 1.0.0 =
Initial release of LazyGEO.
