<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rafael</title>
    <description>The latest articles on DEV Community by Rafael (@rafael_dev).</description>
    <link>https://dev.to/rafael_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4007091%2F0f9c8132-2bfe-4796-b3e0-17160ca71de0.jpg</url>
      <title>DEV Community: Rafael</title>
      <link>https://dev.to/rafael_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rafael_dev"/>
    <language>en</language>
    <item>
      <title>From Epic to Merge: An End-to-End Workflow for Software Development with AI Agents</title>
      <dc:creator>Rafael</dc:creator>
      <pubDate>Mon, 21 Sep 2026 21:55:40 +0000</pubDate>
      <link>https://dev.to/rafael_dev/from-epic-to-merge-an-end-to-end-workflow-for-software-development-with-ai-agents-1ijn</link>
      <guid>https://dev.to/rafael_dev/from-epic-to-merge-an-end-to-end-workflow-for-software-development-with-ai-agents-1ijn</guid>
      <description>&lt;p&gt;Coding agents are becoming increasingly capable of implementing individual software tasks. Give an agent a repository, a clear issue, and enough context, and it can often inspect the codebase, modify files, write tests, and produce a working implementation.&lt;/p&gt;

&lt;p&gt;The harder problem starts one level above that.&lt;/p&gt;

&lt;p&gt;What happens when we need to implement an entire feature consisting of ten related tasks? Some can run in parallel, some depend on others, some require architectural decisions, and some touch areas where autonomous changes should not be allowed.&lt;/p&gt;

&lt;p&gt;At that point, the challenge is no longer simply:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can an AI agent write the code?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The more useful question becomes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do we transform a software initiative into units of work that agents can execute, validate, review, and integrate safely?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This article proposes an end-to-end workflow for implementing an Epic using AI agents while minimizing human intervention without removing the controls required by the risk of the changes.&lt;/p&gt;

&lt;p&gt;The core architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
                         ┌─────────────────────┐
                         │        Epic         │
                         │ intent + constraints│
                         └──────────┬──────────┘
                                    │
                                    ▼
                         ┌─────────────────────┐
                         │   Task dependency   │
                         │        graph        │
                         └──────────┬──────────┘
                                    │
                    ┌───────────────┴───────────────┐
                    │                               │
                    ▼                               ▼
            ┌──────────────┐                ┌──────────────┐
            │    Task A    │                │    Task B    │
            └──────┬───────┘                └──────┬───────┘
                   │                               │
                   ▼                               ▼
              ┌─────────┐                     ┌─────────┐
              │ Planner │                     │ Planner │
              └────┬────┘                     └────┬────┘
                   │                               │
                   ▼                               ▼
              ┌─────────┐                     ┌─────────┐
              │ Builder │                     │ Builder │
              └────┬────┘                     └────┬────┘
                   │                               │
                   ▼                               ▼
              ┌─────────┐                     ┌─────────┐
              │Reviewer │                     │Reviewer │
              └────┬────┘                     └────┬────┘
                   │                               │
                   └───────────────┬───────────────┘
                                   ▼
                         ┌─────────────────────┐
                         │ Epic integration PR │
                         │      + CI           │
                         └──────────┬──────────┘
                                    │
                              human approval
                                    │
                                    ▼
                                  main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The specific tools are interchangeable. The important part is the workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Epic as the source of intent
&lt;/h2&gt;

&lt;p&gt;An Epic is useful because it gives the agents a shared description of what the system is supposed to accomplish.&lt;/p&gt;

&lt;p&gt;It should contain at least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the objective;&lt;/li&gt;
&lt;li&gt;the problem or product context;&lt;/li&gt;
&lt;li&gt;scope and explicit non-goals;&lt;/li&gt;
&lt;li&gt;requirements;&lt;/li&gt;
&lt;li&gt;tasks or user stories;&lt;/li&gt;
&lt;li&gt;acceptance criteria;&lt;/li&gt;
&lt;li&gt;dependencies and risks;&lt;/li&gt;
&lt;li&gt;success metrics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would avoid treating the Epic as the absolute "source of truth."&lt;/p&gt;

&lt;p&gt;It is better understood as the &lt;strong&gt;central source of intent, requirements, and constraints&lt;/strong&gt; for the initiative.&lt;/p&gt;

&lt;p&gt;The repository still contains the technical reality of the system. Existing APIs, schemas, architectural decisions, infrastructure, tests, and implementation constraints may reveal information that the Epic does not contain.&lt;/p&gt;

