Spec: Law↔Judicial Cross-Link Contract
Purpose
Define the future cross-link seam between the law ingestion domain and the judicial ingestion domain without adding judicial runtime behavior now.
Domain Boundaries
- Law hub owns canonical law act persistence and law-source checkpoints.
- Judicial hub will own sentence persistence and judicial-source checkpoints.
- Cross-link hub stores typed relationships only; it does not duplicate source payloads from either domain.
Contract
- Law identity DTO:
LawActIdentity - Judicial identity DTO:
JudicialSentenceIdentity - Relation DTO:
LawJudicialRelation - Persistence port:
LawJudicialCrossLinkPort.upsert_relation(...)
Constraints
- Cross-links must reference stable identities from each hub.
- Cross-link rows must not embed full law/sentence payload snapshots.
- Cross-link relation type must be explicit (
relation_kind) and typed. - Cross-link persistence must remain independent from law/judicial schema migrations to avoid coupled release blockers.
Why sentences are not stored in law tables
- Law and judicial entities have different identity lifecycles and provenance.
- Judicial ingestion cadence and schema evolution differ from law ingestion.
- Forcing sentence payloads into law tables would create null-heavy, unstable schemas and break bounded-context ownership.