PROTOCOL NAMESEO.MD
REVISIONV2.0.0
V2.0.0SPEC V2.0.0 · MIT LICENSE

SEO.MD

THE OPEN STANDARD FOR AI ENGINE OPTIMIZATION

01.OVERVIEW

SEO.mdis a repo-native, Markdown-first specification file that gives coding agents, developers, and search intelligence platforms a single source of truth for your brand's search and AI-citation strategy.

It sits alongside CLAUDE.md, AGENTS.md, and DESIGN.md at your repository root. Local validation, HTML/crawl auditing, and artifact generation (robots.txt, llms.txt, JSON-LD) work offline with zero API keys.

Core Principle
SEO.MD IS HUMAN-OWNED STRATEGY; .SEO/ IS MACHINE-GENERATED INTELLIGENCE

02.FILE FORMAT

In spec v2.0.0, SEO.md uses standard YAML frontmatter (--- ... ---) for structured metadata followed by a real Markdown body for coding agents and humans. You can write prose, tables, bullets, and links freely in the body without breaking parsers.

SEO.MD (ROOT)

FOUNDER OWNED

YAML frontmatter (domain, keywords, intent, pages, crawl, optional provider) + Markdown playbook (canonical facts, page rules, forbidden claims).

.SEO/ DIRECTORY

PROVIDER OWNED

.seo/STATUS.yml, .seo/REVERSE.md, and .seo/pages/<id>.md store live citation metrics and competitor playbooks without modifying SEO.md.

---
spec: "2.0.0"
site:
  brand: "Acme"
  domain: "acme.com"
  canonical: "https://acme.com"
  type: "saas"
  locale: "en-US"
keywords:
  primary: "billing automation"
  secondary: ["usage-based billing"]
  negative: ["free download"]
competitors:
  - domain: "chargebee.com"
intent:
  category:
    priority: critical
    queries: ["best billing automation"]
pages:
  - id: homepage
    url: /
    status: live
    priority: 1
    keyword: "billing automation"
schema:
  types: ["SoftwareApplication", "Organization", "FAQPage"]
crawl:
  sitemap: /sitemap.xml
  robots: /robots.txt
  llms_txt: /llms.txt
  allow_ai_bots: true
  disallow: ["/admin", "/api/*"]
provider:
  name: null # foxcite | custom | semrush | ahrefs | profound | peec
  endpoint: null
---

# SEO.md — Acme

## Canonical Product Facts
- **One-liner:** Usage-based billing and revenue recognition for B2B SaaS.
- **Proof points:** SOC 2 Type II certified; 99.99% billing accuracy.

## Page & AEO Rules (For Coding Agents)
- Open every key page with a 40-60 word direct answer.
- Include a structured FAQ section with FAQPage JSON-LD.

## Do Not Claim
- Never call Acme "free" or fabricate competitor pricing.
Backwards Compatibility

seomd-cli v2.0.0 automatically detects and continues to parse legacy v1.0 raw-YAML SEO.md files.

03.AGENT WIRING

Because coding agents auto-load AGENTS.md and CLAUDE.md, npx seomd-cli init automatically wires an idempotent marker-wrapped pointer into your existing AGENTS.md / CLAUDE.md (or creates a minimal AGENTS.md if neither exists). Pass --no-wire-agents to opt out.

<!-- seomd:start -->
## SEO & AI Citation Rules (`SEO.md`)

Before creating or editing public-facing pages, landing pages, metadata, JSON-LD schema, or marketing copy:
1. Read `SEO.md` at the repository root for canonical product facts, target buyer prompts, page rules, and forbidden claims.
2. Check `.seo/pages/<page-id>.md` and `.seo/REVERSE.md` (if present) for page-specific citation gaps and playbooks.
3. Run `npx seomd-cli validate` (and `npx seomd-cli check` against built output or localhost) to verify SEO/AEO compliance.
<!-- seomd:end -->

04.SITE TYPES

The site.type field tailors default pages, intent priorities, negative keywords, crawl disallows, and agent rules. During init, routes discovered in your repository are automatically marked status: live.

TypeValueDefault PagesSchema Types
SaaSsaashomepage, features, pricing, vs, alternatives, use-cases, integrations, docs, blogSoftwareApplication, Organization, FAQPage, WebPage
eCommerceecommercehomepage, category, product, collection, reviews, shipping-returns, faqProduct, Organization, FAQPage, BreadcrumbList
Locallocalhomepage, services, location, about, reviews, faq, contact, service-areaLocalBusiness, FAQPage, Review, GeoCoordinates
Blogbloghomepage, category, article, author, about, newsletterArticle, Person, FAQPage, BreadcrumbList
Marketplacemarketplacehomepage, listing, category, seller-profile, how-it-works, pricing, trust-safetyWebSite, Organization, FAQPage, Product

05.SITE

Core site and brand identity in frontmatter.

specstringoptional

Spec version string (e.g. "2.0.0").

site.brandstringrequired

Canonical brand name as it should appear in AI citations.

site.typestringrequired

One of: saas, ecommerce, local, blog, marketplace.

site.domainstringrequired

Bare primary hostname without protocol (e.g. acme.com).

site.canonicalurloptional

