@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix dct:  <http://purl.org/dc/terms/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xeo:  <https://xeoontology.org/xeo#> .

# XEO Decision module — the interpretation tier, made first-class.
#
# The top stratum of the core sample: the most interpretive layer, where an
# observed condition becomes a diagnosed Gap, a Gap becomes candidate Tactics,
# the scope gate filters them to what is in reach, prior Experiments say which
# tactic has earned trust, and a Recommendation is issued — labeled, honestly,
# as an interpretation.
#
#   observation  ->  Diagnostic reveals Gap  ->  Gap addressableBy Tactic
#                ->  Tactic requiresCapability (the scope gate)
#                ->  Experiment tests Tactic, inContext Gap, producedOutcome
#                ->  Recommendation recommends Tactic, closesGap, supportedBy Experiment
#
# DISCIPLINE (the whole point): this module ships CLASSES, never VALUES. `Gap`
# and `Tactic` are here; "Citation-Waterfall stage" and "publish a comparison
# page" are not — those are skos:Concepts and instances you slot in. The
# specific tactic dimensions (impact / risk / time-to-value), how they are
# weighted, and the rules that constrain an approach under given conditions live
# one layer higher still — a strategy/agency config layer this module
# deliberately leaves open. (That layer now exists: xeo-strategy.ttl.)
#
# One dependency, declared honestly: unlike core/visibility/engagement (which
# stand alone on primary web standards), this module uses SKOS as its
# taxonomy-slot primitive — skos:Concept is where your interventions, gap types,
# dimensions, and priorities plug in. That is the one place a foundational
# standard is load-bearing here rather than an optional bridge.
#
# Every term is interpretation- or derivation-tier (Experiment/Outcome carry an
# observational core): an agent assembling only falsifiable context filters this
# entire module out.

# --- Classes ----------------------------------------------------------------

xeo:Diagnostic a owl:Class ;
    rdfs:label "Diagnostic" ;
    xeo:epistemicLayer "entity" ;
    dct:description "A named, reusable check or framework that reads observations and reveals gaps (e.g. a waterfall-position assessment). The framework is durable; each finding it produces is a Gap." .

xeo:Gap a owl:Class ;
    rdfs:label "Gap" ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "A diagnosed deficit between current and desired visibility. First-order, but a claim: asserted by a Diagnostic from evidence, never observed directly. Its kind (gapType) is a slotted-in skos:Concept — e.g. a Citation-Waterfall stage — not a subclass baked into the ontology." .

xeo:Capability a owl:Class ;
    rdfs:label "Capability" ;
    xeo:epistemicLayer "entity" ;
    dct:description "A lever or strength a party can bring to bear (content, technical, PR, brand, ...). The unit of the scope gate: a Tactic is in reach only when every Capability it requires is approved. Specific capabilities are instances, not subclasses." .

xeo:Tactic a owl:Class ;
    rdfs:label "Tactic" ;
    xeo:epistemicLayer "entity" ;
    dct:description "A durable, named approach that can address gaps. Categorized by a slotted-in intervention taxonomy (inIntervention), scored on slotted-in dimensions (assessedAs -> TacticAssessment), and gated by the Capabilities it requires." .

xeo:Intervention a owl:Class ;
    rdfs:subClassOf skos:Concept ;
    rdfs:label "Intervention" ;
    xeo:epistemicLayer "entity" ;
    dct:description "A category of tactic in a controlled vocabulary you bring. A skos:Concept, so a whole intervention taxonomy slots in without touching the ontology." .

xeo:TacticAssessment a owl:Class ;
    rdfs:label "Tactic Assessment" ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "A scored estimate of a tactic on ONE dimension (onDimension), carrying score, method, and confidence. The dimension set (impact / risk / time-to-value, or ICE, or your own) and how dimensions are weighted are a strategy-layer concern; this class only records that an assessment was made, on what dimension, and by what method." .

xeo:Experiment a owl:Class ;
    rdfs:label "Experiment" ;
    xeo:epistemicLayer "episode" ;
    dct:description "A test of a tactic that ran over a time window: immutable once concluded, method-attributed. The precedent record the decision layer learns from." .

xeo:Outcome a owl:Class ;
    rdfs:label "Outcome" ;
    xeo:epistemicLayer "observation" ;
    dct:description "The measured result an experiment produced (lift, delta, significance). The measurement is an observation; any claim that the tactic CAUSED it is an interpretation, carried on the Recommendation, not asserted here." .

