mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 05:30:41 +01:00
Add .cursor/rules/ with: - code-quality.mdc - DRY, SSOT, minimal changes - testing.mdc - Testing guidelines 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
---
|
|
description: "Core code quality rules - DRY, SSOT, minimal changes"
|
|
alwaysApply: true
|
|
---
|
|
|
|
# Code Quality Rules
|
|
|
|
## Core Principles
|
|
|
|
### DRY (Don't Repeat Yourself)
|
|
- Extract repeated logic into reusable functions
|
|
- Check for existing utilities before creating new ones
|
|
- Use constants for repeated values
|
|
|
|
### SSOT (Single Source of Truth)
|
|
- Data should be defined in one place only
|
|
- Configuration lives in dedicated files
|
|
- Types are defined once and imported
|
|
|
|
### Minimal Changes
|
|
- Only modify what's necessary for the task
|
|
- Don't refactor unrelated code
|
|
- Don't add features not requested
|
|
|
|
## Before Making Changes
|
|
|
|
1. Search for existing similar functionality
|
|
2. Check if a utility already exists
|
|
3. Verify you're not duplicating code
|
|
|
|
## Code Patterns
|
|
|
|
- Use existing patterns found in the codebase
|
|
- Follow the file's existing style
|
|
- Don't introduce new patterns without reason
|
|
|
|
## What NOT to Do
|
|
|
|
- Don't add comments explaining obvious code
|
|
- Don't create abstractions for one-time use
|
|
- Don't add "nice to have" features
|
|
- Don't refactor working code unnecessarily
|