Document a codebase =================== A public name needs a contract. Explain its input, its result, its ownership, and the conditions under which it fails. A signature alone is not a manual. Static extraction architecture ------------------------------ Guidedog extracts API documentation by parsing source files directly into abstract syntax trees. It never executes or imports user code, eliminating unintended side effects, external execution requirements, and foreign dependency issues: .. graphviz:: :class: graphviz-adaptive :caption: Guidedog static code documentation architecture. :alt: Code source trees are parsed into ASTs statically, transformed into virtual API documents, and integrated into cross-references and objects.inv. digraph code_doc_arch { graph [rankdir=TB, bgcolor="transparent", pad="0.3", nodesep="0.4", ranksep="0.4"]; node [shape=box, style="rounded,filled", fillcolor="#edf5f2", color="#216553", fontname="Helvetica", fontcolor="#16382f", fontsize=12, margin="0.2,0.12"]; edge [color="#216553", fontname="Helvetica", fontcolor="#16382f", fontsize=10]; subgraph cluster_sources { label="Source Trees (No Execution)"; fontname="Helvetica-Bold"; fontsize=12; fontcolor="#16382f"; style="rounded,dashed"; color="#216553"; odin_src [class="gd-input", label=<Odin Packages
(odin_autoapi_dirs)>, shape=note, fillcolor="#fbfaf3"]; py_src [class="gd-input", label=<Python Modules
(autodoc_source_paths)>, shape=note, fillcolor="#fbfaf3"]; } subgraph cluster_parsers { label="Static AST Parsers"; fontname="Helvetica-Bold"; fontsize=12; fontcolor="#16382f"; style="rounded,dashed"; color="#216553"; odin_parser [label=<core:odin/parser
Declarations + comments>, fillcolor="#edf5f2"]; py_parser [label=<tree-sitter + pyscan
Declarations + docstrings>, fillcolor="#edf5f2"]; } virtual_docs [class="gd-input", label=<Virtual API Doctrees
(api/*.rst in memory)>, fillcolor="#fbfaf3"]; doc_graph [label=<Documentation Graph
Toctrees + references>, fillcolor="#edf5f2"]; inventory [label=<objects.inv
Cross-project object catalog>, shape=cylinder, fillcolor="#e0eee9"]; odin_src -> odin_parser [label="reads"]; py_src -> py_parser [label="reads"]; odin_parser -> virtual_docs [label="generates"]; py_parser -> virtual_docs [label="generates"]; virtual_docs -> doc_graph [label="integrates"]; doc_graph -> inventory [label="exports"]; } Odin ---- .. code-block:: toml odin_autoapi_dirs = ["../../lib"] odin_autoapi_root = "api" odin_autoapi_options = ["members", "undoc-members"] Guidedog reads Odin source through Odin's parser. It does not compile or run the documented package. The generated pages join the document graph and object inventory. The repository's separate API project is ``docs/api``. See :doc:`../odin` for directives, signatures, and options. Python ------ .. code-block:: toml extensions = ["sphinx.ext.autodoc"] autodoc_source_paths = ["../src"] Guidedog parses Python source rather than importing it. This avoids import side effects. It also means runtime-generated objects may be absent. Describe those objects explicitly when they are part of the public interface. See :doc:`../autodoc` for the exact discovery rules. Link across projects -------------------- Publish the generated ``objects.inv`` with the site. An intersphinx mapping can then resolve names from another project. Use explicit mappings for reproducible builds. See :doc:`../intersphinx`.