Add mkdocs-llmstxt plugin and remove hand-written llms.txt#117
Merged
Add mkdocs-llmstxt plugin and remove hand-written llms.txt#117
Conversation
Three changes in the docs/ directory:
1. **docs/requirements.txt** — Add `mkdocs-llmstxt` as a dependency (pinned version).
2. **docs/mkdocs.yml** — Add a `plugins:` section with the `llmstxt` plugin configured as follows:
- `markdown_description`: The extended description paragraph from the current hand-written llms.txt ("sctx replaces monolithic instruction files...")
- `full_output: llms-full.txt` to generate the concatenated full-text file
- `sections`: Map the three sections from the current llms.txt into the plugin config:
- "Getting Started": `getting-started.md` with description
- "Documentation": `protocol.md`, `cli-reference.md`, `examples.md`, `comparisons.md` with descriptions matching current llms.txt
- "Optional": `contributing.md`, `roadmap.md` with descriptions
Note: The `search` plugin that MkDocs enables by default will need to be explicitly listed since adding a `plugins:` key overrides the defaults.
3. **docs/llms.txt** — Delete this file. The plugin generates `llms.txt` into the `site/` build output directory, so having a source file with the same name in `docs/` (which is the docs_dir) would conflict.
The existing `site_name` ("Structured Context") becomes the `# heading` and `site_description` becomes the `> blockquote` in the generated llms.txt — both are already set in mkdocs.yml.
gregology
requested changes
Mar 23, 2026
Owner
gregology
left a comment
There was a problem hiding this comment.
should full_output: llms-full.txt be full_output: llms.txt? Is there a good reason to use llms-full.txt?
Contributor
Author
|
Reviewed the feedback -- nothing actionable to address programmatically. Developer metricsTotal duration: 0m 49s
|
gregology
approved these changes
Mar 23, 2026
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.
Why
The current hand-written
llms.txtlinks to rendered HTML pages on sctx.dev, so agents pulling those URLs get the full MkDocs Material chrome — nav, scripts, theme markup. Not useful for consumption. There's also nollms-full.txt, which is what most agents look for as a single-file dump of all docs.What this does
Swaps the hand-written
docs/llms.txtfor themkdocs-llmstxtplugin, which auto-generates bothllms.txtandllms-full.txtat build time. The generatedllms.txtlinks to.mdversions of pages instead of HTML, andllms-full.txtconcatenates all doc content into one file (~1000 lines).The plugin is configured with explicit
sectionsthat mirror the structure from the old hand-written file, and themarkdown_descriptioncarries over the same introductory paragraph.The old
docs/llms.txtsource file is deleted because it would conflict with the plugin's output (both try to producellms.txtin the build).Alternatives considered
Build script (concat): A simple shell script or Makefile target that cats the markdown files together. No new deps, full control. Downside: nav order has to be kept in sync manually with
mkdocs.yml. With only 8 doc pages this is fine today, but the plugin approach follows an existing convention and stays in sync automatically. Greg preferred this reasoning.Raw markdown serving: Copy
.mdfiles into the build output so agents can fetch individual pages as clean markdown. More flexible but more moving parts in the deploy pipeline, and could confuse human visitors landing on raw markdown URLs. Overkill for now.Review walkthrough
Single commit covering one coherent change (splitting it would leave a broken intermediate state):
mkdocs-llmstxt==0.5.0todocs/requirements.txt, configures thellmstxtplugin indocs/mkdocs.ymlwith sections/descriptions/full_output, explicitly listssearchplugin (adding aplugins:key overrides MkDocs defaults), and deletesdocs/llms.txt.Closes #116
Developer metrics
Total duration: 7m 30s
Turns: 129
Tool calls: 108
Tokens: 1,501,005 input / 10,473 output
Resolves #116