Enforce the design contract with syntax-aware token checks - #207
Merged
Merged
Conversation
This was referenced Sep 28, 2026
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.
Design contract
Raw style values could bypass the previous typography text check through JSX bindings, computed keys, DOM writes, Tailwind variants, or local token aliases. The new syntax-aware check covers typography, colours, radii, shadows, and motion, and verifies that the structured DESIGN record agrees with the shared theme.
How enforcement works
Retained Delete-button colour
Verification
bun run fix,bun run ci,bun run types, scanner TypeScript checks, and production build pass locally. Focused token and design-record tests pass.09e99b2b: validation (including PostgreSQL), browser e2e, and container. CI run.Static analysis does not execute arbitrary imported code, runtime HTML, every CSS-in-JS API, or Web Animations calls. Exact runtime exceptions require review; using a shared colour alone does not prove contrast. Contributor guidance and the reviewed inventory are in
docs/design-contract.mdandscripts/design-contract/exceptions/.The local visual HTML report, screenshots, inventory, and logs are retained under
.design-audit/design-token-contracts/in the task worktree. Generated evidence is excluded from the commit. No merge performed.Integration with sibling design work
This branch restores the original red after the earlier contrast commits were shared with sibling branches. Those branches must align their colour, design record, and exact specimen assertion with this PR before integration. Source-owner review patches remain scoped to their recorded inputs. Required CI must rerun on each integrated branch.