# Plan Mode When working in plan mode (`permission_mode: plan`): **Before calling `ExitPlanMode`**, always write the complete plan to a file in the project root: - **Filename:** `[MILESTONE]-[PURPOSE]-PLAN.md` — e.g. `M2-auth-PLAN.md`, `M3-monitoring-PLAN.md` - MILESTONE: the milestone identifier (e.g. `M2`) or a short label if not milestone-scoped (e.g. `initial`) - PURPOSE: a short kebab-case description of what the plan covers - **Contents:** the full plan as developed in the planning conversation — steps, decisions, rationale, open questions - **Location:** project root (same directory as CLAUDE.md) This file becomes the implementation reference for the session that follows plan mode. ## Keep the plan updated during implementation After each phase or significant step, update PLAN.md: - Mark the phase/step status as **Complete** - Add key commits, references, or artifacts produced - Document deviations from the original plan (what changed and why) - Note verification results This keeps the plan accurate as a living document — useful for resuming across sessions, reflecting on the milestone, and understanding what actually happened vs. what was planned.