Skip to content

Commit d11a072

Browse files
docs(feature): add enum/schema consistency check to self-review checklist (#3356)
Prevents silent validation failures when new enum values are added to one schema but not others (Mongoose model, Zod, tests). Closes #3353
1 parent 14b8763 commit d11a072

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.claude/skills/feature/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ If an action affects another user:
7979
**Tests:**
8080
- [ ] Tests: add unit (`*.unit.tests.js`) + integration (`*.integration.tests.js`) tests. Add E2E (`*.e2e.tests.js`) only if the change affects a critical user flow (auth, org onboarding, invite/join).
8181

82+
**Schema consistency:**
83+
- [ ] New enum values added to ALL schema definitions (Mongoose model `enum`, Zod `z.enum`, tests)
84+
- [ ] Grep existing enum values to find all locations before committing
85+
8286
**Modularity:**
8387
- [ ] Isolated in ONE module (or justified)
8488
- [ ] No cross-module Repository/Model imports (use target module's Service)
@@ -88,6 +92,9 @@ If an action affects another user:
8892
- [ ] Actions affecting other users trigger email (if configured)
8993
- [ ] Templates created for each email type
9094

95+
**Error documentation:**
96+
- [ ] If a non-obvious bug was fixed, document it in `ERRORS.md` (root of repo) with: symptom, root cause, fix
97+
9198
### 8b. Elegance check
9299

93100
For non-trivial changes: pause and ask yourself "is there a simpler or more elegant approach?" If the current implementation feels hacky, refactor before proceeding.

0 commit comments

Comments
 (0)