From 6812e003ea2dc59e3d2622505643b420464015cd Mon Sep 17 00:00:00 2001 From: Wind-Explorer Date: Mon, 15 Dec 2025 22:58:20 +0800 Subject: [PATCH] Create AGENTS.md --- AGENTS.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..23e8eb9 --- /dev/null +++ b/AGENTS.md @@ -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.