ADR-0002 — Design documents are living snapshots, published as this site's Maintain track
This site's design documents describe it as it stands now and are published as its Maintain track, separate from decisions and package docs.
- Status: Approved
- Date: 2026-10-31
- Deciders: @puncoz
- Approved by: @puncoz
- Approved on: 2026-11-01
- Supersedes: —
- Superseded by: ADR-0012 (decision 4: every page is MDX); ADR-0011 (decision 5, in part: Archify diagrams are embedded from sandboxed HTML, with the Mermaid version kept)
- Design documents:
content/docs/maintain/index.mdx,content/docs/maintain/meta.json, every directoryindex.mdx,content/docs/maintain/_templates/
Context
This repository is a documentation site, so "documentation" means two different things here:
- Package and project documentation: the pages readers come for. It is the product.
- Documentation about the site: why it is built the way it is, and how it works.
The second kind serves two further jobs:
- Decisions need a permanent, ordered record of why.
- Design documents (flows, data flows, access rules, the threat model) must match the code at all times. A document that describes an old version is worse than none, because it is believed.
The owner decided on 2026-10-31 that the site's own documentation is published on the site,
rather than kept in a separate docs/ folder outside the content. ADR-0015 then made the site
a catalogued project like any other, slug docs, so this documentation is that project's
Maintain track.
Decision
- The site's own documentation is the Maintain track of the project
docs,content/docs/maintain/, published at/docs/maintain(ADR-0015). - Three kinds of document:
content/<slug>/, exceptcontent/docs/maintain/— package and project documentation, written and updated within the approved content conventions and the invariants inAGENTS.md§6.content/docs/maintain/adr/— immutable once approved; superseded, never rewritten.- Everything else under
content/docs/maintain/— living snapshots of the site as it stands, edited in place. No revision tables, no "previously X, now Y", no strikethrough. What is no longer true is deleted. Git and ADRs hold the history.
- Typed directories:
app-flow/,prd/,architecture/,erd/,dfd/,state/,sequence/,api/,rbac/,security/, each with anindex.mdxof its conventions, and_templates/with a starting point for each. Which ones a change requires is the table inAGENTS.md§8. - Pages are Markdown (
.md) with a frontmattertitleand no#heading; links between them are relative file paths. - Diagrams are Mermaid in fenced blocks: flows, sequences, state machines, ERDs and screen wireframes. No binary or externally hosted images. Rendering them as diagrams on the site is a separate decision (a new dependency).
- An implementation is not complete while a design document contradicts it.
- Skill-generated specs and plans go into these directories (usually the ADR and its design documents), not into a skill's own folder layout.
Options considered
| Option | Pros | Cons | Verdict |
|---|---|---|---|
A — Published with the site, now content/docs/maintain/ | The site documents itself with its own tooling; one content tree; search, Markdown and llms.txt cover the design docs too | Design documents, including the threat model, are public | Chosen by the owner |
B — A separate docs/ folder outside the content | Internal notes stay off the site | Two folders called "docs"; the design docs get none of the site's features | Rejected by the owner |
| C — Changelog-style design docs | History visible inline | Readers must reconstruct the current state | Rejected |
Consequences
Positive
- A reader finds the current system in the design docs, the reasons in ADRs, and the packages in the rest of the site — all in one place, searchable.
Negative / accepted trade-offs
- Everything here is public: the threat model, the audit checklist and the secrets inventory (variable names, never values). Accepted with this decision.
- Mermaid shows as code on the site until a renderer is adopted.
Content invariants
§6.1 applies here as everywhere: nothing about a private project goes into these pages.
Security considerations
These pages are published on every surface (AGENTS.md §6.1), so they must never hold a secret
value, a private project's details, or an unfixed vulnerability's exploit path. A finding that
is not yet fixed is reported to the owner, not written here, until it is fixed.
content/docs/maintain/security/ follows the living-snapshot rule, so the threat model
and secrets inventory are kept accurate rather than historical.
Implementation notes
-
content/docs/maintain/withmeta.json,index.mdxand each directoryindex.mdx;content/docs/meta.jsoncatalogues the site as projectdocs(ADR-0015). -
content/docs/maintain/_templates/holds the templates. -
AGENTS.md§8 states the three kinds, the page format and the "write before building" table. - Tests: none — verified by
bunx next buildcompiling every page.
Approved as written on 2026-11-01, by the owner's choice. Decision 4 was already superseded by ADR-0012 and decision 5 in part by ADR-0011; diagrams are made with Archify, with their Mermaid version kept, by the owner's standing choice in
AGENTS.md§8.
Docs to update on implementation
-
content/docs/maintain/adr/index.mdx— status on approval.
ADR-0001 — Every change starts with an approved ADR
Every feature and functional change starts with a written decision, and no implementation begins until the owner approves it.
ADR-0003 — Comments explain why; every branch takes a block
Comments explain why and the code explains what, so most code has no comment, and every branch takes a block.