Expand description
The std domain: cross-reference labels, glossary terms, program
options and generic objects — Sphinx’s StandardDomain
(domains/std/__init__.py).
This module owns the collection half (Sphinx’s process_doc,
note_object, _note_term, add_program_option); the resolution
half lives in crate::env::resolve.
See docs/superpowers/plans/2026-08-31-m2-wave4-research-spec-sphinx-env-toctree-domains.md
§4 for the attribute-by-attribute mapping this port is drawn from.
Structs§
- Document
Source - One document’s parse output, as
process_docconsumes it. - StdDomain
Data - Standard-domain (
std) registries: cross-reference labels, generic objects (:option:,:envvar:, …), program options, and glossary terms. Field shapes mirror Sphinx’sStandardDomain.dataexactly (domains/std/__init__.py:768-781).
Functions§
- process_
doc StandardDomain.process_doc(domains/std/__init__.py:937-993) plus the registrations Sphinx performs from directives at parse time, which our parse layer has no domain callbacks to run: glossary terms (make_glossary_term) are replayed from the finished doctree, and theoption/envvar/confvalregistrations (ObjectDescription.add_target_and_index) from the records the parse layer kept — seeRegistryExport::program_optionsfor why the doctree cannot carry those. The py domain’s registrations ([crate::env::py_domain::collect_registrations]) replay in the same parse-time pass, because that is where they fire in Sphinx — their duplicate warnings interleave with std’s in document order.