# -*- coding: utf-8 -*-
# ==========================================================================
# Iroko Framework — Agency Module  v1.3.0
# ==========================================================================
# Namespace: https://ontology.irokosociety.org/iroko#
# Prefix:    ag:
# Requires:  iroko-core v1.3.0
#
# Models sovereignty-aligned agency for sacred systems:
# sacred agents, spirits, ritual events, event subtypes,
# authorization chains, stewardship mandates, and ritual consequences.
#
# DESIGN PRINCIPLES
# -----------------
# • Graceful degradation: minimal use requires only iroko:SacredAgent,
#   iroko:Spirit, and iroko:RitualEvent.
# • Elaborate profile: event subtypes, AuthorizationChain,
#   StewardshipMandate, RitualConsequence are additive — never required.
# • iroko:hasTemporalVariation is defined in Core and used here
#   without redefinition. Do not redefine per-module.
# • PROV-O subclass alignments live in iroko-align-prov.ttl only.
# ==========================================================================

@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov:    <http://www.w3.org/ns/prov#> .
@prefix iroko: <https://ontology.irokosociety.org/iroko#> .

<https://ontology.irokosociety.org/iroko-agency>
    a owl:Ontology ;
    dcterms:title "Iroko Framework: Agency Module"@en ;
    dcterms:description "Governance Layer module. Sovereignty-aligned agency model for sacred systems. Defines sacred agents, spirits, ritual events, authorization and refusal events, stewardship mandates, and authorization chains. Designed to degrade gracefully: minimal use requires only iroko:SacredAgent, iroko:Spirit, and iroko:RitualEvent. Use with iroko-authority for full authorization governance."@en ;
    dcterms:creator "Iroko Historical Society" ;
    dcterms:issued "2026-02-23"^^xsd:date ;
<<<<<<< HEAD
    dcterms:modified "2026-03-07"^^xsd:date ;
    owl:versionInfo "1.3.0" ;
    owl:versionIRI <https://ontology.irokosociety.org/iroko-agency/1.3.0> ;
=======
    dcterms:modified "2026-03-21"^^xsd:date ;
    owl:versionInfo "1.2.0" ;
    owl:versionIRI <https://ontology.irokosociety.org/iroko-agency/1.2.0> ;
>>>>>>> main
    dcterms:license <https://creativecommons.org/publicdomain/zero/1.0/> ;
    dcterms:isPartOf <https://ontology.irokosociety.org/iroko-framework/> ;
    dcterms:requires <https://ontology.irokosociety.org/iroko-core> ;
    dcterms:references <https://ontology.irokosociety.org/iroko-authority> ;
    rdfs:seeAlso <https://ontology.irokosociety.org/iroko-framework/> .


# ===========================================================================
# CORE CLASSES — minimal profile
# ===========================================================================

iroko:SacredAgent
    a owl:Class ;
    rdfs:subClassOf iroko:SacredEntity ;
    rdfs:label "Sacred Agent"@en ;
    rdfs:comment "An entity recognized within a ritual system as capable of intentional action — authorization, refusal, protection, sanctioning, or manifestation. Defined without metaphysical claims. Enables structured modeling of agency in sovereignty-aware archives. Subclass of prov:Agent via iroko-align-prov.ttl."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:Spirit
    a owl:Class ;
    rdfs:subClassOf iroko:SacredAgent ;
    rdfs:label "Spirit"@en ;
    rdfs:comment "A sacred agent recognized as a spirit within a cultural and ritual framework. Specific typologies (orisha, lwa, nkisi, egun, etc.) modeled via subclasses or concept schemes in domain modules."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:RitualEvent
    a owl:Class ;
    rdfs:label "Ritual Event"@en ;
    rdfs:comment "A time-bounded ritual activity in which agents participate. A ritual event may generate assertions, permissions, constraints, or records. For temporal calendar time on instances, use PROV-O time properties (prov:startedAtTime, prov:endedAtTime). Subclass of prov:Activity via iroko-align-prov.ttl."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .


# ===========================================================================
# OPTIONAL EVENT SUBCLASSES — elaborate profile
# ===========================================================================

