The Three Phases
The agent workflow follows a sequential, spec-driven development process:Requirements (Phase 1)
Gathers, clarifies, and documents product requirements before any technical design begins.Agent: π Requirements
Output:
Output:
specs/features/{NNN}-{feature-name}/requirements.mdPlan (Phase 2)
Transforms approved requirements into a comprehensive technical design blueprint.Agent: π Plan
Output:
Output:
specs/features/{NNN}-{feature-name}/plan.mdWhy Three Phases?
This separation ensures each aspect of development gets proper attention:Clarity First
Requirements phase eliminates ambiguity before technical decisions are made
Design Quality
Technical design phase explores architecture without rushing to code
Execution Plan
Task phase creates clear, dependency-aware implementation steps
Phase Boundaries
Each phase has strict boundaries to prevent overlap and maintain focus:Requirements Phase Boundaries
Requirements Phase Boundaries
Allowed:
- Product requirements and user stories
- Acceptance criteria (EARS format)
- Constraints and dependencies
- Scope boundaries (in-scope vs out-of-scope)
- System architecture decisions
- Technical implementation details
- Task breakdowns or coding checklists
Plan Phase Boundaries
Plan Phase Boundaries
Allowed:
- System architecture and component design
- Technical decisions and tradeoffs
- Data models and interface contracts
- Implementation sequencing strategy
- Requirement redefinition (must loop back to Phase 1)
- Executable coding task checklists
Task Phase Boundaries
Task Phase Boundaries
Allowed:
- Concrete coding tasks with checkboxes
- Task dependencies and parallelization
- File/component modification lists
- Verification criteria per task
- New requirement scope (must loop back to Phase 1)
- New architecture decisions (must loop back to Phase 2)
- Product code implementation
Traceability System
Each phase produces identifiers that trace through the workflow:- Every technical decision maps to a requirement
- Every task implements a design component
- Nothing is built without clear justification
Iterative, Not Waterfall: While phases are sequential, each phase is internally iterative. Agents cycle through Discovery β Alignment β Drafting β Refinement until the user approves.
Golden Rules
All three agents follow these principles fromAGENTS.md:
- Make small, correct, reviewable changes β Prefer the simplest solution that fits existing patterns
- Keep diffs minimal β Donβt refactor unrelated code
- Prefer existing repo patterns over general best practices
- Donβt add dependencies unless clearly necessary (explain why)
- Use skills β Leverage project-specific skills in
.github/skillsfor best practices
When to Use This Workflow
Use the 3-phase workflow for:- New features requiring cross-cutting changes
- Complex refactors with unclear scope
- Ambiguous requests needing clarification
- Collaborative projects where documentation matters
Next Steps
Learn the Workflow
See how to use the 3-phase workflow in practice
Requirements Phase
Deep dive into gathering and documenting requirements