Keep AI Prototypes Consistent with Your Design System

Give your prototype generator a versioned component contract. Compare an intentionally flawed invitation form with a corrected example, then check appearance, errors, focus, and role preservation.

A shared set of design tokens and components produces consistent form states.
Table of contents
  1. Define consistency as behavior as well as appearance
  2. Assemble a versioned context pack
  3. Specify component contracts, not just names
  4. Prompt with the actual constraints
  5. Compare a flawed form with a corrected form
  6. Validate the rendered result
  7. Keep product evidence and design evidence separate
  8. Maintain the context pack as the system changes

Keep AI-generated prototypes consistent with your design system by supplying a specific version of the system, the components the task may use, their supported properties, and the interaction states reviewers must test. Then compare the generated result against that contract. A color palette alone cannot prevent invented controls, missing errors, or inconsistent behavior.

This guide is for Product Builders and Product Owners working with a design partner. It uses a fictional invitation form to show a filled context pack, an intentionally flawed version, and a corrected browser prototype. The example runs outside StoriesOnBoard; it does not imply that StoriesOnBoard generates or hosts design-system prototypes.

Define consistency as behavior as well as appearance

A prototype can use your brand blue and still break your product conventions. It might submit with an unlabeled icon, hide validation errors until hover, or remove a user's input after a failed attempt. Those differences affect what a review can tell you about the intended product.

Define three things the generated result must preserve: the visual values named by tokens, the permitted components and variants, and the interaction rules for their states. Figma's guidance on design-system context for LLMs similarly treats machine-readable design context as more than a screenshot. The Northstar pack below is a small original example of putting that principle into practice.

For a first prototype, choose one form and its success, error, and access-denied states. Avoid feeding the entire component catalogue into the prompt. The goal is to make the relevant choices explicit, not to ask the model to rediscover which parts of a large system apply.

Assemble a versioned context pack

The fictional Northstar system uses a calm navy-and-white foundation, a blue primary action, and a short spacing scale. The values are illustrative. In your project, load the actual approved tokens and components rather than adopting these as a replacement system.

ContextNorthstar example
ReferenceNorthstar demo system 1.0; invitation form scope; reviewed 2026-10-21
Text and surfacesText #182552; secondary #40507d; paper #ffffff; wash #f5f7fc
Actions and errorsPrimary #3157d5; error #b42318; focus #182552
Spacing8, 16, 24, and 32 px tokens
TypographyOxygen; body 18 px; labels 16 px; headings use the shared scale
Allowed componentsTextField, SelectField, Button, InlineError, StatusMessage
Forbidden shortcutsUnlabeled icon-only submit, custom gradients, invented primary variants, color-only errors
Review statesEmpty, filled, invalid email, invitation prepared, expired, access denied

Include a known-good example and the component usage rules. A screenshot can show spacing and hierarchy, but it cannot specify all keyboard interactions or error behavior. Pair the visual reference with text or code that the generator can inspect.

Record the exact reference version in the prototype's review notes. If your design system changes tomorrow, reviewers should still be able to identify which rules produced today's result.

Specify component contracts, not just names

“Use our button” leaves several decisions unresolved. Which variants exist? What happens during an action? How does focus appear? A compact contract answers those questions without reproducing every implementation detail.

ComponentPermitted inputsBehavior required here
TextFieldLabel, value, hint, error, requiredLabel stays visible; invalid input keeps its value; error is associated with the field.
SelectFieldLabel, options, selected valueViewer and Editor only; selected role survives screen changes.
ButtonPrimary or secondary; label; disabledSemantic button; visible focus; one primary submit action per form.
InlineErrorMessage and related fieldExplain the issue and correction in text, not only color.
StatusMessageHeading, message, optional next actionIdentify simulated success, expiry, or lack of access explicitly.

Where production components are available, import and compose them. Where the prototype tool cannot use your code, document the permitted approximation and test the result against the same behaviors. A hand-built approximation should never be represented as the production component itself.

The included browser demo is such an approximation. It uses a small shared HTML/CSS implementation of the Northstar contract. It is not a Figma export or a live implementation of a customer's system.

Prompt with the actual constraints

Attach the context pack, the relevant source components, and a bounded requirements matrix. Then ask for one implementation rather than several unrelated visual options. This keeps review focused on whether the agreed system was followed.

