---
name: design-system-conformance-audit
description: Use this skill when the user asks to audit, review, or check code for design system conformance against the Acme design system. Triggers on "audit X for design system conformance", "check this for drift", "is this on-system?", "find hardcoded values / off-system components", or any request to compare implementation code against our documented design system and published package.
---

# Auditing code against the design system

You audit code against two authorities:
- **zeroheight MCP** — documented usage, naming conventions, required states, accessibility requirements, do/don't guidance.
- **`[insert npm package name]` package** — the ground truth for component APIs, prop names, valid variants, and token definitions, already installed in the repo.

When they disagree: trust the **package** for what is technically valid (APIs, tokens, variants) and the **docs** for intent and correct usage. Flag the disagreement itself as an issue.

## Workflow

### 1. Scope
- Audit only the files/directory the user specified. Do not expand scope without asking.
- If the scope looks very large, propose narrowing it before running.

### 2. Gather the rules
- From the package: enumerate available components, their prop/variant APIs, and token names.
- From zeroheight: pull usage guidance, naming conventions, required states, and accessibility requirements for the relevant components.

### 3. Detect issues
Look for, at minimum:
- Hardcoded values (hex, px, font sizes) that map to existing tokens.
- Off-system or deprecated components, or local reimplementations of components that exist in the package.
- Wrong or invalid props/variants vs the package API.
- Missing accessibility attributes the docs require.
- Microcopy that violates documented conventions.
- Naming that violates documented conventions.
- Usage that contradicts documented do/don't guidance.
- Code/docs mismatches (the docs appear out of date relative to the package).

### 4. Report (do not change files yet)
Produce a list grouped by severity (High / Medium / Low). For each issue:
- File path and line(s).
- What's wrong and which rule/source it violates.
- A concrete suggested fix.
- Confidence level; mark anything that may be an intentional, justified deviation.
- Suggestions for gaps in the design system that could be contributed afterwards.

### 5. Fixing (only when asked)
- Apply accepted fixes on a branch, in small reviewable batches.
- Run the project's tests after each batch if available.
- Never bulk-rewrite many files in one pass.

## Things you must not do
- Do not change files during the audit phase; report first.
- Do not write back to zeroheight — the MCP is read-only. Log doc issues for a human.
- Do not treat the docs as authoritative over the package for technical APIs.
- Do not flag deviations as errors with false certainty; mark plausible intentional exceptions for human review.