Triage v0.14.1
Authorities / Triage / Specifications

Rules & prohibitions

triage

Rules

20 enforceable checks

TDS001 · deprecated-name

rule

Uses a pre-Triage (mail-triage era) class, id or global instead of the renamed vocabulary.

fix: Rename via /RENAME-MAP.md (or run: python3 tools/assemble_from_pack.py --apply-map <files>).

severity: error

TDS002 · raw-colour

rule

A colour literal appears where a token exists (palette match = error) or that is not in the palette (off-system colour = warning).

fix: Use var(--token) (prefer semantic aliases: --surface-*, --text-*, --status-*) or add the colour to tokens.json.

severity: warning

TDS003 · non-zero-radius

rule

A non-zero border-radius (CSS property or JS style key).

fix: Remove the radius, or fork the system deliberately by changing the token and deleting the global rule.

severity: error

TDS004 · focus-removed

rule

outline:none / outline:0 without a visible focus replacement in the same rule.

fix: Keep the global ring, or provide :focus-visible with a 2px+ ring or a compensating box-shadow/border change.

severity: error

TDS005 · off-scale-spacing

rule

Margin/padding/gap/inset px values outside the normalised spacing scale.

fix: Snap to the nearest scale value or extend the scale in tokens.json deliberately.

severity: warning

TDS006 · off-token-motion

rule

Transition/animation duration not in the motion token set.

fix: Use a motion duration token value (100/120/150/180/200/240/250/280/400ms).

severity: info

TDS007 · off-ladder-zindex

rule

z-index outside the documented ladder.

fix: Use a ladder value or extend misc.zindex in tokens.json.

severity: info

TDS008 · off-system-font

rule

font-family declaration not using Geist / Geist Mono (or inherit).

fix: Use the system stacks (or var(--mono)), or change the token in tokens.json for a deliberate rebrand.

severity: error

TDS009 · token-override

rule

A project stylesheet redefines a Triage custom property (--bg, --acc, --surface-* …).

fix: Edit tokens/tokens.json and regenerate, or use a distinct non-system variable name for local values.

severity: error

TDS010 · unknown-class

rule

A class used in markup that core.css / patterns.css do not define (opt-in, may be a project class).

fix: Use a system class, or allowlist the project class in .triagerc.json.

severity: info

TDS011 · contrast

rule

A defined token pair fails WCAG contrast (4.5:1 text / 3:1 non-text).

fix: Adjust the token value(s) so the pair meets the threshold, or extend .triagerc.json contrastPairs for intentional exceptions.

severity: error

TDS012 · primitive-use

rule

A product stylesheet consumes a primitive token directly where a semantic alias exists.

fix: Use the alias (e.g. var(--surface-card) instead of var(--card)). Definitions inside tokens.css are exempt.

severity: warning

TDS013 · physical-direction

rule

Physical direction property (margin-left, left:, text-align:left …) instead of logical properties.

fix: Use margin-inline-start/end, padding-inline-*, border-inline-*, inset-inline-*, text-align:start/end.

severity: warning

TDS014 · image-alt

rule

<img> without an alt attribute.

fix: Add alt with a description, or alt="" when the image is decorative.

severity: error

TDS015 · accessible-name

rule

Interactive element with no accessible name (empty button/link, no aria-label), or a positive tabindex.

fix: Add text or aria-label; never use tabindex > 0.

severity: error

TDS016 · label-tier

rule

Label-role class (.badge, .nav-label, .cmd-group) set below the comfortable label target (13px at the 16px root).

fix: Use the system token (--fs-badge / --fs-nav-label) or set the label role to 13px+ (0.8125rem+).

severity: info

INT001 · armed-two-step-delete

rule

Item deletes are armed and two-step: the control arms first (label names the object), the second activation deletes; Escape and outside click disarm.

fix: Use .arm-del with data-arm-label; disarm on Escape/outside click/details close.

severity: error

INT002 · one-way-confirm

rule

One-way / high-stakes actions use confirm() naming the object; reversible mutations instead show their reverse ('Shown as deleted · Undo').

fix: confirm() for irreversible; a visible reverse action for reversible mutations.

severity: warning

INT003 · three-channel-feedback

rule

Feedback uses the three sanctioned channels only: banner (persistent page/section state), toast (transient confirmation), empty state (structural absence) — plus in-flight treatments for long actions.

fix: Map each message to banner / toast / empty state; use the in-flight pattern for queued work.

severity: warning

INT004 · editor-save-bars

rule

Editors and settings keep a sticky save bar with explicit unsaved-changes state; save bars apply per card in settings patterns.

fix: Add .savebar with its unsaved/dirty state; scope per card where sections save independently.

severity: warning

Prohibitions

prohibit/raw-colour

prohibition

Raw colour literals (hex/rgb/hsl) outside the token layer — colour arrives only via tokens (lint TDS002).

signals: hex colour, raw hex, rgb(, hsl(, hard-coded colour

prohibit/focus-removal

prohibition

Removing focus outlines without replacement — :focus-visible affordances are mandatory (lint TDS004).

signals: outline none, remove focus ring, focus removed

prohibit/token-override

prohibition

Overriding token values downstream (the token layer is the only place values change; lint TDS009).

signals: override token, redefine variable, patch css variable

prohibit/token-fonts

prohibition

Fonts outside the system stack — family tokens own typefaces (lint TDS008).

signals: custom font, webfont, google font, font import

prohibit/off-radius

prohibition

Non-zero corner radius — the system is squarely squared; radius stays 0 (lint TDS003).

signals: rounded, rounded corners, rounded card, corner radius, border radius, border-radius, pill shape

prohibit/label-less-controls

prohibition

Interactive controls without accessible names — icon-only means aria-label, never a bare glyph (lint TDS015).

signals: unlabeled, icon only, no aria label, mystery icon

Fallbacks

Behaviour without JavaScript

fallback

Every component degrades to its plain markup; the behaviour layer (components.js) is additive. Without JS, interactive widgets show their static forms (tabs stack, menus remain details/summary, file inputs remain native).

scope: javascript, no-js, degradation

Scoped embedding into a host page

fallback

Drop Triage into an existing product without restyling it: wrap the region in .triage and load core/scoped.css (rules live in @scope(.triage) under @layer triage.components). Font-faces and keyframes stay global. Without core/reset.css the host owns root sizing and typography.

scope: integration, scoped, adoption, host page

Reduced-motion handling

fallback

The system honours prefers-reduced-motion: spinners slow to the slow duration and reveal transitions collapse. Motion tokens stay the single source for durations either way.

scope: motion, accessibility, reduced motion

Native confirm() for one-way actions

fallback

Actions that are irreversible, security-relevant, or affect more than the clicked item keep a native confirm() whose sentence names the object and the consequence (INTERACTION.md, one-way set). Arming cannot carry the consequence; this is the sanctioned stop, and never a substitute for the armed pattern on ordinary entity deletes.

scope: danger, high stakes, confirm, one-way, irreversible

Triage · design authority v0.14.1 — rendered live from authorities/triage; updates when the pack updates.