AI Prompts for Identify Design System Violations

20 of the best prompts for identify design system violations, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

AI Prompts for Identify Design System Violations

20 of the best prompts for identify design system violations, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

Scroll to explore

The generated component does not adhere to the established design system tokens, patterns, or components, leading to inconsistencies in the UI. If unresolved, this can result in a fragmented user experience and increased maintenance costs. By following this guide, developers can ensure that components align with the design system, enhancing both usability and aesthetic coherence. Built across 4 distinct stages covering Diagnose the Wall, Isolate and Fix, Verify the Resolution and more, this guide gives you one expert prompt per step so you never have to write from scratch or guess what the AI needs. The prompts work in ChatGPT, Claude, and Gemini and are designed to get usable output on the first try.

Diagnose the Wall

Check the output of the generated component to identify discrepancies with the design system. Look for specific violations in the component's structure or styling.

Quote the Component Output

Please provide the exact output generated for the component named 'Button'. Compare this output to the required design system specifications, paying particular attention to the styling and structure. Identify any deviations from the expected design tokens and explain how these differences impact the overall design consistency. Format your response in a structured manner, highlighting each deviation with specific examples.

Diagnose the Wall

Paste the Component Code

Please analyze the following code for the generated 'Button' component: [COMPONENT CODE]. Identify any missing design system tokens or incorrect usage of components according to the design guidelines. Provide a detailed report that includes specific issues found, suggestions for corrections, and examples of how the component should align with the design system.

Diagnose the Wall

Interpret the Original Instruction

Please clarify your interpretation of the original instruction to generate a 'Button' component that adheres to the design system. Specifically, outline the design tokens and patterns that must be followed to ensure consistency with the system. Provide a detailed explanation of how these elements will influence the component's design, including any specific attributes or styles that should be incorporated.

Diagnose the Wall

Expected vs. Actual Behavior

Identify the expected behavior for the 'Button' component as defined in the design system and compare it to the actual behavior observed in the implementation. Please provide a detailed list that includes specific design tokens or patterns that were not adhered to, and explain how these discrepancies impact the overall user experience. Format your response in a table with columns for 'Expected Behavior', 'Actual Behavior', and 'Design Tokens/Patterns Violated'.

Diagnose the Wall

Identify Violated Constraints

Analyze the generated 'Button' component and identify the specific design system rule that has been violated. Please quote the exact clause from the design system documentation that outlines the expected design tokens and patterns for button components. Additionally, provide a brief explanation of how the violation impacts the overall design consistency.

Diagnose the Wall

Isolate and Fix

Target the specific component code that does not align with the design system for correction. Focus on the styling and structure that need adjustment.

Correct the Styling Tokens

Please review the 'Button' component located at 'src/components/Button.js'. Identify the incorrect styling tokens currently in use and revert them to the appropriate tokens as defined in the design system. Specifically, change 'bg-blue' to 'bg-primary'. Provide a summary of the changes made and ensure the component adheres to the design system standards.

Isolate and Fix

Rewrite with Design Constraints

Rewrite the 'Button' component to align with the design system constraints. Ensure that it utilizes the 'shadcn/ui' components and strictly adheres to the specified padding and margin values of [PADDING VALUE] for padding and [MARGIN VALUE] for margin. Provide the updated code along with a brief explanation of how it meets the design requirements and any changes made to achieve compliance.

Isolate and Fix

Scoped Change for Button

Please update the 'Button' component by changing the className from 'text-lg' to 'text-base' to align with the design system's typography guidelines. Make sure that this change does not affect any other parts of the component. After making the adjustment, provide a brief summary of the modification and confirm that the component still functions as intended without any additional alterations.

Isolate and Fix

Enforce Component Structure

Please review the 'Button' component to ensure it adheres to the required structure outlined in the design system. Specifically, confirm that it includes a 'div' wrapper with the 'flex' and 'items-center' classes. If any discrepancies are found, provide detailed recommendations on how to fix the structure to align with the design system requirements.

Isolate and Fix

Verify Component Imports

Please verify the component imports in the file 'src/components/Button.js'. Ensure that all components are imported from 'shadcn/ui' and identify any unused imports that may lead to conflicts. Provide a summary of your findings, including a list of any incorrect imports and recommendations for fixing them.

Isolate and Fix

Verify the Resolution

Confirm that the adjustments made to the 'Button' component have resolved the design system violations. Check the output for compliance.

