chore: add 17 operational rules and rule index
- Create .claude/rules/ with all 17 standard rule files (01-security through 17-document-imports) - Add Operational Rules section with Rule Index to .claude/CLAUDE.md
This commit is contained in:
parent
afc5a7f895
commit
b659a6a6bd
18 changed files with 373 additions and 0 deletions
24
.claude/rules/06-testing.md
Normal file
24
.claude/rules/06-testing.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Testing
|
||||
|
||||
Assume nothing about correctness — prove it with tests.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
- Write the test first for non-trivial logic (TDD). Implement until it passes.
|
||||
- Every new function/method/module with logic gets unit tests.
|
||||
- Run existing tests after every change. Fix breaks before moving on.
|
||||
|
||||
## Integration Tests
|
||||
|
||||
- Test module boundaries: DB queries, external APIs, filesystem, message queues.
|
||||
- Use real dependencies (or containers) — not mocks. Mocks belong in unit tests.
|
||||
- Target 70/20/10 ratio: unit/integration/E2E.
|
||||
|
||||
## End-to-End Tests
|
||||
|
||||
- Critical user journeys only (~10% of suite). Test API endpoints with integration tests, not E2E.
|
||||
|
||||
## After Every Change
|
||||
|
||||
- Run the test suite, report results, fix failures before continuing.
|
||||
- If no test framework exists, flag it and propose a testing strategy.
|
||||
Loading…
Add table
Add a link
Reference in a new issue