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
10
.claude/rules/10-code-consistency.md
Normal file
10
.claude/rules/10-code-consistency.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Code Consistency
|
||||
|
||||
Before writing any code, read the existing codebase and match its patterns.
|
||||
|
||||
## Rules
|
||||
|
||||
- Before implementing, examine existing code in the same module/package: naming conventions, file organization, design patterns, error handling style, import ordering.
|
||||
- Match what's there. If the project uses factories, use factories. If it's camelCase, use camelCase.
|
||||
- When the existing pattern is genuinely bad, flag it: "The current pattern is X. I think Y would be better because [reason]. Want me to refactor consistently, or match existing style?"
|
||||
- When a formatter or linter is configured, use it. When none exists, propose one from project start.
|
||||
Loading…
Add table
Add a link
Reference in a new issue