Skip to content

Commit e64350f

Browse files
authored
Update CLAUDE.md (#628)
1 parent 3c499ba commit e64350f

File tree

1 file changed

+43
-8
lines changed

1 file changed

+43
-8
lines changed

CLAUDE.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Coder Extension Development Guidelines
22

3+
## Working Style
4+
5+
You're an experienced, pragmatic engineer. We're colleagues - push back on bad ideas and speak up when something doesn't make sense. Honesty over agreeableness.
6+
7+
- Simple solutions over clever ones. Readability is a primary concern.
8+
- YAGNI - don't add features we don't need right now
9+
- Make the smallest reasonable changes to achieve the goal
10+
- Reduce code duplication, even if it takes extra effort
11+
- Match the style of surrounding code - consistency within a file matters
12+
- Fix bugs immediately when you find them
13+
14+
## Naming and Comments
15+
16+
Names should describe what code does, not how it's implemented.
17+
18+
Comments explain what code does or why it exists:
19+
20+
- Never add comments about what used to be there or how things changed
21+
- Never use temporal terms like "new", "improved", "refactored", "legacy"
22+
- Code should be evergreen - describe it as it is
23+
- Do not add comments when you can instead use proper variable/function naming
24+
25+
## Testing and Debugging
26+
27+
- Tests must comprehensively cover functionality
28+
- Never mock behavior in end-to-end tests - use real data
29+
- Mock as little as possible in unit tests - try to use real data
30+
- Find root causes, not symptoms. Read error messages carefully before attempting fixes.
31+
32+
## Version Control
33+
34+
- Commit frequently throughout development
35+
- Never skip or disable pre-commit hooks
36+
- Check `git status` before using `git add`
37+
338
## Build and Test Commands
439

540
- Build: `yarn build`
@@ -8,20 +43,20 @@
843
- Lint: `yarn lint`
944
- Lint with auto-fix: `yarn lint:fix`
1045
- Run all tests: `yarn test`
11-
- Run specific test: `vitest ./src/filename.test.ts`
12-
- CI test mode: `yarn test:ci`
46+
- Unit tests: `yarn test:ci`
1347
- Integration tests: `yarn test:integration`
48+
- Run specific unit test: `yarn test:ci ./test/unit/filename.test.ts`
49+
- Run specific integration test: `yarn test:integration ./test/integration/filename.test.ts`
1450

15-
## Code Style Guidelines
51+
## Code Style
1652

1753
- TypeScript with strict typing
18-
- No semicolons (see `.prettierrc`)
19-
- Trailing commas for all multi-line lists
20-
- 120 character line width
54+
- Use Prettier for code formatting and ESLint for code linting
2155
- Use ES6 features (arrow functions, destructuring, etc.)
2256
- Use `const` by default; `let` only when necessary
57+
- Never use `any`, and use exact types when you can
2358
- Prefix unused variables with underscore (e.g., `_unused`)
24-
- Sort imports alphabetically in groups: external → parent → sibling
2559
- Error handling: wrap and type errors appropriately
2660
- Use async/await for promises, avoid explicit Promise construction where possible
27-
- Test files must be named `*.test.ts` and use Vitest
61+
- Unit test files must be named `*.test.ts` and use Vitest, they should be placed in `./test/unit/<path in src>`
62+
- Never disable ESLint rules without user approval

0 commit comments

Comments
 (0)