bra0 / Docs / Reference / SHACL Shapes
Reference

SHACL Shapes Catalog Catalogue des Shapes SHACL

SHACL shapes are the enforceable governance layer of bra0. They validate data quality, agent contracts, domain models, and pipeline outputs. All validation runs through rudof (Rust) — no JS fallbacks. Les shapes SHACL sont la couche de gouvernance exécutable de bra0. Elles valident la qualité des données, les contrats d'agents, les modèles domaine et les sorties de pipeline. Toute validation passe par rudof (Rust) — pas de fallback JS.

58
SHACL NodeShapes
7
Active files
19
ShEx Shapes
0
CI violations

ShEx + SHACL: complementary roles ShEx + SHACL : rôles complémentaires

bra0 uses both ShEx and SHACL, each for its strength. They are not interchangeable. bra0 utilise à la fois ShEx et SHACL, chacun pour sa force. Ils ne sont pas interchangeables.

ShEx
Schema definition & ORM Définition de schéma & ORM

Defines the shape of data for code generation. bra0.shex → TypeScript types via @ng-org/shex-orm. Powers useShape() reactive CRUD. Lives in the Semantic Layer. Définit la forme des données pour la génération de code. bra0.shex → types TypeScript via @ng-org/shex-orm. Alimente le CRUD réactif useShape(). Vit dans la Semantic Layer.

SHACL 1.2
Validation & governance Validation & gouvernance

Enforces data quality rules at governance boundaries. CI gates, agent contract compliance, DSSC/Gaia-X alignment. Lives in the Control Plane. Engine: rudof (Rust, SHACL 1.2 complete). Applique les règles de qualité des données aux frontières de gouvernance. Portes CI, conformité des contrats d'agents, alignement DSSC/Gaia-X. Vit dans le Control Plane. Moteur : rudof (Rust, SHACL 1.2 complet).

Validation toolchain Chaîne de validation

# Validate agent contracts rudof shacl-validate \ -s ontologies/governance/agent-service-contract.shapes.ttl \ ontologies/governance/agents/all-agents.ttl \ ontologies/governance/agent-service-contract.ttl # Validate capability model rudof shacl-validate \ -s ontologies/enterprise/bra0-shapes.ttl \ ontologies/enterprise/capability-map.ttl # CI pipeline (3 phases: syntax → SHACL → governance) ./scripts/ci-shacl-validate.sh

Shape files Fichiers de shapes

Agent Service Contract 15 shapes
ontologies/governance/agent-service-contract.shapes.ttl

Validates the governed agents against asc: ontology (v0.4). Governance hardening: mandate completeness, bootstrap identity, policy inheritance, temporal validity. AI Act Art. 52 compliance traceability. Valide les agents gouvernés contre l'ontologie asc: (v0.4). Durcissement de gouvernance : complétude des mandats, identité bootstrap, héritage de politiques, validité temporelle. Traçabilité conformité AI Act Art. 52.

AgentServiceShape GovernedAgentShape MandateShape BootstrapIdentityCompleteShape PolicyCompletenessShape PolicyInheritanceShape NonHumanAgentShape CollaborationShape TemporalValidityShape SkillShape PluginShape GatingRequirementsShape ToolPolicyShape SubagentPolicyShape ExecApprovalShape
bra0 Application Profile 12 shapes
ontologies/enterprise/bra0-shapes.ttl

Validates the capability model, urbanization governance, and pipeline structure. SPARQL-based rules enforce naming conventions, unique canonical realizations, and deprecation hygiene. Valide le modèle de capacités, la gouvernance d'urbanisation et la structure des pipelines. Les règles SPARQL appliquent les conventions de nommage, les réalisations canoniques uniques et l'hygiène de dépréciation.

CapabilityShape AssetShape MappingShape NoDuplicateCanonicalShape DeprecatedMappingShape CapabilityNamingShape CapabilityDefinitionPatternShape ProcessCompletenessShape PipelineStepShape PipelineStepContractShape PipelinePlanShape RequiresConsistencyShape
EDGY Structural Fidelity 8 shapes
experiments/edgy-audit/shapes/edgy-structural-fidelity.shacl.ttl

Validates conformance to EDGY language rules. Ontology quality metrics: label completeness, named link hierarchies, facet membership, intersection bridge correctness, tree type consistency. Valide la conformité aux règles du langage EDGY. Métriques qualité d’ontologie : complétude des labels, hiérarchies de liens nommés, appartenance aux facettes, bridges d'intersection, cohérence de type dans les arbres.

ElementLabelShape ElementProvenanceShape NamedLinkHierarchyShape FacetMembershipShape IntersectionBridgeShape TreeSameTypeShape LinkDomainRangeShape NoOrphanClassShape
Contact Validation 7 shapes
ontologies/domain/contacts/contact-validation.shacl.ttl

