|
| 1 | +======================== |
| 2 | +How these docs are built |
| 3 | +======================== |
| 4 | + |
| 5 | +This documentation is built as engineering, with the same rigor as the code it |
| 6 | +describes. This page explains how, because how a system is documented is itself |
| 7 | +a signal of how it is built. |
| 8 | + |
| 9 | +.. contents:: |
| 10 | + :local: |
| 11 | + :depth: 1 |
| 12 | + |
| 13 | +Documentation held to a passing bar |
| 14 | +=================================== |
| 15 | + |
| 16 | +The site is built with `Sphinx <https://www.sphinx-doc.org/>`_ and the |
| 17 | +`Furo <https://pradyunsg.me/furo/>`_ theme, from reStructuredText sources under |
| 18 | +``docs/source/``. It is compiled and deployed to GitHub Pages by a GitHub |
| 19 | +Actions workflow on every push to ``main``. |
| 20 | + |
| 21 | +The build runs with warnings treated as errors: |
| 22 | + |
| 23 | +.. code-block:: bash |
| 24 | +
|
| 25 | + sphinx-build -b html -W --keep-going docs/source docs/_build/html |
| 26 | +
|
| 27 | +The ``-W`` flag is the point. A broken cross-reference, a malformed heading, or |
| 28 | +a link to a page that no longer exists does not produce a quiet warning that |
| 29 | +rots over time; it fails the build, exactly like a failing test. The |
| 30 | +documentation passes or it does not ship. This is what keeps a docs site honest |
| 31 | +as the code underneath it changes. |
| 32 | + |
| 33 | +Reference that cannot drift |
| 34 | +=========================== |
| 35 | + |
| 36 | +The API reference is generated directly from the source with Sphinx autodoc. It |
| 37 | +reads the actual classes, signatures, and docstrings out of the installed |
| 38 | +package rather than restating them by hand. Hand-copied API docs drift from the |
| 39 | +code the moment the code changes; generated ones cannot, because the code is |
| 40 | +their only source. |
| 41 | + |
| 42 | +Prose grounded in the code |
| 43 | +========================== |
| 44 | + |
| 45 | +The technology chapters are not generic tutorials. Each was written against the |
| 46 | +specific module that uses the library in question, and describes how it is |
| 47 | +actually used here, not how it is used in the abstract. The same discipline |
| 48 | +applies to the concept chapters: where the tool has a known limit, the docs |
| 49 | +state it plainly rather than imply a capability the code does not have. The |
| 50 | +:doc:`concepts/schema-adaptation` chapter documents its own classification edge |
| 51 | +cases; the :doc:`concepts/privacy` chapter names the guarantees it does *not* |
| 52 | +make. Documentation that hides limits is documentation that cannot be trusted on |
| 53 | +the claims it does make. |
| 54 | + |
| 55 | +Structure |
| 56 | +========= |
| 57 | + |
| 58 | +The site is organized by what a reader is trying to do, not by how the code is |
| 59 | +packaged: |
| 60 | + |
| 61 | +- **Getting Started** gets a reader from nothing to generated data. |
| 62 | +- **Concepts** explains the design decisions and why they were made. |
| 63 | +- **Foundations** covers the principles and the project's lineage. |
| 64 | +- **Technology Stack** justifies each dependency in the context of the system. |
| 65 | +- **Reference** is the exhaustive, lookup-oriented material (CLI, API, testing). |
| 66 | + |
| 67 | +Diagrams are authored as text (Mermaid) and rendered in-page, so they live in |
| 68 | +version control alongside the prose and change with it. |
| 69 | + |
| 70 | +Why this matters |
| 71 | +================ |
| 72 | + |
| 73 | +Treating documentation as a versioned, reviewed, CI-gated part of the project, |
| 74 | +rather than an afterthought, is a deliberate practice. It is the difference |
| 75 | +between a README that describes what the software was intended to do on the day |
| 76 | +it was written, and a documentation system that is held accountable to what the |
| 77 | +software actually does today. |
0 commit comments