Expand description
The canonical Workshop catalog.
The catalog is the locale-independent semantic identity layer between
textual Workshop spellings and WIR. Every builtin has a canonical id and
a Kind; locale tables map canonical identities to client spellings and
back, so parser, emitter, analyzer, and tooling never embed
locale-specific strings as identity.
Locale coverage is data ([docs/adr/0001-catalog-boundaries.md]):
the primary locale (the first declared one, en-US) is complete — every
entry and enum member carries a primary-locale alias — while additional
declared locales may be partially covered. Missing target-locale mappings
fail explicitly at conversion/emission time; the catalog reports exact
per-locale coverage machine-readably (Catalog::locale_coverage,
Catalog::identity).
The catalog dataset declares its own version and a deterministic content
digest (sha256) recomputed by the catalog pipeline
(workshop-catalog-gen build); Catalog::load rejects a digest
mismatch, so dataset changes are deliberate and reproducible.
Structs§
- Catalog
- The validated canonical Workshop catalog.
- Catalog
Entry - One catalog builtin.
- Catalog
Identity - The machine-readable catalog identity (ADR-0001 Decision 5): the four identities that evolve independently — implementation version, catalog dataset version plus content digest, locale coverage, and target evidence — plus the data provenance record. Serialized with the ADR’s kebab-case identity names.
- Enum
Domain - One enum value domain (e.g.
Color,Beam). - Enum
Member - One enum member within a domain.
- Locale
- A normalized Workshop client locale, e.g.
en-US. - Locale
Coverage - Per-locale mapping coverage: how many canonical entries (builtins, localized preset identities, and enum members) carry a mapping for the locale out of the declared total.
- Localized
String Entry - A locale-independent identity for a preset used by the Workshop
Stringvalue. Unlike a customValue::String, this identity must resolve through reviewed client-locale aliases before it can be parsed or emitted. - Param
Coercions - Literal substitutions accepted at one parameter position and normalized into the parameter’s declared semantic type before it enters WIR.
- Provenance
- Provenance of the catalog data.
- Target
Meta - Target-format metadata recorded in the catalog.
Enums§
- Kind
- The kind of a catalog builtin.
Constants§
- CATALOG_
DATA - The embedded catalog data.
Functions§
- build_
canonical - Rebuild the canonical catalog form with a fresh content digest: validate,
canonicalize, and (re)write the
digestfield. Byte-idempotent, so the committed dataset and its digest are reproducible from the data file. - canonicalize
- Canonicalize catalog data: parse, validate, and re-serialize
deterministically (object keys sorted, stable formatting). Re-running on
the same input produces byte-identical output, so the data pipeline is
reproducible. Validation intentionally skips digest verification so a
stale digest can be repaired by
build_canonical. - content_
digest - The deterministic content digest of catalog data: sha256 of the canonical
(sorted-key, pretty) serialization of the parsed content with the
self-referential
digestfield removed. Independent of file formatting; changes whenever any semantic content changes.