← ClaudeAtlas

state-coverage-reviewlisted

Verify every component in the AST inventory implements its declared states (default/hover/focus/disabled/loading/error/empty) and is exercised by Playwright tests.
Eliyce/paqad-ai · ★ 4 · AI & Automation · score 76
Install: claude install-skill Eliyce/paqad-ai
## What It Does Cross-checks the declared state machine of each component against (1) what the source code implements and (2) what Playwright tests actually exercise. A declared state that's neither implemented nor tested is a finding; an implemented state that's never tested is a coverage finding. ## Use This When Use this for every design-test run after `component-conformance-review`. It depends on the AST inventory that skill produced. ## Inputs - Read `docs/instructions/design-system/components.md` for declared states. - Read Playwright test files (`tests/**`, `e2e/**`) for what's exercised. - Read `references/state-coverage-checklist.md` before grading. ## Procedure The set arithmetic across declared / implemented / tested is deterministic — drive it with the scripts. LLM picks severity per missing state (focus and error are elevated to **high** per the checklist). 1. For each component, run `scripts/extract-source-states.sh <component-file>` → TSV of `<state>\t<signal>` (signals: `:hover`, Tailwind `hover:` utility, `disabled` prop, `aria-disabled`, framer-motion hooks, etc.). `default` is always emitted. 2. Run `scripts/extract-tested-states.sh --component <Name> --tests <dir>` → TSV of `<state>\t<test-file>`. The tests directory should contain Playwright specs only (the script greps for component name + state driver pattern; mixing the component's source with the tests dir would self-pollute the result). 3. Take the declared states from `components.md` (the CS