Skip to content

Designing a Six-Stage UX Workflow for AI Coding Agents

AI coding agents can generate interfaces, but making good UX decisions requires a structured process. In this article, I explain how I designed UX-KB's six-stage workflow to guide agents from understanding a problem to implementing approved solutions.

AI Coding AgentsUX EngineeringMCP

How I structured UX-KB to help AI agents move from understanding a problem to implementing better user experiences.

AI coding agents are becoming increasingly capable of building interfaces, modifying components, and completing development tasks. But there is an important question beyond whether an agent can build something:

Does it understand what should be built, why it should be built, and what makes the experience good for users?

A coding agent can receive a request, generate components, and produce a working interface. However, a good user experience involves more than completing the visible task.

It requires understanding the problem, considering users, identifying usability issues, evaluating possible solutions, and validating the implementation.

While building UX-KB, I wanted to address this problem by giving AI coding agents a structured UX workflow.

Instead of allowing an agent to jump directly into implementation, I organized the workflow into six stages.

Why a structured workflow matters

Imagine asking an AI coding agent:

"Improve the checkout experience of this application."

The agent might immediately start changing the checkout page.

But before making changes, it should consider several questions:

  • What problem is the user experiencing?
  • Who uses this checkout flow?
  • Where are users likely to get confused?
  • Are there accessibility problems?
  • What happens when payment fails?
  • Which improvements should be made first?
  • Does the proposed solution need approval?

Without a structured process, important UX considerations can be missed.

Adding more instructions to a prompt may help, but maintaining and retrieving the right guidance across different tasks becomes difficult.

I wanted UX-KB to provide guidance based on the stage of work an agent is performing.

The six stages of the UX-KB workflow

<AsyncImage query="minimal clean software engineering workflow diagram six connected stages research audit proposal critique implementation UX process dark navy orange cream" aspectRatio="16:9" width="100%" />

The workflow contains six stages:

  1. Need Check
  2. Research
  3. Audit
  4. Proposal
  5. Critique
  6. Implement

Each stage has a different purpose and provides the agent with relevant UX knowledge.

1. Need Check — Understand the actual problem

Before starting research or making changes, the agent needs to understand the request.

At this stage, it should identify:

  • The user's actual goal.
  • The problem that needs to be solved.
  • The affected users and workflows.
  • Missing information or unclear requirements.
  • Whether UX guidance is needed for the task.

For example, if someone asks to improve a registration form, the agent should understand whether the issue is completion rate, confusing fields, validation feedback, accessibility, or something else.

The objective is to avoid solving the wrong problem.

2. Research — Gather relevant UX knowledge

Once the problem is understood, the agent needs relevant knowledge to make informed decisions.

This stage focuses on retrieving guidance related to the task.

For a registration form, relevant topics might include:

  • Form design principles.
  • Input labels and instructions.
  • Validation patterns.
  • Error message clarity.
  • Keyboard accessibility.
  • Mobile form usability.

Instead of loading every available UX document, the agent can retrieve the guidance relevant to its current task.

This is where structured knowledge retrieval becomes useful.

3. Audit — Evaluate the existing experience

Before proposing improvements, the agent should examine the current experience.

The audit stage focuses on identifying problems in the existing interface or workflow.

For a registration page, the agent might inspect:

  • Field organization.
  • Required and optional inputs.
  • Error handling.
  • Loading states.
  • Accessibility.
  • Responsive behavior.
  • User feedback.

The goal is to understand what is already working and what needs improvement.

An audit should identify actual issues rather than suggest changes simply for the sake of changing something.

4. Proposal — Decide what should change

After identifying the problems, the agent can prepare possible solutions.

A useful proposal should explain:

  • What needs to change.
  • Why the change is necessary.
  • Which UX principles support the decision.
  • What impact the change is expected to have.
  • Any trade-offs or dependencies.

For example, instead of simply saying "redesign the registration form", the agent could recommend grouping related fields, improving validation feedback, and making error messages easier to understand.

The proposal stage separates identifying problems from deciding how to solve them.

5. Critique — Review the proposed solution

A proposed solution should not automatically be treated as the correct solution.

