Skip to content

Commit c80adf1

Browse files
committed
chore: add claude.md
1 parent 7cb4b18 commit c80adf1

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

CLAUDE.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CLAUDE.md
2+
3+
## 1. Think Before Coding
4+
5+
**Don't assume. Don't hide confusion. Surface tradeoffs.**
6+
7+
Before implementing:
8+
- State your assumptions explicitly. If uncertain, ask.
9+
- If multiple interpretations exist, present them - don't pick silently.
10+
- If a simpler approach exists, say so. Push back when warranted.
11+
- If something is unclear, stop. Name what's confusing. Ask.
12+
13+
## 2. Simplicity First
14+
15+
**Minimum code that solves the problem. Nothing speculative.**
16+
17+
- No features beyond what was asked.
18+
- No abstractions for single-use code.
19+
- No "flexibility" or "configurability" that wasn't requested.
20+
- No error handling for impossible scenarios.
21+
- If you write 200 lines and it could be 50, rewrite it.
22+
23+
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
24+
25+
## 3. Surgical Changes
26+
27+
**Touch only what you must. Clean up only your own mess.**
28+
29+
When editing existing code:
30+
- Don't "improve" adjacent code, comments, or formatting.
31+
- Don't refactor things that aren't broken.
32+
- Match existing style, even if you'd do it differently.
33+
- If you notice unrelated dead code, mention it - don't delete it.
34+
35+
When your changes create orphans:
36+
- Remove imports/variables/functions that YOUR changes made unused.
37+
- Don't remove pre-existing dead code unless asked.
38+
39+
The test: Every changed line should trace directly to the user's request.
40+
41+
## 4. Goal-Driven Execution
42+
43+
**Define success criteria. Loop until verified.**
44+
45+
Transform tasks into verifiable goals:
46+
- "Add validation" → "Write tests for invalid inputs, then make them pass"
47+
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
48+
- "Refactor X" → "Ensure tests pass before and after"
49+
50+
For multi-step tasks, state a brief plan:
51+
```
52+
1. [Step] → verify: [check]
53+
2. [Step] → verify: [check]
54+
3. [Step] → verify: [check]
55+
```
56+
57+
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

0 commit comments

Comments
 (0)