&lt;p&gt;This distinction becomes important once agents start making decisions.&lt;/p&gt;

&lt;p&gt;Imagine that a task only says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add retry support to payment processing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent might reasonably ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which failures are retryable?&lt;/li&gt;
&lt;li&gt;How many retries are allowed?&lt;/li&gt;
&lt;li&gt;Should retries be synchronous or asynchronous?&lt;/li&gt;
&lt;li&gt;What happens to idempotency?&lt;/li&gt;
&lt;li&gt;Can the payment provider receive the same request twice?&lt;/li&gt;
&lt;li&gt;Is retrying outside the scope of a specific payment method?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The task itself may not answer those questions.&lt;/p&gt;

&lt;p&gt;The Epic can provide the product and architectural boundaries required to answer them without duplicating the entire context in every issue.&lt;/p&gt;

&lt;p&gt;A practical implementation is to represent the Epic as a parent GitHub Issue and its tasks as sub-issues. This keeps the planning artifacts close to the code and allows issues, pull requests, commits, diagrams, files, and technical decisions to reference each other.&lt;/p&gt;




&lt;h2&gt;
  
  
  Task granularity matters more than prompt count
&lt;/h2&gt;

&lt;p&gt;One of the easiest mistakes when building agentic development workflows is to hand a very large objective directly to a coding agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Implement the entire billing Epic.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A sufficiently capable model may still make progress, but the execution becomes difficult to reason about.&lt;/p&gt;

&lt;p&gt;The agent must simultaneously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;discover the architecture;&lt;/li&gt;
&lt;li&gt;interpret requirements;&lt;/li&gt;
&lt;li&gt;make design decisions;&lt;/li&gt;
&lt;li&gt;modify multiple domains;&lt;/li&gt;
&lt;li&gt;keep dependencies consistent;&lt;/li&gt;
&lt;li&gt;validate behavior;&lt;/li&gt;
&lt;li&gt;understand what is in and out of scope.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is not simply context-window size.&lt;/p&gt;

&lt;p&gt;The problem is the number of decisions that must remain coherent throughout the execution.&lt;/p&gt;

&lt;p&gt;A better workflow reduces the complexity of each execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  When is a task granular enough?
&lt;/h3&gt;

&lt;p&gt;A useful rule is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A task is sufficiently granular when it represents one coherent delivery, can be implemented and validated independently, and can produce a pull request that can be understood, tested, and reverted without relying on undeclared changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Task size should therefore not be measured primarily by lines of code or number of files.&lt;/p&gt;

&lt;p&gt;The more important property is &lt;strong&gt;cohesion&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, adding a field to an API may require modifying:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;database schema
    ↓
domain entity
    ↓
service
    ↓
API endpoint
    ↓
tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That can still be one coherent task.&lt;/p&gt;

&lt;p&gt;Several layers are affected, but they all implement the same vertical capability.&lt;/p&gt;

&lt;p&gt;By contrast, a change touching only three files may still be too broad if it combines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;authentication
+ billing rules
+ event processing
+ infrastructure changes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useful questions are therefore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the task have one observable result?&lt;/li&gt;
&lt;li&gt;Does it represent one coherent capability?&lt;/li&gt;
&lt;li&gt;Can it be validated independently?&lt;/li&gt;
&lt;li&gt;Are major architectural decisions already resolved?&lt;/li&gt;
&lt;li&gt;Can the diff be reviewed as one logical unit?&lt;/li&gt;
&lt;li&gt;Can the change be reverted independently?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last question is particularly useful:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can a reviewer understand and validate this diff as a single logical change?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the answer is no, the task probably needs further decomposition.&lt;/p&gt;




&lt;h2&gt;
  
  
  Separate investigation from implementation
&lt;/h2&gt;

&lt;p&gt;Tasks become especially dangerous when uncertainty and implementation are mixed together.&lt;/p&gt;

&lt;p&gt;Consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Choose an asynchronous processing architecture and implement it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contains at least two fundamentally different types of work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;deciding what architecture should exist;&lt;/li&gt;
&lt;li&gt;implementing that architecture.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A better decomposition could be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task 1 — Investigate asynchronous processing alternatives

Task 2 — Record the architectural decision

Task 3 — Implement the event producer

Task 4 — Implement the event consumer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first tasks reduce uncertainty.&lt;/p&gt;

&lt;p&gt;The later tasks execute against a decision that already exists.&lt;/p&gt;

