feat(core): add 8 AGENTS.md files (package, layer, domain levels)

This commit is contained in:
2026-04-06 15:03:09 +02:00
parent eb195c8261
commit 95a46fe7f4
8 changed files with 258 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Infrastructure Layer — Implementations
## Rules
- Implements interfaces from application/
- Imports from application/ and entities/
- NEVER imported by application/ or entities/
- Can import external libraries (Drizzle, Better Auth, Sentry, etc.)
- Can import @repo/cms-client
- Always provide a mock implementation for every real implementation
## Naming
- Real: `{provider}-{name}.repository.ts` (e.g., `payload-users.repository.ts`)
- Mock: `mock-{name}.repository.ts`
- All implementations must use `@injectable()` decorator for InversifyJS
## Adding a New Implementation
1. Create `src/infrastructure/repositories/{provider}-{name}.repository.ts`
2. Implement the interface from application/
3. Add `@injectable()` decorator
4. Create corresponding mock: `mock-{name}.repository.ts`
5. Register both in DI module (production binds real, test binds mock)