Repository navigation
Make the docs easier for AI agents to read: llms.txt, page descriptions, Markdown fixes - #152
Merged
Merged
Conversation
Every page now has a `description:` in its front matter: one sentence that says what the page is or does. It becomes the page's meta description and og:description, and the summary next to its link in /llms.txt. Before this, no page had one, so Docusaurus used the first line of the page. For 439 of the 564 links in /llms.txt that was just "Overview" or "Definition", and search results showed the same word. scripts/add_descriptions.py drafted them from each page's own first sentence (flows' "This flow describes how to…" became "How to…"), and six weak drafts were rewritten by hand. It never overwrites a description, and --check lists the pages that have none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
llms.txt - Sections, names and order now come from the sidebar's folders (plugins/llms-txt/route-rules.js), with headings such as "Flows › Clinical › Encounter" instead of URL slugs. Each page is listed once; before, each also had its own heading that repeated its description. - A "How to use these docs" note after the summary: the .md URLs, what concepts, flows and references are, which version is listed, and that the code wins where they disagree. - Left out: the generated /category pages, which only repeated links, and the Docusaurus template's example page (deleted). - Context7 is listed under Optional. Markdown copies of pages (plugins/llms-txt/clean-markdown.js) - Fixes 106 links to pages whose route ends in a slash, which the plugin wrote as /apps/ai-vision/.md (a 404) instead of /apps/ai-vision.md. - Drops the "#" heading anchors, base64 images (keeping their alt text) and table column padding. llms-full.txt goes from 7.1 MB to 5.1 MB. - Labels embedded videos as videos, with a youtube.com/watch link. Pages - Each page of the latest English docs links to its Markdown copy with <link rel="alternate" type="text/markdown">, and has a "Copy page" button with "View as Markdown", "Open in Claude" and "Open in ChatGPT". - robots.txt with the sitemap and a pointer to llms.txt. Keeping it that way - CI checks that every page has a description, and after the build that every Markdown link resolves (scripts/check_llms.py). - The concept, flow and reference skills, their templates and Ezhuthachan's draft checks now ask for a description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying coredocs with
|
| Latest commit: |
b7d096a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5b58973a.coredocs.pages.dev |
| Branch Preview URL: | https://claude-llms-txt-ai-readiness.coredocs.pages.dev |
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.
The site already served
/llms.txt,/llms-full.txtand a Markdown copy of every page (from #91). This makes those files more useful, fixes the broken links in them, and adds checks so they stay that way.What was wrong on docs.ohc.network
## concepts,## category,## markdown-pageFlows › Clinical › Encounter/apps/ai-vision/.mdreturned 404<link rel="alternate" type="text/markdown">, plus Copy page, View as Markdown, Open in Claude and Open in ChatGPTChanges
Commit 1: page descriptions (637 files, one line each).
scripts/add_descriptions.pydrafted adescription:for every page from the page's own first sentence. "This flow describes how to…" became "How to…", and six weak drafts were rewritten by hand. The script never overwrites an existing description. The 3.0 pages got descriptions too, for their search snippets.Commit 2: tooling.
plugins/llms-txt/route-rules.jsbuilds llms.txt's sections from_category_.jsonlabels and positions. A "How to use these docs" note follows the summary.plugins/llms-txt/clean-markdown.jsfixes the plugin's trailing-slash.mdlinks and removes heading anchors and base64 images. Tables are no longer padded, and videos are labelled./category/*pages and the template'ssrc/pages/markdown-page.mdxare left out of llms.txt; the template page is deleted.DocItem/MetadataandDocItem/Contentadd the alternate link and the page actions. They appear only where a.mdexists: the latest version, in English. 3.0 and/ml/pages are unchanged.static/robots.txt.test-deploy.yml) now runsadd_descriptions.py --checkbefore the build andscripts/check_llms.py buildafter it.description:.Checked
npm run build(en + ml) passes.add_descriptions.py --checkandcheck_llms.py buildboth pass: 534 pages listed, 535 Markdown pages, every link resolves.execCommandfallback (that browser blocks the Clipboard API)..mdthat exists, including for routes that end in a slash (/deployment/providers/aws→aws.md)./ml/or/category/pages.For review
.mdURL. They are ordinary links, and no data is sent until the reader submits.npm start, because the.mdfiles are made only bynpm run build.Not in this PR
llms-full.txtis still about 5 MB, more than a model's context window. Agents should use llms.txt and fetch single pages; the note in llms.txt says so.Accept: text/markdownwould need a host other than GitHub Pages..github/workflows/daily-doc-updater.mdwas not changed (its.lock.ymlis compiled). CI will now flag any page it adds without a description.🤖 Generated with Claude Code