Hello! In our last lesson, we successfully configured the Figma MCP server, building a live bridge between your design environment in Figma and your development environment in VS Code. All the technical setup is now complete.
Before we start generating code, it's essential to pause and set the right expectations. Using AI to write code is incredibly powerful, but it's not magic. Understanding its capabilities and limitations is the key to using it effectively.
1. What We Are Learning
In this lesson, we will identify the strengths (speed) and risks (inaccuracy, non-semantic code) of AI code generation.
Think of it like this: you've just hired a very talented and unbelievably fast junior developer. They can produce work at lightning speed, but they lack your senior-level experience. They might miss subtle details, misunderstand the deeper "why" behind a design decision, or choose a shortcut that isn't best practice.
Your role is to be the senior mentor and art director. You will provide the vision (the Figma design), and the AI will produce a first draft. You will then review, guide, and correct that draft to ensure it meets your high standards. This lesson is about learning what to look for during that review.

2. Why This Matters
Without a clear understanding of the AI's strengths and weaknesses, you'll run into frustration. You might expect pixel-perfect results and be disappointed, or you might trust the AI's output too much and end up with a website that looks good but is fragile or inaccessible.
By learning what to expect, you can:
- Leverage the AI for what it's good at: speeding up initial production.
- Know where to focus your attention: reviewing for accuracy, responsiveness, and code quality.
- Craft better prompts to get better results.
This mindset shift—from "the AI will build it for me" to "I will guide the AI to build it correctly"—is the single most important factor for success in this workflow.
3. The Two Sides of the Coin: Strengths and Risks
Let's explore the dual nature of AI code generation.
Strength: Unmatched Speed and Iteration
The most significant advantage of using AI is speed. Tasks that would take a developer hours—like scaffolding a new page, creating components, or implementing a complex layout—can be done in minutes or even seconds. This frees you up to focus on the design and user experience, rather than the manual labor of coding.
For a designer, this means you can prototype and test ideas with real code almost as fast as you can create mockups.
The Best AI Coding Tools for Designers
To see this in action, let's watch a video from a designer at Microsoft who uses AI coding tools in his daily practice. Pay close attention to how he uses AI not to replace his thinking, but to accelerate his workflow.
Please watch two clips from 'The Best AI Coding Tools for Designers': Rapid Prototyping (01:29 - 03:23): Notice how he quickly ports a Figma component to a prototyping tool to nail down an interaction and animation, something that would be very time-consuming to code manually. Quick Fixes and Flow State (07:17 - 10:00): See how he uses an AI tool to tackle small bug fixes quickly, allowing him to stay in a creative 'flow state' instead of getting bogged down by context switching.
As you can see, the AI acts as a "force multiplier," handling tedious tasks and allowing the designer to iterate on high-level problems.
Risks: Inaccuracy, Bad Habits, and Hidden Flaws
Now for the other side of the coin. The AI's speed comes with trade-offs. Because it's trained on a massive, unfiltered dataset of public code from the internet, it can pick up bad habits.
Let's watch a short video that highlights some of these risks, particularly for those who are new to programming.
When should you NOT use GitHub Copilot - Honest views of a software developer
This video from software developer Mehul Mohan discusses the potential downsides of using tools like GitHub Copilot, especially for beginners.
Please watch these two key sections from 'When should you NOT use GitHub Copilot': The Beginner's Trap (01:36 - 03:46): This part directly addresses your situation. It explains the danger of using code you don't fundamentally understand. Insecure & Bad Code (03:46 - 05:09): This section explains why the AI might produce flawed code—it learns from everything, including code that is outdated, insecure, or poorly written.
To build on this, let's look at a more detailed analysis of how these risks appear specifically when translating Figma designs to code.
Can AI Tools Implement Designs Perfectly?
This article, 'Can AI Tools Implement Designs Perfectly?', directly tests several AI tools against a Figma design. It provides a realistic benchmark for what we can expect.
Please read two sections of this article: Start at the heading 'The Current State of AI-Driven Design Implementation' and read through the four challenges: 'Reproduction accuracy', 'Implementation gaps', 'Knowledge currency', and 'Maintainability concerns'. Then, skip to the end and read the section 'Key Takeaways and Practical Implications'. Focus on the core ideas: AI gets you about 65-80% of the way there, and the output must be treated as a 'first draft'.
These resources highlight three main categories of risk:
- Visual Inaccuracy: The output might look "mostly right" but have incorrect spacing, font sizes, or colors. Responsive behavior is a common failure point; a layout might look perfect on a desktop but break on a mobile device.
- Non-Semantic Code: This is a crucial concept. The AI might create a button using a generic box (
<div>) that's styled to look like a button. A human developer would use a<button>tag. Why does this matter? A<button>tag tells the browser and accessibility tools (like screen readers for visually impaired users) that it is an interactive element. The generic<div>does not. Good code describes its meaning (semantics), not just its appearance. - Poor Architecture & Maintainability: The AI might repeat the same code in multiple places instead of creating a reusable component. This makes the website harder to update later. It's the code equivalent of a designer creating multiple disconnected copies of a button instead of using a single, updatable component.
4. What to Watch Out For
As a non-coder testing these tools, you are not alone in discovering that the reality is more nuanced than the marketing. Your role is to be a critical evaluator.
I Tested 5 Vibe Coding Tools So You Don't Have To
The author of this article, a non-coder, tested several AI tools to build an app. Her conclusions provide an excellent framework for how to approach these tools with a healthy dose of skepticism.
Please read the sections 'What This Means for the No-Code Revolution' and 'The Framework for Choosing Your AI Coding Tool'. Pay attention to the idea that the 'skills gap still exists' and the advice to 'test the core features first'.
Based on everything we've covered, here is your practical framework for reviewing AI code:
- Assume It's a Draft: Never assume the first output is the final output. Treat it as a starting point.
- Trust, but Verify: Trust the AI to get you started quickly. Verify the output against your design, especially spacing, typography, and colors.
- Test Responsiveness Immediately: As soon as you have a piece of the page, resize your browser window from mobile to desktop size. Check if the layout adapts correctly. This is where AI often needs the most guidance.
- Question the "How": You don't need to be a coding expert, but you can learn to spot patterns. If you see lots of generic
<div>tags where you'd expect headings, buttons, or lists, it's a sign the code may not be semantic. This is where you'll use AI to help you fix it.
5. Mini Exercise
Let's do a quick critical thinking exercise. No coding required.
Imagine you've used our new workflow. You selected a "Contact Us" form in your Figma design and asked the AI to generate the code. The form in your design has three text fields (Name, Email, Message) and a Submit button.
The AI generates the code, and when you preview it in your browser:
- It looks visually almost perfect.
- But when you try to click into the "Email" text field, you can't type anything in it.
- The
Submitbutton looks right, but clicking it does nothing.
Based on what you've learned in this lesson, answer these questions:
- This is an example of which key risk? (e.g., visual inaccuracy, non-semantic code, implementation gap, etc.)
- The article "Can AI Tools Implement Designs Perfectly?" mentioned a design fidelity range. What was that range, and how does it help you manage your expectations in this scenario?
- The
Submitbutton was created with a<div>tag styled to look like a button. Why is this likely part of the problem?
Take a moment to think through your answers. You can find my take on them below.
Click here to see my answers
- This is a classic implementation gap or lack of functionality. The AI successfully reproduced the look of the form but failed to implement its behavior.
- The article stated AI tools achieve 65-80% design fidelity. This sets the expectation that the AI will likely get the visual layout mostly right but will probably miss functional details or responsive polish. It's a first draft, not a finished product.
- A
<div>is a generic container. It has no built-in interactivity. A proper<button>element is designed to be clicked and to submit forms. By using a<div>, the AI created a "dead" button. A key part of your review process will be spotting these non-semantic elements and asking the AI to fix them.
6. Checklist Before Moving Ahead
Please confirm you've internalized these key concepts before we proceed.
- I can articulate the primary strength of using AI for code generation (speed/efficiency).
- I can name at least three common risks of relying on AI-generated code (e.g., inaccuracy, non-semantic code, poor responsiveness).
- I understand my role is to act as a reviewer and director for the AI, not just a passive user.
- I understand that AI-generated code should always be treated as a "first draft."
You are now armed with the right mindset to be an effective director of your new AI assistant. You understand the incredible speed it offers and, just as importantly, you know what pitfalls to watch out for.
A Look Ahead:
In our next lesson, we will finally bring it all together. You will write your first real prompt, select a frame in Figma, and instruct the AI to generate the HTML and CSS for it. We'll then review the output together, applying the critical lens you've developed today.