List Rules
list-rulesLists checklist rules as records, filtered by component, ID, scope, layer, level or check. Each rule has a stable ID to cite in reviews and commits, its level (must or should), its scope, its requirement, how to check it (like a unit test, a review or axe's button-name rule) and a link to it.
WHEN TO USE: to review code rule by rule, to get only the rules that apply to a task, to look rules up by ID, or to find the ones a tool can check. Pass scope ["component", "both"] to build or review a component, and ["usage", "both"] to review a screen that uses it. WHEN NOT TO USE: for a component's API, DOM contract and tokens, use get-contract, which has every rule too.
A component meets the standard when it meets every must rule. Each should rule is expected unless there's a good reason not to follow it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | The IDs of the rules to look up, like ["button/keep-focus"]. | |
| check | No | How the rule is checked. | |
| layer | No | ui (how it looks), ux (user experience), dx (developer experience) or ax (agentic experience). | |
| level | No | ||
| scope | No | Who meets the rule: component (the component itself), usage (the code that uses it) or both. Rules without a scope, like the Design Tokens', match any scope. | |
| automated | No | true for the rules tools check all of (unit tests, axe, a type check, a linter or a visual regression test), false for the ones a person checks, at least in part. | |
| component | No | The component or foundation, like button or design-tokens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | ||
| total | Yes | ||
| unknown | No | The IDs asked for that no rule has, with the ones that might have been meant. |