Description
The project has had 14 "UI does not match design spec" bug issues since inception. Each feature PR risks introducing design drift (wrong border-radius, non-oklch colors, incorrect spacing tokens, wrong font). Currently, design compliance is only caught post-merge by the UI Verifier automation, which creates follow-up bug issues. Catching violations pre-merge in CI would eliminate this entire bug category.
Acceptance Criteria
Approval Required
This is HIGH risk because:
- Static analysis of Tailwind classes can produce false positives (e.g.,
rounded-sm is valid per design spec but rounded-md is not)
- May need an allowlist for edge cases (third-party component wrappers)
- Could slow down the test suite if file scanning is expensive
- Scope could expand beyond what's useful — should start minimal (just
rounded- check) and iterate
Comment "approved" to release this to the automation queue.
Dependencies
None
Technical Notes
- Design spec is at
.agents/design.md — the source of truth for visual rules
- Existing pattern:
src/components/editor/design-spec-compliance.test.ts already does similar static checks for editor components (11 tests)
- The
overlay-opacity.test.ts and dialog-design-spec.test.ts also follow this pattern
- Start with the
rounded- class check — it accounts for the majority of design-spec bugs
- Exclude
src/components/ui/ (shadcn/ui managed files) and node_modules/
- Reference
.agents/conventions.md for test patterns
Description
The project has had 14 "UI does not match design spec" bug issues since inception. Each feature PR risks introducing design drift (wrong border-radius, non-oklch colors, incorrect spacing tokens, wrong font). Currently, design compliance is only caught post-merge by the UI Verifier automation, which creates follow-up bug issues. Catching violations pre-merge in CI would eliminate this entire bug category.
Acceptance Criteria
rounded-classes other thanrounded-noneorrounded-sm(design spec requires sharp corners,--radius: 0)font-familyinstead of the JetBrains Mono CSS variablepx-/py-/p-values that don't match the 4px grid (design spec spacing)pnpm test(no separate CI step needed)src/components/ui/are excludedrounded-check catches the most common violation patternpnpm lint && pnpm typecheck && pnpm testpassApproval Required
This is HIGH risk because:
rounded-smis valid per design spec butrounded-mdis not)rounded-check) and iterateComment "approved" to release this to the automation queue.
Dependencies
None
Technical Notes
.agents/design.md— the source of truth for visual rulessrc/components/editor/design-spec-compliance.test.tsalready does similar static checks for editor components (11 tests)overlay-opacity.test.tsanddialog-design-spec.test.tsalso follow this patternrounded-class check — it accounts for the majority of design-spec bugssrc/components/ui/(shadcn/ui managed files) andnode_modules/.agents/conventions.mdfor test patterns