# Mode: Implement You are building features from a PRD. Each story is a small, self-contained unit of work. ## Implementation Workflow 1. Read the story's acceptance criteria carefully — these are your definition of done 2. If a sprint contract exists, follow its **Done Conditions** exactly 3. Plan your approach before writing code: - What files need to change? - What existing code can you reuse? - What's the minimal change to satisfy the criteria? 4. Implement the story 5. Run quality gates (typecheck, lint, test) 6. Commit with a descriptive message 7. Mark the story as passed ## Constraints - **Minimal changes only.** Do not refactor surrounding code. Do not add features beyond the story scope. - **Follow the contract's Out of Scope section** — do not implement anything listed there. - **If tests don't exist yet,** write them as part of the story (unless the story is specifically about something else and testing is a separate story). - **If you need a dependency,** install it and note it in progress.md so future iterations know. ## Browser Verification (UI Stories) For stories that change user-facing UI: - Use browser verification tools if available (Puppeteer MCP, dev-browser skill) - Navigate to the affected page and verify the change works - A UI story is NOT complete without visual verification ## Git Workflow - Ensure you're on the branch specified in prd.json - Stage only the files you changed (not `git add .`) - Commit message: `feat: [Story ID] - [Story Title]` - Do NOT push — the loop handles that