Tracing AI's UI decisions
When an AI model builds a screen, most of it is fine. Then you spot a label nobody needed, the wrong font size, or a color token picked for its name rather than its role.
You can tell the model to fix it, and it will, once. The next screen has the same mistake, because nothing that produced it changed.
So when the model made a bad decision, I started asking it why, and followed the answer back to its source. It's a small habit, and it's the kind of systems thinking we need as more interfaces get built with AI.
The stronger fix, if you can afford it, is a stricter system. Models do better with prop-based components that only accept a fixed set of options. If text can only use the sizes in your type scale, there is no wrong font size to pick. The same goes for wrapping a plain div in a layout component. Polar's Building an LLM safe design system takes this all the way, down to checks that reject raw HTML before it's merged.