A `make docs-api-clean && make docs-api` cold rebuild now succeeds
with zero WARNING/ERROR lines (was 39).
Docstring fixes (RST hygiene — no semantic change):
- arborist/qa/{keys,runner,query,verify,quantifier,metacognition,dag,
evidence}.py — add blank lines around indented blocks, convert
ad-hoc indented sections to literal blocks (`::`), avoid line-broken
inline literals (e.g. UNKNOWN_EVIDENCE_ID), and replace nested
bracket/quote literals with cleaner wording.
- arborist/concepts/__init__.py — wrap function-signature listing in
a literal block so bare `*` (kwarg marker) doesn't trip docutils.
- arborist/store.py — blank line before bullet lists in module +
connect docstrings.
- arborist/evict.py — replace ad-hoc `{ ... }` enum block with prose.
Surface fixes:
- docs/_source/_ext/makefile_targets.py — escape `*` in auto-
generated Makefile target descriptions (covers `*-parallel`,
`*.dot`, `*.db`, `π*`, etc.) so the generator emits clean RST.
- docs/_source/index.rst, concepts.rst — extend title underlines
to match title length.
- docs/_source/concepts.rst, v8-fork-score.rst — widen first column
of grid tables so cells no longer overflow into the column margin.
- docs/_source/merkle-agi-v7w-spatial-temporal.rst — switch
pseudocode JSON block from `code-block:: json` to `text` (the
`<int32 x 3>` placeholders aren't valid JSON tokens).
Verification:
- make docs-api-clean && make docs-api → build succeeded, 0 warnings
- make test → 1588 passed, 28 skipped
- make chain-check-shards → 0 breaks across all 7 shards
- import-time SyntaxWarning escalation on edited modules → clean
|
||
|---|---|---|
| .. | ||
| _ext | ||
| _static | ||
| api | ||
| bench.rst | ||
| concepts.rst | ||
| conf.py | ||
| cookbook.rst | ||
| diagrams | ||
| index.rst | ||
| license.rst | ||
| Makefile | ||
| merkle-agi-v7w-spatial-temporal.rst | ||
| pi-star.rst | ||
| quickstart.rst | ||
| README.md | ||
| requirements.txt | ||
| v8-fork-score.rst | ||
Arborist API Reference (Sphinx)
This directory contains Sphinx configuration to generate API documentation from docstrings.
Build
cd docs/_source
make html # Generate HTML (output: _build/html/)
make text # Generate text (output: _build/text/)
make clean # Remove build artifacts
Or directly:
sphinx-build -b html . _build/html
View
After building, open _build/html/index.html in a browser.
Structure
conf.py— Sphinx configurationindex.rst— Main table of contentsapi/— Module documentation (one .rst per module category)substrate.rst— Core data structures (merkle, document, wikitext)storage.rst— SQLite schema (store, ingest, evict)retrieval.rst— FTS5 search (search, sources, concepts)qa.rst— Q&A pipeline (runner, query, verify, evidence, etc.)distill.rst— Distillation (surface→core)mesh.rst— Federation (gossip-based sync)cli.rst— Command-line interface
What it replaces
This generated documentation replaces docs/modules.md (1200+ lines of static API reference). The docstrings in code are the source of truth; Sphinx extracts them automatically.
Adding new modules
- Add a docstring to the module (module-level docstring at the top of
module.py) - Add an
.rstfile inapi/that includes the module withautomoduledirective - Reference it in
index.rst - Rebuild with
make html
Theme
Uses furo theme (modern, responsive, search-enabled).
Autodoc directives
The .rst files use Sphinx automodule to extract:
- Module docstrings
- Class docstrings + members
- Function signatures + docstrings
- Source code links (
:viewcode:extension)
See Sphinx autodoc docs.