&lt;p&gt;This distinction also makes agent behavior easier to control. We can allow an agent to investigate broadly without implicitly granting it permission to modify the architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  A readiness check before implementation
&lt;/h2&gt;

&lt;p&gt;Before a task reaches a Builder, the workflow should verify that it is actually ready to be implemented.&lt;/p&gt;

&lt;p&gt;A practical checklist is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] There is one clearly defined outcome.&lt;/li&gt;
&lt;li&gt;[ ] Scope and non-goals are explicit.&lt;/li&gt;
&lt;li&gt;[ ] Acceptance criteria are verifiable.&lt;/li&gt;
&lt;li&gt;[ ] Dependencies are declared.&lt;/li&gt;
&lt;li&gt;[ ] No major architectural decision remains unresolved.&lt;/li&gt;
&lt;li&gt;[ ] The change represents a coherent capability.&lt;/li&gt;
&lt;li&gt;[ ] There is an objective validation strategy.&lt;/li&gt;
&lt;li&gt;[ ] The change can produce an independent pull request.&lt;/li&gt;
&lt;li&gt;[ ] The change can be reverted without removing unrelated work.&lt;/li&gt;
&lt;li&gt;[ ] The expected diff is reasonably bounded or its size is justified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These do not need to become rigid numerical rules.&lt;/p&gt;

&lt;p&gt;A 2,000-line generated schema migration may be simpler than a 100-line authentication change.&lt;/p&gt;

&lt;p&gt;Cohesion, independence, and verifiability matter more than raw size.&lt;/p&gt;




&lt;h2&gt;
  
  
  One task, one isolated execution environment
&lt;/h2&gt;

&lt;p&gt;Once tasks can run concurrently, filesystem isolation becomes necessary.&lt;/p&gt;

&lt;p&gt;A simple strategy is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Epic
│
├── integration/epic-payments
│
├── task/payment-retry
│   └── worktree A
│
├── task/payment-webhook
│   └── worktree B
│
└── task/payment-events
    └── worktree C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each Builder receives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;its own Git branch;&lt;/li&gt;
&lt;li&gt;its own Git worktree or container;&lt;/li&gt;
&lt;li&gt;the context package for the current task;&lt;/li&gt;
&lt;li&gt;the relevant validation commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This prevents two agents from directly modifying the same working directory.&lt;/p&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt;, however, eliminate integration conflicts.&lt;/p&gt;

&lt;p&gt;Two isolated agents can still independently modify the same API, data model, or subsystem. Their worktrees are isolated operationally, but their changes may conflict semantically when integrated.&lt;/p&gt;

&lt;p&gt;The orchestrator must therefore understand task dependencies and integration order.&lt;/p&gt;




&lt;h2&gt;
  
  
  Model task dependencies explicitly
&lt;/h2&gt;

&lt;p&gt;An Epic should not be treated as a flat task list.&lt;/p&gt;

&lt;p&gt;It is better represented as a dependency graph.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 ┌───────────────┐
                 │ Add DB schema │
                 └───────┬───────┘
                         │
               ┌─────────┴─────────┐
               ▼                   ▼
      ┌────────────────┐   ┌────────────────┐
      │ Write producer │   │ Create API     │
      └───────┬────────┘   └───────┬────────┘
              │                    │
              ▼                    │
      ┌────────────────┐           │
      │ Write consumer │           │
      └───────┬────────┘           │
              └──────────┬─────────┘
                         ▼
                ┌────────────────┐
                │ Integration    │
                │ validation     │
                └────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A task can then have explicit metadata such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;payment-consumer&lt;/span&gt;
&lt;span class="na"&gt;blocked_by&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;payment-schema&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;payment-producer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The orchestrator can execute independent nodes concurrently while waiting for their dependencies.&lt;/p&gt;

&lt;p&gt;This is significantly safer than telling several agents to work through the Epic and hoping they discover the correct order themselves.&lt;/p&gt;




&lt;h2&gt;
  
  
  Planner, Builder, and Reviewer
&lt;/h2&gt;

&lt;p&gt;The workflow uses three main roles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Planner
&lt;/h3&gt;

&lt;p&gt;The Planner investigates before implementation.&lt;/p&gt;

&lt;p&gt;Its responsibilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;inspecting the relevant codebase;&lt;/li&gt;
&lt;li&gt;identifying affected components;&lt;/li&gt;
&lt;li&gt;checking dependencies;&lt;/li&gt;
&lt;li&gt;identifying risks;&lt;/li&gt;
&lt;li&gt;proposing an implementation approach;&lt;/li&gt;
&lt;li&gt;defining validation steps;&lt;/li&gt;
&lt;li&gt;detecting whether the task should be split.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Planner should not modify production files during this phase.&lt;/p&gt;

