← back to the demo

Rules

Every screen is checked against five rules. The linter decides R1–R3 by measuring the node list, and the LLM critic decides R4 and R5 and gives a second opinion on R1–R3 without seeing the linter's result. The score is the share of rules passed, and a screen passes at 80 or above with no R1 or R2 failure.

The recorded run on the demo page was scored on rubric v2.2. The evals page shows how the rules changed since.

R1 Carbon components used as documented

Decided by the linter. The critic gives a second opinion, and where they disagree the score follows the linter.

What the critic is given · rubric v3
Carbon components used as documented: every component name must appear in the catalog below, and each component is used the way its catalog entry describes, including what its children and slots may hold. `p` is allowed for body text.
What the linter checks

R2 Carbon tokens only (no hardcoded color/spacing)

Decided by the linter. The critic gives a second opinion, and where they disagree the score follows the linter.

What the critic is given · rubric v3
Carbon tokens only: every style value, and every styling attribute that isn't one of the component's documented options, uses `var(--token)` with a name from the token list. Hex, rgb, px, or rem literals, or invented token names, fail. Border widths follow the same rule with one exception. On `border`, `border-top`, `border-right`, `border-bottom`, `border-left` and their `-width` forms, a literal `1px` passes, because Carbon has no border-width token. Any other px value fails there, and a token value (`var(--token)` from the list) passes like any other token, whatever size it resolves to. Documented attribute options (cds-tag type=green, cds-stack gap=5) pass.
What the linter checks

R3 Contrast & accessible labels

Decided by the linter. The critic gives a second opinion, and where they disagree the score follows the linter.

What the critic is given · rubric v3
Contrast and accessibility: text and background pairs meet WCAG AA (4.5:1); every input has its label attribute (label or label-text) or an aria-label; every cds-button has text or tooltip-text.
What the linter checks

R4 Consistent spacing

Decided by the critic. The linter doesn't check this rule.

What the critic is given · rubric v3
Consistent spacing: sibling sections use the same gap; padding is consistent at each level; no arbitrary one-off spacing.

R5 Clear primary action; destructive action separated

Decided by the critic. The linter doesn't check this rule.

What the critic is given · rubric v3
Clear primary action: at most one kind=primary cds-button per section and one obvious main action on the page; destructive actions use kind=danger and sit in a separated section, not beside the primary action. Judge button kinds as Carbon renders them, not as written: inside a cds-button-set, Carbon makes the first button secondary and every later button primary, whatever kind they were given. A set with a single button therefore shows no primary, and a set with three or more buttons shows more than one.