Annotated Plan Workflow
Drive Agent work through a strict phase pipeline: Research → Plan → Annotate → Todo → Implement → Feedback.
Core Rule
Never write or modify implementation code until a written plan has been reviewed and explicitly approved.
Phase 1: Research
- Read relevant folders and flows deeply.
- Produce a persistent
research.mdwith findings, assumptions, risks, and open questions. - Review
research.mdbefore moving forward. - Correct misunderstandings in the document, then refresh it.
Use prompts like:
- Read this area in depth and capture all relevant behavior, constraints, and edge cases in `research.md`.
- Study this subsystem deeply, identify potential bugs, and keep researching until root causes are listed in `research.md`.
Phase 2: Plan
- Create a persistent
plan.mdbased on actual source files. - Include approach, affected files, code-level change strategy, and trade-offs.
- Prefer concrete references when available (existing internal or OSS implementation).
- Keep implementation blocked until explicit approval.
Require plan contents:
- Goal and non-goals
- Files and interfaces to change
- Data flow and failure handling
- Type-safety and validation strategy
- Migration/compatibility impact (if relevant)
- Rollback strategy (if relevant)
Annotation Cycle (1-6 rounds)
- Review
plan.mdin deep think. - Add inline notes to reject, constrain, or refine decisions.
- Ask Agent to address all notes and update
plan.md. - Repeat until the plan matches product and architecture intent.
- Keep the guardrail explicit: do not implement yet.
Use prompts like:
- I added inline notes. Address all notes and update `plan.md`. Do not implement yet.
- Remove optionality here, keep this API shape unchanged, and simplify this section.
Todo Breakdown
Before coding, add a granular checklist into plan.md.
Rules:
- Break work into phases and concrete tasks.
- Mark tasks complete as implementation progresses.
- Keep this checklist as the single progress source of truth.
Phase 3: Implementation
After approval, execute the entire plan without stopping for unnecessary confirmations.
Execution contract:
- Implement all approved tasks.
- Mark each finished task in
plan.md. - Avoid unnecessary comments and avoid weak types.
- Run typecheck/test continuously to catch issues early.
- Stop only when all tasks are complete or a real blocker appears.
Use prompt template:
- Implement the approved `plan.md` fully.
- When a task or phase is complete, mark it complete in `plan.md`.
- Do not stop until all approved tasks are complete.
- Continuously run typecheck/tests and fix introduced issues.
Feedback During Execution
Keep feedback terse and directive.
Examples:
- You missed task X from
plan.md. - Move this change to module Y.
- Match table layout with existing page Z.
- Revert this direction. Scope is now only A.
Prefer referencing existing project patterns over describing UI/architecture from scratch.
Steering Rules
During planning and implementation:
- Accept only changes aligned with current priorities.
- Trim nice-to-have scope aggressively.
- Protect stable public interfaces unless explicitly approved.
- Override tool choices when project conventions require it.
Session Strategy
Prefer one long session for research + planning + implementation so context compounds.
Persistence anchors:
research.mdstores discovered system knowledge.plan.mdstores approved decisions and progress.
When context compacts, reload from these files and continue.
Deliverable Checklist
Use this workflow as complete only when all are true:
research.mdexists and is reviewed.plan.mdexists and is approved.- Inline-note cycle completed.
- Todo checklist added and tracked.
- Implementation finished against approved scope.
- Typecheck/tests pass for changed area.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.