xeo:Recommendation a owl:Class ;
    rdfs:label "Recommendation" ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The labeled claim the whole chain exists to produce: deploy this Tactic to close this Gap, supported by these Experiments, at a given priority. An interpretation — carries method, confidence, and who/what issued it." .

# --- Object properties (the chain) ------------------------------------------

xeo:reveals a owl:ObjectProperty ;
    rdfs:domain xeo:Diagnostic ; rdfs:range xeo:Gap ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "A diagnostic asserts this gap. Carries the assessment method." .

xeo:evidencedBy a owl:ObjectProperty ;
    rdfs:domain xeo:Gap ;
    xeo:epistemicLayer "derivation" ;
    dct:description "The observed facts a gap was derived from — a Prompt's visibilityFor rollup, a URL's ranksFor, a SerpSnapshot. The seam tying the interpretation tier back down to the substrate. Range left open: any observation-bearing term." .

xeo:gapType a owl:ObjectProperty ;
    rdfs:domain xeo:Gap ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "derivation" ;
    dct:description "The kind of gap, as a slotted-in concept (e.g. a Citation-Waterfall stage). Bring your own scheme." .

xeo:addressableBy a owl:ObjectProperty ;
    rdfs:domain xeo:Gap ; rdfs:range xeo:Tactic ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "A candidate tactic for closing this gap — a claim, made before the scope gate is applied." .

xeo:inIntervention a owl:ObjectProperty ;
    rdfs:domain xeo:Tactic ; rdfs:range xeo:Intervention ;
    xeo:epistemicLayer "derivation" ;
    dct:description "The intervention category this tactic belongs to. Parallels core's inTopic." .

xeo:requiresCapability a owl:ObjectProperty ;
    rdfs:domain xeo:Tactic ; rdfs:range xeo:Capability ;
    xeo:epistemicLayer "entity" ;
    dct:description "A capability that must be approved for this tactic to be in reach. The scope-gate edge: a tactic whose required capabilities are all approved is deployable; otherwise it stays advisory." .

xeo:assessedAs a owl:ObjectProperty ;
    rdfs:domain xeo:Tactic ; rdfs:range xeo:TacticAssessment ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "Links a tactic to a per-dimension scored estimate." .

xeo:onDimension a owl:ObjectProperty ;
    rdfs:domain xeo:TacticAssessment ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The dimension being scored, as a slotted-in concept (impact, risk, time-to-value, ICE, RICE, ...). Bring your own dimension scheme." .

xeo:tests a owl:ObjectProperty ;
    rdfs:domain xeo:Experiment ; rdfs:range xeo:Tactic ;
    xeo:epistemicLayer "episode" ;
    dct:description "The tactic this experiment put to the test." .

xeo:inContext a owl:ObjectProperty ;
    rdfs:domain xeo:Experiment ; rdfs:range xeo:Gap ;
    xeo:epistemicLayer "observation" ;
    dct:description "The gap the experiment was run against. The precedent-similarity key: 'has this tactic worked on a gap like mine?' is a match on gapType through this edge." .

xeo:producedOutcome a owl:ObjectProperty ;
    rdfs:domain xeo:Experiment ; rdfs:range xeo:Outcome ;
    xeo:epistemicLayer "observation" ;
    dct:description "The measured result this experiment generated." .

xeo:recommends a owl:ObjectProperty ;
    rdfs:domain xeo:Recommendation ; rdfs:range xeo:Tactic ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The tactic this recommendation puts forward." .

xeo:closesGap a owl:ObjectProperty ;
    rdfs:domain xeo:Recommendation ; rdfs:range xeo:Gap ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The gap this recommendation aims to close." .

xeo:supportedBy a owl:ObjectProperty ;
    rdfs:domain xeo:Recommendation ; rdfs:range xeo:Experiment ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The precedent experiments backing this recommendation — the earned trust behind the pick." .

xeo:atPriority a owl:ObjectProperty ;
    rdfs:domain xeo:Recommendation ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "Priority as a slotted-in concept — bring your own scheme (P0/P1/P2, now/next/later, ...)." .

# --- Datatype properties -----------------------------------------------------
# Note: xeo:confidence is defined in xeo-core (a 0-1 derivation confidence) and
# is reused here on interpretation edges; it is not redeclared.

xeo:method a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "How an interpretation or derivation was produced (model, rule, human analyst). Expected on reveals, assessedAs, and every Recommendation." .

