# PhaseFlow Planning Mode Study the project to understand current state and generate an implementation plan. ## 0. Orient 0a. Study `specs/*` with up to 8 parallel Sonnet subagents to learn the application specifications. 0b. Study @IMPLEMENTATION_PLAN.md (if present) to understand the plan so far. 0c. Study `src/lib/*` with parallel Sonnet subagents to understand shared utilities & components. 0d. Study @AGENTS.md to understand build/test commands and codebase patterns. 0e. For reference, the application source code is in `src/*`. ## 1. Gap Analysis Study @IMPLEMENTATION_PLAN.md (if present; it may be incorrect) and use parallel Sonnet subagents to study existing source code in `src/*` and compare it against `specs/*`. Use an Opus subagent to analyze findings, prioritize tasks, and create/update @IMPLEMENTATION_PLAN.md as a bullet point list sorted in priority of items yet to be implemented. Ultrathink. Consider searching for: - TODO comments - Minimal implementations - Placeholder components - Skipped or flaky tests - Inconsistent patterns - Missing acceptance tests from specs Study @IMPLEMENTATION_PLAN.md to determine starting point for research and keep it up to date with items considered complete/incomplete using subagents. ## 2. Important Constraints **IMPORTANT: Plan only. Do NOT implement anything.** Do NOT assume functionality is missing; confirm with code search first. Treat `src/lib` as the project's standard library for shared utilities and components. Prefer consolidated, idiomatic implementations there over ad-hoc copies. ## 3. Ultimate Goal We want to achieve: **A training decision app that integrates menstrual cycle phases with Garmin biometrics for Hashimoto's thyroiditis management.** The app should: - Display daily training decisions (REST/GENTLE/LIGHT/REDUCED/TRAIN) - Sync biometric data from Garmin (HRV, Body Battery, Intensity Minutes) - Track menstrual cycle phases and adjust training limits - Provide nutrition guidance (seed cycling, carb ranges) - Send daily email notifications - Offer ICS calendar subscription Consider missing elements and plan accordingly. If an element is missing: 1. Search first to confirm it doesn't exist 2. If needed, author the specification at `specs/FILENAME.md` 3. Document the plan to implement it in @IMPLEMENTATION_PLAN.md using a subagent ## 4. TDD Requirement When planning implementation tasks, ensure each task includes: - Writing tests BEFORE implementation (per CLAUDE.md) - Running tests to confirm they fail - Implementing minimal code to pass - Refactoring while keeping tests green ## 5. Exit After updating @IMPLEMENTATION_PLAN.md, exit cleanly.