The Lab
The code is the deliverable. Run it.
Every other page here tells you what I decided. This one lets you check. Four pieces of working code, in the open, because a designer who says they ship code should hand you some to run, not describe having done it. If you are the engineer on the panel wondering whether a designer’s code survives contact, start here.
Source, in public: github.com/arpitmaheshwari/the-lab (opens in a new tab) — the same files that run here, MIT, verbatim.
0/42tests · 76 assertions · 0 dependencies
- Enable JavaScript to run the suite here, or read the assertions on the loop.js page.
Nothing mocked: this panel imports the same module the demos use and reports what it returns. Every assertion, named →
Four things you can run
A demo you can’t run is a screenshot with ambitions
01
loop.js
An opinion becomes testable the day it compiles. The decisions behind four trust patterns, written as functions with tests: which verb a confidence score turns into (act, review or ignore), whether that confidence has earned belief (Brier score, expected calibration error), when the system should say “I don’t know”, and what to show while the model is thinking.
Read it, run it, break it →02
trustlint
You can lint how an answer is shaped. You cannot lint whether it is true. Paste an AI answer and it flags the seven habits that lose a reader’s trust: figures with no source, absolutes, hedges used as decoration, and the expensive one, confidence with nothing underneath. It says in its own output what it cannot judge: the truth.
Paste an answer, audit it →03
This site, torn down
A site that asks for evidence should stand being inspected. How the page you are reading is built, measured rather than described: no framework and no bundler, a 631.3 KB stylesheet, two third-party services across four domains, one type scale, and the gaps, including the one this page caught in itself.
See the receipts →04
ember-design-system
A design system a machine can read is one that gets applied. The public twin of the plugin I shipped inside a client: the tokens with their measured contrast, one type scale, the spacing grid, and the rules a component library cannot hold. Its reference page runs the same audit on itself, failures included. The system painting this page is its successor, and it is public too.
Install it, read it →The bar everything here ships against
The quality bar is code.
commented and ready for review — when we disagree on feasibility, the cheapest experiment settles it
on every push that touches a page, its styles or the toolingThe teardown →
usability-tested as real code — 8 patterns and one rule, all 9 drivable — and that same code is what goes to productionThe patterns →
self-hosted from the repository — no CDN, no third-party runtimeThe book edition →
A client’s design system, encoded as an installable plugin: two shipped across client orgs, one public.
- Contrastrendered pixels, not tokens
- Overflow41 pages × 5 widths
- Legibilitynightly, every diagram
- Prose59 pages
When a gate and my eye disagree, the pixels win.
The evidence boundary
These prove less than they look like they prove
Three different things get called evidence. Only the first lives on this page.
- Implementation
- The code does what it says. 76 assertions across 42 tests, run in your browser above, on the same module the demos import. That is all a green test proves.
- Usage
- The rules came out of shipped products, not a notebook. The verbs, the abstention, the logged override and the citation gate were each argued for and built inside the case studies. The code here is my restatement of those decisions, not the client’s source.
- Outcome
- Whether a pattern moves adoption is a claim about a product, not about a function. Where I have a measured before-and-after, it sits on the case with its baseline and window. A passing suite will never stand in for a result here.
Why a lab at all
A principle with no failing state is a preference
The eight patterns in the pattern library came out of shipped products, and for years they lived where principles usually live: in slides, in review comments, in my head. Reasonable people agreed with every one of them and shipped the naked confidence score anyway. A principle you can nod at costs nothing to ignore.
Written as code, the same rules get a way to fail. decide() reports a review with no reasons as a violation, not a suggestion. calibrate() returns insufficient-data instead of a flattering number when the sample is thin. trustlint refuses to score truth at all, and says so in its own output.
That is what the Lab is for: the judgements I keep making in design reviews, given somewhere to fail, so they hold when I am not in the room.
The system I leave behind
The system I leave behind is one a machine can read
Six products at Talon had grown one at a time and looked like six companies had made them. For a company selling one integrated platform, that was the claim failing in plain sight. I introduced one design system across the line, so Plato, Ada and Atlas read as rooms of one building. Then I encoded it as a Claude plugin, so it stopped depending on who remembered it.
- One family
- Family resemblance, not a coat of paint. For a company selling an integrated platform, looking integrated is the claim, made visible.
- Encoded, not documented
- Two systems shipped as installable plugins inside client organisations. A Figma library is applied by whoever remembers it. A system a machine reads is applied every time.
- Enforced
- Contrast measured from rendered pixels before every push; overflow and legibility swept nightly. The interface I design is the front-end I ship in the pull request.
Below is the live system, not a picture of it: the stylesheet painting this page, with every contrast ratio measured as the page loads rather than quoted from a document.
Four heats · semantic, never decorative
Three families · one job each
- AnnouncesSource Serif 4
- Is readSource Sans 3
- Labels600 · .08em · upper
- code()JetBrains Mono — code only
One spacing grid · enforced by a gate
Below 4 is an optical nudge, above 80 is structural. Anything between that is off-grid fails the build.
The public plugin is MIT, and its reference page runs the same audit on itself, failures included. Amber, the successor system that paints this page, is public in the same place.
/plugin marketplace add arpitmaheshwari/ember-design-system
/plugin install ember-design-system