feat(udg): consolidate sync manifests + emit multi-tier native tokens #67

Merged
peterswimm merged 1 commit from feat/sync-and-multi-tier into main 2026-07-25 19:15:07 +00:00
Owner

Summary

Implements recommendations #2–4 from the theme-alignment strategy + bonus multi-tier manifest:

  • Rec #4: Fix doc-drift — clarify DTCG tier sources, fix stale paths.
  • Rec #3: Tokenize hand-authored WP artifacts (atahualpa-tctd brand accents).
  • Rec #2: Consolidate sync-manifests + wire consumers: to a real just sync tool.
  • Bonus: Extend native.py to emit full multi-tier tokens (all 9 tiers, not just color).

All gated by just check ✓. Sync tool is read-only + CI-safe (skips when sibling repos absent).

Test Plan

  • just check green (all 22 gates pass).
  • just sync-dry shows 3 rituals consumers (Dart, Swift, JSON).
  • sync.py gracefully handles missing sibling repos.
  • dist/rituals/udg_tokens.json includes all 9 tiers.
  • Pre-commit hook passes (no uncommitted changes, just build matches dist/).
## Summary Implements recommendations #2–4 from the theme-alignment strategy + bonus multi-tier manifest: - **Rec #4:** Fix doc-drift — clarify DTCG tier sources, fix stale paths. - **Rec #3:** Tokenize hand-authored WP artifacts (atahualpa-tctd brand accents). - **Rec #2:** Consolidate sync-manifests + wire `consumers:` to a real `just sync` tool. - **Bonus:** Extend native.py to emit full multi-tier tokens (all 9 tiers, not just color). All gated by `just check` ✓. Sync tool is read-only + CI-safe (skips when sibling repos absent). ## Test Plan - [x] `just check` green (all 22 gates pass). - [x] `just sync-dry` shows 3 rituals consumers (Dart, Swift, JSON). - [x] sync.py gracefully handles missing sibling repos. - [x] dist/rituals/udg_tokens.json includes all 9 tiers. - [x] Pre-commit hook passes (no uncommitted changes, `just build` matches dist/).
feat(udg): consolidate sync manifests + emit multi-tier native tokens (recs #2–4)
All checks were successful
Security Scans / Trivy filesystem scan (pull_request) Successful in 1m7s
Security Scans / Gitleaks secret scan (pull_request) Successful in 51s
Test Generator / test (pull_request) Successful in 3m59s
Test Generator / lint-workflows (pull_request) Successful in 34s
Test Generator / lint-prose (pull_request) Successful in 33s
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 23s
82e6eefbd9
Consolidates three recommendations from docs/reviews/theme-alignment-strategy.md
and closes the native token pipeline for Dart/Swift apps.

**Recommendation #4 (doc-drift fixes):**
- extract.py: clarify that non-color tiers source from Brand/UDG/dtcg/*.json
  (DTCG format), not the unread udg/baseline/tokens/*.yml legacy files.
- sync-manifest.yml: fix stale macOS path (udg_tokens.json output).

**Recommendation #3 (retokenize hand-authored artifacts):**
- atahualpa-tctd/style.css: tokenize brand-accent hex (#FFFF00 yellow,
  #0066cc blue, #FFFF66 border) onto :`root` CSS variables. WP-chrome
  greys (UI defaults) remain literal per design intent.

**Recommendation #2 (consolidate sync-manifests + make consumers actionable):**
- udg/config/sync-manifest.yml: now the single source of truth for both
  products + consumers (consolidated from generator/config/sync-manifest.yml).
- udg/generators/sync.py: new tool that reads consumers: entries and
  source-injects artifacts into sibling repos. Dry-run by default (--apply to commit).
- justfile: added `just sync-dry` (preview) and `just sync` (inject).

**Bonus: Full multi-tier manifest (#1 remainder):**
- native.py: extended from color-only to emit all 9 tiers (color, space, radius,
  border, shadow, motion, typography, icon-size, size).
  - dist/<p>/udg_tokens.dart: all const Map<String, T> (int for color, double for others).
  - dist/<p>/udg_tokens.swift: all public let [String: T] (UInt32 for color, Double for others).
  - dist/<p>/udg_tokens.json: { tier: { theme: { key: value } } } manifest.
- sync-manifest.yml: consumers now list the new udg_tokens.json as the full manifest.

All gated by `just check`; sync.py is read-only and skips gracefully when
sibling repos are absent (CI-safe).
peterswimm deleted branch feat/sync-and-multi-tier 2026-07-25 19:15:08 +00:00
Sign in to join this conversation.
No description provided.