Commands to Events Mapping
This document maps the primary commands that can be executed in the system to the corresponding domain events they generate. This helps trace how user actions in the system result in domain events and state changes.
Cat Management Commands
RegisterNewCat
Description: Add a new cat to the colony registry Primary Events:
CatSightingRecorded
- Initial documentation of cat presenceIdentityUpdateEvent
- Basic details recorded
Secondary Events:
NicknameAssignmentEvent
(if nickname provided)IntegrationEvent
(when formally integrating into colony)
UpdateCatIdentity
Description: Update a cat's physical characteristics or identification Primary Events:
IdentityUpdateEvent
- Changed description, pattern, etc.
Secondary Events:
NicknameAssignmentEvent
(if nickname added/changed)
RecordCatSighting
Description: Document observation of a cat at a specific location and time Primary Events:
CatSightingRecorded
- Location and timestamp recorded
Secondary Events:
TerritoryChangeEvent
(if location pattern changes)DisappearanceEvent
(if reappearing after missing)
RecordMedicalProcedure
Description: Document a medical procedure performed on a cat Primary Events:
MedicalProcedureEvent
- Basic procedure detailsVaccinationEvent
(for vaccines)TNREvent
(for spay/neuter)
Secondary Events:
QuarantineEvent
(if quarantine required)MicrochipEvent
(if microchipped during procedure)
ReportCatMissing
Description: Report a cat has not been seen for a concerning period Primary Events:
DisappearanceEvent
- Last sighting and circumstances recorded
Secondary Events:
ThreatEvent
(if disappearance suggests external threat)
Relationship Management Commands
RecordSocialRelationship
Description: Document a social relationship between cats Primary Events:
SocialBondEvent
- Relationship type and involved cats recorded
Secondary Events:
TerritoryChangeEvent
(if territory affected by relationship)
RecordCatConflict
Description: Document a conflict between cats Primary Events:
ConflictEvent
- Involved cats and severity recorded
Secondary Events:
TerritoryChangeEvent
(if territory affected by conflict)
ConfirmMaternality
Description: Confirm maternal relationship between cats Primary Events:
SocialBondEvent
(with bondType="maternal")
Secondary Events:
IdentityUpdateEvent
(updating family information)
Colony Management Commands
AddLocation
Description: Add a new location to the colony Primary Events:
EnvironmentalChangeEvent
- New location details
UpdateAccessPermissions
Description: Change a cat's access permissions to locations Primary Events:
AccessLevelChangeEvent
- Permission changes recorded
RecordThreat
Description: Document an external threat to the colony Primary Events:
ThreatEvent
- Threat type and severity recorded
Secondary Events:
EnvironmentalChangeEvent
(if environment modified in response)