Linked.Archi ML-Enabled Systems SHACL Shapes
type: Ontology
imports: core#
license: http://creativecommons.org/licenses/by/4.0/
preferred namespace prefix: mlsyssh
creator: Kalin Maldzhanski
description: SHACL shapes for validating ML-enabled system architecture models. Enforces governance rules: every ML model must have versioning, monitoring, and dataset lineage; every serving infrastructure must have latency SLAs.
created: 2026-05-03
modified: 2026-05-03
publisher: Linked.Archi
publisher: linked.archi
status: draft
version IRI: 0.1.0#
version info: 0.1.0

ML Model Governance Shape
type: NodeShape
target class: MLModel
definition: Validates that every ML model has the minimum required governance metadata.
property:
  path: prefLabel
  min count: 1
  datatype: langString
  message: Every ML model must have a human-readable label (skos:prefLabel).
  severity: Violation
property:
  path: hasModelVersion
  min count: 1
  message: Every ML model must have at least one version recorded.
  severity: Violation
property:
  path: trainedOn
  min count: 1
  message: Every ML model must declare the dataset it was trained on (data lineage).
  severity: Violation
property:
  path: hasMonitoringPlan
  min count: 1
  message: Every ML model must have a monitoring plan for production observability.
  severity: Warning
property:
  path: hasPerformanceMetric
  min count: 1
  message: Every ML model should have at least one performance metric recorded.
  severity: Warning
property:
  path: registeredIn
  min count: 1
  message: Every ML model should be registered in a model registry.
  severity: Warning

Dataset Governance Shape
type: NodeShape
target class: Dataset
definition: Validates that every dataset has provenance and quality metadata.
property:
  path: prefLabel
  min count: 1
  message: Every dataset must have a human-readable label.
  severity: Violation
property:
  path: hasDataLineage
  min count: 1
  message: Every dataset must declare its upstream data sources (data lineage).
  severity: Warning

Serving Infrastructure Shape
type: NodeShape
target class: ServingInfrastructure
definition: Validates that serving infrastructure has operational metadata.
property:
  path: serves
  min count: 1
  message: Serving infrastructure must declare which model(s) it serves.
  severity: Violation
property:
  path: hasServingLatencySLA
  min count: 1
  message: Serving infrastructure should have a latency SLA defined.
  severity: Warning

Training Pipeline Shape
type: NodeShape
target class: TrainingPipeline
definition: Validates that training pipelines have required connections.
property:
  path: producesModel
  min count: 1
  message: A training pipeline must declare which model(s) it produces.
  severity: Violation

ML Integration Contract Shape
type: NodeShape
target class: IntegratesWith
definition: Validates that ML/SE integration points have sufficient documentation to prevent the ML Mismatch problem (Lewis et al. 2021).
property:
  path: source
  min count: 1
  max count: 1
  message: An integration relationship must have exactly one source.
  severity: Violation
property:
  path: target
  min count: 1
  max count: 1
  message: An integration relationship must have exactly one target.
  severity: Violation
property:
  path: definition
  min count: 1
  message: Integration contracts should document the interface agreement.
  severity: Warning