Imported from brendanprobst/api-ddd-template (
AGENTS.md). Install upstream withnpx skills add brendanprobst/api-ddd-template. Copyright stays with the author.
Repository (root)
Purpose
This repo is a DDD API template: Express HTTP layer, manual Container wiring, domain Result + ErrorCatalog, Jest at the repo root with @/ → api/.
Where to look first
api/— Application entry (app.ts), routes, controllers, domain, use cases, infrastructure.test/— Integration and unit tests; usecreateTestApp()fromtest/setup.tsfor isolated apps.docs/— Architecture decision records (ADRs).
Documentation files in subfolders
Each major directory contains AGENTS.md. Use that name so humans and automation can rely on a single predictable filename when opening a folder for the first time. README.md is better for human-only onboarding in libraries; here AGENTS.md doubles as developer notes and agent context.
Conventions
- Add repository interfaces in
api/domain/repositories/, implementations inapi/infrastructure/repositories/. - Register new ports on
Containerwith explicit getters. - Register domain errors in
ErrorCatalogand map HTTP status inHttpErrorMapper.
Agent prompts
agents/— Prompt stubs +registry.yaml(seeagents/README.md)..cursor/rules/*.mdc— Cursor project rules: DDD / test / infra experts scope by folder; debugger / code janitor attach with@→ Rules. See.cursor/rules/README.md.