a08e897f96
- Package: @landvex/domain
- Zero dependencies on Express, PostgreSQL, S3, or AI frameworks
- Four package structure: domain, contracts, shared, infrastructure
- Domain never depends on infrastructure
- Aggregate Roots: FieldSession, Mission, DecisionCase
- Entities: MissionAsset, Artifact, Observation, Evidence, Finding,
Decision, Review, Action, Outcome
- Value Objects: MissionId, ArtifactId, SessionId, ObservationId,
DecisionId, GeoLocation, GpsAccuracy, Confidence, Severity, Priority,
Hash, StorageUri, Version
- Enums: ArtifactType, ReviewStatus, DecisionVerb, MissionStatus, SessionStatus
- Event Contracts: FieldSessionCreated, MissionCreated, MissionImported,
ArtifactUploaded, ArtifactValidated, ObservationCreated, EvidenceCreated,
FindingCreated, DecisionCreated, DecisionReviewed, DecisionApproved
- Domain Invariants:
- FieldSession: must have location, date, can have zero missions
- Mission: must belong to one Session, must have at least one Artifact
- DecisionCase: must have at least one Observation, one Evidence,
exactly one Decision, cannot be Approved without Review
- Artifact: must have unique hash, storage URI, versioned
- TypeScript interfaces for all domain objects
- Branded ID types for type safety
- Strict rule: No new feature may introduce new domain concepts without
approved change to domain model
- README: 'This package describes LandveX domain model. Contains no
dependencies to database, HTTP, cloud storage, or AI frameworks.'
- Next: PR-002 Persistence Adapter (Repository Interface → PostgreSQL/S3/Event Store)
Rationale: Lock the language before writing infrastructure code.
Shared vocabulary for code, docs, APIs, tests, and product discussions.