Build the Northstar invitation form using demo system 1.0.
Use TextField, SelectField, Button, InlineError, and StatusMessage only.
Use the provided semantic tokens and spacing scale; do not invent variants.
Preserve the selected email and role through the review and welcome states.
Provide invalid-email, expired-invitation, and access-denied examples.
Keep labels visible and provide keyboard focus on interactive controls.
Keep entered values when validation fails; associate errors with fields.
Use local fictional data and label all simulated side effects.
If a needed component is absent, report the gap before creating a substitute.
Return a list of components, token uses, assumptions, and checks performed.

A missing component is a decision point. If the generator proposes a custom searchable role picker, ask whether two role options need that complexity. The approved native selection pattern may already solve the task. If a new interaction is justified, review it as a design-system contribution rather than quietly adding a one-off control.

Compare a flawed form with a corrected form

The deliberately flawed fixture below uses a bright gradient action, placeholder-only labeling, cramped spacing, and a generic error. Its role choice also disappears on the confirmation screen. The corrected form uses the permitted components, shows the field's label and error, and preserves the selected role.

An intentionally flawed invitation form is compared with a corrected form using a visible label, consistent spacing, field error, and approved primary button.
Illustrative comparison: consistent components make the error and the next action easier to inspect. The flawed fixture was created for this example.
Observed driftTargeted correctionVerification
Custom gradient buttonUse Button primary and its semantic color token.Inspect the component and computed style.
Placeholder used as the labelAdd the TextField label and associated error.Check the accessible name and invalid-state message.
Ad hoc spacingUse the 8/16/24/32 px scale for the form layout.Inspect spacing in the source and at mobile width.
Editor selection lostKeep the selected role in the shared prototype state.Complete the invitation and inspect review and welcome.
Keyboard focus removedRestore the approved visible focus treatment.Navigate the whole form with the keyboard.

Ask for this focused repair: “Replace the custom submit with Button primary, add the TextField label and InlineError association, and preserve selectedRole across confirmation. Keep the requirement scope and all other reviewed behavior unchanged.” Review the resulting diff before accepting it.

Validate the rendered result

Open the before-and-after comparison, then open its corrected prototype. The example was checked in a browser for invalid-email feedback, role preservation, keyboard focus, and the expired and access-denied states. These checks cover the demonstrator; they are not an accessibility certification of a production product.

Use three complementary checks. First, inspect component and token use in the generated source. Second, compare the visible result with the reference at desktop and mobile sizes. Third, perform the interaction tasks, including failures. A screenshot comparison cannot tell whether clicking Accept retains the correct role.

For the invalid-email case, enter a value that fails validation and submit. The message should identify how to correct it, the value should remain editable, and the field should retain a visible label. The W3C notification tutorial offers useful examples of clear form feedback. Inspect focus and reading order separately from visual styling.

At 200% zoom, verify that controls and messages remain usable and no text is clipped. On a small screen, check the longest role explanation and the error state, not only the clean initial form. Test the same states again after a design-token change.

Keep product evidence and design evidence separate

A prototype can pass the component check while still solving the wrong problem. Conversely, a useful interaction experiment may contain a deliberate visual approximation. Record both dimensions so reviewers do not confuse brand consistency with product validation.

Use one review note for the user task and another for system adherence. For example: “The invitee can explain Editor access” is a product observation. “The review screen uses the approved StatusMessage and spacing tokens” is a design-system observation. Each may require a different reviewer.

Link the reviewed behavior to the relevant story and acceptance criteria. The story-map handoff guide explains why context should travel with delivery work. Keep the component contract with the design or implementation reference, and the user outcome with the product requirement.

Maintain the context pack as the system changes

Assign an owner for the prototype pack and update it when component behavior changes. A renamed token is easier to detect than a changed validation rule, so record both visual and behavioral revisions. Keep an example of each required state with the pack.

When a newer reference becomes available, identify the affected components before regenerating the prototype. Recheck the changed states and the main journey. Avoid replacing a reviewed flow wholesale just to pick up a small visual update.

Start with one bounded interaction, one reference version, and a review record that names the remaining approximations. Prepare the product context alongside the design context so the next prototype follows both the system's conventions and the user's task.