
In my post on the fully automated development workflow, I said I would follow up on how I handle UI. To be clear, this post is only the most, most, most basic set of rules that keeps the AI's first draft from looking ugly, before any detailed UI work begins. Once that first version is done, look for inspiration for your site on places like Dribbble, Pinterest, landing.love, Mobbin and Awwwards, then fine-tune your product. Don't expect a good-looking UI in one shot. That isn't realistic!
Before you start, remember: don't use any UI skills. None of them are much use.
AI-generated frontends share four habits: boxes nested inside boxes, explanatory text everywhere, saturated gradients, and multi-level menus that jump the moment you touch them.
Telling an AI to "keep it clean" doesn't work; it has nothing to act on. Replace vague taste words with concrete numbers, ratios and prohibitions, split them into independent rule modules, and the AI starts producing clean interfaces.
Below, the full frontend design spec is condensed into 5 modules, each with the reasoning behind its rules, followed by the complete file to copy and the steps to use it.
1. The 5 rule modules
Module 1: Layout and information hierarchy

[Layout and information]
- No boxes inside boxes. No nested cards and no extra dividers.
- No taglines, subtitles, secondary labels or explanatory text.
- Separate levels of content with alignment and spacing, not with text that explains the interface.Why write it this way: by default, AI gives every block of content a border and a shadow, then puts three small cards inside a big one, and the lines chop the page into pieces. It also likes to tuck a slogan or an explanation under every heading. Remove the nested frames and the extra text, group content with alignment and whitespace alone, and the page becomes clean.
Module 2: Visuals, color and whitespace

[Visuals, color and whitespace]
- Overall reference: the minimal style of Apple's website.
- Color ratio: 90% of the area in neutral black, white and gray; 10% in one accent color that marks the core action or key data.
- No gradients, saturated colors, neon colors or cards with complex shadows.
- Weight and lightness contrast: headings bolder and darker, body text lighter and paler.
- More whitespace: set component padding and margins to 1.5 times a typical page. Leave space empty rather than filling it.Why write it this way: beginners tend to pile on colors and fill every space. This rule fixes a 90:10 color ratio: nine tenths of the screen is black, white and gray, and the remaining tenth uses one color only, on the primary button or a key status. Then the distance between elements grows to 1.5 times a typical web page, so the eye can tell what matters most without any frames.
Module 3: Type, grid and icon parameters

[Type, grid and icons]
- Font: use Geist everywhere.
- Size and weight: headings 18px and bold (weight 600 or 700); body text 16px or 14px at regular (400) or medium (500) weight.
- Text color: primary text #181818, secondary text #6A6A6A.
- Spacing grid: every spacing value is a whole multiple of 4px, with no exceptions.
- Corner radius: between 8px and 40px by component size and level (small radius for small buttons, large radius for large dialogs).
- Icons: use the Reicon icon library (https://reicon.dev/docs). Icon glyph 18px, stroke width 1.5px, inside a transparent 24px × 24px frame.These numbers, for beginners:
- Colors #181818 and #6A6A6A: pure black (#000000) on white is harsh. #181818 is a deep gray-black for headings and body text; #6A6A6A is a mid gray for secondary information such as times and notes.
- 4px grid: every distance on the page must be a multiple of 4, such as 4, 8, 12, 16, 24 or 32. Random numbers like 7px or 13px are not allowed. When sizes change in multiples, the edges of every component line up.
- An 18px icon in a 24px frame: some icons are wide, others narrow. Give every icon a fixed transparent 24×24 frame, draw the icon at 18px inside it with a uniform 1.5px stroke, and a row of icons will share one size and one center line.
Module 4: Interaction and desktop menus

[Interaction and desktop menus]
- Show controls by intent: hide secondary action buttons by default; show them when the user hovers, focuses, scrolls near, or starts working in that area.
- Desktop multi-level menus: implement an open delay, a close delay and a safe triangle together. When the pointer moves from parent item A toward submenu B, form a triangle from the current pointer position and the top and bottom corners of submenu B; while the pointer is inside that triangle, keep submenu B open and hold off switching to other items it passes over.The two interactions, for beginners:
- Show controls by intent: if every row in a list ends with Edit, Copy and Delete buttons, the screen fills with icons. Keep the secondary buttons hidden until the pointer reaches that row or the cursor enters the input, and the distraction goes away.
- Safe triangle: on a desktop page, the first-level menu sits on the left and the open submenu on the right. People reach the submenu on a diagonal and pass over the first-level items below. An ordinary menu switches as soon as the pointer crosses them, and the submenu you wanted disappears. Connect the pointer's current position with the top and bottom corners of the submenu to form a triangle; while the pointer moves inside it, the system knows you are heading for the submenu and doesn't switch. With open and close delays of a few hundred milliseconds, the menu becomes much steadier.
Module 5: Render acceptance

[Render acceptance]
- The browser's real rendered result is the standard, not the values computed from code. After writing code, check alignment, line wrapping, whitespace and overlap in the real page.Why write it this way: the style values written in code are the computed state; what the browser draws on screen is the rendered state. The code may say height 40px and centered text, yet the text is too long, wraps onto two lines and spills out of the border; or the play triangle looks off to the left inside its circle. Reading the code won't reveal these problems. This rule makes the AI open the real page and check what it shows, instead of signing off on code values alone.
2. The complete prompt
Create a DESIGN.md file in your project root and paste in the whole spec below:
# Frontend Interface Design Spec
## 1. Layout and information
- No boxes inside boxes. No nested cards and no extra dividers.
- No taglines, subtitles, secondary labels or explanatory text.
- Separate levels of content with alignment and spacing, not with text that explains the interface.
## 2. Visuals, color and whitespace
- Overall reference: the minimal style of Apple's website.
- Color ratio: 90% of the area in neutral black, white and gray; 10% in one accent color that marks the core action or key data.
- No gradients, saturated colors, neon colors or cards with complex shadows.
- Weight and lightness contrast: headings bolder and darker, body text lighter and paler.
- More whitespace: set component padding and margins to 1.5 times a typical page. Leave space empty rather than filling it.
## 3. Type, grid and icons
- Font: use Geist everywhere.
- Size and weight: headings 18px and bold (weight 600 or 700); body text 16px or 14px at regular (400) or medium (500) weight.
- Text color: primary text #181818, secondary text #6A6A6A.
- Spacing grid: every spacing value is a whole multiple of 4px, with no exceptions.
- Corner radius: between 8px and 40px by component size and level (small radius for small buttons, large radius for large dialogs).
- Icons: use the Reicon icon library (https://reicon.dev/docs). Icon glyph 18px, stroke width 1.5px, inside a transparent 24px × 24px frame.
## 4. Interaction and desktop menus
- Show controls by intent: hide secondary action buttons by default; show them when the user hovers, focuses, scrolls near, or starts working in that area.
- Desktop multi-level menus: implement an open delay, a close delay and a safe triangle together. When the pointer moves from parent item A toward submenu B, form a triangle from the current pointer position and the top and bottom corners of submenu B; while the pointer is inside that triangle, keep submenu B open and hold off switching to other items it passes over.
## 5. Render acceptance
- The browser's real rendered result is the standard, not the values computed from code. After writing code, check alignment, line wrapping, whitespace and overlap in the real page.3. Three steps to use it in a project
- Trim the file for your platform: for desktop websites or admin systems, keep all 5 modules; for mobile-only pages, delete the desktop multi-level menu rule in module 4. Save the file as DESIGN.md (or put it in CLAUDE.md, AGENTS.md or .cursorrules).
- Install dependencies before writing pages: when you assign the task, tell the AI: "Read DESIGN.md first, install the Geist font and the Reicon icon library, then start writing the page code."
- Check in the browser: after the AI writes the code, have it open the local page with a browser tool and check screenshots, fix anything off the 4px grid, any extra nested borders and any misplaced line wraps, and only then commit.