diff --git a/CLAUDE.md b/CLAUDE.md index 8d491ec..61c0b75 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -882,11 +882,25 @@ Always run `git push` immediately after every `git commit`. Every non-trivial implementation (anything beyond a one-line fix or doc change) **must** follow this workflow: +#### 0 — Mandatory planning phase (REQUIRED before any code changes) + +Before touching any code, present a written plan and **wait for explicit user approval**. Do not open files to edit, do not create branches, do not write code until the user says the plan is approved. + +The plan must include: +- **What** is changing and **why** +- **Which files** will be created or modified (with paths) +- **Database / migration impact** (if any) +- **API contract changes** (new endpoints, changed schemas) +- **Frontend route / component changes** +- **Risks or non-obvious decisions** + +Only proceed to step 1 after the user responds with explicit approval (e.g. "looks good", "go ahead", "approved"). + #### 1 — Create a feature branch -After the planning phase is approved, branch off `main`: +After the planning phase is approved, branch off `main`. Name the branch after the title of the change — use lowercase words separated by hyphens, descriptive enough to understand at a glance what the branch does: ```bash git checkout main && git pull -git checkout -b feat/ # e.g. feat/color-mode, feat/admin-appearance +git checkout -b feat/ # e.g. feat/user-profile-avatar-upload, feat/document-bulk-delete ``` #### 2 — Spin up an isolated Docker stack for the feature