&lt;p&gt;Its output should be an execution plan, not an implementation.&lt;/p&gt;

&lt;p&gt;A typical result might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Affected modules:
- payments/service.ts
- payments/repository.ts
- payments/service.test.ts

Implementation:
1. Add retry classification for transient provider errors.
2. Add bounded exponential retry behavior.
3. Preserve idempotency key across attempts.
4. Add tests for retryable and non-retryable failures.

Validation:
- unit test suite
- payment integration tests
- lint
- typecheck

Risk:
- ensure declined payments are never retried
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That output becomes part of the Builder's context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Builder
&lt;/h3&gt;

&lt;p&gt;The Builder executes the approved task.&lt;/p&gt;

&lt;p&gt;Its responsibilities are intentionally narrower:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;implement the planned change;&lt;/li&gt;
&lt;li&gt;update or create tests;&lt;/li&gt;
&lt;li&gt;run the required validations;&lt;/li&gt;
&lt;li&gt;commit the changes;&lt;/li&gt;
&lt;li&gt;open or update the pull request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Builder should not silently redefine acceptance criteria or expand scope because it discovered something interesting during implementation.&lt;/p&gt;

&lt;p&gt;If implementation reveals a significant architectural issue, the correct action is usually to escalate the finding back to the orchestrator.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reviewer
&lt;/h3&gt;

&lt;p&gt;The Reviewer evaluates the result independently.&lt;/p&gt;

&lt;p&gt;It should inspect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the actual diff;&lt;/li&gt;
&lt;li&gt;the acceptance criteria;&lt;/li&gt;
&lt;li&gt;tests;&lt;/li&gt;
&lt;li&gt;validation output;&lt;/li&gt;
&lt;li&gt;architectural constraints;&lt;/li&gt;
&lt;li&gt;possible regressions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The review should be based on the expected behavior, not merely on the Builder's explanation of what it implemented.&lt;/p&gt;

&lt;p&gt;That distinction matters because the Builder and Reviewer may otherwise share the same incorrect assumption.&lt;/p&gt;

&lt;p&gt;The Reviewer should return concrete findings such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BLOCKING

Retry logic also retries PaymentDeclinedError.

Acceptance criterion:
Only transient provider failures may be retried.

payments/service.ts:87
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The implementation doesn't look quite right.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Objective findings make automated correction loops possible.&lt;/p&gt;




&lt;h2&gt;
  
  
  Internal and external orchestration
&lt;/h2&gt;

&lt;p&gt;There are two broad ways to coordinate the agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Internal orchestration
&lt;/h3&gt;

&lt;p&gt;A primary agent delegates work through a native multi-agent runtime.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main agent
    │
    ├── planner agent
    ├── builder agent
    └── reviewer agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The runtime manages the child executions and returns their results to the parent.&lt;/p&gt;

&lt;p&gt;This is useful when delegation is closely tied to the reasoning process of the primary agent.&lt;/p&gt;

&lt;h3&gt;
  
  
  External orchestration
&lt;/h3&gt;

&lt;p&gt;A separate process controls independent agent executions.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;orchestrator
    │
    ├── agent process -- task A
    ├── agent process -- task B
    └── agent process -- review A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The executions communicate through structured output, files, Git, APIs, or another durable mechanism.&lt;/p&gt;

&lt;p&gt;External orchestration is particularly useful when we need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deterministic workflows;&lt;/li&gt;
&lt;li&gt;separate worktrees or containers;&lt;/li&gt;
&lt;li&gt;explicit concurrency;&lt;/li&gt;
&lt;li&gt;retries;&lt;/li&gt;
&lt;li&gt;timeouts;&lt;/li&gt;
&lt;li&gt;task queues;&lt;/li&gt;
&lt;li&gt;persistent execution state;&lt;/li&gt;
&lt;li&gt;provider-independent agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture described in this article favors external orchestration for the main workflow while still allowing individual agents to use internal subagents when useful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Give each task only the context it needs
&lt;/h2&gt;

&lt;p&gt;The Epic contains global information.&lt;/p&gt;

&lt;p&gt;That does not mean every agent should receive the entire Epic, every previous conversation, and every implementation log.&lt;/p&gt;

