docs: improve llms.txt routing - #657
Open
Devon-White wants to merge 13 commits into
Open
Conversation
Contributor
hey-august
reviewed
Sep 6, 2026
| - Treat the [root `llms.txt`](https://signalwire.com/docs/llms.txt) as an orientation page and directory, not an exhaustive list of documentation pages. The available documentation indexes appear under `## Products` at the bottom of the file. | ||
| - Fetch a documentation page as clean Markdown by appending `.md` to its URL or requesting it with the HTTP header `Accept: text/markdown`. | ||
| - Open the relevant documentation index to discover its page links. | ||
| - If a page is not listed in the root index, check the relevant documentation index before concluding that the documentation does not contain it. |
Collaborator
There was a problem hiding this comment.
Is this line necessary? This section sets off my "overprompting" alarms
Collaborator
Author
There was a problem hiding this comment.
Yeah I added that cause I had done a few personal test on both claude and codex where i fed them a doc where i didnt start from llms.txt. They both tend to not do a follow up fetch of the product llms.txt, unless asked specifically about a certain product.
Consider how Fern organizes their llms.txt. It does not contain all links for all docs. So unless it knows it needs to fetch a product llms.txt to get the rest of the links, he tends to just start googling instead.
I would recommend keeping all, except maybe that last line.
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
.mdor requestAccept: text/markdownfor clean page exports and use the documentation indexes listed by Fern in the rootllms.txtllms.txtValidation
yarn fern-md-checkpassesnode --test "scripts/**/*.test.js"passes all 41 testsgit diff --checkpassesAccept: text/markdownreturns clean Markdown exports<llms-only>content without an expected-output fixtureValidation limitation
yarn fern-checkreaches Fern's remote missing-redirects check but cannot complete because the FDR endpoint returns HTTP 403, including with external network access