Product Repository Contract¶
Status¶
Normative Business Domain Specification
Purpose¶
Defines the contract for persisting and retrieving Product aggregates.
This contract is strictly derived from Product Invariants.
Core Principle¶
Repository MUST NEVER violate Product Invariants.
Invariants Reference¶
- INV-001 Product has exactly one Canonical Product Identity
- INV-002 Identifier is evidence, not identity
- INV-003 Observation must not mutate identity
- INV-004 Variant belongs to exactly one Product
Contract Rules¶
Repository SHALL:
- persist Product as a whole aggregate
- retrieve Product with full consistency
- preserve invariants at all times
Repository MUST NOT:
- partially persist Product state
- bypass Aggregate root
- resolve identity logic
- interpret business rules
- depend on SQL structure
- depend on WordPress
- depend on feed structure
Consistency Rule¶
Any persistence MUST preserve:
- identity
- variants
- observations
- conflicts
- consistency state
Decision¶
Repository is a pure domain-facing contract.