application.cqrs.registry¶
src.application.cqrs.registry
¶
CQRS Registry - Single Source of Truth for Commands and Queries.
This registry catalogs ALL commands and queries in the system with their metadata. Used for: - Container auto-wiring (automated handler factory generation) - Validation tests (verify no drift between commands/handlers) - Documentation generation (always accurate) - Gap detection (missing handlers, result DTOs, etc.)
Architecture: - Application layer (commands/queries are use cases) - Imported by container for automated wiring - Verified by tests to catch drift
Adding new commands/queries: 1. Define command/query dataclass in appropriate _commands.py/_queries.py file 2. Create handler class in handlers/ directory 3. Add entry to COMMAND_REGISTRY or QUERY_REGISTRY below 4. Run tests - they'll tell you what's missing
Reference
- docs/architecture/registry.md
- docs/architecture/cqrs-registry.md