How to deliver high-quality software with AI-native development / Set the standard before you build
How to break work into units an agent can finish
The size of the unit you hand an agent decides almost everything that follows: whether it finishes, whether the diff can be reviewed, whether a failure can be isolated, and whether a rollback is one flag or one migration. This page covers how to size work for coding agents, the two failure modes at either end, and how to split a large change without losing track of the whole.
Published September 1, 2026. Editorial.
Key takeaways
- A unit is the right size when one reviewer can understand the whole diff at once and one check can prove it works.
- Too large fails silently: the agent runs out of context, does most of it, and reports success on the part it finished.
- Too small fails expensively: humans pay the coordination cost, and ten trivially correct changes can still add up to one incoherent feature.
- Split along boundaries that already exist in the system, not along the sentences in the ticket.
Task decomposition used to be an optional planning step. In an AI-native team it is the main control you have on delivery quality, because it decides whether the failure mode is visible or hidden.
Why size decides everything
An agent working on a unit that fits will finish it, run the checks, and hand you something you can evaluate. An agent working on a unit that does not fit will do the first two thirds well, lose track of the task, and then produce a summary that describes the work as complete. Anthropic's own documentation is direct about the mechanism: performance degrades as the context window fills, and a model may start forgetting earlier instructions or making more mistakes when the window is getting full [1].
The reason this matters for delivery rather than for prompting is that the failure is silent. Nothing errors. The build keeps passing if the tests it wrote cover the part it finished. A human then reviews a large diff, finds the parts that are present to be reasonable, and misses that a requirement from the middle of the ticket has been dropped without any notice.
The right-sized unit
We use two tests, both practical rather than theoretical.
One reviewer, one sitting. A person should be able to keep the whole change in mind at once and say what it does and what it risks. If they have to scroll back to remember what the first file did, the unit is too big for the review to be real, whatever the review process says happened.
One check, one answer. There should be a check that decides whether the change works. Not twelve loosely related tests: one clear signal, plus whatever supporting tests it needs. If you cannot describe that check in a sentence, you are looking at more than one unit of work sharing one ticket number.
Both tests are about the humans and the pipeline, not about the model. Models will readily attempt far more than this. The constraint is that a delivery process needs failures to be attributable, and attribution requires small units.
The failure at the large end
The large-unit failure is the expensive one because it is invisible until late. The pattern goes: a broad ticket, an agent session that runs for a long time, a large diff, an approving review because the visible parts are competent, and then a gap discovered two weeks later by a customer or an auditor.
There is a second version that costs more. When a single unit spans several areas of the system, a failure anywhere in it invalidates the whole change, so the rollback is all or nothing. A team ends up choosing between reverting three days of work to fix one bad decision, or adding fixes on top of something they no longer trust. Neither is a good option and both were created at planning time.
If a change genuinely cannot be split, that is usually information about the system rather than about the ticket. Coupling that forces every change to be wide is the thing to fix, and it is worth naming as work in its own right rather than accepting it without comment forever.
The failure at the small end
The opposite error is real but cheaper. When units are too small, each one passes, each one is trivially reviewable, and the coordination cost moves onto humans. Ten changes that are individually correct can still produce a feature that is incoherent, because nobody kept the whole design in view.
The signal here is a rise in follow-up changes that only exist to reconcile earlier ones: renaming for consistency, moving a function that ended up in the wrong module, aligning two interfaces that were designed in separate sessions. That is the coordination cost showing up as work. If you see it, merge some units back together and write down the overall design of the feature before you start.
Splitting along boundaries that already exist
The common mistake is splitting along the ticket's sentences: one unit per bullet point. That produces changes that all touch the same files and cannot be released independently, which is the worst of both cases.
Better boundaries, with the most useful first:
By deployable part. Split so each unit can go to production and be observed on its own, even if it is behind a flag and does nothing yet. This is the boundary that makes progressive delivery possible.
By data direction. Writing the new field, backfilling it, reading it, and removing the old one are four units, and they should be four. This ordering is also what makes the change reversible at each step, which matters most when a migration is involved.
By interface. Define the contract in one unit, implement behind it in another, migrate callers in a third. The contract unit is small and is the one worth a careful human read.
By risk. Isolate the part that touches money, credentials or personal data into its own unit so it can get the review and the gates that the rest does not need. Mixing a payment path into a large change that only affects appearance is how a high-risk edit gets a low-risk review.
Ordering the work so the agent does not lose track
Once the units exist, the order matters. Two rules give most of the benefit.
Put the contract first. When the interface, schema or type definitions are merged before the implementation, everything generated afterwards has something concrete to conform to, and mismatches appear as type errors instead of as surprises when the code runs. This is also why typed languages and strict configuration are worth more in an AI-native team than they did before.
Merge the check before the code where you can. A failing test that describes the desired behaviour, written and reviewed first, turns the implementation step into something the agent can work against, again and again until it passes, with nobody watching. It also proves the test can fail, which is the property most missing from generated test suites, as covered in test strategy when the AI writes the tests too.
Keeping the whole design consistent while the parts change
Splitting work creates a new obligation: someone has to keep track of the whole feature. In our experience that is one named person per feature, and their job is not to write the code, it is to keep the order correct and notice when unit four has broken the assumption behind unit two without anyone noticing.
Write the sequence down where the agent can read it, in the repository rather than in a ticketing tool. A short plan file naming the units, their order and the boundary they were split on gives every session the same information, which is most of what stops six sessions producing six different designs. That habit is covered from the point of view of documentation in documentation an agent and a new hire can use.
Parallel sessions need boundaries too
One consequence of cheap code writing is that several agent sessions can run at once, and the decomposition decides whether that is useful or chaotic.
Two units that touch the same files will produce conflicting changes, and resolving a conflict between two generated diffs is unpleasant work: neither side has an author who remembers the intent, so the reviewer is reconciling two sets of reasoning they were not part of. The way to avoid it is to split by file ownership as well as by behaviour, so parallel units touch disjoint areas. Where that is impossible, run them one after another and accept the extra elapsed time, because it is smaller than the cost of a bad merge.
The related habit is to keep each parallel session's scope written down where the others can be checked against it. Isolated work benefits from isolated context, right up to the moment two sessions make incompatible assumptions about the same interface, and the only cheap protection is that the interface was fixed before either started.
What to change first
Take the last feature that went badly and look only at its decomposition. Ask whether any single unit was too large for one person to understand as a whole, whether any unit mixed a high-risk path with routine work, and whether the units could have been released independently. In most postmortems we run, the answer to at least one of those is no, and it explains more of the outcome than any decision made later.
The units also have to arrive with a standard, which is what done means when an agent writes the code, and they have to pass something that does not depend on goodwill, which is the gates. The main guide puts the sequence together.
Common questions
How big should a task be for a coding agent?
Small enough that one reviewer can understand the whole diff at once, and that one check can decide whether it works. Those two tests are about your review process and your pipeline rather than about model capability: a delivery process needs failures to be attributable, and attribution requires small units.
What happens when a task is too large for an agent?
It fails silently. The agent completes most of the work, loses track of the task as its context fills, and reports success on the part it finished. Anthropic's documentation notes that performance degrades as the context window fills and the model may forget earlier instructions. Nothing errors, so a large diff gets an approving review with a requirement missing and nobody noticing.
Can tasks be too small in an AI-native team?
Yes, and the sign is a rise in changes that only exist to reconcile earlier ones: renames for consistency, functions moved to the right module, two interfaces aligned after being designed in separate sessions. That is humans paying the coordination cost. When you see it, merge units back together and write down the overall design of the feature first.
How should we split a large feature into agent-sized units?
Along boundaries that already exist in the system rather than along the sentences in the ticket. The most useful boundaries are deployable part, data direction such as write then backfill then read then remove, interface contract before implementation, and risk, so the part touching money or credentials is isolated and can get a stricter review.
What should be built first when work is split?
The contract. When interfaces, schemas and type definitions are merged before implementation, everything generated afterwards has something concrete to conform to and mismatches appear as type errors instead of surprises when the code runs. Where possible, merge a failing check next, so the implementation step becomes something an agent can work against repeatedly without a person watching.
Who keeps track of the overall design of a feature when work is split across sessions?
One named person per feature, whose job is the sequence rather than the code. They keep the order correct and notice when a later unit has invalidated an assumption behind an earlier one. Six sessions with no shared plan produce six reasonable designs, which is how a coherent feature turns into a project of fixing mismatches.
Where should the plan for a split feature live?
In the repository, not only in a ticketing tool. A short plan file naming the units, their order and the boundary they were split on gives every agent session and every engineer the same information. Anything an agent cannot read while it works will not influence what it builds.
What if a change genuinely cannot be split?
Treat that as information about the system rather than about the ticket. Coupling that forces every change to be wide is the underlying problem, and it will keep making every future change large, risky and hard to roll back. Name it as work in its own right rather than paying the cost without comment on every feature.
Does splitting work slow delivery down?
It moves time from rework into planning, which usually makes the total faster. The specific saving is in failure isolation: when a small unit is wrong you revert one change, while a wide unit forces a choice between reverting days of work and adding fixes on top of something you no longer trust.
How do we decompose work when nobody understands the existing code?
Make understanding the first unit and give it a written output. A short document describing how the current flow works, produced and reviewed before any change, is cheap and prevents a decomposition built on guesses. Splitting a system nobody has read produces units along imagined boundaries, which is how a small change turns into a wide one.
Related reading
What a good technical spec looks like when a model writes the code
The old advice was to keep specs short and stop where writing the code is faster. That advice assumed a person was reading it. When a model writes the code, the cost of an unanswered question changes, and so does the right length of a spec.
How to estimate a software project honestly
A single-number estimate on new work is a promise nobody can keep. The honest version is a range that reflects real uncertainty, and the biggest cause of a bad estimate is risk nobody planned for.
Why scope creep happens and how to stop it
Scope creep is rarely about laziness or bad discipline. It is about unclear goals and a fear of saying no. Here is how to keep scope under control and still accept good ideas.
More in Set the standard before you build
What done means when an agent writes the code
A coding agent stops when the work looks done, and looking done is easy. A definition of done for AI-written work has to be checkable without a person reading the diff: named acceptance criteria, an automated check for each one, and a stated limit on what the change can affect. This page covers what belongs in that definition, who writes it, and how to tell when yours is too weak.
The decisions that stay with your engineers
An agent will make an architectural decision without telling you it made one. It will pick a queue, invent a boundary, choose a consistency model, and present all of it as implementation. This page covers which decisions should stay with your engineers, why those specific ones, and how to record them so the next session does not reverse them without anyone noticing.