Agent-readable docs: Phase 2 — llms.txt and frontmatter descriptions#103
Merged
Conversation
Phase 2 of notes/agent-readable-docs.md, building on the Markdown alternates from Phase 1 (PR #101). Adds a hierarchical, agent-readable index of every docs page and starts wiring frontmatter descriptions into a sample of high-traffic pages. - site/{dolt,doltlab,doltgres}/src/pages/llms.txt.ts (new) Static endpoint that emits llms.txt (https://llmstxt.org) — H1 with the site title, blockquote summary, one H2 per nav section, nested bullets for each item linking to the .md alternate. Descriptions come from the page's frontmatter `description:` field where present. - site/{dolt,doltlab,doltgres}/_headers Explicit Content-Type: text/markdown for /docs/llms.txt and the bundle-root copy. Cloudflare otherwise ships text/plain. - site/{dolt,doltlab,doltgres}/package.json cp dist/docs/llms.txt dist/llms.txt next to the existing _headers / _redirects / 404.html copies, so llms.txt is also served at the Cloudflare bundle root. - site/{dolt,doltlab,doltgres}/src/pages/404.astro Surface the llms.txt link as another discovery path. - Frontmatter descriptions on a sample of high-traffic pages Dolt: introduction (what-is-dolt, installation, getting-started), the three top git concept pages (commits, branch, merge), products (hosted overview + cloning, dolthub overview), and the three big reference landings (CLI, dolt-sql-procedures, dolt-system-tables). DoltLab: what-is-doltlab and the two admin guides (basic, enterprise). Doltgres: introduction overview, installation, getting-started. Pages without a description still appear in llms.txt — they just don't get the descriptive suffix on the entry. - cypress/e2e/dolt/llms-txt.spec.ts (new) Verifies the file is served at /docs/llms.txt, starts with the title + summary, has one H2 per nav section, every entry links to a .md URL, and frontmatter descriptions appear after the colon. Output: dolt llms.txt has 139 entries / 167 lines; doltlab 97 lines; doltgres 77 lines. All three sites build clean; cypress llms-txt (4/4), markdown-alternate (4/4), navigation (5/5), dead-links (15/15), and single-h1 (10/10) all pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of
notes/agent-readable-docs.md, building on the Markdown alternates from Phase 1 (PR #101). Adds a hierarchical, agent-readable index of every docs page (llms.txt, per llmstxt.org) and starts wiring frontmatterdescription:into the entries.What's in
site/{dolt,doltlab,doltgres}/src/pages/llms.txt.ts(new).mdalternate. Descriptions come from the page's frontmatterdescription:field where present. Order matchesnav.ts(so the sidebar).site/{dolt,doltlab,doltgres}/_headersContent-Type: text/markdownfor/docs/llms.txtand the bundle-root/llms.txt. Cloudflare otherwise shipstext/plain.site/{dolt,doltlab,doltgres}/package.jsoncp dist/docs/llms.txt dist/llms.txtin each build script, next to the existing_headers/_redirects/404.htmlcopies.site/{dolt,doltlab,doltgres}/src/pages/404.astrollms.txtlink as another discovery path from the helpful-404.description:on a sample of high-traffic pagesdescriptionstill appear in llms.txt — they just don't get the descriptive suffix on the entry.cypress/e2e/dolt/llms-txt.spec.ts(new)/docs/llms.txt, starts with the title + blockquote summary, has one H2 per nav section, every entry links to a.mdURL, and frontmatter descriptions appear after the colon.Verification
llms.txt: 139 entries across 8 sections (167 lines). DoltLab: 97 lines. Doltgres: 77 lines.dist/docs/llms.txtanddist/llms.txtfor each site.llms-txt(4/4),markdown-alternate(4/4),navigation(5/5),dead-links(15/15),single-h1(10/10) — all pass.What's still ahead
Phase 3 (breadcrumbs, related-docs footer, broader
description:backfill) pernotes/agent-readable-docs.md. Phase 2 leaves us with a clean discovery surface even before that lands.