lewitt

Reverse-engineera website's design DNA.

Give it a URL. Get back measured tokens, honest taste trade-offs, and guardrails your coding agent actually has to follow.

A specimen run: lewitt reads stripe.com and writes the design contract.

Measured on four live sites.

Every swatch, restraint, and certificate below comes from real v1.3 runs in the repo — open the standalone HTML artifacts to inspect them live.

Stripe Design DNA live preview with token swatches and evidence ledger
$ lewitt https://stripe.com --full1440×900 · isolated browser · / , /pricing , /products , /contact/sales
Measured paletteObserved · light
#FFFFFF--backgroundCanvas
#F6F9FC--cardRaised surface
#061B31--foregroundBlue-black ink
#533AFD--primary0.2% action accent
#64748D--muted-foregroundMuted copy

UNMAPPED--destructive

Restraints & guardrails

Colour is a once-per-page event

Chosea single decorative gradient confined to the hero
Overgradient text, gradient buttons, and gradient section backgrounds
MUST NOTbg-gradient-to-* · bg-linear-to-* · shadow-lg · border-width <= 1px

One indigo, only where you can click

Choseindigo (#533AFD, ~0.2% surface) restricted to buttons and links
Overindigo section backgrounds, icons, or display headings
MUST NOTbg-indigo-500/600 on cards or section surfaces

Three outputs you actually use.

Read how the pipeline works
01
Lay the basedna.json → shadcn-theme.css

Maps measured tokens to shadcn slots; leaves missing slots explicitly UNMAPPED.

:root {
  --background: #FFFFFF; /* Observed */
  --primary: #533AFD; /* 0.2% share */
  --destructive: initial; /* UNMAPPED */
  --radius: 4px;
}
02
Clip a brickscripts/clip.py → brick.md

Strips source colours to your theme variables and catches missing reduced-motion fallbacks.

surface: rgba(0,0,0,0) -> var(--card)
text: rgb(40,39,36) -> var(--card-foreground)
reduced-motion: not-degraded (0ms, 32px travel)
03
Certify your buildscripts/cert.py → cert.html

Probes rendered CSS in your local preview against the extracted contract and guardrails.

$ python3 scripts/cert.py --url http://localhost:3000
status: certified · 16/16 measured
probes: L1 --lw-* · L2 computed probe