&lt;p&gt;Instead, the orchestrator should build a &lt;strong&gt;task context package&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;epic&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;objective&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Add asynchronous invoice processing&lt;/span&gt;
  &lt;span class="na"&gt;constraints&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;existing synchronous API must remain compatible&lt;/span&gt;

&lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;invoice-event-producer&lt;/span&gt;
  &lt;span class="na"&gt;objective&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Publish an event after invoice creation&lt;/span&gt;

&lt;span class="na"&gt;acceptance_criteria&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;exactly one event is emitted after a successful transaction&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;failed transactions must not emit events&lt;/span&gt;

&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;completed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;invoice-event-schema&lt;/span&gt;

&lt;span class="na"&gt;architecture&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ADR-014-event-bus.md&lt;/span&gt;

&lt;span class="na"&gt;relevant_files&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;src/invoices/service.ts&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;src/events/publisher.ts&lt;/span&gt;

&lt;span class="na"&gt;validation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;npm test -- invoices&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;npm run typecheck&lt;/span&gt;

&lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;AGENTS.md&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pipeline becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Epic
  ↓
context selection
  ↓
task-specific context
  ↓
isolated execution
  ↓
validated result
  ↓
Epic integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Long context windows are useful, but they should be treated as available capacity rather than a target to fill.&lt;/p&gt;

&lt;p&gt;More context is not automatically better context.&lt;/p&gt;

&lt;p&gt;Excessive context can introduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;obsolete information;&lt;/li&gt;
&lt;li&gt;conflicting instructions;&lt;/li&gt;
&lt;li&gt;irrelevant implementation details;&lt;/li&gt;
&lt;li&gt;old architectural assumptions;&lt;/li&gt;
&lt;li&gt;competing objectives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Context engineering is therefore part of orchestration.&lt;/p&gt;

&lt;p&gt;The question is not:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How much information can the model receive?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is the minimum sufficient context required to make this decision correctly?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Define autonomy as a risk policy
&lt;/h2&gt;

&lt;p&gt;Reducing human intervention does not mean giving agents unrestricted permissions.&lt;/p&gt;

&lt;p&gt;The workflow should define which actions are safe to perform automatically and which require approval.&lt;/p&gt;

&lt;p&gt;A possible policy is:&lt;/p&gt;

&lt;h3&gt;
  
  
  Autonomous
&lt;/h3&gt;

&lt;p&gt;Agents may perform these operations inside their isolated task environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;edit application code;&lt;/li&gt;
&lt;li&gt;add or update tests;&lt;/li&gt;
&lt;li&gt;run tests, linters, and static analysis;&lt;/li&gt;
&lt;li&gt;create commits;&lt;/li&gt;
&lt;li&gt;open pull requests;&lt;/li&gt;
&lt;li&gt;apply Reviewer-requested fixes that remain within the approved scope.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Autonomous with additional validation
&lt;/h3&gt;

&lt;p&gt;Changes in this category may proceed automatically only when specific validation rules succeed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dependency updates;&lt;/li&gt;
&lt;li&gt;non-destructive database migrations;&lt;/li&gt;
&lt;li&gt;API contract changes;&lt;/li&gt;
&lt;li&gt;shared configuration changes;&lt;/li&gt;
&lt;li&gt;changes affecting multiple domains or services.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Human approval required
&lt;/h3&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;production deployments;&lt;/li&gt;
&lt;li&gt;destructive migrations;&lt;/li&gt;
&lt;li&gt;secret access or modification;&lt;/li&gt;
&lt;li&gt;infrastructure mutations;&lt;/li&gt;
&lt;li&gt;authentication or authorization changes;&lt;/li&gt;
&lt;li&gt;billing operations;&lt;/li&gt;
&lt;li&gt;irreversible data transformations;&lt;/li&gt;
&lt;li&gt;final integration into the main branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These categories should not be universal constants.&lt;/p&gt;

&lt;p&gt;A migration adding a nullable column may be routine in one system and dangerous in another with billions of rows.&lt;/p&gt;

&lt;p&gt;The correct abstraction is therefore not a hardcoded list of actions.&lt;/p&gt;

&lt;p&gt;It is a &lt;strong&gt;risk policy&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The complete implementation cycle
&lt;/h2&gt;

&lt;p&gt;We can now put the pieces together.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Create the Epic
&lt;/h3&gt;

&lt;p&gt;The human or product process defines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;objective
problem
scope
non-goals
requirements
acceptance criteria
risks
success metrics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this stage, the emphasis is on &lt;strong&gt;what needs to be achieved&lt;/strong&gt;, not exactly how every part will be implemented.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Decompose the Epic
&lt;/h3&gt;

&lt;p&gt;A planning process converts the Epic into tasks.&lt;/p&gt;

&lt;p&gt;Each task is checked for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cohesion
independence
testability
reversibility
architectural uncertainty
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If major design uncertainty exists, investigation tasks are created before implementation tasks.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Build the dependency graph
&lt;/h3&gt;

&lt;p&gt;Dependencies between tasks are declared explicitly.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ──► C ──► E
│
└──► D ──► E

B ───────► E
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tasks &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; can begin immediately.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;C&lt;/code&gt; and &lt;code&gt;D&lt;/code&gt; wait for &lt;code&gt;A&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;E&lt;/code&gt; waits for all upstream work.&lt;/p&gt;

&lt;p&gt;The orchestrator now has enough information to determine safe parallelism.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Create the Epic integration branch
&lt;/h3&gt;

&lt;p&gt;A branch is created from the current target branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main
  │
  └── epic/invoice-processing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Individual task branches are based on an appropriate integration state.&lt;/p&gt;

&lt;p&gt;Long-running Epics should periodically synchronize with the target branch to avoid allowing the integration branch to drift too far from &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Build a context package for the next task
&lt;/h3&gt;

&lt;p&gt;The orchestrator selects only the information required for the task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Epic summary
+ task description
+ acceptance criteria
+ architecture decisions
+ completed dependencies
+ relevant files
+ repository instructions
+ validation commands
+ risk constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This becomes the Planner's initial input.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Run the Planner
&lt;/h3&gt;

&lt;p&gt;The Planner inspects the repository and produces a plan.&lt;/p&gt;

&lt;p&gt;Possible outcomes are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;READY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEEDS_SPLIT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BLOCKED_BY_ARCHITECTURE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BLOCKED_BY_DEPENDENCY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only &lt;code&gt;READY&lt;/code&gt; tasks proceed automatically.&lt;/p&gt;

&lt;p&gt;This step acts as an important boundary between project planning and code generation.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Create an isolated Builder environment
&lt;/h3&gt;

&lt;p&gt;The orchestrator creates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task branch
+
Git worktree or container
+
task-specific context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;worktrees/
├── payment-retry/
├── payment-webhook/
└── invoice-events/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Independent Builders can now execute concurrently without sharing the same filesystem.&lt;/p&gt;




&lt;h3&gt;
  
  
  8. Execute the Builder
&lt;/h3&gt;

&lt;p&gt;The Builder receives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task context
+
Planner result
+
repository instructions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It implements the change and runs the required validations.&lt;/p&gt;

&lt;p&gt;The result should include structured information such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;completed&lt;/span&gt;

&lt;span class="na"&gt;commit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;a814ed3&lt;/span&gt;

&lt;span class="na"&gt;validation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;unit_tests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;passed&lt;/span&gt;
  &lt;span class="na"&gt;integration_tests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;passed&lt;/span&gt;
  &lt;span class="na"&gt;lint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;passed&lt;/span&gt;
  &lt;span class="na"&gt;typecheck&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;passed&lt;/span&gt;

&lt;span class="na"&gt;files_changed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;src/payments/service.ts&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;src/payments/service.test.ts&lt;/span&gt;

&lt;span class="na"&gt;notes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;preserved existing idempotency behavior&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact schema is not important.&lt;/p&gt;

&lt;p&gt;Structured output is.&lt;/p&gt;

&lt;p&gt;An orchestrator should not need to parse an essay to determine whether tests passed.&lt;/p&gt;




&lt;h3&gt;
  
  
  9. Open the task pull request
&lt;/h3&gt;

&lt;p&gt;Each task produces a pull request targeting the Epic integration branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task/payment-retry
        │
        ▼
epic/payment-improvements
        │
        ▼
main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The task PR should remain independently reviewable.&lt;/p&gt;

&lt;p&gt;CI runs again outside the Builder's local environment.&lt;/p&gt;

&lt;p&gt;This gives us two independent validation layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Builder validation
        +
CI validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  10. Run the Reviewer
&lt;/h3&gt;

&lt;p&gt;The Reviewer receives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;task requirements
+
acceptance criteria
+
diff
+
test results
+
relevant architecture constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns structured findings.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;changes_requested&lt;/span&gt;

