Ler original em português

← All contents

dooopSoftware · Process · 11 min

How to Divide Tasks for Programming Agents

Learn how to create small, verifiable, and reversible tasks for programming agents, with independent context, scope, and acceptance.

Published on September 6, 2026

CENTRAL THESIS

A good agent does not save a poorly divided task. The gain lies in acceptance that allows review without guessing intent.

Divide work by verifiable results. Each unit needs its own scope, evidence, and stopping point.

Dividing tasks for programming agents requires designing small, verifiable, and reversible delivery units, each with independent acceptance. The right unit is the smallest change that delivers an observable result, can be reviewed without reconstructing the entire reasoning, and preserves a clear dependency boundary.

When this division fails, human review must reconstruct which problem the agent tried to solve.

When a Task Is Too Large for an Agent

A common sign of poor division appears when the request seems simple but authorizes too many changes. "Fix the registration error and improve the tests" can involve field validation, business rules, interface messages, API contracts, test fixtures, and possibly a lateral refactoring. For an experienced person, this request already requires judgment. For a programming agent, it leaves too much room for inference.

The problem is not only the quality of artificial intelligence. Often, the task was written in a way that makes it impossible to separate intent, implementation, and verification.

A task is too large when:

  • it asks for more than one observable objective in the same instruction;
  • it depends on broad interpretation about product, architecture, or priority;
  • it crosses multiple system layers without a defined order;
  • it allows changing files that are not directly related to the expected result;
  • it requires human review to discover which problem the agent decided to solve;
  • it does not define a test, command, inspection, or evidence to accept the change.

DORA recommends working with small, independent, and testable units to get earlier feedback on changes and review hypotheses sooner. The same guidance warns about the difficulty of reviewing and integrating large AI-generated changes DORA. This does not prove that all work with agents must follow a single format. But it reinforces a useful discipline: the larger the change batch, the harder it is to understand what is being accepted.

For teams redesigning their development process with AI, this division aligns with a larger decision: separating where AI can accelerate execution from where technical leadership needs to preserve judgment, review, and responsibility.

The Minimum Unit Is Not a Line of Code, but Independent Acceptance

The smallest useful task is not the smallest possible change. A one-line change can be poor if it lacks acceptance criteria. A change in three files can be good if it has a single objective, clear scope, and independent verification.

Independent acceptance means a person can accept or reject the task without waiting for another future task and without reopening the entire product discussion. Acceptance can come from an automated test, an executed command, a file review, a described manual check, or a simple combination of these elements.

The boundary of work should be acceptance, not effort estimation.

This changes how delegation works. Instead of asking "improve the registration flow," the team needs to decide which specific result will be evaluated. For example: "when the phone field is empty, the API must return a validation error with the message already defined in the module standard." This task can be accepted or rejected. It does not need to solve all registration problems.

This criterion also prevents a common excess: turning each task into a mechanical command so small that no one sees value anymore. If the task does not produce an observable result, it becomes a coordination cost. A good division preserves a unit of meaning.

How to Separate Objective, Context, and Execution

A task for a programming agent needs three separate layers: objective, context, and execution. When these layers mix, the agent tends to fill gaps with inference. Sometimes it gets it right. Sometimes it creates a plausible solution for the wrong problem.

The objective describes the expected change in behavior, structure, or test. It should fit in a concrete sentence. It is not "improve registration." It is "display the existing error message when the required field is not filled."

The context informs what the agent needs to know to avoid guessing intent. It can include current behavior, expected behavior, constraints, internal standards, probable files, test commands, and references to already recorded decisions. Anthropic defines context engineering as selecting and maintaining the information available to the model during inference, including instructions, tools, external data, and history, within a limited window Anthropic. The practical implication is simple: if context is limited, the task must choose well what to include.

Execution defines how the work should be conducted. Not in the sense of dictating every line of code, but establishing constraints: files that probably should be consulted, areas that should not be changed, compatibility that must be preserved, commands that must be executed, and situations where the agent must stop.

A good instruction organizes these blocks into verifiable fields. For example:

  • objective: fix validation of empty phone in registration;
  • context: the message standard is in the validation module, and the interface already expects a specific error key;
  • scope: consider only registration validation and associated tests;
  • out of scope: do not change layout, public API contract, dependencies, or persistence;
  • verification: run the module test or justify why it was not possible;
  • stopping: if the fix requires changing the API contract, stop and request human decision.

This format does not guarantee a good output. It makes remaining ambiguity explicit and makes review more objective.

Independent Acceptance Checklist for Programming Agent Tasks

Before delegating, the team can use a simple checklist. It does not replace technical judgment. It serves to decide if the request is ready, needs rewriting, or should be divided.

Single Objective

Does the task ask for a single observable change in behavior, structure, or test?

Passes when the expected result can be summarized in a concrete sentence. Fails when the request mixes fixing, refactoring, documenting, and improving without priority order.

Own Acceptance

Can the task be accepted or rejected without waiting for another task?

Passes when there is a test, command, file review, or manual check that confirms the result. Fails when acceptance depends on a future decision or a change not yet made.

Limited Scope

Is the probable area of change indicated?

Passes when the task specifies modules, files, routes, components, or boundaries to consider. Fails when the agent needs to explore the entire repository to find where to start.

