Docs Style Guide
The seven rules every page of these docs follows, for anyone who writes or reviews documentation.
Each rule has a one-line reason, because a rule without one gets argued every time.
- Only what is built goes in the repository. Docs describe shipped behaviour in the present tense: no design documents, waves, phases, PR plans, decision ids, "Built notes" or "Status: design" banners. Why: a reader cannot tell a plan from a fact, and a plan that lags the code misleads.
- One topic, one page, one section. The README and the package READMEs link to the docs and never copy them. Why: two copies drift, and the reader trusts the wrong one.
- Every page opens with one sentence saying what it covers and who it is for. Why: a reader decides in a few seconds whether the page is theirs.
- Code, tests and comments never cite doc sections. Tests are named after what they test. Why: a section number breaks silently when the doc is edited, and a comment should explain the code, not point away from it.
- Diagrams are Mermaid with no forced colours on anything GitHub or the docs site renders. Why: the reader picks the theme, and a forced colour can be unreadable on a dark canvas. Carry emphasis in shape and layout.
- Docs change in the same PR as the code. Why: a doc that lags is worse than no doc.
- Moved pages keep their old URLs working, through
mkdocs-redirects. Add an entry toredirect_mapsinmkdocs.ymlfor every page you move or rename. Why: people bookmark, link and search for pages; a move should not break them.
Checking a change
The build fails on a broken link or a missing page. The boundary test (packages/nl2sql/tests/architecture/test_boundaries.py) rejects plan ids in parentheses, alone or inside a sentence, and the names of planning documents in source, tests and docs.