LCTIO Docs
Use this skill for changes under docs/, Sphinx configuration updates, and documentation build validation.
Workflow
- Refresh repository state before editing.
- If
./.venv/exists, use./.venv/bin/pythonand tools from that environment for docs installs and builds. - Inspect
docs/source/conf.py,docs/Makefile, and any new docs files you will touch. - Check
pyproject.tomlfor the current packaging and dependency layout before assuming docs dependencies exist. - For
autodocand related extensions, prefer installing the project in editable mode with the local virtual environment so imports resolve fromsrc/. - Manage docs-only dependencies with a docs extra in
pyproject.toml. - Run a clean docs build after config or content changes and treat warnings as important review items.
Core Commands
./.venv/bin/python -m pip install -e ../.venv/bin/python -m pip install -e .[docs]PATH="$PWD/.venv/bin:$PATH" make -C docs html./.venv/bin/python -m sphinx -b html docs/source docs/build/html./.venv/bin/python -m sphinx -W -b html docs/source docs/build/htmlmake -C docs cleanPATH="$PWD/.venv/bin:$PATH" make -C docs clean./.venv/bin/python -m sphinx -b linkcheck docs/source docs/build/linkcheck./.venv/bin/python -m sphinx -b doctest docs/source docs/build/doctest
Autodoc Notes
- If Sphinx cannot import
lctio, first verify the editable install rather than immediately patchingsys.path. - If runtime-only dependencies break docs imports, prefer
autodoc_mock_importsfor optional packages instead of hiding real import failures from this package.
What To Confirm With The User
- Which Sphinx extensions and themes are approved for the project.
- Whether warnings should fail validation by default with
-Wfor the current change. - Whether a failure is likely caused by local environment constraints, optional dependencies, or network access.
Expectations
- Keep generated docs output under
docs/build/treated as generated unless the user asks to commit it. - Prefer validating only the docs targets affected by the change, then run a stricter warning-failing build when the change touches configuration or shared content.
- Investigate warnings and validation failures enough to identify whether they are actionable code or docs issues versus environment-sensitive failures.
- For
linkcheck, external links may fail because of transient network or remote-site behavior; report that clearly instead of treating every failure as a docs defect. - For doctest or example-code validation, expect some failures to depend on local environment state. Do not spend extended effort on repeated or ambiguous failures before consulting the user.