Run Component Test

Please run the test suite for the 'BUTTON' component. Ensure that it renders correctly with the updated design tokens and confirm that the output matches the expected design system specifications. Provide a summary of any discrepancies found and suggest necessary adjustments to align with the design system.

Verify the Resolution

Show Diff of Changes

Please provide a detailed comparison of the changes made to 'src/components/Button.js'. Highlight the specific modifications that bring the component in line with the design system, and explain the significance of each change. Format the output to clearly show the before and after states of the code, along with annotations for each highlighted modification.

Verify the Resolution

Replay Original Scenario

Please replay the original scenario where the 'Button' component failed to match the design system. Provide a detailed comparison between the original and updated components, highlighting any changes made to ensure adherence to the design specifications. Include specific aspects such as color, size, font, and spacing, and confirm whether the updated component meets all required standards.

Verify the Resolution

Check Edge Cases

Please verify the edge cases for the 'Button' component when it receives different props. Specifically, assess how the component behaves in various states, such as default, hover, active, and disabled. Ensure that the component consistently adheres to the design system guidelines in each of these scenarios and provide a detailed report on any discrepancies found.

Verify the Resolution

Confirm Output State

Please confirm the final output state of the 'Button' component in the UI. Verify that it visually aligns with the design system guidelines, including color, size, and typography. Additionally, test its functionality to ensure it behaves as expected when interacted with, such as responding to clicks and displaying the correct state changes.

Verify the Resolution

Prevent Recurrence

Create artefacts that will help prevent future violations of the design system in generated components. Focus on reusable prompts and constraints.

Design System Compliance Prompt

Before generating any component, please verify that it adheres to the design system specifications. This includes checking the use of design tokens and established patterns. If any discrepancies are found, stop the generation process and request clarification on how to resolve the issues. Provide a summary of the compliance check and list any specific areas that need attention.

Prevent Recurrence

Component Specification Snippet

Create a detailed component specification snippet for a 'Button' that includes all required design tokens. The snippet should specify that the 'Button Component' must use the following tokens: [TOKEN_1], [TOKEN_2]. Additionally, outline the structure, indicating it should follow [STRUCTURE_TYPE] and adhere to typography guidelines such as [TYPOGRAPHY_GUIDELINES]. Ensure the output is clear and formatted for easy reference.

Prevent Recurrence

Style Constraint Phrase

Draft a style constraint phrase for components that adheres to the design system. Use the following format: 'All components must use the design tokens defined in the design system. Any deviation from [SPECIFIC TOKENS] will result in a review.' Ensure the phrase clearly communicates the importance of compliance and the consequences of non-adherence. Provide examples of acceptable and unacceptable deviations to illustrate the constraints effectively.

Prevent Recurrence

shadcn/ui Configuration Note

Create a detailed configuration note for implementing 'shadcn/ui' in our project. Ensure to include the following points: all components must be imported from 'shadcn/ui', design tokens should be applied consistently across all instances, and a schedule for regular reviews of imports to prevent conflicts. Format the note with clear headings for each section and provide examples where applicable.

Prevent Recurrence

Context-Reload Prompt

Generate a context-reload prompt for new generations that confirms the design system specifications. The prompt should include a request to verify the necessary tokens, patterns, and component structures at the beginning of each new generation. Additionally, instruct the AI to ask for clarification if there is any uncertainty regarding these specifications before proceeding with the generation.

Prevent Recurrence

Frequently asked questions

What causes components to ignore design tokens?+

Components may ignore design tokens due to incorrect prompts or misinterpretation of the design system guidelines. v0 lacks memory, so it cannot recall previous instructions, leading to potential oversights.

How can I ensure components match design patterns?+

To ensure components match design patterns, explicitly state the required design tokens and structures in your prompts. v0 generates components based solely on the immediate input, so clarity is crucial.

What should I do if components fail at runtime?+

If components fail at runtime, check the generated code for discrepancies with the design system. v0 may produce visually correct components that do not function as intended due to missing dependencies or incorrect imports.

How does v0 handle design constraints?+

v0 does not retain context between generations, which means it cannot enforce design constraints unless they are explicitly stated in each prompt. This can lead to inconsistencies if not carefully monitored.

Can I reuse prompts for different components?+

Yes, you can reuse prompts for different components, but ensure they are tailored to the specific requirements of each component. v0 generates outputs based on the exact input provided, so specificity is key.