Notes from building an AI design collaborator · part 10
The AI told me our brand colour with total confidence, and it was wrong
· 3 min read
I was building the thing that reads a product's real colours and spacing off its own code, and early on I did the lazy version. I just asked the model. "What's the primary colour here?" It told me instantly, a hex value, confident and specific and wrong. Not wildly wrong, which would have been fine because I'd have caught it. One shade off. The worst possible kind of wrong.
I didn't notice for about a week. By then that almost-right blue had gone into a pile of wireframes, quietly making everything look a little bit not-our-product in a way nobody could put their finger on. That's the whole danger with a made-up fact. It doesn't announce itself. It sits there being nearly true while everything built on top of it inherits the nearly.
So I stopped asking it for facts
The rule I landed on is a little strict and I've kept it ever since. The model never touches the ground truth.
What the model is genuinely brilliant at is writing code, so I let it do that instead. It looks at the product, works out how this particular stack stores its colours and spacing, and writes a small script to pull them. Then the script runs and reads the actual values. The model wrote the reader. The reader read the facts. At no point did I ask the model to remember a colour.
It sounds like a pedantic distinction and it completely isn't. When the model guesses, you get a vibe with a hex code stuck on it. When the model writes a script and the script reads the file, you get the value. Same model, same effort, and one path can hallucinate while the other simply can't, because there's no step left where anyone is asking it to recall a fact instead of go and fetch one.
Where it still bites
I want to be honest that this makes the extraction safe, not everything. Judgment sneaks back in at the edges. Inferring a spacing scale out of messy real numbers is a guess wearing the coat of a measurement. Naming a component is an opinion with a straight face. Those I keep flagged and quarantined, because pretending they're facts is the same mistake in nicer clothes.
But for anything the product has actually written down somewhere, the rule holds, and it's saved me from shipping a confident wrong answer more than once. So I don't ask the model what the colour is anymore. I ask it to write the thing that goes and reads it, and I let the file have the last word.
Part of a series on building an AI collaborator for our design team at Xflow. Each post stands on its own.
- ai
- tooling
The rest of Notes from building an AI design collaborator
- 1. I stopped describing my product to AI. I just gave it the HTML.
- 2. I gave the AI my design process, not my design decisions
- 3. I turned my design process into a dozen small skills, not one giant prompt
- 4. I built a free tool that gives your AI your real product
- 5. I taught the AI to push designs into Figma. Then it quietly stopped.
- 6. We rebuilt our Figma design system out of the code, not the other way round
- 7. We ran our design process on itself, and it broke in useful ways
- 8. How do you teach an AI your taste?
- 9. It worked great on the smart model. Then I ran it on a cheaper one.
- 11. A screen list lies. I found a whole feature I didn't know we shipped.
- 12. Our documentation updates itself, because updating it is the AI's job
- 13. I sat down to turn my workflow into a swarm of agents. Most of it refused.
- 14. Every modal in our app shared one URL. Our analytics couldn't tell them apart.
- 15. My AI's rules only worked because one tool bothered to read them
- 16. Six designers, one GitHub account, and a script that saves us from ourselves
- 17. "Out of scope" usually means "we'll repaint this in six months"