Decisions & open questions
About these docs — how to maintain them
How the site is built, where to edit what, how to add a page or a source, and the conventions used.
Built from 1 source document
The model
flowchart LR
T["documentation/topics/*.md<br/>English topic pages"] --> B["node documentation/build.mjs"]
S["Original sources<br/>(listed in manifest.json)"] --> B
M["documentation/manifest.json<br/>nav, statuses, source list"] --> B
B --> O["documentation/site/<br/>static HTML + CSS + JS"]- The Markdown files are the source of truth. Never edit
documentation/site/— it is regenerated from scratch on every build. - Topic pages (
documentation/topics/) are the maintained, English reading path. Update them when a decision changes. - Original sources stay where they are and stay authoritative for their detail (
contracts.mdfor the POC wire, the French analysis documents for the design discussion). The site shows them converted as-is.
Build and open
node documentation/build.mjs # rebuild (Node 18+, no npm install — zero dependencies)
node documentation/build.mjs --strict # same, but exits 1 on any broken link or anchorThen open documentation/site/index.html directly in a browser — no server needed, it works over file://
(the search index is a .js file).
The site is self-contained: every repository file a page links to (PDFs, decks, code, raw Markdown) is copied
into site/repo/, and links to folders go to the GitHub tree. So documentation/site/ can be uploaded as-is to any
static host.
Offline reading (phone, bus, plane)
Offline mode is opt-in, per device. When the site is served over http(s) (a static host, or the local preview below), the top bar shows a button:
| Button | Meaning | Click |
|---|---|---|
| ⤓ Save offline | Nothing saved on this device (the default) | Confirms, then downloads everything once (≈ 14 MB: every page, search, the diagram library, PDFs, images) |
| Saving for offline… N% | Download in progress | — |
| ✓ Offline ready | A complete copy is on this device | Offers to remove it and free the space |
| ● Offline — saved copy | No connection; you're reading the saved copy | — |
| ↻ Updated — tap to reload | A newer version was just saved | Reloads the page |
| Offline save failed — will retry | A download failed; nothing half-saved is kept | Retries on the next visit |
- While it's on, each later visit with a connection downloads only the files that changed; the previous copy is then deleted — versions never pile up. Space used ≈ one copy, plus any PowerPoint deck you opened (decks are only saved once opened — a browser can't display them).
- The choice is stored in the browser: switching it on on your phone doesn't affect your laptop.
- On a phone, "Add to home screen" installs it like an app.
Service workers don't run for pages opened from file://, so offline mode needs http(s). To try it locally:
node documentation/build.mjs --serve # builds, then serves on http://localhost:8080
node documentation/build.mjs --serve --port=9000The offline logic is generated: documentation/sw-template.js is the editable template; the build writes
site/sw.js with the list of files and a content hash per file.
The build checks every link and every #anchor (topic → source, source → source) and lists problems at the end.
Where to change what
| To… | Edit |
|---|---|
| Fix or extend a topic | documentation/topics/<slug>.md |
| Add a topic page | Create topics/<slug>.md with front matter, then add the slug to a group in manifest.json → nav |
| Add a new source document | Add an entry to manifest.json → sources (path, title, status, language, optional note and HTML twin) |
| Change a source's status badge or warning note | manifest.json |
| Change the look | documentation/assets/style.css |
| Change search, theme, diagrams, copy buttons, the offline pill | documentation/assets/app.js |
| Change offline caching behaviour | documentation/sw-template.js (what is saved in advance: OFFLINE_* in build.mjs) |
| Change the Markdown conversion | documentation/build.mjs |
Writing topic pages
Front matter:
---
title: Page title
nav: Short label for the menu # optional
summary: One sentence shown under the title.
sources: # repo paths, shown as "Built from…" and cross-linked from the source pages
- poc-code/contracts.md
---Links: [text](topic:tokens-and-keys#the-mandate-jwt) to another topic, [text](src:poc-code/contracts.md#7-cross-module-scenario-matrix)
to a source (anchors are GitHub-style heading slugs, so existing file.md#anchor links keep working). Use
(<src:path with spaces.md>) for paths containing spaces.
Callouts — a blockquote starting with a marker:
> [!DECISION] Optional title
> Text…Markers: NOTE, TIP, IMPORTANT, WARNING, CAUTION, STATUS, DECISION, OPEN, POC, SUPERSEDED.
Diagrams: a fenced ```mermaid block. Topic pages may also contain raw HTML blocks (cards, stats); source pages never interpret HTML.
Conventions
- When the POC and the target design differ, describe the target, label the POC choice and whether it is a simplification. When nothing is decided, list the options and say not chosen.
- Never present a working hypothesis (🔶 in the French documents) as a decision.
- Status badges for sources: Current Reference Proposed design POC Pitch material Historical Duplicate External reference Boilerplate Raw transcript.
Third-party code
The only library is Mermaid 12.4.0 (MIT), vendored unmodified in documentation/assets/vendor/mermaid/ (≈ 5.7 MB,
licence and third-party notices alongside) and loaded only on pages that contain a diagram — no CDN, works offline.
Everything else (Markdown conversion, search, theme, navigation) is plain JavaScript written for this site.