| applyTo | **/* |
|---|---|
| description | 3-stage code-change workflow: Analysis → Roadmap → Execution |
All code changes follow a 3-stage workflow: Analysis → Roadmap → Execution. The stages are sequential — each has clear deliverables and exit criteria before the next begins.
Understand the problem, design the solution, define the tests.
Architecture Report (v0) → Agent Review → Architecture Report (v1) → ...
Test Definition (v0) → Agent Review → Test Definition (v1) → ...
Agents: Any combination of human stakeholders, LLM agents, or automated review tools. "Agent" is used generically throughout.
- Codebase assessment — code review, dependency analysis, existing patterns
- Requirements analysis — functional/non-functional requirements, edge cases, constraints
- Architecture design — proposed changes, contracts/invariants, alternatives, risks
- Test strategy — risk-driven test matrix, fixtures strategy, regression set
- Iterative refinement — stakeholder feedback, architecture adjustments
- File references: confirm all referenced paths exist and are spelled correctly
- Code snippets: verify against actual implementation (copy-paste, don't paraphrase)
- Dependencies: check actual versions in package files
- Context timestamp: document when analysis was performed (commit SHA or date)
Versioned reports in __reports__/<topic>/ following reporting guidelines:
- Architecture reports: reporting-architecture.instructions.md
- Test definition reports: reporting-tests.instructions.md
Reviewing agent approves the architecture and test strategy.
Translate the approved design into an executable directory tree.
- Create
__roadmap__/<campaign>/directory - Write root
README.mdwith context, reference documents, goal, pre-conditions, success gates - Identify the dependency graph of the work
- Map the dependency graph to a directory tree:
- Parallel work → sibling leaves
- Sequential dependencies → nesting depth (dependent work goes deeper)
- Diamond dependencies → place dependent node deeper than all parents
- For each leaf task: write Goal, Pre-conditions, Success Gates, Steps with Implementation Logic and References
- Verify the 1:1 mapping invariant (README.md nodes = filesystem entries)
Complete __roadmap__/<campaign>/ directory tree per roadmap generation guidelines.
Reviewing agent approves. All leaf tasks have Implementation Logic and References. 1:1 mapping holds. Tree structure correctly encodes all dependencies.
Navigate the roadmap tree and implement.
For the detailed operational manual (failure handling, subagent dispatch, status updates), see roadmap-execution.instructions.md.
- Enter the directory, read
README.md - Execute all leaf files at this level (they are parallel — can be assigned to parallel agents)
- When all leaves are done, enter each subdirectory (parallel with each other)
- Within each subdirectory, recurse from step 1
- Within a leaf task, for each step:
- Read Implementation Logic and References
- Produce the deliverables
- Run consistency checks
- Commit with the prescribed message (1 step = 1 commit)
- When a leaf task's success gates are met: merge task branch into milestone
- When all nodes in a directory are done: mark the directory node as
donein the parentREADME.md - If amendment needed: follow the amendment workflow in roadmap-generation.instructions.md
- Repeat until all nodes at all levels are
done
milestone/<campaign>branch fromdev— single integration branchtask/<name>branches from milestone — one per leaf task, flat hierarchy- Breadth-first merge order: all depth-d tasks merge before depth d+1 begins
- See git-workflow-milestone.instructions.md for details
Code, tests, documentation — all as prescribed by task files. Test logs for agent review.
All nodes done at every level. All tests pass. Final agent review.
| Previous Model | Current Model | Why |
|---|---|---|
| Phase 1: Architectural Analysis | Stage 1: Analysis | Same purpose, now explicitly iterative with agent review |
| Phase 2: Test Suite Development | Stage 1: Analysis (test definition reports) | Tests defined in analysis, implemented during execution |
| Phase 3: Core Implementation | Stage 3: Execution | Driven by breadth-first tree traversal, not a phase |
| Phase 4: Debugging to 100% | Stage 3: Execution (consistency checks per step) | Integrated into each step |
| Phase 5: Git Commits | Stage 3: Execution (commit per step) | Prescribed in task files |
| Phase 6: Documentation | Stage 3: Execution (doc tasks in tree) | Documentation tasks are leaf nodes |
| Phase 7: Doc Commits | Stage 3: Execution | No separate phase needed |
Everything after analysis is encoded in the roadmap directory tree. Tests, code, documentation, and commits are all steps in leaf task files, ordered by tree depth. The tree IS the execution plan.