Deontic SHACL is an extension of the Shapes Constraint Language (SHACL) that validates RDF graphs against deontic rules—obligations, permissions, and prohibitions—rather than purely structural constraints. It enables the algorithmic detection of normative violations in knowledge graph representations of legal and regulatory data.
Glossary
Deontic SHACL

What is Deontic SHACL?
Deontic SHACL extends the W3C Shapes Constraint Language to validate RDF knowledge graphs against normative rules, enabling the detection of obligation violations and permission conflicts in legal data representations.
By defining deontic shapes that specify what agents must, may, or must not do, Deontic SHACL transforms a standard graph validation engine into a normative compliance checker. This bridges the gap between formal deontic logic and practical semantic web technologies, allowing legal reasoning systems to verify that a set of facts satisfies an encoded regulatory framework.
Core Characteristics of Deontic SHACL
Deontic SHACL extends the W3C Shapes Constraint Language to validate RDF graphs against normative rules, enabling the detection of obligations, permissions, and prohibitions within knowledge graph representations of legal and compliance data.
Deontic Target Declaration
Extends standard SHACL target declarations with deontic modalities. A shape can target nodes not just for structural validation, but to assert that certain triples must exist (obligation), may exist (permission), or must not exist (prohibition). This is achieved through custom SHACL parameter declarations or SPARQL-based constraint components that evaluate the deontic status of a graph pattern rather than simple conformance.
Violation vs. Non-Compliance Detection
Distinguishes between two distinct failure modes critical for legal reasoning systems:
- Structural Violation: A standard SHACL constraint failure indicating malformed data
- Normative Non-Compliance: A deontic failure indicating a breach of an obligation or a prohibited state exists
This separation allows compliance engines to generate audit trails that differentiate between data quality issues and actual regulatory breaches, each triggering different remediation workflows.
Contrary-to-Duty Reasoning Support
Integrates with contrary-to-duty (CTD) obligation modeling by allowing shapes to define primary obligations and their corresponding fallback rules. When a primary obligation shape reports a violation, secondary CTD shapes are automatically activated to validate whether the appropriate remedial obligations have been fulfilled. This prevents the logical paradoxes that arise when a violation of a primary norm is treated as a simple constraint failure with no normative consequence.
Normative Severity Levels
Assigns severity classifications to deontic constraint violations beyond standard SHACL severity levels:
- Prohibition violations: Critical severity, indicating forbidden states
- Obligation violations: High severity, indicating unfulfilled duties
- Permission boundary warnings: Informational, indicating states approaching prohibition thresholds
These levels integrate with compliance dashboards to prioritize remediation actions based on normative weight rather than technical severity alone.
Temporal Deontic Validation
Extends SHACL's validation scope to include temporal operators that evaluate deontic compliance over time windows. Shapes can assert that:
- An obligation must be fulfilled within 30 days of a triggering event
- A prohibition applies only during a specified regulatory period
- A permission expires after a deadline
This temporal awareness is essential for modeling real-world legal obligations that have activation, fulfillment, and expiration lifecycles.
Normative Conflict Reporting
Detects and reports normative conflicts where two applicable shapes prescribe incompatible deontic conclusions for the same target node. For example, one regulation may obligate data retention while another prohibits it. The conflict report includes:
- The conflicting shape identifiers and their source authority
- The specific triples in conflict
- Suggested resolution strategies based on lex superior, lex specialis, or lex posterior principles
This transforms SHACL from a passive validator into an active normative reasoning engine.
Deontic SHACL vs. Standard SHACL
A feature-level comparison of the Shapes Constraint Language extension for deontic rule validation against the standard W3C SHACL specification.
| Feature | Standard SHACL | Deontic SHACL |
|---|---|---|
Primary Validation Target | Structural conformance and data integrity | Normative compliance and deontic rule adherence |
Constraint Type | Descriptive (what is) | Prescriptive (what ought to be) |
Violation Semantics | Data error or shape mismatch | Normative violation (breach of obligation, prohibition, or permission) |
Deontic Modalities | ||
Obligation Modeling | ||
Permission Modeling | ||
Prohibition Modeling | ||
Contrary-to-Duty Reasoning |
Frequently Asked Questions
Clear answers to common questions about using SHACL to validate normative rules and detect deontic violations in legal knowledge graphs.
Deontic SHACL is an extension of the W3C Shapes Constraint Language (SHACL) that validates RDF graphs against deontic rules—formal representations of obligations, permissions, and prohibitions. While standard SHACL checks whether data conforms to structural shapes, Deontic SHACL evaluates whether an agent's actions or a state of affairs comply with a normative framework. It works by defining deontic shapes that specify what must be true (obligation), what may be true (permission), or what must not be true (prohibition) within a knowledge graph. When a graph node violates a deontic shape, the engine generates a sh:Violation report that includes the specific norm breached, the violating entity, and the context of the infraction. This enables legal reasoning systems to programmatically detect non-compliance in representations of contracts, regulations, or corporate policies.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the foundational technologies and formalisms that enable the validation of RDF knowledge graphs against deontic rules, ensuring normative compliance in legal AI systems.
Normative Conflict
A state where two or more applicable norms prescribe incompatible actions, requiring resolution strategies.
- Resolution Principles: Includes lex superior (higher authority prevails), lex specialis (specific law overrides general), and lex posterior (later law supersedes earlier).
- Deontic SHACL Role: Detects these conflicts by identifying nodes that simultaneously violate and satisfy contradictory deontic shapes, flagging them for automated or manual resolution.
Deontic Event Calculus
A temporal formalism for tracking the full lifecycle of obligations within an event stream.
- Lifecycle States: Models the activation, fulfillment, violation, and expiration of duties over time.
- Synergy with SHACL: While Deontic SHACL validates a static graph snapshot, Deontic Event Calculus monitors the dynamic sequence of actions that lead to a violation, providing a complete temporal compliance picture.
Normative Compliance Checker
An algorithmic engine that evaluates a trace of agent actions against a formalized set of deontic rules.
- Function: Consumes a log of events and a knowledge base of norms to output a compliance report detailing violations.
- Deontic SHACL as a Component: Serves as the static validation module within a larger compliance checking architecture, verifying the state of the world at any given point against normative constraints.
Hohfeldian Analysis
A fundamental analytical framework decomposing legal relations into eight jural correlatives.
- Core Pairs: Includes right/duty, privilege/no-right, power/liability, and immunity/disability.
- Precision for SHACL: Applying Hohfeldian analysis before modeling ensures that Deontic SHACL shapes accurately capture the directed nature of legal relations, distinguishing a duty owed to a specific party from a general prohibition.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us