Skip to main content

Task Planning Agent

Position in pipeline: Agent 5
Phase: 4 — Agentic Implementation (planning step)
Min confidence: 0.80
Version: 1.0.0


Role

The Task Planning Agent decomposes the approved architecture (design.md) into a concrete execution wave plan (tasks.md). Every task is atomic, spec-traceable, and assigned to an execution wave that respects architectural layer dependencies.

The Task Planning Agent is the bridge between design and implementation — it makes explicit what the Implementation Agent will execute and in what order.


Primary output: tasks.md

# Execution Wave Plan: [Feature Name]

Task Planning Agent confidence: 0.0–1.0
Slice: [SLICE-NNN]
Design reference: design.md v1.2
Total tasks: N

## Wave 1 — Foundation (parallel)

### TASK-001: [Task Name]
- **Requirement:** REQ-001
- **Design reference:** design.md § Component Boundaries
- **Type:** MIGRATION | MODEL | UTIL | TEST
- **File targets:** [src/domain/[Entity].ts]
- **Dependencies:** None
- **Estimated complexity:** LOW | MEDIUM | HIGH

### TASK-002: [Task Name]
...

## Wave 2 — Persistence & Logic (parallel, after Wave 1)
...

## Wave 3 — Integration & API (parallel, after Wave 2)
...

## Wave 4 — Polish (parallel, after Wave 3)
...

## Uncertainty Factors (if confidence < 0.95)
- [What the agent is uncertain about]

The four execution waves

WaveContentsArchitectural layer
Wave 1 — FoundationMigrations, Domain Models, Value Objects, Shared UtilitiesInfrastructure + Domain
Wave 2 — Persistence & LogicRepositories, Domain Services, Business RulesApplication + Domain
Wave 3 — Integration & APIApplication Services, Controllers, API Handlers, Event PublishersInterfaces + Application
Wave 4 — PolishObservability instrumentation, Documentation, Feature FlagsCross-cutting

All tasks within a single Wave can be executed in parallel by the Implementation Agent's context-fresh sub-agents. Waves must complete sequentially.


Task atomicity rules

Each task must:

  1. Reference exactly one spec requirement (REQ-NNN)
  2. Target at most 3 files
  3. Be completable by a single context-fresh sub-agent in one execution
  4. Have no circular dependencies with other tasks in the same wave

Tasks that violate these rules are split into smaller tasks or flagged for TL review.


Traceability

The task plan makes the traceability chain explicit:

intent.md → requirements.md (REQ-001) → design.md (Component A) → tasks.md (TASK-001)

This chain is what allows the QA Agent to map tests back to requirements and the Knowledge Agent to link production failures to their origin.


Governance

RuleBehavior
Confidence < 0.80Draft plan; TL review required before Implementation Agent executes
Undocumented behaviorTasks that cannot be traced to a requirement are flagged UNDOCUMENTED_BEHAVIOR
Wave dependency violationTasks that skip wave sequence are rejected by the Implementation Agent

Next agent

Implementation Agent — receives tasks.md and executes each wave using context-fresh sub-agents