v1.4.02026-05-15Architectural refactor — single-source registry replaces 5 hand-maintained maps.
Architectural refactor — single-source registry replaces 5 hand-maintained maps.
Three consecutive KR-10 batches (78→88, 88→98, 98→108) lost data because the sub-agent missed one of 5 hand-maintained data maps (route.ts, logos.ts, tokens.ts, homepage-urls.ts, design-systems.ts). homepage-urls.ts was missed in 2 batches in a row, requiring a 20-brand backfill. Prose checklists in omd-add-reference Phase 5 failed to enforce parity.
Option C — single source of truth + machine gate:
- Canonical YAML frontmatter in every
references/<id>/DESIGN.mdcarriesid,name,country(ISO),category(slug),homepage,primary_color,logo.{type,slug},verified, and optionaldisplay_name_kr+dsblock. All 108 existing references migrated viaweb/scripts/migrate-frontmatters.mjs(preserves any existing fm; merges from the 5 source maps; emits canonical block). - Typed registry at
web/src/data/registry.generated.ts(autogenerated, ~41 KB, 108 entries, sorted by id for stable diff). Built byweb/scripts/build-registry.mjs, which validates the schema and fails fast pointing at the offending file. Auto-runs onnpm run devandnpm run build. - 5 consumers refactored to derive everything from
REGISTRY/REGISTRY_BY_ID.route.ts,logos.ts,tokens.ts(BRAND_COLORS),design-systems.ts(getDesignSystem/getAllDesignSystems).web/src/lib/homepage-urls.tsdeleted —getHomepageUrlnow lives inregistry.generated.ts.preview-export-view.tsximport updated. - Catalog-integrity vitest at
web/__tests__/catalog-integrity.test.ts: 108 parametrized per-id assertions (schema, §1 canonical header, prose-first paragraph, fingerprint cross-check, design-md mirror) plus 5 cross-cutting invariants (registry sort, triple-fingerprint byte identity, mirror coverage, llms.txt advisory check). 328 tests, all green. - Husky pre-commit hook at
.husky/pre-commitrunsbuild-registry + catalog-integrityonly when data-plane paths change (references/,data/reference-fingerprints.json, mirror copies,registry.generated.ts, scripts, the test itself). Other commits stay fast. Hook wired viacore.hooksPath = .husky. - Skill thin-out:
.claude/skills/omd-add-reference/SKILL.mdPhase 5: 80 lines → 32 lines. Prose checklist replaced with the canonical frontmatter schema + a singlenpm run build-registry && npm testgate. Sub-agent self-verification step required..claude/skills/omd-batch-launch/SKILL.mdPhase 3: 58 lines → 22 lines. Same pattern.
- Build verified —
cd web && npm run buildpasses type-check and prerenders all 247 routes (incl. all 108/design-systems/<id>pages). No regression in API, builder, playground, or browse modal — every surface reads the same registry.
Migration is one-way and irreversible: any new reference must follow the canonical frontmatter schema. The vitest gate (and husky) will refuse to merge a DESIGN.md missing a required field.

