Skip to content

Add token-conformance scan to design-qa skill - #10

Merged
drepkovsky merged 1 commit into
mainfrom
feat/design-qa-token-scan
Jun 14, 2026
Merged

Add token-conformance scan to design-qa skill#10
drepkovsky merged 1 commit into
mainfrom
feat/design-qa-token-scan

Conversation

@drepkovsky

Copy link
Copy Markdown
Member

Second embedded primitive for agent-board-design-qa (iteration 2). Where the geometry scan asks "is it broken", the token scan asks "is it off-system".

  • Learns the repo's tokens at runtime by probing every :root CSS variable through a throwaway element (var(--x) applied to background-color/box-shadow/border-radius, keep whatever computes). No per-stack config; works on any CSS-variable design system; sidesteps the text-format mismatch where a token shadow and a rendered shadow never compare equal as strings.
  • Flags off-palette colors (RGB distance), off-token box-shadows, off-token border-radii.
  • Spacing is intentionally NOT a generic 4px heuristic (that was the loudest false-positive source when dogfooding) — only against a real scale per-repo.

Dogfooded on the agent-board web viewer: detected 26 color / 3 radius / 1 shadow tokens, found 3 real off-token box-shadows (bespoke inset highlights on the selects + refresh button), zero color/radius false positives.

Types + drift + 67 tests green.

🤖 Generated with Claude Code

Second embedded primitive: learns the repo's design tokens at runtime by probing every :root CSS variable through a throwaway element (var(--x) applied to background-color/box-shadow/border-radius), so it works on any CSS-variable design system with no per-stack config and sidesteps text-format mismatches. Flags off-palette colors (RGB distance), off-token box-shadows, and off-token border-radii. Spacing is intentionally checked only against a real scale, not a generic 4px heuristic (that was the loudest false-positive source when dogfooding on the board viewer).
@drepkovsky
drepkovsky merged commit 7013b89 into main Jun 14, 2026
@drepkovsky
drepkovsky deleted the feat/design-qa-token-scan branch June 14, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant