SHACL Shape Governance
Ownership
- Shared shapes (
ontologies/shared/core.shacl) are owned by the architecture team.
- Bounded-context shapes are owned by their domain teams.
Approval Flow
- Contributor runs
python tools/shape_lint.py locally before opening a PR; CI runs it automatically and blocks merge on errors.
- Contributor runs
python tools/shape_impact_analysis.py --shape-version <candidate> --graph <snapshot|ttl|nt> before PR:
<candidate> is the SHACL shape version identifier to analyze.
<snapshot|ttl|nt> selects the graph input format (snapshot, Turtle, N-Triples).
- On errors: fix and re-run; on warnings: document the rationale in the PR and re-run after updates.
- Shared shapes require architecture sign-off (tag the architecture team as reviewers).
- Bounded-context shapes require domain owner approval (tag the owning team or add them as reviewers).
Conflict Resolution
- Bounded-context shapes must extend shared constraints, not override them.
- Conflicts detected by
shape_lint.py are errors and block merges.
Versioning Policy
- Major: breaking constraints
- Minor: additive, backward-compatible constraints
- Patch: documentation-only or non-functional cleanup