Validates FOAF/vCard/Org contact data quality. Email pattern validation, organization naming, contact point completeness, duplicate email detection via SPARQL. Valide la qualité des données de contact FOAF/vCard/Org. Validation de pattern email, nommage d'organisation, complétude des points de contact, détection de doublons via SPARQL.

ContactNameShape ContactEmailShape OrgNameShape ContactPointShape UniqueEmailShape
Retro-Engineering 6 shapes
ontologies/domain/retroeng.shapes.ttl

Validates due diligence knowledge graphs from topo perception. Verification status tracking (Verified/Claimed/Gap), provenance chain enforcement, label completeness across 9 target classes. Valide les graphes de connaissance de due diligence issus de la perception topo. Suivi du statut de vérification (Vérifié/Déclaré/Lacune), application de la chaîne de provenance, complétude des labels sur 9 classes cibles.

LabelRequiredShape VerificationStatusShape ProvenanceRequiredShape SecurityControlShape ProvenanceSourceShape GapShape
Bundle Pipeline 5 shapes
ontologies/governance/shapes-bundle.ttl

Validates topo bundle-analysis pipeline output. Chunk size invariants (gzipSize ≤ renderedSize via SPARQL), module classification (C1-C8), capability map linkage. Valide la sortie du pipeline topo bundle-analysis. Invariants de taille de chunk (gzipSize ≤ renderedSize via SPARQL), classification des modules (C1-C8), maillage de la carte de capacités.

BundleSnapshotDetailShape ChunkDetailShape ModuleShape ClassificationShape CapabilityMapShape
Control Plane 3 shapes
src/shapes/shacl/control-plane.shacl.ttl

Embedded shapes for runtime validation of consent policies (ODRL), catalog entries (DCAT), and provenance records (PROV-O). Used by the TypeScript validator in standalone mode. Shapes embarquées pour la validation runtime des politiques de consentement (ODRL), des entrées de catalogue (DCAT) et des enregistrements de provenance (PROV-O). Utilisées par le validateur TypeScript en mode standalone.

ConsentPolicyShape CatalogEntryShape ProvenanceRecordShape

ShEx schema (ORM) Schéma ShEx (ORM)

bra0.shex 19 shapes
src/shapes/shex/bra0.shex

The ShEx schema that defines the data model for all 11 entity types plus auxiliary shapes. Compiled to TypeScript via pnpm shapes:build (@ng-org/shex-orm). Powers the useShape() reactive CRUD hook in both NextGraph and Standalone modes. Le schéma ShEx qui définit le modèle de données pour les 11 types d'entités plus les shapes auxiliaires. Compilé en TypeScript via pnpm shapes:build (@ng-org/shex-orm). Alimente le hook CRUD réactif useShape() en modes NextGraph et Standalone.

OntologyDocumentShape ConceptShape SkosConceptShape AgentServiceShape AttributeShape RelationshipShape SpecializationShape InstanceShape AnnotationPropertyShape ConceptSchemeShape ExternalSourceShape MappingShape ConstraintShapeShape PropertyConstraintShape PrefixShape RelAttributeShape PropertyValueShape

CI integration Intégration CI

SHACL validation runs as a mandatory CI gate on every push to ontologies/**. The pipeline has three phases: La validation SHACL s'exécute comme porte CI obligatoire à chaque push sur ontologies/**. Le pipeline comporte trois phases :

# Phase 1: Turtle syntax validation (all .ttl files) rudof data --format turtle <file.ttl> # Phase 2: Agent Service Contract validation rudof shacl-validate -s agent-service-contract.shapes.ttl \ agents/all-agents.ttl agent-service-contract.ttl # Phase 3: Governance shapes validation rudof shacl-validate -s bra0-shapes.ttl capability-map.ttl

Zero violations is the mandatory gate. The lint ratchet pattern ensures violation count decreases or stays at 0 between commits. No tagged release while violations exist. Zéro violation est la porte obligatoire. Le pattern de cliquet lint garantit que le nombre de violations diminue ou reste à 0 entre les commits. Pas de release taggée tant que des violations existent.

See also Voir aussi

Ontology Catalog — the ontologies that SHACL shapes validate against.
48 Capabilities — GOV-4 (Validation Gates) is powered by these shapes.
3-Layer Architecture — SHACL lives in the Control Plane; ShEx lives in the Semantic Layer.
ASC Ontology — the Agent Service Contract ontology that the largest shape file validates.
Catalogue d'ontologies — les ontologies que les shapes SHACL valident.
48 Capacités — GOV-4 (Portiques de validation) est alimenté par ces shapes.
Architecture 3 couches — SHACL vit dans le Control Plane ; ShEx vit dans la Semantic Layer.
Ontologie ASC — l'ontologie Agent Service Contract que le plus grand fichier de shapes valide.