Create AGENTS.md

This commit is contained in:
2025-12-15 22:58:20 +08:00
parent 125d635dc2
commit 6812e003ea

23
AGENTS.md Normal file
View File

@@ -0,0 +1,23 @@
# Friendolls Server Agent Guidelines
## Commands
- **Error Checks**: `pnpm check`
- **Format/Lint**: `pnpm format`, `pnpm lint`
- **Test**: `pnpm test` (Unit), `pnpm test:e2e` (E2E)
- **Single Test**: `pnpm test -- -t "test name"` or `pnpm test -- src/path/to/file.spec.ts`
- **Database**: `npx prisma generate`, `npx prisma migrate dev`
## Code Style & Conventions
- **Architecture**: NestJS standard (Module -> Controller -> Service). Use DI.
- **Database**: `PrismaService` only. No raw SQL.
- **Validation**: strict `class-validator` DTOs (whitelisting enabled).
- **Naming**: `PascalCase` (Classes), `camelCase` (vars/methods), `kebab-case` (files).
- **Error Handling**: Standard NestJS exceptions (`NotFoundException`, etc).
- **Docs**: Swagger decorators (`@ApiOperation`, `@ApiResponse`) required on Controllers.
- **Imports**: External/NestJS first, then internal (relative paths).
## Note
Do not run the project yourself. Run error checks and lints to detect issues.