IMPLEMENTATION — preface enrichment P0 (ordered steps)
Created: 24-07-2026 · Last updated: 24-07-2026
Index: PLAN_csl-guides_preface_enrichment_P0_2026-07.md
Step order (wave-1)
Step A — Legend emit + schema (UC-3)
- Define
scripts/legend.schema.json(fields from ARCHITECTURE). - Add
--emit-legendtopref_abbr_crosscheck.py(or thinpref_legend_emit.pycalling shared parse/count). - Emit
scripts/out/pwg_legend.json+pw_legend.json(+ optional combined). - Add
pref_legend_parity.py --checkcomparing emit to schema + key counts. - Wire
npm runor document Python check in CI if cheap (prefer script in existing test path).
Files: scripts/pref_abbr_crosscheck.py or new emit script; scripts/out/*_legend.json; scripts/legend.schema.json; tests.
Step B — Fold table (UC-8)
- Author
scripts/pref_fold_table.jsonfrom PWG/PW align change-log examples (old, new, dict, body_n, source log URL). - Load table in
pref_key_body_align.pycandidate generation (additive, not silent magic). - Document in
pref-body-naming-authority.md.
Files: scripts/pref_fold_table.json; align tool; naming-authority doc.
Step C — Site feed + Abbreviations rewrite (UC-1)
- Add npm/python step: copy or merge pilot legends →
src/data/pref-legends.json. - Rewrite
src/components/Abbreviationsto:- Prefer
pref-legends.jsonfor PWG/PW - Fall back to existing
abbreviations.jsonfor other codes - Show expansion + optional body_count
- Surface
review_requiredsubtly if present
- Prefer
- Update abbreviations-and-citations.mdx one paragraph on data source.
npm run buildgreen.
Files: src/data/pref-legends.json; src/components/Abbreviations/*; docs mdx; package.json script if needed.
Step D — Residual appendix (UC-13)
- Author
docs/about/preface-body-residual-appendix.mdx(or.mdif site allows) with:- Policy one-pager
- Before/after pref_only table (PWG/PW census)
- Residual class distribution
- Link to tools/out
- Sidebar under About.
- CHANGELOG entry.
Step E — FAIR cross-links (UC-11)
- From ocr-prefaces / pref METHODS pointers: ensure pilot PWG/PW METHODS link naming authority + legend emit path.
- No Zenodo cut in wave-1 unless already trivial.
Step F — PWG/PWK thin support (sibling repos)
Separate handoffs: spot-check N legend keys against pref source; METHODS one-paragraph pointer to csl-guides legend store.
Dependency graph
A → C (feed needs emit)
B independent of C (can parallel A)
D independent (can parallel after A for numbers)
E after A
F after A (uses emit)
Dr. Mārcis Gasūns