Component Libraries Solved a Human Cost Problem
Composite UI components were built to ration scarce human authoring time. When coding agents make layout authoring cheap, stricter libraries reduce variance while hurting fit.
When an AI-built frontend arrives looking inconsistent, most engineering teams reach for a familiar remedy: tighten the component library. They add more composite components, narrow the prop surface, and close off escape hatches. The resulting screens look more uniform, yet they rarely become more usable. Uniformity was not the underlying failure.
To understand why, it helps to examine the economic problem that composite component libraries were actually designed to solve.
The Economics of Composite Components
A data table with built-in filters, a detail drawer, or a pre-packaged settings section exists because authoring layout and interaction from scratch is expensive for people. A team of eight engineers cannot afford to design every list view individually. Instead, they invest design effort once into a reusable container and spread that cost across dozens of screens. Reuse also prevents eight developers from inventing eight incompatible table interactions.
Both of those advantages rest on a single assumption: authoring code is the scarce resource. For a coding agent, that assumption no longer holds. An agent can write a bespoke side-by-side comparison layout in roughly the same time it takes to wire up a generic table component.
Where the Abstraction Breaks Down
Every composite component encodes assumptions about the user's job. Rows open a detail view; actions live in a trailing menu; filters sit above the list. When a screen's actual task matches those assumptions, the component works well.
Often, however, the task does not match. A reviewer may need to compare two candidates side by side, make a single inline decision per row, or process two hundred items a day with minimal visual clutter. When a human developer hits that mismatch, the friction is visible—they push back on the design or slowly build a one-off, and the team feels the cost.
An agent responds differently, and both of its default moves degrade the product:
In the first case, the user adapts to the library's geometry. In the second, the codebase accumulates brittle wrappers that defeat the original purpose of reuse.
Drawing the Line Between Primitives and Composition
This is not an argument for abandoning shared foundations. Agents should not re-derive contrast ratios, focus rings, keyboard traps in dialogs, or dark-mode surface borders on every screen. Those problems have single, objective answers, and getting them wrong produces accessibility defects.
The cleaner boundary is whether the right answer depends on the user's specific task:
| Layer | Examples | Rule |
|---|---|---|
| Primitives | Color tokens, type scale, focus rings, touch targets, dialog keyboard behavior | One correct answer. Shared and strict. |
| Composition | Layout, visual hierarchy, primary action, hidden details, record comparison | Depends on who uses the screen and what they decide. Written per screen. |
The Cost Moved, It Did Not Disappear
Cheap authoring does not make bespoke screens free. Every screen still requires review, and two screens solving the same job in incompatible ways still impose a cognitive tax on users switching between them.
Previously, the component library carried that consistency by default. Without composite containers enforcing sameness, another mechanism must take over—and hoping an agent will exercise restraint is not a mechanism. What works instead is pairing strict primitives with a small set of written design strategies selected per screen, followed by direct inspection of the rendered interface.
Tightening a component library reduces variance. When screens are failing on fit, reducing variance only makes the mismatch more uniform.
Join the PathGuided Closed Beta
Onboard your repositories with local-to-cloud spec execution, split-tier model routing, and commit-bound Work Tours.