The Agent Workflow

A multi-agent development workflow that reduces AI code generation costs by 8090% made possible by the Clean React architecture and its contract-driven structure.

The Agent Workflow

A multi-agent development workflow that reduces AI code generation costs by 8090% made possible by the Clean React architecture and its contract-driven structure.

The system

A team of small, focused agents — each with one job, each working against an explicit contract.

Most AI code generation relies on a single large model with full codebase context for every task. The Clean React agent workflow does the opposite — it breaks every feature into its smallest constituent parts and assigns each part to a dedicated local agent with only the context it needs. Nothing more.

📃

The spec is the instruction set

Before any agent writes a single line of code, every part of every feature is fully defined — structure, responsibilities, data flows, and TypeScript contracts. The spec tells the agent exactly what to build, how it fits into the Clean React architecture, and what contracts it must honour. There is no ambiguity and no room for inconsistent output.

📃

The spec is the instruction set

Before any agent writes a single line of code, every part of every feature is fully defined — structure, responsibilities, data flows, and TypeScript contracts. The spec tells the agent exactly what to build, how it fits into the Clean React architecture, and what contracts it must honour. There is no ambiguity and no room for inconsistent output.

🤖

Each agent has one job

A dedicated agent is assigned to each part — the domain module, the connector, the UI components. It receives its spec and its TypeScript contract. Nothing else. It writes its part, against its contract, without any knowledge of the rest of the codebase. One job. One context. One output.

🤖

Each agent has one job

A dedicated agent is assigned to each part — the domain module, the connector, the UI components. It receives its spec and its TypeScript contract. Nothing else. It writes its part, against its contract, without any knowledge of the rest of the codebase. One job. One context. One output.

💸

Agents run locally at near-zero cost

Because each agent's context is small and explicit, the task does not require a large, expensive cloud model. Local models — running on your own machine — handle the build layer of the workflow entirely. No cloud API calls. No token costs for repo-wide context. No unnecessary spend.

💸

Agents run locally at near-zero cost

Because each agent's context is small and explicit, the task does not require a large, expensive cloud model. Local models — running on your own machine — handle the build layer of the workflow entirely. No cloud API calls. No token costs for repo-wide context. No unnecessary spend.

Output is consistent by design

Every agent works against the same architectural standard. Every part it produces follows the same structure, the same patterns, and the same contracts as every other part. Consistency is not enforced by review — it is guaranteed by the system before a single line is written.

Output is consistent by design

Every agent works against the same architectural standard. Every part it produces follows the same structure, the same patterns, and the same contracts as every other part. Consistency is not enforced by review — it is guaranteed by the system before a single line is written.

The role of local agents

Small models handling precise tasks at near-zero cost.

Local agents are the engine of the workflow — handling the bulk of every feature build entirely on your own machine, with no cloud API costs and no unnecessary context.

What they handle

Every domain module, every connector, every atomic UI component — built by a dedicated local agent working against its spec and TypeScript contract. 80–90% of the entire codebase, handled locally.

Why local models are the right tool

Large cloud models are powerful but expensive — and most of that power is wasted on tasks that don't need it. A local agent given a tight spec and an explicit contract doesn't need repo-wide understanding. It needs to read a contract and implement against it correctly.

How they operate

Each agent receives two things — its implementation spec and its TypeScript contract. That is its entire context. It writes its part, produces its output, and hands off.

Why this produces consistent output

Every agent works against the same architectural standard. Every part it produces follows the same structure and the same contracts as every other part. Consistency is guaranteed by the system before a single line is written.

The role of Claude Code

Repo-wide intelligence,
used only where it's needed.

Claude Code is the most capable — and most expensive — tool in the workflow. The agent workflow is designed to use it precisely where it earns its cost, and nowhere else.

🤖

What it handles

Claude Code is responsible for two things — creating the full UI and feature specs before the agents begin, and wiring every feature together once the agents have finished.

Both tasks require repo-wide context and high-level reasoning. Both are exactly what Claude Code is built for.

🎯

Used at two stages, nowhere else

Every prompt sent to Claude Code costs tokens based on context size. In a standard AI development workflow, almost every prompt carries full codebase context — whether it needs it or not.

In the Clean React agent workflow, Claude Code only sees the full codebase at the two points where that context is genuinely necessary. Every other task goes to a local agent with a minimal context.

💸

The result

Claude Code spend is reduced to a fraction of what a standard workflow would cost — because it is used precisely, not habitually.

The quality of its output is also higher, because it is given tasks that match its capabilities rather than tasks that any smaller model could handle.

Get in touch

Ready to migrate your React Native app to Clean React?

If your app is holding your business back — let's talk about what a migration would look like for you. The first call is free.

Companies I have worked with:
Companies I have worked with:

Copyright © 2026 Clean React. All rights reserved.

Copyright © 2026 Clean React. All rights reserved.

Copyright © 2026 Tommy Harty.
All rights reserved.