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

# XEO Alignment module — optional bridges to foundational web vocabularies.
#
# XEO stands alone: core, visibility, and engagement load and reason with none
# of the vocabularies referenced here present. These are ALIGNMENTS, not
# dependencies — a crosswalk for anyone who already speaks schema.org, PROV-O,
# or SKOS and wants to connect their data to XEO (or export XEO as their terms).
#
# Two deliberate stances, so the bridges never assert something false:
#   * SKOS mapping relations (skos:closeMatch) express APPROXIMATE cross-vocab
#     correspondence WITHOUT forcing logical entailment — used wherever the
#     concepts rhyme but are not provably identical (e.g. xeo:URL ~ schema:WebPage).
#   * rdfs:subClassOf / rdfs:subPropertyOf are used ONLY where an XEO term is a
#     genuine specialization of the target (e.g. xeo:Crawl is-a prov:Activity).
#
# None of this depends on any third-party SEO vocabulary; schema.org, PROV-O and
# SKOS are neutral web standards, not competitors in the xEO space.

xeo:align-module a owl:Ontology ;
    dct:title "XEO Alignment (schema.org · PROV-O · SKOS)" ;
    dct:description "Optional crosswalk from XEO terms to foundational web vocabularies. Alignments, not imports: XEO is self-contained without them." ;
    dct:creator "Inbound Found" ;
    owl:versionInfo "0.5.0" ;
    rdfs:seeAlso <https://schema.org/> , <http://www.w3.org/ns/prov#> ,
                 <http://www.w3.org/2004/02/skos/core#> .

# ===========================================================================
# schema.org — the neutral base for web entities. Consumers who already publish
# schema.org markup can join their WebSite/WebPage/Brand graph straight to XEO.
# ===========================================================================

xeo:Website skos:closeMatch schema:WebSite ;
    rdfs:comment "An XEO Website is identified by origin and carries tenancy; schema:WebSite is the closest published class." .

xeo:URL skos:closeMatch schema:WebPage ;
    rdfs:comment "XEO models the URL as the durable address-identity; the page's rendered state at a time is a Fetch observation, not the identity. schema:WebPage is the closest published class for 'the page at this address' — closeMatch, not equivalence, because XEO deliberately separates the address (entity) from the document state (observation)." .

xeo:address rdfs:subPropertyOf schema:url ;
    rdfs:comment "The serialized absolute URL is a schema:url value." .

xeo:Brand skos:closeMatch schema:Brand .

xeo:SearchPerformanceFact skos:closeMatch schema:Observation ;
    rdfs:comment "The atomic metric row is an observation with a measured property, value, and time — never a reified 'score' class. schema:Observation captures the same shape." .

xeo:inTopic skos:closeMatch schema:about ;
    rdfs:comment "A Term being in a Topic is a (provenance-carrying) 'aboutness' assertion." .

# ===========================================================================
# PROV-O — the provenance spine. XEO's epistemic layering (entity / episode /
# observation / derivation / interpretation / norm) maps onto PROV as follows:
#   episode      -> in PROV terms this splits into the Activity that ran
#                   (Crawl) and the Entity it produced (LLMResponse, SerpSnapshot)
#   observation  -> assertions attributable to an activity/agent
#   derivation   -> prov:wasDerivedFrom, qualified by method/model/confidence
#   interpretation -> a labeled claim; XEO-native, no PROV analog
#   norm         -> a standing rule over a class of cases; XEO-native, no PROV
#                   analog. Its APPLICATION is provenance (see appliedPractice).
# ===========================================================================

xeo:Crawl rdfs:subClassOf prov:Activity ;
    rdfs:comment "A crawl is a process that ran over a period, fetching URLs." .

xeo:Engine rdfs:subClassOf prov:SoftwareAgent ;
    rdfs:comment "An engine is a software agent that bears responsibility for the responses it produces." .

xeo:LLMResponse rdfs:subClassOf prov:Entity ;
    rdfs:comment "A captured response is an immutable record (entity) generated by, and attributed to, an engine." .

xeo:SerpSnapshot rdfs:subClassOf prov:Entity ;
    rdfs:comment "A SERP snapshot is an immutable captured record." .

xeo:ConversionEvent rdfs:subClassOf prov:Activity ;
    rdfs:comment "Engagement draft: a conversion is an event that occurred at a time." .

xeo:onEngine rdfs:subPropertyOf prov:wasAttributedTo ;
    rdfs:comment "The response is attributed to the engine (and, via model/modelVersion, the model) that produced it." .

xeo:capturedAt rdfs:subPropertyOf prov:generatedAtTime ;
    rdfs:comment "The response record was generated at capture time." .

# ===========================================================================
# SKOS — the taxonomy spine. XEO's Topic tree is a controlled vocabulary:
# a Topic is a concept, childOf is the broader/narrower relation. Users bring
# their OWN concept scheme of topics/gaps/stages and slot it into these terms
# without touching the ontology.
# ===========================================================================

xeo:Topic rdfs:subClassOf skos:Concept ;
    rdfs:comment "A Topic is a concept in a site-scoped scheme, plus derivation provenance (method, model, confidence)." .

xeo:childOf rdfs:subPropertyOf skos:broader ;
    rdfs:comment "Topic childOf Topic: the child points to its broader parent, matching skos:broader." .

xeo:scopedTo rdfs:seeAlso skos:inScheme ;
    rdfs:comment "Topics are scoped to a Website rather than a free-standing ConceptScheme; skos:inScheme is the analogous grouping." .

# ===========================================================================
# Decision layer (xeo-decision.ttl) — PROV-O bridges. The precedent chain is
# provenance: an Experiment is a process, its Outcome the entity it generated,
# and a Gap / Recommendation is derived from the evidence and experiments behind
# it. (The decision module also uses skos:Concept directly for its taxonomy
# slots — gapType, inIntervention, onDimension, atPriority — but that is a
# load-bearing primitive declared in the module itself, not an optional bridge.)
# ===========================================================================

xeo:Experiment rdfs:subClassOf prov:Activity ;
    rdfs:comment "An experiment is a process that ran over a period, testing a tactic." .

xeo:Outcome rdfs:subClassOf prov:Entity ;
    rdfs:comment "An outcome is the measured record an experiment generated." .

xeo:producedOutcome rdfs:subPropertyOf prov:generated ;
    rdfs:comment "The experiment (activity) generated this outcome (entity)." .

xeo:concludedAt rdfs:subPropertyOf prov:endedAtTime ;
    rdfs:comment "When the experiment activity ended." .

xeo:evidencedBy rdfs:subPropertyOf prov:wasDerivedFrom ;
    rdfs:comment "A gap is derived from the observations behind it." .

xeo:supportedBy rdfs:subPropertyOf prov:wasDerivedFrom ;
    rdfs:comment "A recommendation is derived from the precedent experiments that back it." .

# ===========================================================================
# Delivery layer (xeo-delivery.ttl) — schema.org bridge. Only Project has a
# published counterpart; Campaign, Objective and MetricTarget are XEO-native.
# ===========================================================================

xeo:Project skos:closeMatch schema:Project ;
    rdfs:comment "An XEO Project is a contracted body of work on one website with a quota and a scope; schema:Project is the closest published class. closeMatch, not equivalence: XEO's carries an engagement shape schema.org has no notion of." .
