@@ -9,8 +9,8 @@ between prose and code, which works at every viewport.
99## Goals
1010
1111- ** One column model per page type, fixed.** Example pages keep cells in
12- the prose|code 2-col grid; journey pages keep section heading + figure
13- in a 2-col grid . Figures never reflow the surrounding columns.
12+ the prose|code 2-col grid; journey pages keep headings, figures, and lists
13+ in one centered flow . Figures never reflow the surrounding columns.
1414- ** Universal, not viewport-conditional.** A reader at any width sees the
1515 same figure in the same place. No ` @media ` breakpoints for figure
1616 positioning; no overlay layer.
@@ -121,11 +121,12 @@ single-column flow on every viewport:
121121```
122122
123123One figure per section, faithful to the section's conceptual shift,
124- scored against ` docs/journey-visualisation-rubric.md ` . Figures are
125- mapped by section title via ` SECTION_FIGURES ` in ` src/marginalia.py ` ;
126- ` render_for_section ` returns empty for unmapped titles, but the
127- SectionFigureContract requires every production journey section to
128- have one.
124+ scored against ` docs/journey-visualisation-rubric.md ` . Journey-section
125+ metadata lives in ` docs/quality-registries.toml ` and is loaded through
126+ ` src/editorial_registry.py ` ; ` src/marginalia.py ` renders the resulting
127+ registry entry. ` render_for_section ` returns empty for an unmapped title,
128+ but the SectionFigureContract requires every production journey section
129+ to have one.
129130
130131### Why these two, not five
131132
@@ -138,38 +139,22 @@ vary instead. Adding a second or third figure changes the banner's
138139internal grid (auto-fit handles 1/2/3+), but the cells around it
139140remain unchanged — no reflow, no cognitive context-switch.
140141
141- ## Anchors and attachments
142+ ## Anchors, attachments, and journey figures
142143
143- ` src/marginalia.py ` declares which figures attach where. The data shape
144- will move from per-cell injection toward per-position banners:
144+ ` docs/quality-registries.toml ` is the source of truth for attachment and
145+ caption metadata. Each ` [[figure_attachments]] ` row names an example slug,
146+ cell anchor, paint-function name, and caption; each
147+ ` [[journey_section_figures]] ` row names a journey-section title, figure, and
148+ caption. ` src/editorial_registry.py ` loads those rows, while
149+ ` src/marginalia.py ` owns only executable paint functions and the
150+ ` render_for_anchor ` / ` render_for_section ` renderers.
145151
146- ``` python
147- # proposed shape — banners keyed by position, each holding 1+ figures
148- BANNERS = {
149- " mutability" : {
150- " after-cell-0" : [
151- (" aliasing-mutation" ,
152- " Two names share one mutable list — appending through one "
153- " name changes the object visible through both." ),
154- (" tuple-no-mutation" ,
155- " By contrast, a tuple is frozen — aliases share a value "
156- " no method can change in place." ),
157- ],
158- },
159- }
160- ```
161-
162- Banner positions:
163-
164- | position | renders |
165- | --------------------| --------------------------------------|
166- | ` before ` | once, before the first cell |
167- | ` after-cell-0 ` , … | once, after cell N (zero-indexed) |
168- | ` after-walkthrough ` | once, after the last cell |
169-
170- Each position is a list, not a single figure: the same banner may hold
171- multiple figures as a small multiple. Most slugs will start empty.
172- Adding a banner is a one-line edit in ` src/marginalia.py ` .
152+ Example-page rendering interleaves each cell with
153+ ` render_for_anchor(slug, "cell-N") ` . A registry row may therefore attach one
154+ or more figures after a teaching cell. Journey pages call
155+ ` render_for_section(section_title) ` between a section heading and its list.
156+ Add or move metadata in the registry; add a ` FIGURES ` paint function only when
157+ the diagram itself is new.
173158
174159## Authoring model
175160
@@ -235,12 +220,14 @@ explicitly. Re-introducing either is a defect.
235220- `src/marginalia_grammar.py` — palette, tokens, words, phrases, metrics.
236221 Aligned with `public/site.css` design tokens; figures use the four
237222 palette constants and never pick colours directly.
238- - `src/marginalia.py` — figure registry (`FIGURES`) and attachment map.
239- Exports `render_for_anchor(slug, anchor)` for the current cell-inline
240- layout; banner-rendering helpers will land alongside.
241- - `src/app.py` — `_render_walkthrough_cell` is the current rendering
242- helper; the banner-between rollout will rename or replace it with a
243- walkthrough-level renderer that interleaves cells and banners.
223+ - `docs/quality-registries.toml` — source of truth for attachments,
224+ captions, journeys, and curated editorial scores.
225+ - `src/editorial_registry.py` — loader for the registry (or its generated
226+ Worker fallback).
227+ - `src/marginalia.py` — executable figure registry (`FIGURES`) plus
228+ `render_for_anchor(slug, anchor)` and `render_for_section(title)`.
229+ - `src/app.py` — `render_example_page` interleaves teaching cells and
230+ `render_for_anchor`; `render_journey_page` places section figures.
244231- `public/site.css` — `.cell-banner` rules. Production uses the
245232 banner-between grammar; cells always render with the prose|code
246233 2-column grid and never receive a `has-figure` class.
0 commit comments