Created
January 6, 2026 09:35
-
-
Save pliablepixels/adce1526bac46349c387186eb5d53884 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Problem 1: **Instructions are buried in narrative text** | |
| Your current CLAUDE.md has rules mixed with explanatory text: | |
| ```markdown | |
| Global Rules | |
| ------------- | |
| - All text needs to be internationalized. Always make sure all language files are in sync and updated with each change | |
| ``` | |
| This is easy to **read** but easy to **forget during execution**. | |
| ### Problem 2: **No enforcement/blocking mechanism** | |
| There's nothing that forces me to check these rules at critical decision points like: | |
| - Before marking work complete | |
| - Before committing code | |
| - When starting new work | |
| ### Problem 3: **Action-trigger mismatch** | |
| The instruction "create a new branch for new features" should trigger **at the START** of work, but it's in a section called "Commit Rules" which I read when **committing**. | |
| ## Better Structure Suggestions | |
| ### Option 1: **Task-Phase Checklists** (Recommended) | |
| ```markdown | |
| # CRITICAL: Pre-Work Checklist | |
| **Run this checklist BEFORE starting any feature work:** | |
| - [ ] Create new feature branch: `git checkout -b feat/feature-name` | |
| - [ ] Understand if changes will need translations | |
| - [ ] Identify which files will be modified | |
| # CRITICAL: Pre-Commit Checklist | |
| **Run this checklist BEFORE every commit:** | |
| - [ ] All UI text has translation keys (check all 5 languages: en, de, es, fr, zh) | |
| - [ ] All tests pass: `npm run test:unit` | |
| - [ ] No console.log statements (use log functions) | |
| - [ ] All components have data-testid attributes if UI changed | |
| # CRITICAL: Pre-PR Checklist | |
| **Run this checklist BEFORE creating a pull request:** | |
| - [ ] E2E tests run and pass for major changes | |
| - [ ] All translation files in sync | |
| - [ ] Branch is up to date with main | |
| ``` | |
| ### Option 2: **STOP Signs** (More Aggressive) | |
| ```markdown | |
| 🛑 STOP - READ THIS BEFORE EVERY COMMIT | |
| =========================================== | |
| 1. Did you create a feature branch? If not, STOP and create one now. | |
| 2. Did you update ALL 5 translation files? If not, STOP and update them. | |
| 3. Did tests pass? If not, STOP and fix them. | |
| Only proceed with commit after ALL checks pass. | |
| ``` | |
| ### Option 3: **Action-Based Organization** | |
| ```markdown | |
| # When Starting New Work | |
| ## IF this is a new feature: | |
| 1. ALWAYS create a new branch: `git checkout -b feat/name` | |
| 2. NEVER work directly on main | |
| ## IF changes include UI text: | |
| 1. MUST add translation keys to all 5 languages immediately | |
| 2. Language files: en, de, es, fr, zh | |
| 3. Check: Did you update ALL files? | |
| # When Committing | |
| ## ALWAYS before commit: | |
| - Run `npm run test:unit` | |
| - Verify all 352 tests pass | |
| - Check git status for unwanted files | |
| ## NEVER commit: | |
| - console.log statements | |
| - commented-out code | |
| - .env files or secrets | |
| ``` | |
| ### Option 4: **First-Line Critical Rules** | |
| ```markdown | |
| # ⚠️ CRITICAL RULES - READ FIRST ⚠️ | |
| 1. **BRANCH CREATION**: New features MUST be on new branch (feat/name) | |
| 2. **TRANSLATIONS**: ALL UI text MUST be in all 5 languages (en, de, es, fr, zh) | |
| 3. **TESTING**: ALL tests MUST pass before commit | |
| 4. **NO DIRECT MAIN**: NEVER commit features directly to main | |
| # Detailed Rules Below... | |
| ``` | |
| ## My Recommendation | |
| Combine approaches for maximum effectiveness: | |
| ```markdown | |
| # 🚨 CRITICAL WORKFLOW CHECKLIST 🚨 | |
| ## BEFORE Starting Work | |
| - [ ] For new features: Create branch `git checkout -b feat/name` | |
| - [ ] For fixes: Create branch `git checkout -b fix/name` | |
| - [ ] NEVER work directly on main branch | |
| ## DURING Development | |
| - [ ] Add translation keys for ALL new UI text | |
| - [ ] Update ALL 5 language files in sync (en, de, es, fr, zh) | |
| - [ ] Use proper log functions (not console.log) | |
| - [ ] Add data-testid to new/modified UI components | |
| ## BEFORE Committing | |
| - [ ] Run `npm run test:unit` - ALL 352 tests MUST pass | |
| - [ ] Verify all translation files updated | |
| - [ ] Check for console.log statements | |
| - [ ] Review git diff for unwanted changes | |
| ## BEFORE Merging/PR | |
| - [ ] Run e2e tests for major changes | |
| - [ ] All tests pass | |
| - [ ] Branch up to date with main | |
| --- | |
| # Detailed Guidelines | |
| [Rest of your existing content...] | |
| ``` | |
| ## The Key Insight | |
| **Put blocking requirements at the TOP with checkboxes**, not buried in narrative sections. Make me verify them explicitly rather than expecting me to remember them from general rules. | |
| Would you like me to rewrite your CLAUDE.md file with this improved structure? | |
| --- | |
| ## 👤 User | |
| yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment