Sooner or later a model asks for a component you never built. A badge with variant: "danger-subtle". A card with a background of #7c3aed because the sentence before it was about premium plans. A table with fourteen columns on a phone. A kind called insight-banner that appears once and never again. None of it is careless. The model is fluent in every design system it has read, and yours is only one of them.
What the component does next is a design decision, and most teams make it by accident. Whatever the renderer happened to do on the first day becomes the policy.
Two easy answers
The first easy answer is to render it. Pass the props through, let the style land, and trust review to catch the odd one. This is how a system wears away without anyone deciding to change it. Each off-system value looks harmless on its own screen. A month later there are four reds, and none of them is the one that means an error.
The second easy answer is to throw. A schema rejects the payload, the boundary catches it, and the person sees an error card where the answer was. The system stays clean, and the product fails at the moment someone asked it a question. The model got the numbers right. It guessed one variant name wrong, and the whole part was lost for it.
Policy
Render it
- Partone wrong prop
- Rendererpasses it through
- Screena fifth red
Throw
- Partone wrong prop
- Schemarejects the part
- Screenan error card
Refuse the prop
- Partone wrong prop
- Boundarydrops the variant
- Screenanswer intact
Both treat the payload as one thing that is either valid or not. It rarely is. It is usually a correct answer wearing one wrong prop.
Refuse the prop, keep the answer
The contract I want is narrower than either. Parse each part at the boundary, before it reaches a component. Keep every field that is on the system. Refuse each field that is not, by name, and render what is left. The component behind the boundary never sees an off-system value, so it never has to decide what to do with one.
type Refusal = {
part: string; // the part id the model gave
field: string; // "variant", "background", "kind"
received: unknown;
rule: string; // the contract it broke
};
type Parsed<P> = { props: P; refused: Refusal[] };A refused field falls back to the default the component already has. A badge with an unknown variant renders as the neutral badge. A raw color is dropped, and the card keeps its surface. I do not map a near miss to its closest token. danger-subtle could mean a softer error or a warning, and a guess made on the model's behalf is how a meaning gets blurred inside a clean parser.
An unknown kind is the one case where the part itself cannot render. Even then the answer can survive. Most invented kinds carry a title and some text. Render that as a note, the plainest part in the set, and refuse the kind. The person still reads what the model meant to say.
Say no where it can be seen
A refusal has three readers, and each needs it in a different form.
- The person needs almost nothing. The part renders on the system, and nothing on screen apologizes for a choice they never saw. The exception is a refusal that changes meaning, like a dropped column. Then the part says what it left out.
- The developer needs it in the log with the part id, the field, and the rule it broke, so a review can see it without replaying the stream.
- The model needs it in the next turn. One line saying
danger-subtleis not a variant, followed by the ones that are, corrects the next answer more reliably than another paragraph in the system prompt.
That last reader closes a loop most teams leave open. The prompt describes the system once. The refusals describe it again, each time the model drifts, in terms of the exact mistake it made.
Count what you refuse
Refusals are the most honest report a component system gets. Count them by field and by rule. A steady trickle is the model being a model. A sudden rise usually means a prompt changed or a new model shipped, and I would rather learn that from a chart than from a screenshot in a thread.
Some refusals are requests. If the model keeps asking for a softer error, and the people reviewing keep agreeing it would have been right, the system is missing a meaning. Add it on purpose, with a name and a rule, and the refusal stops because the system grew. That is a different act from letting the value through. One is a decision. The other is drift.
A system that only accepts has to be policed. A system that refuses by name keeps its own record of where it is too small.
