Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

UX

Pattern

A reusable solution you can apply to your work.

“Design is not just what it looks like and feels like. Design is how it works.” — Steve Jobs

Also known as: User Experience, Usability

Understand This First

  • Requirement – UX decisions flow from understanding what users need.

Context

This is a tactical pattern that sits at the boundary between software and the people who use it. Once you have an Application with Requirements and working code, UX determines whether anyone can actually use it well. It’s the umbrella quality that covers every moment a person spends interacting with your system, from the first screen they see to the error message they hit at 2 a.m.

In agentic coding, UX applies in two directions. The software you build with an agent has UX that affects its end users. But the agent interaction itself is also a UX: the quality of prompts, responses, and tool outputs shapes how effectively a developer can work.

Problem

Software can be technically correct and still frustrating, confusing, or hostile to use. A feature that works perfectly in a test suite can fail completely in the hands of a real person under real conditions. How do you ensure that a system is not just functional but genuinely usable?

Forces

  • Developers understand the system deeply; users encounter it cold.
  • Good UX requires understanding human cognition and behavior, which are outside most engineers’ training.
  • UX improvements are hard to measure and easy to deprioritize against feature work.
  • In agentic workflows, AI agents can generate interfaces quickly but have no innate sense of what feels right to a human.

Solution

Treat UX as a first-class quality of the system, not a coat of paint applied at the end. UX is the sum of Affordance (does the interface suggest how to use it?), Feedback (does the system tell you what happened?), Accessibility (can everyone use it?), and dozens of smaller decisions about layout, language, timing, and flow.

Good UX starts with knowing your users: their goals, their context, their level of expertise. It continues with making common tasks easy, uncommon tasks possible, and errors recoverable. It means writing clear labels, providing helpful error messages, and respecting people’s time.

When directing an AI agent to build an interface, be explicit about UX expectations. Agents produce what you ask for, but they won’t spontaneously consider edge cases like slow network connections, screen readers, or users who don’t speak English unless you tell them to.

How It Plays Out

A developer asks an agent to build a settings page. The agent produces a form with every option on a single screen, technically complete but overwhelming. The developer revises the prompt: “Group settings into logical categories with tabs. Show the most common options first. Add inline help text for anything that isn’t self-explanatory.” The result is the same functionality with far better UX.

Tip

When reviewing agent-generated interfaces, try the “first five seconds” test: show the screen to someone unfamiliar with the project and ask what they think they can do. If they cannot answer, the UX needs work.

A CLI tool returns cryptic exit codes when something goes wrong. Users have to search documentation to understand what happened. Adding human-readable error messages with suggested next steps transforms the experience without changing any core logic.

Example Prompt

“The settings page dumps every option on one screen. Reorganize it into tabbed categories: General, Notifications, Privacy, and Advanced. Put the most-used options in General and add inline help text for anything technical.”

Consequences

Investing in UX produces software that people can actually use, which sounds obvious but is remarkably rare. Users make fewer mistakes, need less support, and stick with the product longer. Teams spend less time answering support questions about confusing interfaces.

The cost is time and attention. Good UX requires testing with real people, iterating on designs, and sometimes rethinking features that are already “done.” It also requires humility: accepting that your intuition about what’s usable may be wrong.

  • Refined by: Affordance — the specific cues that make an interface self-explanatory.
  • Refined by: Feedback — how the system communicates state and outcomes.
  • Refined by: Accessibility — ensuring UX works for everyone.
  • Depends on: Requirement — UX decisions flow from understanding what users need.
  • Enables: Internationalization — good UX architecture makes adaptation to other languages possible.