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.
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.
FOUNDER OWNED
YAML frontmatter (domain, keywords, intent, pages, crawl, optional provider) + Markdown playbook (canonical facts, page rules, forbidden claims).
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.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.
| Type | Value | Default Pages | Schema Types |
|---|---|---|---|
SaaS | saas | homepage, features, pricing, vs, alternatives, use-cases, integrations, docs, blog | SoftwareApplication, Organization, FAQPage, WebPage |
eCommerce | ecommerce | homepage, category, product, collection, reviews, shipping-returns, faq | Product, Organization, FAQPage, BreadcrumbList |
Local | local | homepage, services, location, about, reviews, faq, contact, service-area | LocalBusiness, FAQPage, Review, GeoCoordinates |
Blog | blog | homepage, category, article, author, about, newsletter | Article, Person, FAQPage, BreadcrumbList |
Marketplace | marketplace | homepage, listing, category, seller-profile, how-it-works, pricing, trust-safety | WebSite, Organization, FAQPage, Product |
05.SITE
Core site and brand identity in frontmatter.
specstringoptionalSpec version string (e.g. "2.0.0").
site.brandstringrequiredCanonical brand name as it should appear in AI citations.
site.typestringrequiredOne of: saas, ecommerce, local, blog, marketplace.
site.domainstringrequiredBare primary hostname without protocol (e.g. acme.com).
site.canonicalurloptionalFull canonical HTTPS URL (e.g. https://acme.com).
site.localestringoptionalBCP 47 locale code. Default: en-US.
06.KEYWORDS & COMPETITORS
Primary topic anchor, supporting terms, negative terms checked by `seomd check`, and competitor domains.
keywords.primarystringrequiredPrimary category or product keyword.
keywords.secondarystring[]optionalSupporting keyword cluster.
keywords.negativestring[]optionalDilutive terms flagged in titles/H1s by `seomd check`.
competitorsobject[]optionalList 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>.prioritystringoptionalOne of: low, medium, high, critical.
intent.<cat>.queriesstring[]optionalExact 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[].idstringrequiredUnique slug identifier (maps to `.seo/pages/<id>.md`).
pages[].urlstringrequiredRoute path or pattern (e.g. `/pricing`, `/vs/[competitor]`).
pages[].statusstringrequiredOne of: live, draft, planned.
pages[].prioritynumberrequiredNumeric build/audit priority (1 = highest).
pages[].keywordstringoptionalOptional page-specific target keyword.
pages[].titlestringoptionalLink text for the page in generated `llms.txt`. Default: a readable form of the URL.
pages[].descriptionstringoptionalOne-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[]optionalSchema.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.sitemapstringoptionalSitemap path. Default: /sitemap.xml.
crawl.robotsstringoptionalRobots path. Default: /robots.txt.
crawl.llms_txtstringoptionalllms.txt path. Default: /llms.txt.
crawl.allow_ai_botsbooleanoptionalAllow AI search crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.). Default: true.
crawl.disallowstring[]optionalPaths excluded in generated `robots.txt`, repeated in every crawler group.
crawl.ai_trainingstringoptionalallow | 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[]optionalEvery price a page may show, e.g. ["$0", "$99", "$0.08"].
claims.forbiddenstring[]optionalPhrases no page may assert, e.g. "SOC 2 certified", "unlimited".
claims.skipstring[]optionalURL 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.namestringoptionalProvider identifier: foxcite | custom | semrush | ahrefs | profound | peec | null.
provider.endpointurloptionalOptional 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
| Command | Offline? | Purpose |
|---|---|---|
seomd init | Yes | Repo-aware v2 scaffold + AGENTS.md / CLAUDE.md wiring |
seomd validate | Yes | Validate SEO.md (v2 & v1) with --strict and --json |
seomd check [target] | Yes | Audit local HTML dir or localhost URL against SEO.md |
seomd generate <target> | Yes | Generate robots.txt, llms.txt, or JSON-LD schema |
seomd doctor | Yes | Inspect SEO.md, agent wiring, crawl files, and provider config |
seomd analyze | Provider | Run live AI citation scans (--page, --intent, --engines) |
seomd sync | Provider | Pull cached intelligence (--dry-run shows metric deltas) |
seomd status | Yes | Render terminal dashboard or --json from .seo/STATUS.yml |
Building a provider integration? See the Provider Protocol Specification →
15.VERSIONING
Markdown + YAML frontmatter, automatic AGENTS.md / CLAUDE.md wiring, offline check / generate / doctor, and vendor-agnostic Provider Protocol.
Raw YAML document with # comment headings. Automatically detected and supported for read/validate compatibility in seomd-cli v2.