The critique stage gives the agent an opportunity to review its own recommendations before implementation.

It should consider:

  • Does the solution address the original problem?
  • Is it consistent with the existing design system?
  • Are accessibility requirements considered?
  • Could the change introduce new usability problems?
  • Are there simpler alternatives?
  • Is the proposal technically practical?

This stage helps identify weaknesses before they become implementation work.

6. Implement — Make approved changes

Implementation comes after the earlier stages.

This is where the coding agent translates the approved proposal into actual interface changes.

It should follow the relevant UX guidance while implementing the solution.

Implementation can include:

  • Updating components.
  • Improving form interactions.
  • Adding loading and empty states.
  • Improving error feedback.
  • Supporting keyboard navigation.
  • Checking responsive behavior.
  • Validating the final experience.

One important design decision in UX-KB is that implementation should require user approval. The agent should not treat every proposed UX improvement as permission to modify the application.

The workflow is intended to support informed decisions, not remove the developer from the decision-making process.

How this workflow works inside UX-KB

The six stages are not just labels in documentation. They are represented through workflow stage packs that an AI coding agent can retrieve through the MCP server.

The agent starts a session and identifies the current stage. It can then retrieve the relevant stage pack and supporting documents.

A simplified workflow looks like this:

Each stage provides focused guidance instead of requiring the agent to process the entire knowledge base for every task.

UX-KB currently organizes its workflow into these six stage packs:

StageStage pack
Need Checkneed_check
Researchresearch
Auditaudit
Proposalproposal
Critiquecritique
Implementimplement

The MCP tools allow agents to start sessions, retrieve stage packs, access individual documents, search the knowledge base, and perform other knowledge-related operations.

Why sessions matter

Another important part of this design is session management.

An agent working on a task may retrieve guidance from multiple documents across different stages.

If the underlying knowledge base changes while the task is in progress, the agent could potentially receive inconsistent guidance.

UX-KB addresses this by pinning a knowledge base version to a session.

This means the session continues working against a consistent version of the knowledge base rather than silently switching to newer content during the workflow.

It makes the retrieval process more predictable and easier to reason about.

Why not just use one large prompt?

A large prompt can contain many UX instructions, but it introduces practical challenges.

1. Context management

Not every UX principle is relevant to every task. Loading too much information can make it harder to focus on the current problem.

2. Maintainability

When guidance is stored in one large instruction set, updating and organizing it becomes difficult.

3. Workflow separation

Understanding a problem, auditing an interface, and implementing a solution are different activities. They should not be treated as the same step.

4. Consistency

A structured workflow provides a repeatable process that can be used across different development tasks.

This does not mean prompts are useless. Project instructions and prompts are still valuable. UX-KB is intended to complement them with structured, retrievable knowledge.

What I learned while building this workflow

One of the biggest lessons from building UX-KB is that giving an AI agent more information does not automatically lead to better decisions.

The agent also needs to know:

  • Which information is relevant.
  • When it should retrieve that information.
  • What it should do with the guidance.
  • When it should stop and ask for approval.

I also learned that a workflow should guide the agent without making every task unnecessarily complicated. A small UI adjustment should not require a lengthy research process.

The six stages provide a structure, but the amount of work in each stage should depend on the actual task.

What comes next?

The six-stage workflow is one part of UX-KB. Another important question is how to verify whether an AI coding agent is using the knowledge it actually retrieved.

For example:

  • Did the agent retrieve the correct document?
  • Is the referenced document part of the current session?
  • Does the document still exist?
  • Is the reference unknown or deprecated?

These questions led me to work on citation verification in UX-KB.

That will be the focus of the next article.

Final thoughts

AI coding agents are good at turning instructions into code. But building a usable product requires more than code generation.

It requires understanding problems, evaluating existing experiences, making informed decisions, and reviewing solutions before implementation.

The six-stage workflow is my attempt to bring more structure to that process.

UX-KB is still evolving, and I am continuing to improve how agents retrieve and use UX knowledge during development.

Explore the project:


Building UX-KB — a structured UX knowledge base for AI coding agents.

Was this post helpful?

Comments

Be the first to comment

Be the first to share your thoughts.