On every pull request that touches frontend source, scans the diff for hard-coded visual values — hex colors, rgb/rgba literals, raw pixel spacing, font sizes, border radii, box shadows, and Carbon --cds-* variables redefined with literals — and maps each violation to the correct Schematic design token or primitive. Where the mapping is unambiguous, it opens a follow-up PR that applies the fix. Runs automatically on pull request events; no manual configuration is required beyond a connected git provider.
- Identifier
design-token-drift- Version
- 1.0.0
- Steps
- 4
- Triggers
- 2
- design-system
- tokens
- frontend
- css
- review
- automated
When it runs
pull_request.opened- Settle delay
- 15s after the event
Only when all hold
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
pull_request.synchronize- Settle delay
- 15s after the event
Only when all hold
- actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
- actor.username not contains [bot]
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01PR Opened / Updated
triggerThe event that starts the run.
- 02Clone Repository
git.cloneShallow-clones the repository at the right ref.
- 03Scan for Token Drift
agent.runOne agent works the task with its toolkit.
- 04Publish Drift Report
report.publishPosts or updates a deduplicated report comment.
The agent
Design Token Drift Reviewer
- Base type
- Code Reviewer
- Temperature
- 0.2
- Max iterations
- 30
- Tools
- 8
Git provider · 4
get_pull_request_diffGet Pull Request Diff · readcreate_branchCreate Branch · writecreate_or_update_fileCreate or Update File · writecreate_pull_requestCreate Pull Request · write
Filesystem · 2
read_fileRead File · readedit_fileEdit File · write
Code search · 1
code_searchCode Search · read
Status · 1
update_statusUpdate Status · write
Related playbooks
Dark Mode Audit
Reviews style changes for colors that render one theme's text on the other theme's background and checks both themes define every new token.
Accessibility Audit
Reviews UI PRs for accessibility defects, posts inline threads citing WCAG criteria, and submits a summary review.
API Contract Breaking-Change Detector
Detects breaking changes in published API contracts, names affected consumers, and labels the PR.