Skip to content

feat(import-design): validate DTCG output and type font-family tokens#6394

Merged
shipyard-local[bot] merged 1 commit into
mainfrom
feature/w3c-tokens-validator-and-typing
Jul 20, 2026
Merged

feat(import-design): validate DTCG output and type font-family tokens#6394
shipyard-local[bot] merged 1 commit into
mainfrom
feature/w3c-tokens-validator-and-typing

Conversation

@shipyard-local

@shipyard-local shipyard-local Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the W3C DTCG token emitter (#6390). Adds conformance validation and accurate string typing — emitter + test only, so the importers and imported-design render/codegen flows are untouched.

What changed

  • validate_dtcg() — a dependency-free W3C Design Tokens conformance check (standard $type set, value/type shape, reserved $-keys, $extensions well-formedness), run over emitter output in tests and proven against known-bad documents.
  • Font-family typing — confident font-family string tokens now emit $type:"fontFamily" (comma stacks as the DTCG array form); the non-standard $type:"string" is gone.
  • No drops — every other string is parked losslessly under the document-root $extensions["dev.pulp.nonStandardTokens"].

Non-breaking guarantee

Changes live only in design_tokens_w3c.{hpp,cpp} + its test + docs/skill. IRTokens, the parser, codegen, and the runtime theme are unchanged.

Verification

  • 22 DTCG cases / 78 assertions pass (incl. 4 known-bad docs the validator correctly rejects).
  • 476/476 token|import|codegen|theme|designmd regression tests pass — zero breakage.
  • Real emit (alpha/DESIGN.md): font families → fontFamily; 63 non-standard strings parked in $extensions, none dropped.

🤖 Generated with Claude Code


🔎 Provenance

Agent claude
Machine m5
Workspace w1
Directory ~/Code/fig-fix
Session fd0e374f-d5dc-4e2a-bb33-6fa8b66124a0

Resume

claude --resume fd0e374f-d5dc-4e2a-bb33-6fa8b66124a0

Jump to this tab

cmux surface focus B1B434D3-85F6-4937-8806-96D59886F574

Relaunch (any agent)

cmux surface resume get --surface B1B434D3-85F6-4937-8806-96D59886F574

Restore URLhttps://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot

stamped 2026-07-19 22:42 UTC

Add validate_dtcg() — a dependency-free W3C Design Tokens conformance
check (standard $type set, value/type shape, reserved $-keys,
$extensions well-formedness) run over emitter output in tests.

Promote confident font-family string tokens to $type "fontFamily"
(comma stacks as the DTCG array form); park every other string
losslessly under the document-root $extensions["dev.pulp.nonStandardTokens"]
rather than emitting a non-standard $type "string". Emitter- and
test-only: IRTokens, the parser, codegen, and the runtime theme are
untouched, so existing importers and render flows are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot
Skill-Update: skip skill=content reason="docs-only cli.md line tweak for --emit-w3c-tokens; no content-command change"
Skill-Update: skip skill=kits reason="docs-only cli.md line tweak; no kits behavior change"
@shipyard-local
shipyard-local Bot enabled auto-merge July 19, 2026 22:42
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 20, 2026
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 20, 2026
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 20, 2026
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 20, 2026
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 20, 2026
@shipyard-local
shipyard-local Bot enabled auto-merge (squash) July 20, 2026 20:15
@shipyard-local
shipyard-local Bot merged commit 3fc70d4 into main Jul 20, 2026
27 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant