Field Log: AI Workflows • 6 min read
Asking an AI to build a "clean, modern page" usually fails. You get a generic page with a centered headline, a purple gradient blob, three cards, and tight margins. The issue isn't coding skill. The issue is visual guidance. The fix is separating design from code.
Designing is visual. Spacing, alignment, and font scaling define a premium layout. Coding models work best when they focus on code, not design. Generate high-fidelity comps first, then hand them to the coder.

Step 1: Generate the Design Section-by-Section
Don't generate a full page comp at once. It squises detail. Generate the Hero, About, Showcase, and Footer separately. This gives each section layout room.

For example, prompt: "Generate a detailed Hero section for a flower shop. Style: editorial, minimal, warm."
"Generate a website section concept for a premium local flower business called Seven Flowers. Create a separate, highly detailed layout comp for the Hero section. Style direction: minimal, editorial, calm, warm, and natural. Avoid generic SaaS elements, card lists, and gradient blobs."
Step 2: Use Actionable Style Words
Banish words like "modern." Use real style terms: *Swiss Editorial, Opulent Minimalism, or Brutalist Terminal*. These terms define your margins, font weights, and border styles.

- Swiss Editorial: Implies strong typographic contrast and strict vertical grid lines.
- Opulent Minimalism: Directs the model toward dark-mode backgrounds, thin borders, and high-end product photography.
- Brutalist Terminal: Dictates monospace type, thick black borders, and high density data grids.

Step 3: Mix and Match Multiple Directions
Run your prompt multiple times. Take the hero section from one generation, a feature grid layout from another, and a footer design from a third. By curating the best visual ideas, you act as the design director before writing code.
Step 4: Extract and Prepare High-Quality Assets
If your design has a custom mascot or 3D object, generate it on a flat background. Remove the background and convert the asset to WebP for high speed.

Step 5: Turn the Reference Images into Code
Build section by section. Start with the Hero. Give the AI agent the reference image, the stack details (e.g. Next.js, Tailwind), and the WebP assets.
- The reference image for the Hero section.
- The isolated, optimized asset files.
- A clear tech stack context.
- A directive to reproduce the layout and typography as closely as possible.
Step 6: The Screenshot-Driven Refinement Loop
Coder outputs get you 80% there. To finish, take a screenshot of your live build, compare it to the design comp, and give exact feedback: "Move this image 20px up and increase paragraph line-height."

What to Keep Under Close Inspection
During this refining phase, keep a strict checklist of design principles to ensure the final implementation does not lose its premium feel:

- Alignment: Keep all text blocks and elements on a consistent alignment system.
- Spacing: Generous spacing is the hallmark of expensive layouts. Avoid cramped margins.
- Responsiveness: Ensure you test mobile and tablet breakpoints early.
- Brand Consistency: Verify that color values and font families remain uniform.
- Smoothness: Create natural transitions between sections.
Conclusion
Shift how you work with AI. Use image models for visual taste, and AI agents for execution. This workflow unlocks a new tier of frontend quality, moving beyond generic templates into bespoke web layouts.
Source Citation & Reference: This article synthesizes visual workflows, advice, and diagram concepts initially presented by Leon Lin in the thread: Building Better Frontends with an Image-to-Code approach (X.com Post). All rights to the original diagrams and workflow steps are attributed to the author.

