Make docs discoverable by LLMs and coding agents (sphinx-llm)#451
Merged
Conversation
Following Jacob Tomlinson's PyData talk on marketing open source projects to LLMs (https://youtu.be/bRDtplyhRYw), make xskillscore documentation easy for coding agents to discover and parse: - Generate llms.txt (summary) and llms-full.txt (full docs as a single context-efficient text file) during the Sphinx HTML build via the sphinx-llms-txt extension, with a project title/summary and absolute links driven by html_baseurl. - Add documentation breadcrumbs to the package __init__ so agents reading the source are pointed at the docs and the llms.txt files. - Add sphinx-llms-txt to the docs build environments (ci/doc.yml and the `complete` optional-dependencies extra). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #451 +/- ##
==========================================
- Coverage 94.57% 94.50% -0.08%
==========================================
Files 27 27
Lines 2841 2841
==========================================
- Hits 2687 2685 -2
- Misses 154 156 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Switch from sphinx-llms-txt to NVIDIA's sphinx-llm package (the `sphinx_llm.txt` extension). It uses the markdown builder to emit true markdown: llms.txt (sitemap), llms-full.txt (full docs) and per-page .md files, following the llms.txt standard. - conf.py: enable `sphinx_llm.txt`; set `llms_txt_description` (title comes from the project name). Drop the html_baseurl and llms_txt_title/summary keys that were specific to sphinx-llms-txt. - ci/doc.yml and the `complete` extra: depend on sphinx-llm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Link to https://context7.com/xarray-contrib/xskillscore so users and coding agents can find the LLM-indexed documentation. Uses a shields.io static badge in Context7 brand colour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses review feedback to copy the README badge table into the docs landing page. Replaces the flat list of image directives with the same categorized grid table and substitution definitions used in README.rst. Merge main to drop the removed geophysical-data toctree entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.rst
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.
What & why
As coding agents become a primary way developers discover and use libraries, they read our documentation and write code based on what they find. This PR makes xskillscore's docs easy for LLMs/agents to discover and parse, following the recommendations from Jacob Tomlinson's PyData talk "Marketing your open source project to LLMs" (https://youtu.be/bRDtplyhRYw).
Changes
llms.txt,llms-full.txtand per-page.mdduring the Sphinx HTML build via NVIDIA'ssphinx-llmextension (sphinx_llm.txt). It runs the markdown builder under the hood to emit true markdown following the llms.txt standard:llms.txt— a sitemap with per-page descriptionsllms-full.txt— the entire docs concatenated as one context-efficient markdown fileindex.html.md, etc. — a markdown version of every page at the same URL +.mdllms_txt_descriptionsets the project summary; the title comes from the project name.xskillscore/__init__— a module docstring pointing at the docs, thellms.txt/llms-full.txtfiles, and the source repo, so an agent reading the installed source is guided to the right places.sphinx-llmtoci/doc.ymland thecompleteoptional-dependencies extra (it pulls insphinx-markdown-builder).After this is merged and built on Read the Docs, the files will be available at:
Verification
sphinx-llm(0.4.1) generatesllms.txt,llms-full.txtand per-page.mdwith the exact config used here (sphinx_llm.txt+llms_txt_description) in an isolated Sphinx build.import xskillscoreworks with the new module docstring.ruff check/ruff format --checkpass;conf.pycompiles.Note: a full local
make htmlcurrently fails on an unrelated, pre-existing incompatibility between the newest Sphinx andsphinx-autosummary-accessors; the conda-pinned RTD/CI environment is unaffected.🤖 Generated with Claude Code