I Turned Sol LeWitt's Wall-Drawing Instructions into a Design Skill: lewitt v1.3.0

When you do vibe coding with a coding agent, whether you are a creator who does not write code or a strong engineer with a weaker eye for design, you eventually hit the same wall: the product moves fast, and the interface still looks like AI.

Drop a screenshot of a site you like and ask the model to "use this style, keep it restrained and refined," and it will almost certainly go wrong. The reason is simple. A screenshot only carries still pixels. It does not carry the trade-offs (why there is no shadow here, why the accent covers only 0.2% of the surface), and it does not carry interaction states (how long a hover transition lasts, how motion degrades under reduced-motion).

I have turned this workflow into an open-source skill, lewitt, and I have just released v1.3.0.

The name is a nod to the conceptual artist Sol LeWitt. For his Wall Drawings, he did not paint the work himself. He wrote a precise set of instructions, and assistants executed them on any wall. That is what I want to do for AI: translate "it looks right, but I cannot say why" into design instructions a machine can run and a gate can check.

Three ground rules: set boundaries before extracting

There are already plenty of tools that take a URL and spit out a design system. In practice they share two problems: they invent CSS values from a screenshot, and they fill a document with empty words like "modern," "elegant," and "refined," which do nothing to restrain an agent when it writes code.

So when I built the skeleton of lewitt, I started with three rules across the whole pipeline:

  1. R1. Evidence never changes class. Every measurement, pattern, token, and interaction delta must carry a status (Observed / Inferred / Proposed / Unknown). Slots the source site does not define (for example, no error red was captured) are written explicitly as UNMAPPED. Nothing is invented.
  2. R2. Anti-slop is a script, not guesswork. Empty adjectives are banned, and every restraint principle must carry a machine-readable guardrail (forbidden Tailwind classes or CSS properties, for example).
  3. R3. Single source of truth (SSOT). dna.json is the only authored source. taste.md, tokens.css, shadcn-theme.css, and agent-rules.md are all deterministic renders. If anyone hand-edits a derived file, the check fails.

A three-piece workflow: lay the base, clip a brick, certify

In a real project, almost nobody wants their site to be a 1:1 copy of Stripe or Linear. The more common rhythm is building with blocks: first settle a global base you can work with, then, when you reach a specific module, borrow a hover card or a nav micro-interaction from another site.

So lewitt v1.3.0 splits the work into three independent pieces:

1. Lay the base: lewitt <url>

The default is a lightweight mode. An isolated, throwaway browser profile captures one to four representative pages, then reasons in three layers — measure → pattern → taste — and writes:

  • agent-rules.md: hard MUST NOT constraints at the top, semantic tokens below, ready to hand to a coding agent.
  • shadcn-theme.css: a Tailwind CSS v4 @theme inline theme (with the --color-* namespace). Paste it into globals.css and it runs.

If you need a full component-library demo, add --full and it writes a dual-view page: Live Preview for brand specimens, Specs & Evidence for the measured ledger. It is no longer a debug panel. The top bar's Stress ▾ menu can apply long copy, reduced motion, and a 390px viewport to both views.

The steno.ai --full Live Preview first screen: oatmeal canvas #F0EDDA, the serif headline Influence everywhere. All at once., and a slim top bar with the lewitt mark, Live Preview | Specs & Evidence, and Stress ▾
The steno.ai --full Live Preview first screen: oatmeal canvas #F0EDDA, the serif headline Influence everywhere. All at once., and a slim top bar with the lewitt mark, Live Preview | Specs & Evidence, and Stress ▾
The stripe.com Live Preview section "04 — Motion & Guardrails": inline SVG Bézier curves, a Replay slider, and folded MUST NOT mechanical rules
The stripe.com Live Preview section "04 — Motion & Guardrails": inline SVG Bézier curves, a Replay slider, and folded MUST NOT mechanical rules

2. Clip a brick: scripts/clip.py

This is the most useful part of v1.3.0. It can run completely without dna.json, and it is aimed at a single local module:

python3 scripts/clip.py \  --url https://www.steno.ai/ \  --find "Start a Demo" \  --dest ./bricks \  --action hover

It triggers the interaction with real CDP mouse events, samples style deltas on the trigger and its container, and then runs the same timeline again with Emulation.setEmulatedMedia set to prefers-reduced-motion: reduce, to measure whether the source actually degrades the motion.

The critical step is stripping the skin. By role and WCAG contrast, it replaces the source colours with shadcn variables already in your project (--card, --secondary, --primary, --radius). Hand the resulting brick.md to an agent and it can rebuild the structure and motion without fighting your existing palette.

The shipped example is the steno.ai hero button, "Start a Demo". Besides mapping the skin onto shadcn slots (surface → var(--card), text → var(--card-foreground), radius → var(--radius)), that interaction came back not-degraded under prefers-reduced-motion: reduce, and the report marks it in red as reduced motion · not-degraded so you know to add the fallback yourself. The same full extract also notes that a CSSOM scan of the four captured pages (/, /about, /team, /experts) found no prefers-reduced-motion block1.

The steno.ai section "05 — Clipped Bricks": on the left, the skinned Start a Demo live button and before / during / after frames; on the right, the red reduced motion · not-degraded warning
The steno.ai section "05 — Clipped Bricks": on the left, the skinned Start a Demo live button and before / during / after frames; on the right, the red reduced motion · not-degraded warning

3. Certify: scripts/cert.py

Once the page is written, point --url at your local preview origin and run the check:

python3 scripts/cert.py \  --url http://localhost:3000 \  --dest runs/stripe.com

It probes the values the page actually paints in three tiers (--lw-* → shadcn slots → computed styles), and flags colours, type sizes, and guardrail violations that have drifted. If you changed a design on purpose, declare it as intentional in cert.config.json with a reason, and it will not be reported as rejected.

The copy of runs/stripe.com/cert.html in the repo is a real certificate run against the generated system page: all 16 tokens measured clean2.

The top of the stripe.com local certificate: This build is certified, 16/16 measured, with probe sources L1 --lw-* and L2 probe
The top of the stripe.com local certificate: This build is certified, 16/16 measured, with probe sources L1 --lw-* and L2 probe

Real pitfalls from building it

Getting a tool to run is not the hard part. Getting it to stop producing "false green" reports is what took the time:

  • The regex compiles, but never matches. Early guardrail patterns looked fine and still failed to catch real Tailwind class names. We added a guardrail pattern self-test: every rule has to hit a known violation before it can pass.
  • 1e-05s was read as 5000ms. On a real site, the reduced-motion branch compressed a transition to 0.01ms, and the browser returned scientific notation 1e-05s. The old regex pulled out 05s and treated a compliant degrade as a 5-second animation.
  • Empty bricks passed silently. If the target itself has no hover change, an empty delta used to be reported as PASS. It now returns inconclusive (exit code 3), so you have to tighten the locator instead of getting a fake pass.

How to use it

It has been exercised in local agent setups including Codex and Claude Code. The repo also ships four measured runs: steno.ai in full mode plus a Hero CTA clip, stripe.com in full mode plus a certificate, binance.com in full mode, and linear.app in DNA mode. Clone it and you can read the outputs:

I will run it in my own projects for a while first, and only start the next round of work once I have hit high-frequency new cases (scroll-triggered parallax, mixing DNA from two sites, and the like).

  1. 1Logged under e-motion-reduced-scan (Observed). This covers the CSSOM scan of those four captured pages plus the replay of this single Hero CTA—not every motion on the site. ↩
  2. 2The visible banner reads This build is certified (lowercase), with probe sources landing on L1 --lw-* and L2 probe and no L3 rows. ↩

Acknowledgements

Built with Gemini / DeepSeek, with a little help from yours truly.

12:00am in Xiamen, China