Summary
We can now take a product from the first idea through design, development and release ourselves. But when an agent is writing most of the code, keeping control of the experience becomes a different kind of challenge. We need clear design rules, instructions that can actually be tested and a way to review the work without checking every line ourselves. Here's how I'd organise that process, including when to use subagents, what to put in our prompts and when to test.
Decide what a finished product should actually do
A coding agent can make a lot of progress while we're still figuring out what the product should be.
And that's where things get messy.
We change the navigation halfway through, add functionality we hadn't considered and keep asking the agent to rebuild things that were working perfectly well.
So before writing any code, I'd establish a short product brief.
Nothing complicated. Just the primary journeys, the information they need, the expected behaviour and what we're leaving out.
Here's a useful first instruction:
Turn my product requirements into a short implementation brief.
Document the main user journeys, required functionality, data that needs storing and expected outcomes.
Separate confirmed decisions from unresolved ones.
Identify dependencies and divide the work into stages that can be tested independently.
Don't invent functionality or start implementing yet.
Review the result, correct the assumptions and save it in `docs/product-plan.md`.
One thing I'd be particularly careful about is how we describe successful behaviour.
"Users can save their searches" leaves quite a lot open.
"Saved searches retain their selected filters after a reload. Failed saves keep the current selections. Repeated submissions must not create duplicates" gives the agent something specific to implement and test.
And those expectations should be agreed before the agent starts writing code.
Establish the design system while building the first screens
I'd start with a small design system and expand it as the product develops.
We need enough consistency to stop the agent inventing new patterns, but there's little value in creating dozens of components before we know what we'll need.
For an existing product, I'd ask the agent to inspect the current code first.
Audit the existing UI components and styling.
Identify repeated patterns, duplicate components, hardcoded values and inconsistent spacing or typography.
Propose which elements should become shared tokens or reusable components.
Report the findings before changing any code.
Then we can review the proposed standards and let the agent implement them.
For a new product, I'd establish semantic colours, typography, spacing, buttons, form controls and feedback patterns alongside the first few screens.
But the interesting part is what happens afterwards.
We need the agent to reuse those decisions every time it builds something new.
That means keeping the actual tokens and components in the codebase, with a short reference explaining their intended use.
If we already work in Figma, its MCP server can provide variables, component information and design context through tools such as `get_variable_defs` and `get_design_context`. [1]
And if there's a conflict between the Figma design and the existing implementation, the agent should report it rather than quietly choosing one.
Give the agent rules it can refer back to
I'd separate three kinds of information.
`docs/product-plan.md` explains what we're building.
`docs/design-system.md` explains which design patterns and components we're using.
And `AGENTS.md` explains how the coding agent should work.
For example, a few rules in `AGENTS.md` could read:
For UI changes, consult the design system and reuse existing components and tokens.
Preserve approved navigation and behaviour unless the task explicitly requires changes.
Flag conflicts between requirements and existing implementation.
Run tests relevant to the modified code.
Report any changes outside the requested scope.
Never deploy without explicit approval.
Codex reads `AGENTS.md` as repository guidance. We can also create more specific instructions in relevant folders. [2]
But I'd avoid making the agent read the entire project's documentation before every small adjustment.
The instructions should tell it where the rules live and when they're relevant.
That's also where reusable skills become useful.
For example, we can create a skill that checks component consistency, captures screenshots at agreed sizes and reports visual differences.
Then we can reuse that procedure whenever a change affects the interface.
Use the same structure for every implementation request
A good prompt should answer five questions:
- What needs to change?
- Which existing code and design rules apply?
- What behaviour must remain unchanged?
- What will count as a successful result?
- How should the agent prove it works?
Here's how that could look in practice:
Implement saving and editing saved searches.
Use the approved product plan and design system. Inspect the existing search functionality and reuse its components.
Saved filters must persist after a reload. A failed save must preserve the current selections and display feedback. Repeated submissions must not create duplicates.
Preserve existing search behaviour and navigation. Don't add unrelated functionality or dependencies.
Write tests for the agreed outcomes, including failed requests.
Run the relevant checks and verify the flow in the browser.
Report changed files, test results, outstanding issues and anything you couldn't verify. Do not deploy.
We've described the outcome without trying to dictate every implementation decision.
And that's useful because the agent can still find a better technical solution while working within the design decisions we've already made.

Finish one complete journey before starting another
I'd divide implementation into complete journeys rather than asking the agent to build the whole interface and wire everything together afterwards.
Each journey should have working interactions, data handling and the states needed to make it usable.
Once the agent finishes, review the browser experience and fix the issues before moving on.
Then commit the accepted changes to Git.
This gives us a working version to return to if something breaks later.
And it means we're reviewing smaller sets of decisions rather than trying to untangle the entire product at the end.
Make testing a habit tied to specific changes
Here's where the routine becomes particularly useful.
We don't need to run every test after every small change. But we do need to know which changes require which checks.
I'd use this schedule:
| After this happens | Run these checks |
|---|---|
| A component is modified | Relevant component tests and a visual check |
| A complete interaction is implemented | Browser tests for success, failure and interrupted states |
| Shared tokens or layouts change | Check affected screens and responsive layouts |
| A user journey is completed | Run its full browser tests, keyboard checks and accessibility checks |
| Before a release | Run critical journeys together and review the complete application |
Playwright can automate browser interactions and verify user visible behaviour. [3]
But here's an important detail.
If the agent writes the implementation and then invents its own tests, it might simply test the behaviour it decided to create.
So define the expected outcomes first.
And when reviewing results, ask which scenarios were actually tested.
A successful build, three passing unit tests and a successful browser test tell us different things.
I'd also keep approved screenshots for important interface states. When something changes, we can compare the new output with the accepted version.
But we should review any changed screenshot before updating the reference. Otherwise, an unwanted visual change can become the new standard.
And automated accessibility checks still need some manual testing, particularly for keyboard behaviour and how understandable the experience is. [4]
Use subagents when we need independent reviews
I think subagents are particularly useful once the product becomes more complex.
We can have one agent implementing a journey while separate agents investigate design consistency, missing states or potential regressions.
But there's a difference between giving subagents independent work and having several agents change the same files.
For review tasks, I'd keep them read only.
For example:
Delegate two independent reviews of the completed implementation.
Reviewer 1: Compare the interface with the design system and approved journey. Identify inconsistent components, unnecessary additions and missing interaction states.
Reviewer 2: Examine error handling, data persistence, accessibility and test coverage.
Neither reviewer should edit files.
Return confirmed issues with file references, reproduction steps and severity. Report anything that couldn't be verified separately.
The main agent can combine the findings, and we can choose what needs correcting.
Codex and other supported agent systems can delegate bounded work to subagents with separate contexts. This works best when the tasks are genuinely independent. [5]
For smaller changes, I'd keep things with one agent.
And I'd avoid letting several agents modify shared files simultaneously unless we're deliberately coordinating those changes.
Don't accept a completed task until it's actually complete
I'd establish one final rule for every implementation.
A task is finished when:
- The agreed behaviour works.
- Relevant tests have passed.
- The interface follows the design system.
- Unrelated parts of the product haven't changed.
- Any remaining problems are documented.
- We've reviewed and accepted the result.
Then commit the change and move on.
The same approach applies before release, just across the complete product rather than one journey.
Run the critical journeys together, check the production configuration and make sure there's a way to recover if deployment causes problems.
After release, we can feed actual errors and feedback back into the next development cycle.
And as we discover patterns in the agent's mistakes, we can improve the rules or tests so we don't keep correcting the same things.
That's what makes this way of working interesting to me.
We can make a decision, see it implemented, test how it behaves and change it ourselves, without waiting for the work to move between several different roles.
But the more code our agents can produce, the more important it becomes to define exactly what a successful result looks like.
Because once we get that right, we can spend far less time correcting the agent and a lot more time working on the product itself.
Sources
[1] Figma, MCP Server Tools and Prompts — https://developers.figma.com/docs/figma-mcp-server/tools-and-prompts/. Design context, variables and components available through MCP.
[2] OpenAI, Rethinking Skills and Prompts — https://developers.openai.com/blog/rethinking-skills-and-prompts-for-gpt-6-astra. Guidance on keeping project instructions focused and creating reusable skills.
[3] Playwright, Best Practices — https://playwright.dev/docs/best-practices. Testing user visible application behaviour.
[4] Playwright, Accessibility Testing — https://playwright.dev/docs/accessibility-testing. Limitations of automated accessibility checks.
[5] OpenAI, Multi-agent — https://developers.openai.com/api/docs/guides/agents-api/multi-agent. Delegation, independent reviews and coordination between agents.
Leave a comment