Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Sphinx

$ sphinx-build Official Low Risk
Sphinx · Design & Docs · BSD-2-Clause · macos / linux / windows

Sphinx (sphinx-build) is the canonical Python and technical documentation compiler supporting reStructuredText and MyST Markdown, cross-references, autodoc, LaTeX/PDF, and -b json / -b linkcheck builders. Passing -W --keep-going -q turns broken references into deterministic CI failures without noisy progress output.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
brew install sphinx-doc
CLI vs MCP Decision CLI Only

Compiling local .rst / .md trees and checking cross-references with sphinx-build -W runs directly in the repository environment.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Clean non-interactive sphinx-build with -W, -n, -q, -j auto, and -b json builder, though CLI logs are plain text and sphinx-quickstart is interactive unless -q is passed.

  • -W --keep-going -q gives deterministic strict build checks
  • Supports -b json output builder for structured doc pages
Trust & Safety 19 / 25

Outputs only to the specified build directory, though conf.py and autodoc execute arbitrary Python inside the documented project.

  • conf.py and autodoc import/execute Python modules during build
Setup & Portability 13 / 15

Easy to install via pip, uvx, or brew install sphinx-doc, though projects often depend on third-party extensions in conf.py.

  • Cross-platform Python package; project extensions may need matching virtualenv
Utility & Efficiency 13 / 15

Unmatched cross-referencing, API autodoc, MyST Markdown, and multi-format output (html, latexpdf, man, epub, linkcheck).

  • Rich builder ecosystem including -b linkcheck and -b doctest
Maintenance & Lineage 9 / 10

Official Sphinx documentation project (sphinx-doc/sphinx) actively maintained under BSD-2-Clause.

  • Core Python ecosystem tool since 2008
Docs & Verifiability 8 / 10

Comprehensive official documentation and manpage reference at sphinx-doc.org.

  • Official docs at sphinx-doc.org/en/master/man/sphinx-build.html

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required for local builds; intersphinx and -b linkcheck fetch public HTTP docs/links when enabled.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and open-source (BSD-2-Clause).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Sphinx Agent Rules
- Run `sphinx-build -b html -W --keep-going -q docs/ docs/_build/html` to catch broken xrefs cleanly.
- Remember `conf.py` and `autodoc` execute Python code inside the target project; only build trusted repositories.
- Avoid `sphinx-quickstart` interactive mode without passing `--quiet` and all metadata flags.

Agent-Ready Command Recipes

Safe Read-Only Queries

Check Sphinx build version
sphinx-build --version

Prints the installed sphinx-build version without running conf.py.

Validate external documentation links
sphinx-build -b linkcheck -q docs/ docs/_build/linkcheck

Checks external URLs referenced in the docs and writes link status results to docs/_build/linkcheck.

Controlled Writes & Previews

Build HTML docs with strict warning failures
sphinx-build -b html -W --keep-going -q docs/ docs/_build/html

Compiles documentation into docs/_build/html and fails with a non-zero exit code if any Sphinx warning occurs (-W).

Strengths for Agents

  • + Strict -W -n --keep-going validation catches broken cross-references and syntax errors reliably.
  • + Built-in -b linkcheck, -b doctest, and -b json builders cover verification and structured output.

Caveats & Pitfalls

  • ! Evaluating conf.py and autodoc imports project Python code, which is unsafe on untrusted repositories.
  • ! Projects using extensions (myst-parser, themes) must run sphinx-build inside the project's virtualenv.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI