ADR-040: SHACL Runtime Enforcement Policy

Status: Accepted
Version: 1.0
Date: 2026-01-15
Related ADRs: ADR-004, ADR-006
Related PRDs: PRD-006, PRD-007, PRD-008


Context

SHACL shapes exist for the Knowledge Graph, but runtime enforcement is inconsistent, fail-open in key paths, and not versioned. This creates silent data quality drift and makes safe rollouts difficult.

Decision

Adopt a fail-closed, context-aware SHACL enforcement policy with a single configuration source of truth and versioned shape loading:

Rationale

Fail-closed enforcement prevents data corruption, while context scoping and maintenance mode allow safe rollout and emergency operations. Versioned shapes enable compatibility management and impact analysis across releases.

Constraints

Quality Attributes

Consequences

Positive

Negative

Bounded Contexts Impacted