docs: dynamically generate llms.txt and llms-full.txt#10598
Open
luarss wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces automated generation of llms.txt and llms-full.txt files to facilitate LLM documentation discovery. It adds a new Python script generate_llms_txt.py that parses the documentation structure from toc.yml to generate these files, integrates this script into the Sphinx configuration, and adds pyyaml to the documentation requirements. The review feedback suggests replacing legacy os.popen with subprocess.run to properly handle execution failures, explicitly specifying encoding="utf-8" for all file read and write operations to ensure cross-platform compatibility, and adding robust fallback handling for empty or malformed YAML parsing.
2 tasks
luarss
added a commit
to luarss/OpenROAD-flow-scripts
that referenced
this pull request
Jun 5, 2026
Mirrors The-OpenROAD-Project/OpenROAD#10598. Adds sphinx-llm extension to Sphinx config and requirements, bumps Python to 3.11 in readthedocs. Signed-off-by: Jack Luar <jluar@precisioninno.com>
luarss
added a commit
to luarss/OpenROAD-flow-scripts
that referenced
this pull request
Jun 6, 2026
Mirrors The-OpenROAD-Project/OpenROAD#10598. Adds sphinx-llm extension to Sphinx config and requirements, bumps Python to 3.11 in readthedocs. Signed-off-by: Jack Luar <jluar@precisioninno.com>
Add docs/generate_llms_txt.py which reads toc.yml and all module READMEs to produce llms.txt (navigation index) and llms-full.txt (full inline content) on every Sphinx build. Hook it into conf.py setup(app) alongside getMessages.py, copy outputs to the HTML root via html_extra_path, and add pyyaml to docs/requirements.txt. Both files are gitignored as build artifacts. Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Replace the custom generate_llms_txt.py script with the sphinx-llm extension, which generates llms.txt and llms-full.txt directly into the Sphinx HTML output as a first-class build step. Removes the html_extra_path workaround and the pyyaml dependency. Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
sphinx-llm requires Python >=3.9; the previous "3.7" setting caused pip to find no matching distribution and fail the RTD build. Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
luarss
added a commit
to luarss/OpenROAD-flow-scripts
that referenced
this pull request
Jun 6, 2026
Mirrors The-OpenROAD-Project/OpenROAD#10598. Adds sphinx-llm extension to Sphinx config and requirements, bumps Python to 3.11 in readthedocs. Signed-off-by: Jack Luar <jluar@precisioninno.com>
…nx-llm Add sphinx-llm to requirements.in, regenerate requirements.txt via pip-compile with Python 3.10, and downgrade RTD Python back to 3.10. Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
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
Add support for
llms.txtandllms-full.txtto the ReadTheDocs documentation site using thesphinx-llmextension. These files follow the llmstxt.org standard and make OpenROAD's documentation directly consumable by LLMs without HTML scraping.Changes:
sphinx_llm.txtto the Sphinx extensions list indocs/conf.py— the extension generates both files as a native build step, writing directly into the HTML outputsphinx-llmtodocs/requirements.txtOnce merged and built, files will be served at:
https://openroad.readthedocs.io/llms.txthttps://openroad.readthedocs.io/llms-full.txtType of Change
Impact
No change to tool behavior. Adds two new URL endpoints to the ReadTheDocs site after the next documentation build.
Verification
./etc/Build.sh).Related Issues
N/A