&lt;span class="na"&gt;findings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;severity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;blocking&lt;/span&gt;
    &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;src/payments/service.ts&lt;/span&gt;
    &lt;span class="na"&gt;line&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;87&lt;/span&gt;
    &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;declined payments are being retried&lt;/span&gt;
    &lt;span class="na"&gt;criterion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;only transient failures may be retried&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;approved&lt;/span&gt;
&lt;span class="na"&gt;findings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  11. Run the correction loop
&lt;/h3&gt;

&lt;p&gt;If the Reviewer finds a blocking problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reviewer
   ↓
Builder
   ↓
validation
   ↓
Reviewer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The loop continues within predefined limits.&lt;/p&gt;

&lt;p&gt;An important operational detail is that retries should not be infinite.&lt;/p&gt;

&lt;p&gt;After a certain number of unsuccessful correction cycles, the task should be escalated.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;attempt 1 → failed review
attempt 2 → failed review
attempt 3 → failed review
               ↓
        human escalation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeated failure is itself useful information. It may indicate that the task is poorly specified, incorrectly decomposed, or hiding an unresolved architectural problem.&lt;/p&gt;




&lt;h3&gt;
  
  
  12. Merge into the Epic integration branch
&lt;/h3&gt;

&lt;p&gt;Once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Builder validation = passed
CI = passed
Reviewer = approved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the task can be merged into the Epic branch according to the project's autonomy policy.&lt;/p&gt;

&lt;p&gt;This may unblock downstream tasks in the dependency graph.&lt;/p&gt;

&lt;p&gt;The orchestrator then schedules the newly available work.&lt;/p&gt;




&lt;h3&gt;
  
  
  13. Run Epic-level validation
&lt;/h3&gt;

&lt;p&gt;Passing every task independently does not prove that the Epic works as a whole.&lt;/p&gt;

&lt;p&gt;Once all required tasks are integrated, the workflow runs broader validation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;full test suite
integration tests
end-to-end tests
contract tests
migration checks
security checks
performance checks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact set depends on the project.&lt;/p&gt;

&lt;p&gt;This stage catches problems that task-level validation cannot detect.&lt;/p&gt;

&lt;p&gt;For example, two individually correct tasks may still implement incompatible assumptions.&lt;/p&gt;




&lt;h3&gt;
  
  
  14. Validate the Epic acceptance criteria
&lt;/h3&gt;

&lt;p&gt;The final Reviewer evaluates the integrated result against the original Epic rather than individual tasks.&lt;/p&gt;

&lt;p&gt;The question changes from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Did we implement Task 7 correctly?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does the system now satisfy the outcome defined by the Epic?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This distinction is important.&lt;/p&gt;

&lt;p&gt;A workflow can successfully complete every task and still fail to achieve the intended product behavior if the decomposition itself was incomplete.&lt;/p&gt;




&lt;h3&gt;
  
  
  15. Human approval and final merge
&lt;/h3&gt;

&lt;p&gt;If the final integration satisfies the Epic criteria, the workflow produces an Epic pull request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;epic/payment-improvements
        │
        ▼
       main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an appropriate place for a human approval gate.&lt;/p&gt;

&lt;p&gt;The human is no longer expected to manually implement or review every small code change.&lt;/p&gt;

&lt;p&gt;Instead, human attention is concentrated where it has the highest value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;requirements
architecture
risk
exceptions
final integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a more realistic interpretation of "human-in-the-loop" development than requiring a person to supervise every tool call made by an agent.&lt;/p&gt;




&lt;h2&gt;
  
  
  Choosing models by role
&lt;/h2&gt;

&lt;p&gt;There is no requirement that every stage use the same model.&lt;/p&gt;

&lt;p&gt;Different roles have different computational requirements.&lt;/p&gt;

&lt;p&gt;The Planner may benefit from stronger reasoning because it needs to understand architecture and dependencies.&lt;/p&gt;

&lt;p&gt;The Reviewer may need similar capability because it must identify subtle inconsistencies.&lt;/p&gt;

&lt;p&gt;A Builder executing a very constrained change may not require the same model.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Orchestrator ── high reasoning capability

Planner      ── high reasoning capability

Reviewer     ── high reasoning capability

Builder      ── selected according to task complexity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This also creates room for provider-independent workflows.&lt;/p&gt;

&lt;p&gt;An orchestration layer could use OpenCode, Codex, Claude, or other coding-agent runtimes without fundamentally changing the architecture described here.&lt;/p&gt;

&lt;p&gt;The model becomes an execution component rather than the workflow itself.&lt;/p&gt;




&lt;h2&gt;
  
  
  Measure the workflow