iroko:ManifestationEvent
    a owl:Class ;
    rdfs:subClassOf iroko:RitualEvent ;
    rdfs:label "Manifestation Event"@en ;
    rdfs:comment "A ritual event in which a sacred agent is asserted to manifest through a medium, place, dream, divination, or other mode. Connects to iroko-manifestation.ttl for mode and medium typing."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:AuthorizationEvent
    a owl:Class ;
    rdfs:subClassOf iroko:RitualEvent ;
    rdfs:label "Authorization Event"@en ;
    rdfs:comment "A ritual event in which authorization is asserted, delegated, conditioned, or revoked. Supports sovereignty modeling for access, disclosure, and stewardship mandates."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:RefusalEvent
    a owl:Class ;
    rdfs:subClassOf iroko:RitualEvent ;
    rdfs:label "Refusal Event"@en ;
    rdfs:comment "A ritual event in which a sacred agent is asserted to refuse participation, disclosure, access, or a requested action. Enables modeling of sacred refusal as a positive, governance-significant act rather than merely an absence."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .


# ===========================================================================
# OPTIONAL SUPPORT CLASSES — elaborate profile
# ===========================================================================

iroko:RitualAction
    a owl:Class ;
    rdfs:label "Ritual Action"@en ;
    rdfs:comment "A typed action asserted to be performed or effected within ritual practice. Use when finer granularity than RitualEvent is needed — for example, a sequence of actions within a ceremony."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:AuthorizationChain
    a owl:Class ;
    rdfs:label "Authorization Chain"@en ;
    rdfs:comment "A structured representation of delegated or layered authority across agents, mandates, and conditions. Models succession of authorization from one agent or office to another within a ritual governance system."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:StewardshipMandate
    a owl:Class ;
    rdfs:label "Stewardship Mandate"@en ;
    rdfs:comment "A mandate asserted to govern stewardship, custody, disclosure, or use of materials. May be associated with agents, events, and access policies. Can condition iroko:AccessPolicy instances."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:RitualConsequence
    a owl:Class ;
    rdfs:label "Ritual Consequence"@en ;
    rdfs:comment "An outcome category describing asserted consequences of ritual actions or events. Descriptive and claim-bearing — does not assert causal certainty. Access governance applies."@en ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .


# ===========================================================================
# CORE PROPERTIES — minimal profile
# ===========================================================================

iroko:involvesAgent
    a owl:ObjectProperty ;
    rdfs:label "involves agent"@en ;
    rdfs:comment "Links an event, action, or assertion node to an agent involved. Complements prov:wasAssociatedWith in instance data without requiring PROV import."@en ;
    rdfs:range iroko:SacredAgent ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:hasOutcome
    a owl:ObjectProperty ;
    rdfs:label "has outcome"@en ;
    rdfs:comment "Links an event or action to an outcome entity — a RelationshipAssertion, RitualConsequence, RefusalEvent, AccessPolicy, or other outcome record. Range: iroko:SacredEntity — all current and anticipated outcome types (Assertion, RitualConsequence, RefusalEvent) are subclasses of SacredEntity, enabling traversal without locking in a union declaration."@en ;
    rdfs:range iroko:SacredEntity ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .


# ===========================================================================
# OPTIONAL PROPERTIES — elaborate profile
# ===========================================================================

iroko:hasAuthorizationChain
    a owl:ObjectProperty ;
    rdfs:label "has authorization chain"@en ;
    rdfs:comment "Associates a RitualEvent, policy, or mandate with an AuthorizationChain."@en ;
    rdfs:range iroko:AuthorizationChain ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:hasMandate
    a owl:ObjectProperty ;
    rdfs:label "has mandate"@en ;
    rdfs:comment "Associates an agent, event, or policy with a StewardshipMandate."@en ;
    rdfs:range iroko:StewardshipMandate ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:hasRitualConsequence
    a owl:ObjectProperty ;
    rdfs:label "has ritual consequence"@en ;
    rdfs:comment "Associates a ritual event or action with a RitualConsequence category."@en ;
    rdfs:range iroko:RitualConsequence ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:mandateScope
    a owl:DatatypeProperty ;
    rdfs:label "mandate scope"@en ;
    rdfs:comment "Free-text description of the scope of a StewardshipMandate — what materials, processes, or knowledge types it covers."@en ;
    rdfs:domain iroko:StewardshipMandate ;
    rdfs:range rdf:langString ;
    iroko:minimumAccessLevel iroko:access-community-only ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:mandateCondition
    a owl:DatatypeProperty ;
    rdfs:label "mandate condition"@en ;
    rdfs:comment "Text description of conditions activating or limiting this stewardship mandate."@en ;
    rdfs:domain iroko:StewardshipMandate ;
    rdfs:range rdf:langString ;
    iroko:minimumAccessLevel iroko:access-community-only ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

