2026-05-21 17:27:37 +03:30
|
|
|
|
# AGENTS.md
|
2026-05-05 22:42:09 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
## Stack
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- NestJS
|
|
|
|
|
|
- Prisma
|
|
|
|
|
|
- TypeScript
|
|
|
|
|
|
- pnpm
|
|
|
|
|
|
- RTK enabled
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# Core Rules
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Keep changes minimal.
|
|
|
|
|
|
- Do not touch unrelated files.
|
|
|
|
|
|
- Prefer existing patterns over new abstractions.
|
|
|
|
|
|
- Preserve API behavior unless requested otherwise.
|
|
|
|
|
|
- Prefer forward Prisma migrations.
|
|
|
|
|
|
- Never edit applied migrations in shared environments.
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# EXECUTION RULES
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Keep responses short.
|
|
|
|
|
|
- Do not narrate thoughts.
|
|
|
|
|
|
- Do not explain obvious steps.
|
|
|
|
|
|
- Do not create plans for simple tasks.
|
|
|
|
|
|
- Prefer implementation over exploration.
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Avoid:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- “I think…”
|
|
|
|
|
|
- “Let me check…”
|
|
|
|
|
|
- “I should inspect…”
|
|
|
|
|
|
- “I’m going to…”
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# RTK Rules
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Always prefer RTK commands.
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
Use:
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- `rtk ls`
|
|
|
|
|
|
- `rtk grep`
|
|
|
|
|
|
- `rtk smart`
|
|
|
|
|
|
- `rtk read`
|
|
|
|
|
|
- `rtk git diff`
|
|
|
|
|
|
- `rtk git status`
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Avoid raw:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- `cat`
|
|
|
|
|
|
- `grep`
|
|
|
|
|
|
- `rg`
|
|
|
|
|
|
- `git diff`
|
|
|
|
|
|
- recursive repository scans
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# Reading Strategy
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
1. `rtk grep`
|
|
|
|
|
|
2. `rtk smart`
|
|
|
|
|
|
3. `rtk read`
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Rules:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Read only necessary files.
|
|
|
|
|
|
- Do not read sibling files unless needed.
|
|
|
|
|
|
- Do not reread unchanged files.
|
|
|
|
|
|
- Stop searching once target location is found.
|
|
|
|
|
|
- Edit quickly after locating target.
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Avoid:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- opening entire modules
|
|
|
|
|
|
- multi-file chained reads
|
|
|
|
|
|
- large diff dumps
|
|
|
|
|
|
- exploratory scans
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# Forbidden Paths
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Do not inspect unless required:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- `node_modules/`
|
|
|
|
|
|
- `dist/`
|
|
|
|
|
|
- `coverage/`
|
|
|
|
|
|
- `.prisma/`
|
|
|
|
|
|
- `prisma/migrations/`
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# Prisma Rules
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Use transactions for multi-step writes.
|
|
|
|
|
|
- Prefer explicit `select/include`.
|
|
|
|
|
|
- Normalize `Decimal` values with `Number(...)`.
|
|
|
|
|
|
- Keep migrations forward-safe.
|
|
|
|
|
|
- Use:
|
|
|
|
|
|
- `pnpm prisma migrate dev --name <name>` for new local migrations
|
|
|
|
|
|
- `pnpm prisma migrate deploy` for applying existing migrations
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# NestJS Rules
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Keep layering:
|
|
|
|
|
|
- controller
|
|
|
|
|
|
- service
|
|
|
|
|
|
- prisma/shared service
|
2026-05-05 22:42:09 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
- Reuse shared services.
|
|
|
|
|
|
- Keep DTO validation strict.
|
|
|
|
|
|
- Avoid `any`.
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
---
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
# Validation
|
2026-05-05 22:42:09 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
Typecheck before handoff:
|
2026-05-21 17:27:37 +03:30
|
|
|
|
|
2026-05-24 19:40:04 +03:30
|
|
|
|
```bash
|
|
|
|
|
|
pnpm -s tsc --noEmit
|
|
|
|
|
|
```
|