Audit frontend implementation for design-system drift before it becomes product drift.
design-fidelity-auditor is an AgentSkill for reviewing UI code against a canonical design system. It helps an agent or engineer answer questions like:
- Are we still using approved tokens?
- Did this component bypass theme primitives with hardcoded values?
- Are spacing, typography, motion, and interaction states still aligned?
- Which issues are true policy violations versus lower-confidence drift risks?
The skill is intentionally review-first. It is built to generate a structured audit artifact, not to silently redesign the UI.
- inspects CSS, Tailwind, JSX, TSX, Angular templates, Vue SFCs, and related UI files
- reads project design authority such as
DESIGN.md, token files, theme config, or primary primitives - produces a fidelity scorecard plus evidence-backed findings
- recommends the smallest system-aligned remediation for each issue
- distinguishes confirmed violations from ambiguous cases
- replace accessibility review, browser QA, or visual regression testing
- invent a design system when the project has none
- maintain shared cross-repository governance infrastructure
- auto-apply broad UI changes unless the user explicitly requests implementation work
.
|-- SKILL.md
|-- README.md
|-- CHANGELOG.md
|-- assets/
| `-- audit-report-template.md
|-- evals/
| `-- evals.json
|-- examples/
| `-- sample-audit-report.md
|-- fixtures/
| `-- basic-button/
| |-- button.css
| |-- design-system.md
| `-- expected-findings.json
|-- reports/
| `-- .gitkeep
|-- scripts/
| |-- score_audit_report.py
| `-- validate_audit_report.py
`-- benchmarks/
`-- README.md
The skill works best when given both:
- UI implementation under review
- design authority for comparison
Typical design authority inputs:
DESIGN.md- CSS custom property token files
- Tailwind theme or config
- component library primitives
- design-system guidelines or generated design notes
Typical implementation inputs:
- CSS or SCSS
- JSX or TSX
- Tailwind class strings
- Angular or Vue templates
- inline styles
The canonical output is a markdown audit report with:
- audit summary
- design authority reviewed
- scope and evidence
- fidelity scorecard
- findings with severity and file evidence
- remediation priorities
- confidence and unknowns
- recommended next step
Use assets/audit-report-template.md as the default structure.
If this skill is selected by a dispatcher and telemetry is enabled, log the dispatch decision before returning the audit result.
Preferred commands:
./log-dispatch.sh --skill design-fidelity-auditor --intent audit_ui_fidelity --reason "Design-system drift audit requested" --decision HANDOFFOn Windows:
.\log-dispatch.cmd --skill design-fidelity-auditor --intent audit_ui_fidelity --reason "Design-system drift audit requested" --decision HANDOFFIf the logger is not present in the current repository, use the nearest installed skill-dispatcher logger when available. If no logger exists, continue the audit and explicitly note that telemetry could not be recorded.
This skill uses a simple evidence hierarchy:
- Token source or theme config
- Canonical design-system docs such as
DESIGN.md - Established repository primitives
- Visual references or generated design notes
- General design best practices
That ordering matters. A strong audit should not confuse taste with policy.
This repository now declares the full dispatcher-facing metadata needed for reliable routing in SKILL.md, including:
dispatcher-category: designdispatcher-capabilitiesfor token audit and drift detectiondispatcher-accepted-intentsfor audit and compliance-review routingdispatcher-input-artifactsanddispatcher-output-artifactsdispatcher-risk: lowdispatcher-writes-files: truedispatcher-persistent-directories: reportsdispatcher-layer: feedbackdispatcher-lifecycle: active
That makes the skill easy to route as a focused review specialist rather than a generic frontend helper.
This repository keeps memory intentionally scoped:
- Runtime memory: current audit evidence and findings in the active thread
- Project-local memory: optional saved audit report inside the repo when explicitly requested, preferably under
reports/ - Shared memory: intentionally out of scope for this skill
If your environment supports a shared-memory or governance skill, integrate at that boundary rather than embedding shared memory into this repository.
If an audit report is written to disk, validate its structure:
python scripts/validate_audit_report.py path/to/report.mdScore a saved report against the bundled basic fixture:
python scripts/score_audit_report.py path/to/report.md fixtures/basic-button/expected-findings.jsonThese scripts are lightweight checks, not full semantic evaluation. They are meant to catch regressions in report structure and core finding coverage.
When you want a predictable project-local artifact path, save reports under reports/.
Prompt-based evals live in evals/evals.json. They cover:
- hardcoded token bypasses
- arbitrary spacing and sizing values
- incomplete design references
- proper handling of uncertainty
- remediation guidance quality
Good extension points:
- add more fixtures in
fixtures/for specific stacks such as Tailwind, Angular, or component-library variants - strengthen the scoring harness with domain-specific expectations
- add CI that validates example artifacts and benchmark fixtures on each change
Avoid adding speculative infrastructure unless it directly improves audit quality or installability.
For public GitHub packaging, this repository is already structured so a maintainer can add:
- a project
LICENSEfile - CI to run the validation scripts
- additional fixtures and benchmark cases
- release notes tied to
metadata.versioninSKILL.md
Current version: 2.1.0
Use this skill when another agent or reviewer needs a fast, evidence-backed answer to:
Does this UI still honor the design system, and if not, what exactly drifted?