Make developer docs LLM-consumable via sphinx-llm
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Add LLM-readable output to the Kolibri developer docs build so the published kolibri-dev.readthedocs.io site exposes llms.txt, llms-full.txt, and per-page Markdown alongside the existing HTML. This makes the docs directly consumable by LLM tools (Cursor, Claude.ai web fetches, MCP doc servers) and by in-repo coding agents that benefit from Markdown over HTML.
Complexity: Low Target branch: develop
Context
The llms.txt standard is the prevailing convention for surfacing docs to LLMs: a Markdown sitemap at /llms.txt, optionally a single combined /llms-full.txt, and per-page .md versions alongside HTML. ReadTheDocs serves these files when they appear in the build output but does not generate them (RTD reference). Sphinx core has no built-in support (sphinx-doc/sphinx#13268).
NVIDIA's sphinx-llm extension (released Feb 2026) emits all three artefacts during a normal HTML build. It resolves autodoc directives to real content, which matters because docs/backend_architecture/content/api_methods.rst, docs/backend_architecture/logger/models.rst, docs/backend_architecture/uap/models.rst, and four other files rely on autodoc to render model fields and API methods.
Kolibri's docs already use sphinx_rtd_theme with sphinx.ext.autodoc, m2r, and notfound.extension (see docs/conf.py); requirements are pinned in requirements/docs.txt; the RTD build is configured in .readthedocs.yaml.
The Change
Wire NVIDIA's sphinx-llm extension into the Sphinx build:
- Add
sphinx-llm[gen](pinned) torequirements/docs.txt - Register
"sphinx_llm.txt"in theextensionslist indocs/conf.py - Confirm no conflicts with the existing
autodoc,m2r, andnotfound.extensionextensions, and that theprocess_docstringhook for Django model fields still applies to the Markdown output
Default configuration is fine; no per-page tuning required for the first pass.
How to Get There
Build the docs from the repo root:
make docs
Inspect the output:
ls docs/_build/html/llms.txt docs/_build/html/llms-full.txt
ls docs/_build/html/backend_architecture/content/api_methods.html.md
Open api_methods.html.md and confirm that autodoc-generated content (model fields, method signatures) is rendered as Markdown rather than appearing as raw .. autoclass:: directives.
Out of Scope
The following are intentionally excluded from this task — file follow-up issues if needed:
- Content rewrites of existing
.rst/.mdfiles for LLM clarity - Per-section or per-product
llms.txtfiles (Cloudflare-style tiered structure) - "Copy as Markdown" buttons or
Accept: text/markdownserver-side handling - MCP doc server setup or documentation referencing one (e.g.
langchain-ai/mcpdoc) - Updates to
AGENTS.mdorCLAUDE.md - Any evaluation of how well agents/LLMs actually answer questions from the generated
llms.txt
Acceptance Criteria
- [ ]
sphinx-llm[gen]is added torequirements/docs.txtwith a version pin - [ ]
docs/conf.pyregisters"sphinx_llm.txt"in theextensionslist - [ ]
make docscompletes with no new warnings or errors compared to the current build - [ ]
docs/_build/html/llms.txtexists and contains a Markdown sitemap of the docs - [ ]
docs/_build/html/llms-full.txtexists and contains the combined documentation content - [ ] Every
.htmlpage underdocs/_build/html/has a corresponding.html.mdcompanion (e.g.getting_started.html→getting_started.html.md) - [ ] The
.html.mdfiles forbackend_architecture/content/api_methods,backend_architecture/logger/models, andbackend_architecture/uap/modelsrenderautodoccontent as Markdown — model fields and method signatures appear as readable text, not as raw.. autoclass::directives - [ ] After merge and RTD rebuild,
https://kolibri-dev.readthedocs.io/llms.txtreturns the sitemap andhttps://kolibri-dev.readthedocs.io/llms-full.txtreturns the combined content (verified in the PR follow-up, not in the PR itself)
References
llms.txtstandard — origin and conventions- NVIDIA
sphinx-llmextension — the extension this task adopts - ReadTheDocs
llms.txtsupport — platform behaviour and serving rules - sphinx-doc/sphinx#13268 — upstream tracking issue for native support
docs/conf.py— current Sphinx configurationrequirements/docs.txt— current docs build dependencies.readthedocs.yaml— RTD build configuration
AI usage
Used Claude Code to brainstorm this task and draft the issue. The scope (single PR, minimal change), the chosen extension (NVIDIA sphinx-llm over the jdillard/sphinx-llms-txt alternative based on its handling of autodoc), and the out-of-scope list were all my decisions after Claude presented options with tradeoffs. Claude ran the web research on Sphinx and ReadTheDocs llms.txt support and summarised it; I checked the linked sources before deciding. The acceptance criteria and references are Claude's drafts, edited section by section.
Plan: Wire NVIDIA's sphinx-llm extension into the Sphinx build so the published docs site exposes llms.txt, llms-full.txt, and per-page .html.md companion files.
- [ ] Verify the baseline build passes
- [ ] Pin the sphinx-llm dependency
- [ ] Register the extension in Sphinx config
- [ ] Build the docs and verify output
- [ ] Commit
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output