Agent skills/Design checks

Design checks

One command checks that new code follows Accordee's design rules. The accordee-review skill runs it at the end of every UI task, and you can run it yourself before you ship.

Run the checks

npm run check:ui
CheckWhat fails
LintThe design rules below, plus the usual Next.js and React rules
Type checkTypeScript errors
Colour scanColours written by hand in inline styles, SVG or CSS
Skill filesA component or token missing from the catalog, or the two copies of the skills out of step

What lint catches

  • Hex, rgb() or hsl() colours in classes, like bg-[#f5f5f5]
  • Palette classes like bg-green-50 outside the shared status colours (SWATCHES and the other tone maps). Overdue numbers use ALERT_TEXT from src/lib/tones.ts.
  • A font weight above 440, including font-semibold and font-bold
  • A dark or blurred backdrop behind a dialog, drawer, menu or sheet
  • Radix imported directly, instead of the wrappers in src/components/ui

Each error says how to fix it. The rules are in scripts/lint/accordee-plugin.mjs if you want to change them.

Older code

Some existing screens use palette colours directly. They're listed in eslint-suppressions.json (and colours in styles in scripts/ui/colour-baseline.json), so only new code is checked. As you clean a file up, shorten the lists:

npm run lint:prune

Don't add entries to these lists to make a check pass. Fix the code instead; the error message says how.

The review checklist

After the checks, accordee-review walks through what tools can't see, and it's a good list for a human review too:

  • Existing components reused, nothing rebuilt next to them
  • One main action per screen
  • Empty states for "nothing yet" and "nothing matches"
  • Undo on delete, move, mark paid and bulk changes
  • Tabular figures for money, counts and dates
  • Plain words, sentence case for new labels
  • Checked at 1440px and 390px, in light and dark