Daily Design System Audit
Schedule Devin to scan merged PRs and flag hardcoded colors and missing tokens.Have Devin learn your design system
The scanner is only as good as the rules it checks against. Instead of writing Knowledge entries yourself, point Advanced Devin at your design system source files and let it generate the Knowledge.Open Advanced Devin and paste a prompt like this:Devin reads the source files, extracts the rules, and creates Knowledge entries like these:
- Color tokens — “All colors must use tokens from
src/tokens/colors.ts. Never use raw hex values like#3B82F6. Usecolors.primary.500instead.” - Spacing grid — “All spacing must follow our 4px grid. Use spacing tokens from
src/tokens/spacing.ts(e.g.,spacing.2= 8px,spacing.4= 16px). Never hardcode pixel values likemargin: 10px.” - Component library — “Always use shared components from
src/components/ui/— including<Button>,<Avatar>,<Modal>, and<Card>. Do not create one-off alternatives.”
Connect Linear for ticket creation
The daily scan creates Linear tickets for each violation it finds, so connect Linear before setting up the schedule.
- Go to Settings > Integrations > Linear and click Connect
- Authorize Devin and select the teams it should have access to
- In Linear, create a project called “Design Debt”
- Create a label called “design-fix” — you’ll use this to trigger auto-fixes in the last step
Schedule the daily scan
Navigate to Settings > Schedules and click Create schedule. Configure it as follows:
- Name: Design system scanner
- Schedule type: Recurring
- Frequency: Daily at 9:00 AM (your team’s timezone)
- Agent: Devin
- Email notifications: Always (so you see results each morning)
| Ticket | File | Violation | Suggested fix |
|---|---|---|---|
| DD-101 | src/pages/Settings.tsx:42 | Hardcoded #3B82F6 | Replace with colors.primary.500 |
| DD-102 | src/components/UserCard.tsx:18 | Custom avatar component | Use <Avatar> from src/components/ui/ |
| DD-103 | src/pages/Dashboard.tsx:95 | margin: 10px | Use spacing.3 (12px, nearest 4px grid value) |
| DD-104 | src/views/Profile.tsx:33 | No mobile breakpoint | Add md: breakpoint for grid layout |
Close the loop with auto-fix PRs
Once you trust the scanner’s output, modify the prompt to have Devin fix violations in the same run — no separate trigger needed. Add a fix step to the end of your scan prompt:Now the full loop runs hands-free: scan → ticket + fix PR → review. Every morning, you wake up to both the violation reports and the PRs that fix them.To generate a weekly summary of all violations found, run this as a follow-up:
