@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 Strategy module — the norms tier: how recommendations are governed.
#
# The layer xeo-decision deliberately left open. xeo-decision produces a
# Recommendation (deploy this Tactic to close this Gap). This module governs HOW
# that recommendation is allowed to be made: the standing rules — best practices,
# SOPs, lessons learned — that veto, reorder, or caveat a candidate before it
# reaches a human, plus the reusable Playbooks those rules travel in and the
# tenancy axis that decides whose rules win.
#
#   Practice constrains Recommendation                (a rule acts on a candidate)
#   Practice appliesToConcept <role | intervention | gapType | capability>  (its scope)
#   Recommendation appliedPractice Practice           (audit: the rule fired, and why)
#   Playbook includes <Diagnostic | Tactic | Practice> ; tenancy activates Playbook
#
# THE NORM STRATUM (introduced here). Core types every term by the kind of claim
# it makes: entity / episode / observation / derivation, and the decision layer
# adds its interpretive calls on top. All of those describe what IS, or what is
# inferred to be. A norm is a different kind of claim: what SHOULD govern a
# choice — reusable across cases, authored by a person or earned from
# experiments, and revisable. It stands above a single decision: one
# Recommendation is a call about one case; a Practice is a norm about a class of
# cases. This is a new epistemic stratum, and core's epistemicLayer annotation
# already lists it — extension modules introducing norm terms must mark them.
#
# DISCIPLINE (unchanged from decision): this module ships CLASSES, never VALUES.
# Practice, Playbook, and the norm relations are here. "Never 301 a paginated
# archive," "prefer topically-relevant internal links," the page-role vocabulary,
# and the tenancy hierarchy (agency / client / engagement / campaign) are
# skos:Concepts and instances you slot in — not subclasses baked into the ontology.
#
# DEPENDENCIES, declared honestly. Unlike core / visibility / engagement (which
# stand alone on primary web standards), this module builds on xeo-decision — it
# governs its Recommendation, Tactic, Diagnostic, and Capability — and, like
# decision, uses SKOS as its slot primitive (appliesToConcept, hasRole,
# appliesAtScope). An agent assembling only falsifiable context filters this
# whole module out.

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

xeo:Practice a owl:Class ;
    rdfs:label "Practice" ;
    xeo:epistemicLayer "norm" ;
    dct:description "A standing rule that governs how recommendations are made under stated conditions. Best-practices, SOPs, and lessons-learned are all Practices, distinguished by source, not by class. A Practice does one of three things (practiceKind): veto a candidate (guardrail), reorder it (preference), or attach a caveat (guidance). Revisable and versioned (supersedes); scoped to the concepts it appliesToConcept; audited on the recommendations it fired on (appliedPractice)." .

xeo:Playbook a owl:Class ;
    rdfs:label "Playbook" ;
    xeo:epistemicLayer "entity" ;
    dct:description "A reusable, discipline-scoped bundle of Diagnostics, Tactics, and Practices — an 'SEO playbook', an 'AEO playbook', a 'local playbook'. Durable and named, like a Diagnostic. Its scope is the DISCIPLINE, not the account: a Playbook is authored once (by the community or an agency) and reused across every client. What varies per client or campaign is which Playbooks a tenancy activates and which Practices it overrides — never the Playbook itself." .

# --- Object properties -------------------------------------------------------

xeo:constrains a owl:ObjectProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xeo:Recommendation ;
    xeo:epistemicLayer "norm" ;
    dct:description "The Practice governs recommendations matching its conditions — vetoing, reordering, or caveating per its practiceKind. Which recommendations 'match' is set by appliesToConcept." .

xeo:appliesToConcept a owl:ObjectProperty ;
    rdfs:domain xeo:Practice ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "norm" ;
    dct:description "Binds a Practice to the slotted-in concepts it applies to — a page role (hasRole), an Intervention, a gapType, a Capability. Bring your own schemes; the Practice fires only where a candidate carries a matching concept." .

xeo:appliedPractice a owl:ObjectProperty ;
    rdfs:domain xeo:Recommendation ; rdfs:range xeo:Practice ;
    xeo:epistemicLayer "derivation" ;
    dct:description "Audit edge: this Practice was evaluated against this recommendation and fired. Carries method and confidence — the application is a computed derivation, not itself a norm. The transparent record of why a candidate was blocked, demoted, or flagged." .

xeo:supersedes a owl:ObjectProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xeo:Practice ;
    xeo:epistemicLayer "norm" ;
    dct:description "This Practice replaces an earlier version. Editing a rule mints a new Practice that supersedes the old (retired to status 'deprecated', never deleted) — the version chain that makes the norms layer revisable and auditable." .

xeo:includes a owl:ObjectProperty ;
    rdfs:domain xeo:Playbook ;
    xeo:epistemicLayer "entity" ;
    dct:description "A Diagnostic, Tactic, or Practice bundled into this Playbook. Range left open across the three decision/norm terms it may hold." .

xeo:activates a owl:ObjectProperty ;
    rdfs:range xeo:Playbook ;
    xeo:epistemicLayer "norm" ;
    dct:description "A tenancy context puts a Playbook into effect for a body of work. Domain left open: model your own tenancy node (agency, client, engagement, campaign) and point it here — this module stays agnostic about the account hierarchy, which is expressed through appliesAtScope." .

xeo:hasRole a owl:ObjectProperty ;
    rdfs:domain xeo:URL ; rdfs:range skos:Concept ;
    xeo:epistemicLayer "derivation" ;
    dct:description "The structural role a URL plays on its site, as a slotted-in concept. A recommended starter scheme is coarse and purpose-based: brand-core (home, about), commercial (services, products, sales), content (articles, marketing), infrastructure (pagination, archives, tag and category indexes). Assignment is a DERIVATION from graph and crawl structure — inbound link_position, index-vs-leaf link patterns, template similarity — not URL-string matching; it carries method and confidence, and 'unknown' is a valid, conservative state. Parallels core's inTopic. Norms bind to these roles via appliesToConcept, so 'never redirect an infrastructure page for ranking' is a rule over a role, not a growing list of regexes." .

xeo:authoredBy a owl:ObjectProperty ;
    rdfs:domain xeo:Practice ;
    xeo:epistemicLayer "norm" ;
    dct:description "The party that authored a Practice (or an activation or override). Range left open — a person, an agency, the system, or a prov:Agent in your own graph. One half of the customization axis: with appliesAtScope, it decides whose rule wins." .

xeo:appliesAtScope a owl:ObjectProperty ;
    rdfs:range skos:Concept ;
    xeo:epistemicLayer "norm" ;
    dct:description "The tenancy level at which a Practice (or activation or override) applies, as a slotted-in concept. A recommended hierarchy is default < agency < client < engagement < campaign < user. Domain left open so it can annotate any strategy-layer assertion. Resolution is most-specific-wins: a client-level Practice overrides an agency default, which overrides the shipped default. This is the 'customization' axis — not a lens, a specificity ladder." .

# --- Datatype properties -----------------------------------------------------
# Reuses xeo:confidence (0-1) and xeo:method from core; neither is redeclared.

xeo:statement a owl:DatatypeProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xsd:string ;
    xeo:epistemicLayer "norm" ;
    dct:description "The rule in plain language, as a human authored or confirmed it — e.g. 'Never 301 a paginated archive URL for ranking purposes.' The canonical human-facing form; the structural fields (practiceKind, appliesToConcept, constrains) make it executable." .

xeo:practiceKind a owl:DatatypeProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xsd:string ;
    xeo:epistemicLayer "norm" ;
    dct:description "How the Practice acts: 'guardrail' (veto a matching candidate), 'preference' (reorder it), or 'guidance' (attach a caveat, change nothing). The mechanism, kept as a small controlled string rather than a subclass." .

xeo:source a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    xeo:epistemicLayer "norm" ;
    dct:description "Provenance of an assertion. The value vocabulary is subject-specific. On a Practice: 'authored' (a human SOP or best-practice — high standing, durable), 'learned' (earned from the experiment ledger — confidence ratchets with Outcomes), or 'claimed' (an unproven assertion, e.g. a current answer-engine tactic — ships low-confidence with a halfLife and decays unless experiments promote it); this lets one class hold a firm SOP and a fragile claim without conflating their trust. On a ranksFor or visibilityFor rollup: the data source the window was built from. DOMAIN LEFT OPEN deliberately — rdfs:domain is an entailment rule, not a constraint, so naming xeo:Practice here would silently type every rollup edge carrying a source as a Practice." .

xeo:status a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    xeo:epistemicLayer "norm" ;
    dct:description "Lifecycle state of a revisable term. The value vocabulary is subject-specific. On a Practice: 'proposed', 'active', or 'deprecated' — a proposed Practice is visible but does not fire, and superseding one deprecates it. DOMAIN LEFT OPEN deliberately, so another revisable term (the execution lifecycle of a Recommendation, say) can carry a lifecycle without being entailed a Practice." .

xeo:rationale a owl:DatatypeProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xsd:string ;
    xeo:epistemicLayer "norm" ;
    dct:description "Why the rule exists — surfaced to a user when the Practice fires, so a veto or demotion is explained, never silent." .

xeo:halfLife a owl:DatatypeProperty ;
    rdfs:domain xeo:Practice ; rdfs:range xsd:duration ;
    xeo:epistemicLayer "norm" ;
    dct:description "Optional decay window for a Practice whose source is 'claimed': how long the assertion is trusted absent supporting Outcomes. Encodes the reality that today's answer-engine tactics may not survive the year — a claim nobody's experiments confirm ages out on its own." .

# --- Module header ----------------------------------------------------------
# At the foot of the file, not the head — see the note in xeo-decision.ttl.
# This file carries 14 of the line-number citations live in launch-guardian and
# if-control-center; a header at the top would break every one of them.

xeo:strategy-module a owl:Ontology ;
    dct:title "XEO Strategy (the norms tier)" ;
    dct:description "The layer xeo-decision deliberately left open: the standing rules — best practices, SOPs, lessons learned — that veto, reorder, or caveat a Recommendation before it reaches a human, the reusable Playbooks those rules travel in, and the tenancy axis that decides whose rules win. Introduces the norm stratum: a claim about what SHOULD govern a choice, as opposed to what is or is inferred to be." ;
    dct:creator "Inbound Found" ;
    owl:versionInfo "0.5.0" .

# --- Audit-edge value ---------------------------------------------------------
# Appended at the foot, line-stable. What a Practice DID when it fired — the
# value carried on appliedPractice. Published in xeo-schemes.ttl (practiceOutcome).

xeo:practiceOutcome a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    xeo:epistemicLayer "derivation" ;
    dct:description "Carried on an appliedPractice edge: 'vetoed' (a guardrail removed the candidate), 'reranked' (a preference moved it), or 'caveated' (guidance flagged it and changed nothing). One value per practiceKind. Domain left open because it rides on the edge, not on a node." .