iroko:chainLink
    a owl:ObjectProperty ;
    rdfs:label "chain link"@en ;
    rdfs:comment "Links one node in an AuthorizationChain to the next — the agent, event, or mandate that follows in the delegation sequence."@en ;
    rdfs:domain iroko:AuthorizationChain ;
    iroko:minimumAccessLevel iroko:access-public-unrestricted ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> .

# NOTE: iroko:hasTemporalVariation is defined in Core (iroko-core v1.3.0)
# and applies to agency resources without redefinition here.
# Use:  <iroko:SomeEvent> iroko:hasTemporalVariation <some:TemporalVariation> .

# ── Patch: AuthorizationEvent, RefusalEvent, RitualAction inbound arcs (v1.3.0) ──

iroko:includesAction a owl:ObjectProperty ;
    rdfs:label "includes action"@en ;
    rdfs:comment "Links a RitualEvent to a constituent RitualAction. Use when finer-grained action typing within an event is required — for example, to distinguish the invocation action from the offering action within a single ceremony. A RitualEvent may include multiple RitualActions. Access: community-only."@en ;
    rdfs:domain iroko:RitualEvent ;
    rdfs:range iroko:RitualAction ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> ;
    iroko:minimumAccessLevel iroko:access-community-only .

iroko:includesEvent a owl:ObjectProperty ;
    rdfs:label "includes event"@en ;
    rdfs:comment "Links an AuthorizationChain to a constituent AuthorizationEvent. Separates chain membership from chain sequence: iroko:chainLink traverses the sequence of links; iroko:includesEvent identifies which AuthorizationEvents belong to the chain without requiring full sequence traversal. A chain may include multiple events at different points in the delegation hierarchy. Access: community-only."@en ;
    rdfs:domain iroko:AuthorizationChain ;
    rdfs:range iroko:AuthorizationEvent ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> ;
    iroko:minimumAccessLevel iroko:access-community-only .

iroko:generatesRefusal a owl:ObjectProperty ;
    rdfs:label "generates refusal"@en ;
    rdfs:comment "Links a RitualEvent, SacredAgent, or StewardshipMandate to a RefusalEvent. A RitualEvent generates a RefusalEvent when a sacred agent refuses participation, disclosure, or authorization within that event. A SacredAgent generates a RefusalEvent when it is asserted to have refused an action or disclosure request. A StewardshipMandate generates a RefusalEvent when compliance with the mandate results in a documented refusal of access or authorization. The RefusalEvent is documented without adjudicating whether the refusal is theologically binding."@en ;
    rdfs:domain [ a owl:Class ; owl:unionOf ( iroko:RitualEvent iroko:SacredAgent iroko:StewardshipMandate ) ] ;
    rdfs:range iroko:RefusalEvent ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> ;
    iroko:minimumAccessLevel iroko:access-community-only .

# ── Patch: RitualPractitioner class (v1.3.0) ─────────────────────────────────
# A human agent exercising sacred capacity. Subclass of SacredAgent.
# Distinct from iroko:Authority (which requires social recognition and
# jurisdiction). A RitualPractitioner acts within ritual context regardless
# of whether they hold a formally recognized title. Covers both sanctioned
# practitioners (Babalawo, Manbo, Tata Nganga) and unsanctioned ones (Bokor,
# independent operators) without adjudicating legitimacy. Legitimacy is
# modeled separately via iroko:Authority in iroko-authority if applicable.

iroko:RitualPractitioner a owl:Class ;
    rdfs:label "Ritual Practitioner"@en ;
    rdfs:comment "A human agent recognized as exercising sacred capacity within a ritual system — performing ceremonies, transmitting knowledge, authorizing or refusing actions, or operating with sacred materials. Subclass of iroko:SacredAgent. Covers the full range of practitioners regardless of institutional recognition: consecrated title-holders (Babalawo, Manbo, Tata Nganga, Houngan, Iyalorisa) and those operating outside sanctioned structures (Bokor, independent operators). Legitimacy and jurisdiction, where applicable, are modeled separately via iroko:Authority in iroko-authority. A practitioner may be linked to an Authority record but the two are independent assertions."@en ;
    rdfs:subClassOf iroko:SacredAgent ;
    rdfs:isDefinedBy <https://ontology.irokosociety.org/iroko-agency> ;
    dcterms:issued "2026-03-07"^^xsd:date ;
    dcterms:modified "2026-03-21"^^xsd:date ;
    iroko:minimumAccessLevel iroko:access-community-only .