&lt;/h2&gt;

&lt;p&gt;Once the process is structured, it can be measured.&lt;/p&gt;

&lt;p&gt;Useful metrics include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tokens consumed per task;&lt;/li&gt;
&lt;li&gt;tokens consumed per agent role;&lt;/li&gt;
&lt;li&gt;execution time per task;&lt;/li&gt;
&lt;li&gt;total Epic execution time;&lt;/li&gt;
&lt;li&gt;number of retries;&lt;/li&gt;
&lt;li&gt;number of failed Builder attempts;&lt;/li&gt;
&lt;li&gt;Reviewer findings;&lt;/li&gt;
&lt;li&gt;CI failures;&lt;/li&gt;
&lt;li&gt;tasks completed without human intervention;&lt;/li&gt;
&lt;li&gt;human escalations;&lt;/li&gt;
&lt;li&gt;cost per pull request;&lt;/li&gt;
&lt;li&gt;cost per Epic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These metrics should not be used only to minimize token usage.&lt;/p&gt;

&lt;p&gt;They can help answer more useful questions.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Does adding a Planner reduce failed implementations?&lt;/p&gt;

&lt;p&gt;Does a stronger Reviewer reduce integration defects?&lt;/p&gt;

&lt;p&gt;Are certain task types consistently escalated?&lt;/p&gt;

&lt;p&gt;At what task size does autonomous completion become unreliable?&lt;/p&gt;

&lt;p&gt;Is parallel execution actually reducing lead time?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At that point, decisions about agents and models can be based on workflow performance rather than intuition.&lt;/p&gt;




&lt;h2&gt;
  
  
  The workflow as a state machine
&lt;/h2&gt;

&lt;p&gt;Once everything above is explicit, the orchestration problem becomes surprisingly mechanical.&lt;/p&gt;

&lt;p&gt;A task can move through states such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PENDING
   ↓
READY
   ↓
PLANNING
   ↓
BUILDING
   ↓
VALIDATING
   ↓
REVIEWING
   │
   ├── changes requested ──► BUILDING
   │
   ├── blocked ────────────► ESCALATED
   │
   └── approved
           ↓
        MERGED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Epic has its own lifecycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PLANNING
   ↓
EXECUTING
   ↓
INTEGRATING
   ↓
VALIDATING
   ↓
AWAITING_APPROVAL
   ↓
COMPLETED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the point where AI-assisted software development starts looking less like a chat interface and more like a distributed software-delivery system.&lt;/p&gt;

&lt;p&gt;And that is probably the more useful abstraction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;The most interesting problem in AI-assisted software development is increasingly not code generation itself.&lt;/p&gt;

&lt;p&gt;It is orchestration.&lt;/p&gt;

&lt;p&gt;An autonomous development workflow needs to answer questions such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What should the agent work on?&lt;/li&gt;
&lt;li&gt;What context should it receive?&lt;/li&gt;
&lt;li&gt;Which work can happen in parallel?&lt;/li&gt;
&lt;li&gt;Which decisions have already been made?&lt;/li&gt;
&lt;li&gt;How should the implementation be validated?&lt;/li&gt;
&lt;li&gt;Who reviews the result?&lt;/li&gt;
&lt;li&gt;What happens when the Reviewer disagrees?&lt;/li&gt;
&lt;li&gt;Which actions can happen automatically?&lt;/li&gt;
&lt;li&gt;Where is human approval required?&lt;/li&gt;
&lt;li&gt;How do independent changes become one coherent feature?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Better models will make individual executions more capable.&lt;/p&gt;

&lt;p&gt;They will not eliminate the need to answer those questions.&lt;/p&gt;

&lt;p&gt;A robust agentic development workflow therefore should not be designed around the assumption that a sufficiently powerful model can receive an entire project and simply "figure it out."&lt;/p&gt;

&lt;p&gt;Instead, the system should reduce ambiguity before execution.&lt;/p&gt;

&lt;p&gt;That means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;clear intent
+ coherent tasks
+ explicit dependencies
+ minimal relevant context
+ isolated execution
+ objective validation
+ independent review
+ risk-based autonomy
+ controlled integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The objective is not to remove humans from software engineering.&lt;/p&gt;

&lt;p&gt;It is to move human attention away from supervising routine implementation and toward the decisions where judgment, product context, architecture, and risk actually matter.&lt;/p&gt;

&lt;p&gt;Once those boundaries are explicit, AI agents stop being isolated coding assistants and become components of a software delivery pipeline.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
