Initial docstring pass focused on syntax/style; this pass verified each docstring against actual function behavior. Found and corrected: WRONG (claimed behavior didn't match): - _cmd_verify: claimed Q&A/audit verification — actually round-trips Merkle proofs on N random documents - _cmd_snapshot_verify: claimed Merkle proof round-trip — actually re-derives snapshot root and checks for drift - _cmd_evict: claimed 'archive unused content' — actually NULLs content and removes FTS row; cores never evict - _cmd_stats: listed 'index size' which is not in stats() output OVERSTATEMENT (claim stronger than contract): - _cmd_ask: 'grounded answer' — verifier may return UNGROUNDED - _cmd_snapshot_list: 'named' — snapshots have hash roots, not names MISSING IMPORTANT BEHAVIOR: - _cmd_rehydrate: didn't mention drift-detection exit code - _cmd_mesh_status: didn't mention 'enabled' flag (most important field) - _cmd_distill: didn't mention recursive core→core distillation - MerkleTree.proof(): didn't mention IndexError on out-of-range VAGUE: - _cmd_search: 'Search the corpus with FTS5' → mention output formats Sphinx rebuild successful (29 warnings, down from 31). |
||
|---|---|---|
| .. | ||
| _build/html | ||
| api | ||
| conf.py | ||
| index.rst | ||
| Makefile | ||
| README.md | ||
Aborist 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.