Sufficient Context

Did the agent receive the necessary information to decide without guessing intent?

Passes when the task includes current behavior, expected behavior, constraints, and useful internal references. Fails when it depends on tacit knowledge that was not written.

Change Boundary

Is it clear what should not be changed?

Passes when there are explicit restrictions on API, database, interface, dependencies, style, or compatibility. Fails when any technically possible solution would seem acceptable.

Feasible Review

Can a person review the output without redoing the entire investigation?

Passes when the expected diff is small enough to compare intent, implementation, and test. Fails when review requires understanding several architectural decisions embedded in the change.

Stopping Condition

Does the agent know when to stop and request intervention?

Passes when the task defines uncertainty, conflict, or test failure situations that require human feedback. Fails when the instruction encourages the agent to keep trying until producing some change.

As a practical rule, if two or more criteria fail, the request should be rewritten before delegation. If only one criterion fails, the team decides whether to complement the context or reduce the scope.

This checklist works best when connected to how the team decides, records context, and reviews changes. A team can have good tools and still operate with ambiguous tasks, fragile reviews, and little traceability.

Fictional Example: Dividing a Registration Flow Fix

Consider a fictional example. A team notices that the registration flow accepts submission without a phone number, but the interface should show an error message when this required field is empty. The initial request could be written as: "fix registration validation, improve message, and adjust tests."

This task seems reasonable but combines at least three objectives. A better division would create tasks with their own acceptance.

First task: confirm and fix the required phone validation rule. The probable scope is the registration validation module and validation tests. Acceptance is: when the phone is empty, validation must return an error using the existing key for required field. Out of scope: changing interface text, public API contract, or persistence.

Second task: adjust message display in the interface, if the first task confirms the error key arrives correctly. The probable scope is the form component. Acceptance is: when submitting registration without phone, the interface must display the message already defined in the form's visual standard. Out of scope: redesign layout, change library, or create a new validation rule.

Third task: review test coverage of the affected flow. Acceptance is: there is a test demonstrating the expected behavior for empty phone, at the appropriate level for the changed code. Out of scope: rewriting the entire registration suite.

Nothing in this example guarantees the agent will produce the correct fix. The expected gain, to be measured by the team, is different: each output can be reviewed with a clear question. Is the rule correct? Does the interface use the expected message? Does the test prove the behavior? If one part fails, the team knows where to intervene without undoing a confusing package of changes.

What Should Stay Out of the Agent's Task

Not every request should be delivered directly to an agent. Some require human decision before any code generation.

Excluded, or requiring a prior clarification step, are requests such as:

  • ambiguous product decisions where the expected behavior has not yet been chosen;
  • relevant architectural changes without recorded decisions;
  • changes requiring access to sensitive context not prepared for use;
  • fixes with high operational risk and difficult-to-review impact;
  • tasks where the team cannot define independent acceptance;
  • broad refactoring mixing cleanup, functional change, and test adjustment.

GitHub's documentation on Copilot agents describes features with distinct environments and permissions and emphasizes human supervision and output review GitHub. For process design, this supports a narrower statement: the agent's output must remain subject to supervision and review.

There is a difference between asking for help investigating a code area and authorizing a change. The first can explore possibilities. The second needs a boundary. When the boundary does not exist, human review arrives too late.

In adoption planning, this same logic helps choose where to start: tasks the team can describe, review, and close with evidence tend to be better candidates than overly broad requests.

How to Close the Task Without Shifting Risk to Review

Closing an agent task should not mean just opening a pull request and waiting for someone to figure out what happened. The output needs to carry enough evidence for human review to be objective.

A good closure includes:

  • short description of what changed;
  • explicit link to the task objective;
  • files or areas changed;
  • test, command, or verification performed;
  • failures, uncertainties, or commands not executed;
  • assumed pending issues and what was out of scope;
  • integration point with the main code.

DORA describes continuous integration as frequent integration into the main code, accompanied by automated builds and tests, and states that fixing a broken build should have priority over new changes DORA. In an agent-assisted flow, this makes closure even more relevant. A small task that breaks the build should not be hidden in a queue of future changes. It must be fixed or reverted clearly.

In this design, human review ceases to be an attempt to compensate for a poor instruction. It becomes a check that the output matches the objective, respects the scope, has sufficient evidence, and that integration is safe.

Before delegating, transform the request into a delivery unit with a single objective, sufficient context, change boundary, own acceptance, and clear stopping condition. If the team cannot write this, it does not yet have a task for an agent. It has a pending technical conversation.

If you want to discuss this decision in the context of your company, talk to dooop.

Further Reading

Sources

  • DORA: small batches. <https://dora.dev/capabilities/working-in-small-batches/>
  • DORA: continuous integration. <https://dora.dev/capabilities/continuous-integration/>
  • Anthropic: context engineering. <https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents>
  • GitHub: responsible use of Copilot agents. <https://docs.github.com/en/copilot/responsible-use/agents>

NEXT DECISION

Discussing Application in the Company

Conversation about the software company context

Content by dooop. Registration allows relating this topic to the reader's journey and tracking interest in the subject.

Conversation about the software company context

We will use your details to deliver this content and contact you about related topics.