Repository navigation
fix(docs): llms.txt links target .html.md siblings; slim ## Optional (#492) - #511
Merged
Merged
Conversation
Collaborator
Author
|
cc @yhcedpn |
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.
What
llms.txt,llms-full.txt, and every per-page.mdlinked to the.htmlpage instead of the clean-markdown.html.mdsibling — so a coding agent probing/llms.txtand following a link got HTML, not the markdown #492 generates. This flips internal conceptual links to.html.mdeverywhere (map +llms-full.txtbodies/delimiters + inside every per-page.md). API pages have no.mdsibling and stay.html(browse-only, D5).Also slims
## Optional: the ~240 feature-catalog leaves were listed flat and linked from the 17 category indexes — pure duplication. Dropping the flat list cutsllms.txt86 KB → 26 KB with zero reachability loss (every leaf is reachable by drilling the category indexes — verified across all 17). Adds a--checkfallback so validation passes without writing.mdsiblings.Reverses design decisions D2 and D3.
Why
Confirmed against the llmstxt.org spec and production practice: the spec defines
llms.txtas "links to detailed markdown files," and 100% of sampled production files (Anthropic, Mintlify, Perplexity, Answer.AI's own) link.md. Linking.htmlforces a lossy HTML→text step and relies on agents guessing the append-.mdconvention (most don't) — defeating the feature's own clean-markdown goal.Verification (real docfx
manifest.json+xrefmap.yml+ source)EXIT=0, 330 per-page.md.llms.txt: 85,791 → 25,656 B;## Optional= 4 pointers; only non-.mdconceptual link isapi/index.html(intended)..mdbodies +llms-full.txtdelimiters/cross-links all.html.md; zero bare conceptual.html.--checkfallback verified (positive + negative control).gen-llms-txt.pyenforces link validity in CI (buildjob).Companion change (separate repo)
Design doc
claude/design/Misc/llms-txt-generation.mdupdated to match (D2/D3 reversal) — it lives in theclaude/nested repo and is committed separately.Follow-up to #492.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SBqUTTxeq1ecUdkvc5X1au