feat: taxonomy registry split, schema update, and SPEC-009 validation#810
Merged
feat: taxonomy registry split, schema update, and SPEC-009 validation#810
Conversation
Split anatomy-terms.json to separate component anatomy parts from styling surfaces and positional terms per the taxonomy spec (taxonomy.md, discussion #806): - anatomy-terms.json: now only visible named parts (icon, label, etc.) - token-objects.json: NEW — styling surfaces (background, border, edge, visual, content) - structures.json: NEW — reusable visual patterns (base, container, etc.) - substructures.json: NEW — child structures (item) - orientations.json: NEW — direction terms (vertical, horizontal) - positions.json: NEW — positional terms (top, bottom, start, end, affixed) - densities.json: NEW — spacing options (spacious, compact) - shapes.json: NEW — shape terms (uniform) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Explicitly define the 9 semantic fields from taxonomy.md that were previously falling through additionalProperties: structure, substructure, anatomy, object, orientation, position, size, density, shape. Add descriptions distinguishing semantic fields from dimension fields. Purely additive — existing tokens that use these fields via additionalProperties continue to validate unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 12375e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Add registry module that embeds design-system-registry JSON at compile time via include_str!. Expand ValidationContext with RegistryData. Replace SPEC-009 stub with real validation logic that checks 12 semantic name-object fields (component, state, variant, size, anatomy, object, structure, substructure, orientation, position, density, shape) against their corresponding registries with advisory (Warning) severity. Excluded fields: property (free-form), colorScheme/scale/contrast (dimension fields validated by SPEC-005/SPEC-008). Closes #763. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
83ca76e to
12e62c2
Compare
Member
Author
Run report for 12375e02Total time: 1m 47s | Comparison time: 5m 17s | Estimated savings: 3m 30s (66.2% faster)
Expanded report
Touched files |
- Add doc comment to registry.rs explaining include_str! paths are relative to sdk/core/src/registry.rs and will fail at compile time if the file is moved - Expand shapes.json description to note it is a starting vocabulary - Add changeset for @adobe/design-system-registry and @adobe/design-data-spec (both minor: new registries + schema fields) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the taxonomy follow-through work from #806: splits the registry, updates the token schema, and implements SPEC-009 validation.
Phase 1 — Registry split and new registries:
anatomy-terms.json: removed styling surfaces and positional termstoken-objects.json(background, border, edge, visual, content)Phase 2 — Token schema update:
token.schema.jsonPhase 3 — SPEC-009 implementation:
registry.rsmodule embedding registry JSON at compile timeValidationContextwithRegistryDataRelated Issue
Motivation and Context
The spec (taxonomy.md, token-format.md) defines 13 semantic fields on the name object with advisory validation against the design system registry. Until now, the registry conflated anatomy parts with styling surfaces, the schema only explicitly defined 7 of 13 fields, and SPEC-009 was a stub. This PR bridges the gap between the spec and the implementation.
How Has This Been Tested?
Types of changes
Checklist: