Problem: The MyST parser configuration enables the "linkify" extension in usr-docs/conf.py, but the required linkify-it-py package was missing from usr-docs/requirements.txt.
Error Message:
ModuleNotFoundError: Linkify enabled but not installed.
Root Cause: The conf.py file has this configuration:
myst_enable_extensions = [
...
"linkify", # This requires linkify-it-py package
...
]Fix: Added linkify-it-py>=2.0.0 to usr-docs/requirements.txt
Problem: The Sphinx LaTeX builder (required for PDF generation) requires the roman package, which was missing from usr-docs/requirements.txt.
Error Message (from initial local testing):
Extension error:
Could not import extension sphinx.builders.latex (exception: No module named 'roman')
Fix: Added roman>=4.0 to usr-docs/requirements.txt
Problem: The usr-docs/conf.py file had html_static_path defined twice:
- Line 33:
html_static_path = ['_static'](pointing to non-existent directory) - Line 81:
html_static_path = [](correct - no static files)
Fix: Removed the first occurrence (line 33), keeping only the correct empty list at line 81.
Before:
sphinx>=7.0.0
sphinx-rtd-theme>=2.0.0
myst-parser>=2.0.0
After:
sphinx>=7.0.0
sphinx-rtd-theme>=2.0.0
myst-parser>=2.0.0
roman>=4.0
linkify-it-py>=2.0.0
Before (lines 32-34):
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# MyST parser settingsAfter (lines 32-34):
html_theme = 'sphinx_rtd_theme'
# MyST parser settingsThe documentation now builds successfully with the following command:
python -m sphinx -T -b html -c usr-docs -d _build/doctrees usr-docs _build/htmlBuild Status: ✅ SUCCESS (52 warnings - all non-critical)
The 52 warnings are all non-critical and fall into these categories:
-
Missing Example Files (9 warnings): Cross-references to pattern-specific example files that haven't been created yet
../examples/react-examples.md../examples/reflection-examples.md../examples/lats-examples.md- etc.
-
Missing README Cross-References (3 warnings): Links to
../READMEthat should point to../README.md -
Missing Local Anchors (29 warnings): Cross-references to anchors in
api/patterns.mdthat need to be defined -
Missing Section Anchors (11 warnings): Internal page anchors in TOC sections that can be added if needed
None of these warnings prevent the documentation from building or being deployed.
The .readthedocs.yaml configuration is correct:
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
sphinx:
configuration: usr-docs/conf.py
fail_on_warning: false
python:
install:
- requirements: usr-docs/requirements.txt
- method: pip
path: .
formats:
- pdf
- epubWhen Read the Docs builds the documentation, it will:
- Clone the repository
- Checkout the specified branch (main)
- Install Python 3.10
- Create a virtual environment
- Install dependencies:
pip install sphinxpip install -r usr-docs/requirements.txt(now includesroman)pip install .(the agent_patterns package)
- Run Sphinx build:
python -m sphinx -T -b html -c usr-docs -d _build/doctrees usr-docs $READTHEDOCS_OUTPUT/html
To test the documentation build locally:
# Install dependencies
pip install -r usr-docs/requirements.txt
# Build HTML documentation
python -m sphinx -b html -d _build/doctrees usr-docs _build/html
# Build PDF documentation (requires LaTeX)
python -m sphinx -b latex -d _build/doctrees usr-docs _build/latex
cd _build/latex
make
# Build EPUB documentation
python -m sphinx -b epub -d _build/doctrees usr-docs _build/epub-
Commit and Push: The fixes are ready to be committed and pushed to trigger a new Read the Docs build.
-
Future Improvements (Optional):
- Create missing example files to eliminate cross-reference warnings
- Fix README cross-references to use correct path
- Add missing anchors in
api/patterns.md
-
Verify Build: After pushing, verify the build succeeds on Read the Docs at:
✅ Build Fixed: Documentation builds successfully locally ✅ Dependencies Updated: All required packages added to requirements.txt ✅ Configuration Clean: Duplicate settings removed ✅ Ready for Deployment: Changes ready to commit and push
| File | Change | Reason |
|---|---|---|
usr-docs/requirements.txt |
Added linkify-it-py>=2.0.0 |
Required by MyST parser's linkify extension |
usr-docs/requirements.txt |
Added roman>=4.0 |
Required by Sphinx LaTeX builder for PDF generation |
usr-docs/conf.py |
Removed duplicate html_static_path |
Cleaner configuration |
Last Updated: 2025-10-27
Build Status: ✅ SUCCESS (52 non-critical warnings)
Files Changed: 2 (usr-docs/requirements.txt, usr-docs/conf.py)
Primary Issue: Missing linkify-it-py package
Build Time: ~30 seconds