Skip to main content

ARCHITECTURE — preface legend store (csl-guides)

Created: 24-07-2026 · Last updated: 24-07-2026

Index: PLAN_csl-guides_preface_enrichment_P0_2026-07.md

Components

prefaces/ (dict repos) → parse (reuse pref_abbr_crosscheck parsers)
csl-orig body .txt → body_count / residual class

scripts/out/{code}_legend.jsonl|tsv (canonical pipeline output)
scripts/pref_fold_table.json (documented orthography alts)
↓ emit/copy at build or npm script
src/data/pref-legends.json (site feed, PWG+PW wave-1)

src/components/Abbreviations/* (rewrite consumers)
docs/about/*-residual-appendix.mdx (UC-13)

Data model (legend row)

FieldTypeNotes
dictstringPWG, PW, …
keystringbody-aligned key_norm where applicable
expansionstringfrom pref (scan-faithful)
classenumwork | grammar | meta | unknown
body_countintfrom crosscheck
residual_classstring|nullortho/rare/… if pref_only else null
work_idstring|nullprovisional ok; review_required if provisional
review_requiredboolR8
sourcesstringpref file:line
fold_appliedstring|nullref into pref_fold_table

Build vs reuse

PieceVerdict
Pref parseReuse pref_abbr_crosscheck.py parsers
Body countsReuse crosscheck TSV
Residual typingReuse decompose outputs
Legend emitBuild thin --emit-legend on existing tools
Fold tableBuild pref_fold_table.json from H1580 change-log examples
Abbreviations UIRewrite consumer path; keep layout tokens where possible
Site dataDerive from scripts/out (R3)

Interfaces

  • CLI: python scripts/pref_abbr_crosscheck.py --dict PWG --emit-legend scripts/out
  • CLI: python scripts/pref_legend_parity.py --check (or flag on emit)
  • JSON schema: document in ARCHITECTURE or scripts/legend.schema.json
  • Component prop: load pref-legends.json filtered by dict code

Fence

No writes under csl-orig; no quiz banks; no payment paths.


Dr. Mārcis Gasūns