design-system-drift-guard
Skill4 starsChanged 31 days agoMITView on GitHub
Audit multi-surface applications for cross-route design system drift, unpoliced component variant explosions, orphaned single-route tokens, and keyboard focus-ring accessibility suppression.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- anti-slop-engineeringSkill
- anti-slop-engineeringSkill
- api-ergonomics-and-contract-governorSkill
- apple-craft-and-frame-budgetSkill
- apple-craft-and-interaction-physicsSkill
- asset-provenance-guardSkill
- backprop-guardSkill
- chaos-and-degradation-choreographerSkill
- chromatic-drift-guardSkill
- cognitive-load-and-attention-governorSkill
- comment-budget-guardSkill
- context-window-and-token-economics-architectSkill
- cryptographic-agility-and-secret-lifecycle-gateSkill
- decision-guardSkill
- demock-guardSkill
- deterministic-simulation-and-property-testingSkill
- distributed-consensus-and-concurrency-gateSkill
- finops-and-unit-economics-governorSkill
- future-scale-gateSkill
- grumpy-senior-staff-engineerSkill
- honeypot-trap-guardSkill
- house-tell-guardSkill
- install-anti-slopSkill
- llm-eval-and-prompt-injection-fortressSkill
- mandela-guardSkill
- mechanical-sympathy-and-perf-gateSkill
- mechanical-sympathy-profilerSkill
- motion-runtime-guardSkill
- observability-and-slo-architectSkill
- observability-and-slo-gateSkill
- paranoid-principal-architectSkill
- pr-boundary-guardSkill
- privacy-and-data-lineage-gateSkill
- re0-handoff-guardSkill
- reduction-guardSkill
- repo-memory-and-invariant-stewardSkill
- root-fix-gateSkill
- safe-evolution-and-rollout-choreographerSkill
- scientific-fault-isolationSkill
- styleseed-guardSkill
- supply-chain-and-sbom-sentinelSkill
- tagore-guardSkill
- type-level-and-ast-slop-gateSkill
- ui-and-copy-disciplineSkill
- verification-oracle-architectSkill
- zero-downtime-migration-gateSkill
The file
Files
Design System Drift & Variant-Budget Guard
Prevent multi-route component proliferation, unpoliced variant explosions, and keyboard focus ring suppression across shipping applications.
Why This Skill Is Needed & Target State
Single-file linters and isolated component tests miss the primary failure mode of evolving applications: cross-route design drift.
- Screen 1 declares 3 button variants (
primary,secondary,outline). Screen 7 invents a 4th variant (ghostwith slightly different padding or opacity) because the author lacked global visibility. - Interactive controls (
button,a,input,select) suppress outline focus rings viaoutline: noneor Tailwindfocus:outline-nonewithout providing an explicit:focus-visiblereplacement, breaking WCAG 2.4.7 keyboard accessibility. - Ad-hoc design tokens are created and used on exactly one route, inflating theme entropy.
The target state is a governed, bounded design system with explicit variant budgets per control kind, 100% visible keyboard focus indicators, and minimal token entropy.
Invariant Rules
- Variant Budget Enforcement: Each control kind (
button,input,select,card,badge) must strictly adhere to its declared variant budget (default: 4 for button/card, 2 for select/input). - Keyboard Focus Ring Protection: Interactive elements must never suppress outline (
outline: none,focus:outline-none) without an accompanying visible replacement (:focus-visible:ring-2,box-shadow). - Zero Orphaned Tokens: Design tokens used on exactly one route in multi-route products must be promoted to the canonical global theme or consolidated.
Mathematical Formulation: Design System Entropy Index ($DSEI$)
$$DSEI = \sum_{k \in \text{Kinds}} \max\left(0, \frac{V_k - B_k}{B_k}\right) + \omega_{\text{focus}} \cdot F_{\text{missing}} + \omega_{\text{orphan}} \cdot T_{\text{orphan}}$$
Where:
- $V_k$ is the observed variant count for control family $k$.
- $B_k$ is the declared budget limit.
- $F_{\text{missing}}$ is the count of interactive elements missing keyboard focus rings.
- $T_{\text{orphan}}$ is the count of single-route design tokens.
CLI Usage
# Scan source tree for variant budgets and focus ring suppression
bunx anti-slop-engineering system-drift --scan src/
# Specify per-kind variant budgets
bunx anti-slop-engineering system-drift --scan src/ --max-variants button=4,select=1,card=3 --json
# Validate pre-existing system drift record
bunx anti-slop-engineering system-drift --file .anti-slop/system-drift.json --strictDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

