feat: agent-friendly docs (llms.txt + markdown endpoints)#448
Merged
Conversation
…gnaling) Implement the Agent-Friendly Documentation spec (agentdocsspec.com) to make docs discoverable and consumable by AI agents.
Root llms.txt is now copied from the latest version's folder on the docs-deployment branch during publish-root-files, instead of being deployed by publish-versioned-docs. This ensures root llms.txt stays in sync when versions.json is bumped (which only triggers publish-root-files, not publish-versioned-docs).
Prepend version links to the root llms.txt during publish-root-files. Only the root copy gets version navigation — versioned copies stay static to avoid stale cross-references when new versions are released.
…a section - Add agent-friendly docs section explaining llms.txt and .md endpoints - Update deployment branch structure to show llms.txt and .md files - Update workflow trigger table to mention llms.txt handling - Remove outdated beta versions section (pre-release tags/branches are now excluded from the docs workflow)
raymondk
approved these changes
Mar 19, 2026
marc0olo
added a commit
that referenced
this pull request
Mar 19, 2026
* feat: add agent-friendly docs (llms.txt, markdown endpoints, agent signaling) Implement the Agent-Friendly Documentation spec (agentdocsspec.com) to make docs discoverable and consumable by AI agents. * fix: use Node 22 in docs workflow for fs.globSync support * fix: move root llms.txt deployment to publish-root-files Root llms.txt is now copied from the latest version's folder on the docs-deployment branch during publish-root-files, instead of being deployed by publish-versioned-docs. This ensures root llms.txt stays in sync when versions.json is bumped (which only triggers publish-root-files, not publish-versioned-docs). * feat: add version navigation to root llms.txt Prepend version links to the root llms.txt during publish-root-files. Only the root copy gets version navigation — versioned copies stay static to avoid stale cross-references when new versions are released. * docs: update VERSIONED_DOCS.md for agent-friendly docs and remove beta section - Add agent-friendly docs section explaining llms.txt and .md endpoints - Update deployment branch structure to show llms.txt and .md files - Update workflow trigger table to mention llms.txt handling - Remove outdated beta versions section (pre-release tags/branches are now excluded from the docs workflow)
marc0olo
added a commit
that referenced
this pull request
Mar 19, 2026
* feat: add agent-friendly docs (llms.txt, markdown endpoints, agent signaling) Implement the Agent-Friendly Documentation spec (agentdocsspec.com) to make docs discoverable and consumable by AI agents. * fix: use Node 22 in docs workflow for fs.globSync support * fix: move root llms.txt deployment to publish-root-files Root llms.txt is now copied from the latest version's folder on the docs-deployment branch during publish-root-files, instead of being deployed by publish-versioned-docs. This ensures root llms.txt stays in sync when versions.json is bumped (which only triggers publish-root-files, not publish-versioned-docs). * feat: add version navigation to root llms.txt Prepend version links to the root llms.txt during publish-root-files. Only the root copy gets version navigation — versioned copies stay static to avoid stale cross-references when new versions are released. * docs: update VERSIONED_DOCS.md for agent-friendly docs and remove beta section - Add agent-friendly docs section explaining llms.txt and .md endpoints - Update deployment branch structure to show llms.txt and .md files - Update workflow trigger table to mention llms.txt handling - Remove outdated beta versions section (pre-release tags/branches are now excluded from the docs workflow)
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.
Summary
Implements the Agent-Friendly Documentation spec so AI agents can discover and consume our docs programmatically.
Deployment structure after all steps are complete
Components
astro-agent-docs.mjs— Astro integration (astro:build:donehook).mdfile into build output (frontmatter stripped, title prepended as# heading, UTF-8 BOM)llms.txtindex with pages grouped by sidebar section, using absolute URLs with the versioned base pathrehype-agent-signaling.mjs— Rehype plugin<blockquote class="agent-signaling">at the top of every HTML page/llms.txtfor documentation discoveryclip: rect(0,0,0,0)(notdisplay:none) so it survives HTML-to-markdown conversionWorkflow changes (
docs.yml)fs.globSync)publish-root-filesnow copiesllms.txtfrom the latest version's folder ondocs-deploymentand prepends version navigation links fromversions.jsonllms.txtis always rebuilt whenversions.jsonchanges, so it stays in sync with version bumpsDocumentation
VERSIONED_DOCS.mdwith agent-friendly docs section, updated deployment structure, removed outdated beta versions sectionDesign decisions
.mdfiles live inside versioned folders — generated in the same Astro build as HTML, so zero content drift by construction/llms.txtis owned bypublish-root-files— rebuilt on every main push from the latest version'sllms.txt+versions.json. This avoids the timing glitch where a version tag is pushed beforeversions.jsonis bumpedllms.txt— versioned copies are static and never go stale; root copy gets dynamic version links prepended fromversions.jsonSpec checks this addresses
llms-txt-exists/llms.txtat rootllms-txt-validllms-txt-links-resolve.mdfilesllms-txt-links-markdown.mdURLsmarkdown-url-support.mdfiles served alongside HTMLllms-txt-directivecontent-negotiationAcceptheader routinghttp-status-codesredirect-behaviorllms.txtdiscoveryPost-merge steps
Merging to
mainwill deploy/main/llms.txtand/main/*.mdautomatically. To getllms.txton the existing released versions and at root:1. Add
llms.txtto v0.2 docs (latest)Cherry-pick the relevant commits to the
docs/v0.2branch:git checkout docs/v0.2 git cherry-pick 858ab57 b6c2f84 # agent-docs plugin + Node 22 git push origin docs/v0.2This triggers
publish-versioned-docs→ deploys/0.2/llms.txt+/0.2/*.md.2. Update root
llms.txtPush any docs change to
main(or re-run the workflow) to triggerpublish-root-files, which will now find/0.2/llms.txtondocs-deploymentand copy it to root with version navigation.If the merge commit itself touches
docs/**ordocs-site/**, this happens automatically.3. Add
llms.txtto v0.1 docs (optional)git checkout docs/v0.1 git cherry-pick 858ab57 b6c2f84 # agent-docs plugin + Node 22 git push origin docs/v0.14. Verify