1. The exact llmstxt.org grammar enforced by strict parsers
Web pages ship navigation chrome, cookie banners, inline scripts and hydrated bundles that waste context tokens when an AI coding assistant, RAG retriever or answer engine tries to understand your product catalogue and documentation. The llmstxt.org convention solves this with two plain UTF-8 files at the root of your origin: /llms.txt (a curated index of canonical URLs with concise factual notes) and /llms-full.txt (concatenated clean markdown of core documentation).
Hand-written /llms.txt files frequently fail machine parsers because authors treat them like free-form README files. Our @repo/engine-geo-ai-visibility validator (validateLlmsTxt / POST /api/v1/engines/llms/validate) checks 15 structural rules:
# Example Industrial Controls Ltd
> UK manufacturer of DIN-rail Modbus power meters and calibration software for commercial buildings.
All technical datasheets, Modbus register maps and firmware checksums are published as public HTML and PDF documents under the URLs below.
## Documentation
- [Modbus TCP Register Map](https://controls.example.co.uk/docs/modbus-registers): Holding and input registers for EM-400 series meters
- [Wiring & CT Sizing Guide](https://controls.example.co.uk/docs/ct-wiring): Three-phase current-transformer installation diagrams
## Products
- [EM-400 Three-Phase Meter](https://controls.example.co.uk/products/em-400): Class 0.5S MID-approved DIN-rail meter with RS-485 and Ethernet
## Optional
- [Terms of Sale](https://controls.example.co.uk/legal/terms): Standard B2B supply terms and 24-month warranty conditions2. Common /llms.txt mistakes that trigger parser warnings
When compiling /llms.txt programmatically or by hand, avoid the six defects most frequently flagged by validateLlmsTxt:
- Subheadings (
###) or free prose inside##sections: Once the first## Sectionheading begins, consumers expect exclusively markdown link list items (- [Title](https://...): optional single-line note). Put narrative context above the first##heading. - Relative URLs (
/docs/apiinstead ofhttps://domain.tld/docs/api): When/llms.txtis pasted into an external LLM context window or cached offline, relative paths lose their origin; always emit canonical absolutehttps://URLs. - Duplicate URLs across sections (
duplicate-url): Listing the same URL under both## Main pagesand## Serviceswastes context tokens and triggers duplicate-link warnings. - Placing
## Optionalbefore another##section (optional-not-last): Short-context agents truncate everything from## Optionalonwards; placing core product or API links after## Optionalhides them from compact retrievers.
3. Building @id-linked Schema.org JSON-LD without invented claims
Search engines and AI citation systems cross-check visible HTML copy against <script type="application/ld+json"> blocks. Instead of scattering five unlinked JSON-LD snippets emitted by competing CMS plugins, publish a clean @graph array where page entities reference site-wide entities via @id ({ "@id": "https://example.co.uk/#organization" }).
Our jsonld.build engine follows one strict rule: missing inputs are omitted, never invented. If a page has no street address, PostalAddress / LocalBusiness is omitted in favour of Organization; if a product page has no visible verified customer reviews, aggregateRating is never fabricated (emitting fake review stars violates Google Search spam policies and UK DMCC / EU Unfair Commercial Practices rules).