diff options
Diffstat (limited to '.cursor/commands/review.md')
| -rw-r--r-- | .cursor/commands/review.md | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/.cursor/commands/review.md b/.cursor/commands/review.md index d7c0c45c..ab36f7c4 100644 --- a/.cursor/commands/review.md +++ b/.cursor/commands/review.md @@ -49,7 +49,7 @@ Review every point below carefully to ensure files follow consistent code style - [ ] Readability over brevity — use `element` not `el`, `event` not `e` - [ ] Booleans are named `isSomething`, `hasSomething`, or `shouldSomething` — not `something` -- [ ] No title case in text/UI — use `Hello world` not `Hello World` +- [ ] No title case for multi-word text/UI — use `Hello world` not `Hello World` ## Tailwind & Styling @@ -61,12 +61,15 @@ Review every point below carefully to ensure files follow consistent code style <PlusIcon className="!size-6" /> {/* ✅ correct */} <PlusIcon className="size-6" /> {/* ❌ wrong */} <PlusIcon className="!size-4" /> {/* ❌ unnecessary, size-4 is default */} + <PlusIcon className="size-4" />{" "} + {/* ❌ completely wrong, 1) doesn't override and 2) size-4 is default */} </Button> ``` ## State Management (Zustand) - [ ] React components never use `someStore.getState()` — use the `useSomeStore` hook instead +- [ ] High-frequency stores (timeline, playback, selections) use selectors — `useStore((s) => s.value)` not `const { value } = useStore()` - [ ] Store/manager methods are not passed as props — sub-components access them directly ```tsx @@ -91,6 +94,11 @@ Review every point below carefully to ensure files follow consistent code style - [ ] Code is scannable — use variables and helper functions to make intent clear at a glance - [ ] Complex logic is extracted into well-named variables or helpers +- [ ] No magic numbers or magic values — extract inline literals into named constants + - Applies to colors, durations, thresholds, sizes, config values, etc. + - If it's domain-specific to one file, a `const` at the top of that file is fine + - If it's generic enough, it belongs in `constants/` + - [ ] No redundant single/plural function variants — if a function can operate on multiple items, it should accept an array and handle both cases. Don't create `doThing()` + `doThings()`. ```tsx @@ -116,4 +124,25 @@ Review every point below carefully to ensure files follow consistent code style --- -> Every decision, every edit must be carefully considered. Everything matters. +## Review Methodology + +Do NOT review by reading the file top-to-bottom and noting what jumps out. Instead: + +1. Go through each checklist section **one at a time** +2. For each section, scan the **entire file** for violations of that specific rule +3. Only move to the next section after you've exhausted the current one +4. After all sections are checked, do a final pass: re-read every checklist item and confirm you didn't skip it + +Before outputting the table, list each checklist section and confirm you checked it: +`Signatures ✓ | TypeScript ✓ | JSX ✓ | Organization ✓ | Comments ✓ | Naming ✓ | Tailwind ✓ | State ✓ | Quality ✓ | Keywords ✓` + +--- + +## IMPORTANT: Review Rules + +- **ONLY** flag issues that are explicitly covered by a checklist item above. +- Do **NOT** invent your own rules, suggestions, or "nice to haves" as primary issues. +- The review output must be a table of issues, each one mapping to a specific checklist item. +- If something looks off but isn't covered by the checklist, you can mention it as a brief side note at the end — but keep it clearly separate from the actual review. Always default to fixing the issues covered by the checklist above, unless the user says otherwise. + +> You WILL miss things if you try to review the whole file in one pass. Iterate rule by rule. |
