Skip to content

Commit 79cd21d

Browse files
committed
Update AGENTS.md with the lastet
1 parent 95d2b51 commit 79cd21d

4 files changed

Lines changed: 131 additions & 103 deletions

File tree

.oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"pedantic": "off"
1919
},
2020
"rules": {
21-
"eslint-plugin-react/react-in-jsx-scope": "off",
21+
"react/react-in-jsx-scope": "off",
2222
"typescript/no-explicit-any": "error",
2323
"typescript/no-misused-promises": "warn"
2424
},

AGENTS.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,49 @@
1-
# CLAUDE.md
2-
3-
This is a starter kit for building a TypeScript application.
1+
# AGENTS.md
42

53
## Commands
64

75
```bash
8-
bun install # Install dependencies
9-
bun dev # Run application
10-
bun run build # Build for production (tsdown/rolldown build)
11-
bun test # Run tests (bun:test)
12-
13-
bun run check # Run all checks (format, lint, typecheck, test)
14-
bun run fix # Auto-fix format and lint issues
15-
bun run typecheck # TypeScript type checking
16-
bun run lint # Run oxlint with type-aware rules
17-
bun run format # Run oxfmt formatter
6+
bun install # Install dependencies
7+
bun dev # Run application
8+
bun run build # Build for production
9+
bun test # Run tests (bun:test)
10+
11+
bun check # Run all checks (format, lint, typecheck, test)
12+
bun fix # Auto-fix format and lint issues
13+
bun typecheck # TypeScript type checking
14+
bun lint # Run oxlint with type-aware rules
15+
bun format # Run oxfmt formatter
1816
```
1917

2018
## Coding Rules
2119

2220
- Use `bun` instead of `npm` or `pnpm`
23-
- Use strict TypeScript with `bun:test` for testing
24-
- NEVER cast with `any`
25-
- AVOID inline type casting with `as` - use valibot or zod for runtime
26-
validation
21+
- ALWAYS use strict TypeScript
22+
- Use `bun:test` for testing
23+
- ALWAYS document methods using TSDoc format with one newline after the
24+
description before the params
25+
- ALWAYS colocate tests with source
26+
- ALWAYS validate user input using `zod`
27+
- ALWAYS create new objects, never mutate. Immutability is important.
28+
- PREFER thin input layers (route handlers, input handler) which validate and
29+
delegate to services.
30+
- NEVER use `any`
31+
- AVOID mocking in tests.
32+
- AVOID inline type casting with `as`, use `zod` instead.
2733
- AVOID unnecessary try/catch
28-
- Document methods using TSDoc format with one newline after the description
29-
before params
30-
- Write tests first when fixing bugs or implementing features
31-
- All changes automatically get formatted with `oxfmt` (no semis, doublequotes)
34+
- AVOID large files. Use many small files with high cohesion, low coupling,
35+
organized by feature/domain not by type.
36+
37+
## Code Quality Checklist
38+
39+
Before marking work complete:
40+
41+
- [ ] Code is readable and well-named
42+
- [ ] Functions are small (<50 lines)
43+
- [ ] Files are focused (<800 lines)
44+
- [ ] No deep nesting (>4 levels)
45+
- [ ] Proper error handling
46+
- [ ] No console.log statements
47+
- [ ] No hardcoded values
48+
- [ ] No secrets
49+
- [ ] No mutation (immutable patterns used)

0 commit comments

Comments
 (0)