xeo:score a owl:DatatypeProperty ;
    rdfs:domain xeo:TacticAssessment ; rdfs:range xsd:decimal ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The value assigned on the assessed dimension. Scale is defined by the dimension scheme, not fixed here." .

xeo:approved a owl:DatatypeProperty ;
    rdfs:domain xeo:Capability ; rdfs:range xsd:boolean ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "Whether this capability is approved for the engagement — the live state of the scope gate. Tenancy-scoped like everything else." .

xeo:lift a owl:DatatypeProperty ;
    rdfs:domain xeo:Outcome ; rdfs:range xsd:decimal ;
    xeo:epistemicLayer "observation" ;
    dct:description "The measured change the experiment recorded on its target metric." .

xeo:concludedAt a owl:DatatypeProperty ;
    rdfs:domain xeo:Experiment ; rdfs:range xsd:dateTime ;
    xeo:epistemicLayer "episode" ;
    dct:description "When the experiment concluded and its outcome became immutable." .

# --- Module header ----------------------------------------------------------
# At the foot of the file, not the head. Turtle is order-independent, so this
# parses exactly as it would at the top — and placing it here moves no line
# below it. launch-guardian and if-control-center cite this file by line number
# in 17 places; a header at the top would silently invalidate all of them at
# once. Same idiom as the IRIs appended in 6469d13. Move it up top the day those
# citations name terms instead of lines.

xeo:decision-module a owl:Ontology ;
    dct:title "XEO Decision (the interpretation tier)" ;
    dct:description "The top stratum of the core sample: where an observed condition becomes a diagnosed Gap, a Gap becomes candidate Tactics, the capability gate filters them to what is in reach, prior Experiments say which tactic has earned trust, and a Recommendation is issued — labeled, honestly, as an interpretation. Ships CLASSES, never VALUES: the dimensions, weights, and governing rules live one layer higher, in xeo-strategy." ;
    dct:creator "Inbound Found" ;
    owl:versionInfo "0.5.0" .

# --- Gap disposition and size ------------------------------------------------
# Appended at the foot (line-stable for the consumers that cite this file by
# line number). What a Gap carries once an operator has looked at it: a verdict,
# and a magnitude in a stated unit. Values for both are published in
# xeo-schemes.ttl (gapVerdict, magnitudeUnit).

xeo:verdict a owl:ObjectProperty ;
    rdfs:domain xeo:Gap ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "interpretation" ;
    dct:description "The operator's disposition on a diagnosed gap, as a slotted-in concept (attack, fix_first, defend, hold, ignore — see xeo-schemes). Distinct from gapType, which says what KIND of deficit it is; the verdict says what we intend to do about it. Carried by one finding per topic per analysis: it is a property of the topic's scoreboard row, not of every finding beneath it." .

xeo:magnitude a owl:DatatypeProperty ;
    rdfs:domain xeo:Gap ; rdfs:range xsd:decimal ;
    xeo:epistemicLayer "derivation" ;
    dct:description "How big the gap is, where the finding IS a size. Required together with magnitudeUnit and never alone: a magnitude with no unit is an uninterpretable number, a unit with no magnitude is noise." .

xeo:magnitudeUnit a owl:ObjectProperty ;
    rdfs:domain xeo:Gap ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "derivation" ;
    dct:description "The unit magnitude is read in, as a slotted-in concept (impressions, clicks, referring_domains, words, ... — see xeo-schemes). A unit that names its own provenance, like sessions_estimated, is how a derived figure is kept from rendering as a measured one." .

# --- Outcome reading -----------------------------------------------------------
# What an Outcome says once read: did it move, and if it could not be judged,
# why. Values published in xeo-schemes.ttl (outcomeResult, outcomeResultReason).

xeo:result a owl:DatatypeProperty ;
    rdfs:domain xeo:Outcome ; rdfs:range xsd:string ;
    xeo:epistemicLayer "observation" ;
    dct:description "'significant', 'no_change' or 'inconclusive'. Answers DID THIS MOVE; lift's sign answers which way. A regression is significant — the value never smuggles a direction in." .

xeo:resultReason a owl:DatatypeProperty ;
    rdfs:domain xeo:Outcome ; rdfs:range xsd:string ;
    xeo:epistemicLayer "observation" ;
    dct:description "Why an outcome was inconclusive, from a small controlled set (window_incomplete, co_intervention, confounded_external, baseline_unavailable, ...). The two confounder reasons differ on purpose: a co-intervention keeps its lift and shares attribution; an external confounder records none." .
