Why AI Coding Agents Need More Than UI Design Prompts
AI coding agents can build interfaces quickly, but good UX depends on context, accessibility, feedback, and thoughtful states—not prompts alone.
Why AI Coding Agents Need More Than UI Design Prompts
An AI coding agent can build a screen that compiles, looks polished, and follows the requested technology stack. But that does not automatically make the interface easy to understand, accessible, or pleasant to use.
There is a difference between generating a user interface and making good user experience decisions.
That difference is the problem I wanted to explore while building UX-KB, a structured UX knowledge system for AI coding agents.
A working interface is not necessarily a usable interface
When an agent receives a request such as "Build a responsive dashboard", it has to make a series of decisions beyond choosing components and writing CSS.
It needs to consider:
- What is the primary task the user is trying to complete?
- Which information deserves the most attention?
- What feedback should appear after an action?
- What happens when there is no data?
- How should errors be explained and recovered from?
- Can the interface be operated with a keyboard?
- Does the layout remain usable on smaller screens?
These decisions are part of the experience, but they are not always visible in the first screenshot an agent produces.
A dashboard can look complete while leaving users uncertain about whether an action succeeded. A form can look simple while providing no useful guidance when something goes wrong.
Visual completion and usable behavior are different things.
Consider a simple sign-up form
Imagine asking an AI coding agent:
Build a clean, responsive sign-up form with email and password fields and a primary submit button.
The agent might produce the expected layout: two inputs, a button, and a polished card.
But the implementation still needs to answer several questions.
| Situation | UX decision to consider |
|---|---|
| Before submission | Are fields labelled clearly, with useful instructions? |
| Invalid email | Is the error specific and connected to the relevant field? |
| Submitting | Does the user receive feedback that the request is processing? |
| Double-clicking | Is duplicate submission prevented where necessary? |
| Network failure | Is the entered information preserved so the user can recover? |
| Keyboard use | Can the user navigate and submit the form without a mouse? |
| Success | Is the next step clear after the account is created? |
| Small screens | Are the fields and actions comfortable to use on mobile? |
The original prompt does not explicitly describe these situations. Some may be inferred by a capable agent, but relying on inference is not a dependable design process.
This is why I think UX guidance needs to cover behavior and states, not just visual instructions.
Why adding more prompt instructions is not the complete answer
A longer prompt can help. It can explain a design system, list accessibility requirements, and describe expected interactions.
But it also introduces a practical problem: the more guidance we put into one instruction, the harder it becomes to maintain and apply consistently.
A few limitations become apparent:
1. Context is not always relevant
A general accessibility checklist may be useful when auditing a form, but much of it may be irrelevant when reviewing a data table or navigation pattern.
2. Rules need examples and context
"Use clear error messages" is useful as a principle, but an agent also needs to understand what makes an error actionable in a particular interface.
3. Guidance needs maintenance
When rules are duplicated across several prompts or documents, keeping them consistent becomes difficult.
4. Design decisions depend on the product
A general UX recommendation should not silently override a project's existing design system, interaction conventions, or technical constraints.
Prompts are still useful. The problem is expecting one large prompt to serve as the complete source of UX knowledge for every task.
What useful UX knowledge should contain
I started looking at UX guidance as something that should be organized, retrieved, and applied when it is relevant.
A useful topic document should do more than state a principle. It should help an agent make a decision.
For example, instead of documenting only "Forms should provide feedback", guidance can describe:
- The user problem the rule addresses.
- Common failure modes.
- The decisions to consider before choosing an interaction.
- The relevant loading, empty, error, disabled, and success states.
- Accessibility considerations.
- Good and bad implementation examples.
- Related topics and source references.
This structure gives an agent something more practical to work with than a collection of broad design slogans.
It also makes the guidance easier for a developer to inspect, review, and improve.
UX decisions should happen in stages
Not every interface request needs a full research and design process. A small UI adjustment and a new multi-step workflow have different levels of complexity.
However, an agent should have a way to understand what kind of work it is doing before jumping into implementation.
The workflow I developed for UX-KB uses six stages:
- Need Check — Understand the problem and whether the proposed feature is needed.
- Research — Gather relevant user, product, and technical context.
- Audit — Review the existing experience and identify usability issues.
- Proposal — Present a design solution with flows, states, and interaction details.
- Critique — Evaluate the proposal independently and identify weaknesses.
- Implement — Move into implementation after explicit user approval.
The important part is not simply having six steps. It is keeping the agent focused on the right question at each stage and preventing implementation from becoming the default first response.
The thinking behind UX-KB
This problem led me to build UX-KB, a workflow-aware knowledge base designed for AI coding agents.
Rather than treating UX guidance as one large prompt, I organized the knowledge into topic-specific documents and six workflow stage packs.
The current knowledge base contains 73 topic documents. Sessions are pinned to a knowledge-base version, and agents can retrieve stage-specific guidance or request individual documents when additional context is needed.
The intention is straightforward: provide relevant UX knowledge at the point where an agent needs to make a decision.
UX-KB also makes the retrieved-document history available for citation checks. This helps identify references that were not fetched, are unknown, or have been deprecated. It does not, by itself, prove that a cited document semantically supports an agent's claim.
I will explain the MCP architecture, tools, and retrieval implementation in the next article.
What a knowledge base cannot solve on its own
Structured guidance improves the information available to an agent. It does not make every design decision correct.
A knowledge base cannot replace:
- Talking to users when research is needed.
- Testing an interaction with real people.
- Checking the implementation in its actual environment.
- Reviewing accessibility beyond the presence of checklist items.
- Resolving every conflict between general UX guidance and product-specific requirements.
The documents also need ongoing review. Duplicated rules, outdated references, or vague examples can make a knowledge base less useful over time.
The quality of the guidance matters just as much as the retrieval system that delivers it.
The question I am more interested in
I don't think the most useful question about AI-assisted interface development is simply:
Can an AI agent build this screen?
A better question is:
Does the agent understand the decisions that make this screen useful, accessible, and predictable for the person using it?
That is the gap I wanted UX-KB to address.
The next article looks at how I used the Model Context Protocol (MCP) to make this structured UX knowledge available to AI agents.
References and further reading
- Web Content Accessibility Guidelines (WCAG) 2.2 — W3C
- What's New in WCAG 2.2 — W3C
- 10 Usability Heuristics for User Interface Design — Nielsen Norman Group
Explore UX-KB
This article introduces the problem and design direction behind UX-KB. The implementation details are covered in the next articles in this series.
Was this post helpful?
Comments
Be the first to commentBe the first to share your thoughts.