Draft note for Oscar: replace bracketed placeholders with real, non-proprietary numbers and details before publishing.
Context
Engineering teams ship UI faster when they do not have to hand-build every component from scratch. We built a coding agent that generates new screens and retrofits legacy ones using our design system. The hard part was not generating code, it was knowing when the agent got it wrong: wrong component, wrong variant, an interaction that technically renders but does not match the pattern a reviewer would approve.
Role
I led the evaluation work for this agent: defining what “correct” means for generated UI, building the test harness that scores it, and feeding those scores back into how we prompt and constrain the agent.
Approach
01. Define what correctness means
Before scoring anything, we needed a shared definition of a correct result: right component, right props, right accessibility behavior, and visual output that matches the design system’s intent, not just something that compiles.
02. Build the eval harness
Each eval case pairs a prompt (e.g. “retrofit this legacy table to the current design system”) with a rubric an LLM judge applies, plus deterministic checks (component usage, prop types, a11y attributes) that do not rely on a judge’s opinion.
03. Close the loop
Failures get grouped by pattern, not treated as one-offs. A recurring failure (e.g. the agent defaulting to a deprecated component) becomes a prompt or constraint change, then a new eval case so it cannot regress silently.
Outcome
[NEEDS REAL METRIC: pass rate improvement, e.g. “agent-generated UI passing review on the first try went from X% to Y%”]
[NEEDS REAL METRIC: retrofit time saved, e.g. “legacy screen retrofits that took a day now take an afternoon”]
