DESIGN.md and tokens.json describe the law.
law/ is the same five invariants shipped as code —
radius 0, one type scale, hairline borders, no page-scroll, the
cursor rule — importable and runnable by anyone building on this
system. Two consumer repos in the fleet, curb and
powder, now run that exact gate in their own CI
matrices, against their own served UI, and both are green.
| consumer | spec | CI wiring | result |
|---|---|---|---|
| curb | ui/law/dashboard.law.spec.ts |
fast-feedback gate · curb#17, refreshed curb#19 | green |
| powder | law/board.law.spec.ts |
dedicated “aesthetic law gate (board UI)” job · powder#52, refreshed powder#55 | green |
Both suites include a planted negative control: a 9px-radius, 20px-font button injected into the live page at runtime. Before the gate is trusted to pass anything, it has to fail that button first — with a named-offender error, not a silent skip.
WHAT THE GATE CHECKS
Five invariants, mechanically:
radius is 0 everywhere, one type scale holds, borders stay
hairline, the page itself never scrolls, and static text never
earns a text cursor. assertLaw() runs all five
against a real rendered page and fails loud, naming the
offending element, the moment one drifts.
THE BUG THIS SURFACED
Shipping the gate to real consumers found a real defect: Node's ESM resolution refused to import.ts law files
straight from node_modules
(ERR_UNKNOWN_FILE_EXTENSION) — the documented
import … from '@misty-step/aesthetic/law' path
didn't work for anyone outside this repo. Fixed in
aesthetic#17
by shipping a compiled law/dist build (JS +
.d.ts) behind a proper package export, verified
with before/after scratch-consumer transcripts. The fix also
surfaced a second bug: the gate's failure branch called a
Playwright API that doesn't exist, so a real violation would
have thrown a raw type error instead of a readable one — fixed
alongside it, and the same bug was found and refreshed out of
both curb and powder's vendored copies (curb#19, powder#55).
The gate isn't ours to grade — it's theirs to run. Two other products import the same five invariants, plant a violation the system is supposed to catch, and watch it fail with a name attached. — curb, powder · vendored aesthetic law