---
wraps: theme-audit
description: Classify a consumer app's theme.css against what the adia-ui framework already ships — restated defaults, re-derived tokens, dead selectors, hand-built component work. Audit and report only; no rewrites.
argument-hint: "[--theme <file>] [--app <root>]"
disable-model-invocation: false
user-invocable: true
---

Audit the theme stylesheet named in the current request.

Run `node "<plugin-root>/scripts/adia-theme-audit.mjs" --theme <file>
--app <root>` (add `--json`/`--json-out <path>` for a structured report,
`--strict` to exit non-zero on any `high`-confidence finding, `--class
1,2,3,4` to narrow scope). No `@adia-ai/web-components` resolvable from
`<app>` → the tool reports `E_NO_FRAMEWORK` with the install remedy; pass
`--framework-root <checkout>` to audit against an unreleased framework
checkout instead. No `--base-url`/Playwright unreachable → class 3's
rendered census degrades to `UNMEASURED` and the run still exits `0`
(unless `--strict`); static `last-wins` detection still runs.

Return the human-readable summary and per-class tables (theme-audit
§Reading the report). Findings route back to the owning skill — a
restated default or re-derived token deletes from the theme file directly;
a hand-built-component finding routes to `screen-composition` to swap in
the primitive; a dead selector still needs a human's confirmation before
removal (the census may not have covered every interaction state). Never
apply a fix inline from this command — theme-audit and its runner never
rewrite the file, and neither does this wrapper.