Full canonical HTTPS URL (e.g. https://acme.com).

site.localestringoptional

BCP 47 locale code. Default: en-US.

06.KEYWORDS & COMPETITORS

Primary topic anchor, supporting terms, negative terms checked by `seomd check`, and competitor domains.

keywords.primarystringrequired

Primary category or product keyword.

keywords.secondarystring[]optional

Supporting keyword cluster.

keywords.negativestring[]optional

Dilutive terms flagged in titles/H1s by `seomd check`.

competitorsobject[]optional

List of competitor objects (`{ domain: "competitor.com" }`).

07.INTENT

Buyer prompts grouped into five standard categories (`informational`, `comparison`, `transactional`, `reputational`, `category`). Filterable with `seomd analyze --intent <category>`.

intent.<cat>.prioritystringoptional

One of: low, medium, high, critical.

intent.<cat>.queriesstring[]optional

Exact prompts buyers ask ChatGPT, Claude, Perplexity, and Gemini.

08.PAGES

Flat array of tracked and planned routes. IDs must be unique and URLs must begin with `/`.

pages[].idstringrequired

Unique slug identifier (maps to `.seo/pages/<id>.md`).

pages[].urlstringrequired

Route path or pattern (e.g. `/pricing`, `/vs/[competitor]`).

pages[].statusstringrequired

One of: live, draft, planned.

pages[].prioritynumberrequired

Numeric build/audit priority (1 = highest).

pages[].keywordstringoptional

Optional page-specific target keyword.

pages[].titlestringoptional

Link text for the page in generated `llms.txt`. Default: a readable form of the URL.

pages[].descriptionstringoptional

One-line summary shown after the link in generated `llms.txt`.

09.SCHEMA

Structured data types used by `seomd generate schema` and agent page rules.

schema.typesstring[]optional

Schema.org types (e.g. SoftwareApplication, Organization, FAQPage, Product).

10.CRAWL

Crawler and AI discovery artifacts verified by `seomd check` and emitted by `seomd generate`.

crawl.sitemapstringoptional

Sitemap path. Default: /sitemap.xml.

crawl.robotsstringoptional

Robots path. Default: /robots.txt.

crawl.llms_txtstringoptional

llms.txt path. Default: /llms.txt.

crawl.allow_ai_botsbooleanoptional

Allow AI search crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.). Default: true.

crawl.disallowstring[]optional

Paths excluded in generated `robots.txt`, repeated in every crawler group.

crawl.ai_trainingstringoptional

allow | block. `block` disallows AI training crawlers (GPTBot, Google-Extended, etc.) while AI search crawlers stay allowed. Default: allow.

11.CLAIMS

Facts `seomd check` verifies on rendered pages. A page fails if it shows an unlisted price, in text or JSON-LD offers, or asserts a forbidden phrase outside a question or negation. Placeholder copy such as “TBD”, “TODO” and “lorem ipsum” fails on every page, with or without claims.

claims.pricesstring[]optional

Every price a page may show, e.g. ["$0", "$99", "$0.08"].

claims.forbiddenstring[]optional

Phrases no page may assert, e.g. "SOC 2 certified", "unlimited".

claims.skipstring[]optional

URL paths where claims are not checked, such as posts that quote competitor prices. `*` matches within one path segment, `**` across segments: ["/blog/*"].

12.PROVIDER

Optional live intelligence provider configuration. Leave null for local-only mode, or point to any platform implementing the Provider Protocol.

provider.namestringoptional

Provider identifier: foxcite | custom | semrush | ahrefs | profound | peec | null.

provider.endpointurloptional

Optional HTTP base URL override (or set SEOMD_API_URL in .env).

13..SEO/ WORKSPACE

Provider-generated outputs are isolated inside .seo/ and updated in a merge-safe manner (running seomd analyze --page /pricing upserts that page without wiping previously analyzed pages):

.seo/
├── README.md        # Workspace overview
├── STATUS.yml       # Overall + per-intent + per-page citation rates & gap scores
├── REVERSE.md       # Competitor reverse-engineering & gaps_for_brand
└── pages/
    └── <id>.md      # Per-page remediation playbooks (materialized on analyze/sync)

14.CLI COMMANDS

CommandOffline?Purpose
seomd initYesRepo-aware v2 scaffold + AGENTS.md / CLAUDE.md wiring
seomd validateYesValidate SEO.md (v2 & v1) with --strict and --json
seomd check [target]YesAudit local HTML dir or localhost URL against SEO.md
seomd generate <target>YesGenerate robots.txt, llms.txt, or JSON-LD schema
seomd doctorYesInspect SEO.md, agent wiring, crawl files, and provider config
seomd analyzeProviderRun live AI citation scans (--page, --intent, --engines)
seomd syncProviderPull cached intelligence (--dry-run shows metric deltas)
seomd statusYesRender terminal dashboard or --json from .seo/STATUS.yml

Building a provider integration? See the Provider Protocol Specification →

15.VERSIONING

V2.0.0 (CURRENT)

Markdown + YAML frontmatter, automatic AGENTS.md / CLAUDE.md wiring, offline check / generate / doctor, and vendor-agnostic Provider Protocol.

V1.0 (LEGACY)

Raw YAML document with # comment headings. Automatically detected and supported for read/validate compatibility in seomd-cli v2.