Skip to content

Commit cab3e81

Browse files
committed
Add 'How these docs are built' documentation-engineering page
Explains the docs-as-engineering approach (Sphinx/Furo, CI-built, warning-clean under -W, autodoc, grounded-in-code prose). Serves as the on-site anchor for the documentation-engineering story.
1 parent 5003a90 commit cab3e81

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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.

docs/source/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ Contents
8888
reference/api
8989
reference/testing
9090

91+
.. toctree::
92+
:maxdepth: 1
93+
:caption: About the documentation
94+
95+
documentation-engineering
96+
9197
Project information
9298
-------------------
9399

0 commit comments

Comments
 (0)