arborist/docs/_source
russell@unturf.com bae5cafe9a
CLI: arborist v8 score → arborist substrate score
Followup to 654d923 (which moved the package from arborist/v8/ →
arborist/substrate/ at the file layer). The CLI surface still baked
in `v8` so a new operator running `--help` would see
``arborist v8 score`` and ask the same "what's v8 vs v9.8?"
naming-confusion question that drove the package rename in the
first place. Closing the loop end-to-end.

arborist/cli.py
===============

- Subparser renamed: ``"v8"`` → ``"substrate"``; help string updated
  to "Merkle-AGI substrate primitives (ForkScore + future paper
  specs)" so the dir name and command name and help text all align.
- Inner subparser dest renamed: ``v8_op`` → ``substrate_op``.
- Function renamed: ``_cmd_v8_score`` → ``_cmd_substrate_score``;
  docstring updated.
- All ``v8_score`` local variables renamed to ``substrate_score``.
- New comment block above the subparser block explains the rename
  + why the v-prefix was retired (substrate-paper version vs v9.8
  schema version naming collision).

The old ``arborist v8 score`` is gone — no alias preserved. CI + ops
scripts must update; today's earlier commit chain has been the only
place using it and that's been refreshed in lock-step.

tests/test_v8_fork_score.py
===========================

- 4 ``parser.parse_args(["v8", "score", ...])`` calls → ``["substrate", ...]``.
- 4 test functions renamed: ``test_cli_v8_score_*`` →
  ``test_cli_substrate_score_*``.
- Module docstring + section comment + helper docstring updated.

Filename intentionally kept as ``test_v8_fork_score.py`` for git
history continuity; pytest discovers by ``test_*`` content, not
filename. Renaming the file would muddle ``git log --follow`` for
the test surface.

Docs refreshed
==============

- docs/v8-fork-score.md — §5 CLI block invocation.
- docs/_source/v8-fork-score.rst — :code-block:: bash invocation.
- docs/_source/bench.rst — invocation in `### v8 ForkScore` section.
- docs/tickets/ticket-000012-selection-consensus-protocol.md —
  three references in §7 close-out + §7 Phase 1c proposal +
  §7 future-CLI-shape note.
- docs/dav1dprometheus-update-2026-05-09.md — bench journal mention.

Doc filenames (``v8-fork-score.{md,rst}``) kept stable since they
are URL identities; the file content explains the v8→substrate
rename internally. ``index.rst`` toctree references unchanged.

Hygiene
=======
- ``.venv/bin/arborist substrate score --help`` → 0 + valid usage.
- ``.venv/bin/arborist v8 score`` → exits non-zero (subcommand
  removed, surfaced cleanly in ``argparse`` error).
- ``make test`` → 1643 passed, 45 skipped.
- ``make chain-check-shards`` → 0 across all 7 shards.
- fox's parallel work in arborist/qa/{runner,verify}.py +
  arborist/qa/warrant_chain.py left untouched.
2026-05-10 09:12:34 -04:00
..
_ext docs: clear all 39 cold-build Sphinx warnings (truly green) 2026-05-09 18:00:15 -04:00
_static docs: add Read the Docs configuration 2026-05-04 08:17:24 -04:00
api docs: open ticket #000022 (adapter LossReport) + federation doc-discoverability fix 2026-05-07 16:36:13 -04:00
bench.rst CLI: arborist v8 score → arborist substrate score 2026-05-10 09:12:34 -04:00
concepts.rst docs: clear all 39 cold-build Sphinx warnings (truly green) 2026-05-09 18:00:15 -04:00
conf.py docs: footer attribution → russell@unturf./foxhop/TimeHexOn/legallydav1dpro unturf permacomputers 2026 2026-05-07 14:53:33 -04:00
cookbook.rst aborist/arborist 2026-05-07 09:31:49 -04:00
diagrams trim Makefile (-6 redundant targets) + better RTD docs 2026-05-04 09:03:03 -04:00
index.rst docs: clear all 39 cold-build Sphinx warnings (truly green) 2026-05-09 18:00:15 -04:00
license.rst aborist/arborist 2026-05-07 09:31:49 -04:00
Makefile docs: add Sphinx API reference generation from docstrings 2026-05-04 07:55:34 -04:00
merkle-agi-v7w-spatial-temporal.rst docs: clear all 39 cold-build Sphinx warnings (truly green) 2026-05-09 18:00:15 -04:00
pi-star.rst docs: propagate kernel/sub-battery counts to canonical surfaces 2026-05-09 17:27:02 -04:00
quickstart.rst aborist/arborist 2026-05-07 09:31:49 -04:00
README.md aborist/arborist 2026-05-07 09:31:49 -04:00
requirements.txt docs: switch to sphinx-book-theme for unified right-side project TOC 2026-05-04 09:13:14 -04:00
v8-fork-score.rst CLI: arborist v8 score → arborist substrate score 2026-05-10 09:12:34 -04:00

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 configuration
  • index.rst — Main table of contents
  • api/ — 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

  1. Add a docstring to the module (module-level docstring at the top of module.py)
  2. Add an .rst file in api/ that includes the module with automodule directive
  3. Reference it in index.rst
  4. 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.