Skip to content

fix(docs): llms.txt links target .html.md siblings; slim ## Optional (#492) - #511

Merged
nockawa merged 1 commit into
mainfrom
worktree-fix+492-llms-txt
Jul 18, 2026
Merged

nockawa merged 1 commit into
mainfrom
worktree-fix+492-llms-txt

Conversation

@nockawa

@nockawa nockawa commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

What

llms.txt, llms-full.txt, and every per-page .md linked to the .html page instead of the clean-markdown .html.md sibling — so a coding agent probing /llms.txt and following a link got HTML, not the markdown #492 generates. This flips internal conceptual links to .html.md everywhere (map + llms-full.txt bodies/delimiters + inside every per-page .md). API pages have no .md sibling 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 cuts llms.txt 86 KB → 26 KB with zero reachability loss (every leaf is reachable by drilling the category indexes — verified across all 17). Adds a --check fallback so validation passes without writing .md siblings.

Reverses design decisions D2 and D3.

Why

Confirmed against the llmstxt.org spec and production practice: the spec defines llms.txt as "links to detailed markdown files," and 100% of sampled production files (Anthropic, Mintlify, Perplexity, Answer.AI's own) link .md. Linking .html forces a lossy HTML→text step and relies on agents guessing the append-.md convention (most don't) — defeating the feature's own clean-markdown goal.

Verification (real docfx manifest.json + xrefmap.yml + source)

  • Write run: EXIT=0, 330 per-page .md.
  • llms.txt: 85,791 → 25,656 B; ## Optional = 4 pointers; only non-.md conceptual link is api/index.html (intended).
  • Per-page .md bodies + llms-full.txt delimiters/cross-links all .html.md; zero bare conceptual .html.
  • --check fallback verified (positive + negative control).
  • Integrity gate baked into gen-llms-txt.py enforces link validity in CI (build job).

Companion change (separate repo)

Design doc claude/design/Misc/llms-txt-generation.md updated to match (D2/D3 reversal) — it lives in the claude/ nested repo and is committed separately.

Follow-up to #492.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SBqUTTxeq1ecUdkvc5X1au

@nockawa
nockawa merged commit e23a175 into main Jul 18, 2026
14 checks passed
@nockawa
nockawa deleted the worktree-fix+492-llms-txt branch July 18, 2026 15:21
@nockawa

nockawa commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

cc @yhcedpn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant