Lens, a methodology that gives AI coding agents the ability to see and critique what they build.
Constraint
A frontier model can write CSS. It can name fonts. It has read more design work than any human has seen. Asked to design a website, it produces something that looks AI-generated. The output trends toward gradients, stacked cards, abstract illustrations, comparison tables. The same defaults, the same aesthetic, every time.
The problem is not that the model does not know what good design looks like. It does. It was trained on millions of well-designed surfaces. The problem is that knowledge does not translate into output under the default arrangement.
First principles
Three constraints of the default arrangement explain why AI-assisted design defaults to the median.
The model cannot see what it built
It writes CSS and hopes. There is no visual feedback loop in the default arrangement. The output is unobserved by the thing that produced it.
The model defaults to the median of its training data
First instinct trends toward the average. The average of millions of designs is generic by construction. The median is the most common pattern, not the right one.
The model confirms its own work instead of attacking it
Asked whether the output is good, it says yes. It cannot tell. Confirmatory framing is the default. Adversarial framing has to be supplied externally.
Each of the three is addressable. The model can be made to see (rendered output, screenshots). The model can be moved off the median (constraints, guardrails, an explicit design system). The model can be put in adversarial mode (the framing is what changes, not the model). Design Discipline is the methodology that does all three.
Five phases
Every design pass runs through the same five phases. Each is owned explicitly. The order is not negotiable.
Absorb
Do not invent a design system. Discover the one the project already has from approved work, or define tokens intentionally before any code lands. The input to design is constraint, not blank canvas.
Ideate
Think before building. What is the content hierarchy. What should the viewer feel first, second, third. Is the surface narrative, comparative, or demonstrative. Can the thing be shown rather than described.
Build
Apply the system. No arbitrary values. Every state covered, not just the happy path.
Verify
The frame flips. The old version was confirmatory: take a screenshot, check the boxes, say pass. It produced generic output because the model was being asked to agree with itself. The new version asks: what would a design lead reject about this. The model can critique its own work brutally. It just does not by default. Adversarial framing is the unlock.
Present
Only after verification passes.
Guardrails
Alongside the phases, a living list of guardrails. Not values. Principles. Not use 8px spacing, but use a spacing system. Not use Inter font, but use a type hierarchy. Every entry traces to a real rejection, with the exact quote that produced it. The list grows every time something new gets rejected.
Guardrails framed as principles transfer between projects. Guardrails framed as values are the recipe everyone has, and the recipe is what produces the median.
Not a recipe
The methodology applies regardless of taste, design system, or medium. A brutalist art site, a fintech dashboard, a pitch deck, a terminal UI, a LinkedIn cover image. The phases and the discipline carry across. The system you absorb differs in every case; the way you absorb it does not.
This is why the project is not a starter template. A starter template would solve one project and break the next.
Repo
Open source at github.com/X-Arc-ai/design-discipline. Installs into any AI coding agent that reads markdown skills, not just Claude Code.
git clone https://github.com/X-Arc-ai/design-discipline.git
cp -r design-discipline/skills/design-discipline/ .claude/skills/design-discipline/
cp design-discipline/commands/design.md .claude/commands/design.md
Then /design [what you want to build] runs the full loop.
Contact
If something on this page is relevant to work you are running, write to us. The form is on the landing page. We come back within two working days.
Book a discovery call →