cqrs-pattern
Installation
SKILL.md
In this repository
- Scope: Backend API in
backend/. Apply CQRS tobackend/app/services/,backend/app/repositories/, andbackend/app/api/v1/endpoints/. See.cursor/rules/cqrs.mdfor the canonical rule. - Layers: Endpoints → services → repositories (unchanged). Within that, use command service/repo for writes and query service/repo for reads. Dependencies in
backend/app/api/v1/deps.pymust expose separate command and query factories where CQRS applies. - After edits run
make formatandmake lintfrom repo root. Full context:.cursor/skills/README.mdand.cursor/rules/project.md.
CQRS pattern (team standard)
Use this skill when implementing or refactoring features that read or write data so the codebase stays aligned with CQRS and ready for scaling.
When to use this skill
- Adding new API endpoints that create, update, delete, or read data
- Adding new business logic or data access (new service methods, new repository methods)
- Refactoring existing domains (e.g. data processing records, task logs) to separate read and write paths
- Deciding where to put a new method (command vs query service/repository)