The Design Token Drift Detector is a governance and monitoring tool designed to enforce design system integrity by detecting unauthorized token usage in codebases. It addresses critical pain points like visual regression blind spots, token sprawl, and audit fatigue. The MVP focuses on automated scanning, CI/CD integration for blocking critical drift, and an exception workflow to balance strict governance with developer velocity.
A CLI or plugin that scans CSS, SCSS, JS, and React/Vue files for hardcoded color values (hex/rgb) that deviate from the registered token registry by more than a configurable threshold (e.g., 2% delta).
GitHub Actions/GitLab CI hooks that automatically fail builds or require a review when critical brand tokens are bypassed, preventing unauthorized changes from merging.
A lightweight UI or CLI command allowing developers (like Marcus) to flag a specific drift as an intentional exception (e.g., accessibility fix), logging the reason and generating a temporary token.
A simple dashboard for Product Managers (like Elena) to view aggregate drift metrics, identify high-risk teams, and export audit reports for quarterly reviews.
Support for ingesting token definitions from Style Dictionary or JSON files to establish the 'source of truth' baseline for comparison.
Monitors Figma variable changes and alerts developers if they are still using the old hex value in their code after a design update.
AI-assisted analysis that suggests potential reasons for drift (e.g., 'Accessibility Override' vs. 'Negligence') to help teams remediate faster.
Allows configuration of different drift thresholds for specific component libraries (e.g., stricter for core UI, looser for legacy integrations).
Generates side-by-side visual previews of the hardcoded color vs. the token to help developers understand the impact before merging.
Auto-generates Pull Requests to replace hardcoded values with the correct token, pre-filled with a migration guide.
Uses historical data to predict which teams or components are most likely to drift and suggests proactive training or policy updates.
Scans not just code, but also runtime environments to detect local overrides that aren't logged in the repository.
Automatically updates token rules based on brand guideline changes, pushing new constraints to all connected repositories.