core:
  type: Package
  publisher: worldview.genval.ai
  version: 1.0.0
  imports:
    - publisher: kanonak.org
      packages:
        - package: core-rdf
          match: ^
          version: 1.0.0
          alias: rdfs
        - package: core-owl
          match: ^
          version: 2.0.0
          alias: owl
        - package: core-xsd
          match: ^
          version: 1.0.0
          alias: xsd

# =============================================================================
# OVERVIEW
#
# This package defines the domain-general vocabulary for authoring falsifiable,
# evidence-backed worldview snapshots under the Kanonak Protocol. A worldview
# snapshot is a point-in-time record of "what we believe and why" - a list of
# falsifiable theses, each with explicit invalidation conditions and supporting
# evidence, plus an overarching narrative.
#
# The ontology has six concentric layers:
#
#   1. Snapshot / Thesis - the top-level units of authorship.
#   2. Evidence base + four generic Evidence subclasses - the typed claims
#      that support theses.
#   3. Status and Strength enumerations - small categorical vocabularies.
#   4. Reference vocabulary stubs - abstract classes (Indicator, Event,
#      Institution, GovernmentBody, Location, Party, Role) whose concrete
#      instances live in domain-specific packages (e.g. worldview.genval.ai/
#      finance for finance-domain instances).
#   5. Condition DSL - a boolean condition tree (Condition + 11 concrete
#      subclasses arranged through three abstract intermediates:
#      NaryBoolCondition, ComparisonCondition, TimeBoundCondition) that
#      turns prose invalidation conditions into a structure a rules engine
#      can evaluate.
#   6. Generic seed instances - small enumerations the DSL itself depends on
#      (Comparator, TimeUnit, Durability, EvaluationState) plus broad Policy
#      and Role members usable across domains. DerivedIndicator subclasses
#      (MovingAverage, etc.) are real classes rather than tagged-union
#      discriminators.
#
# Domain extensions (finance, climate, scientific, etc.) import this package,
# subclass Evidence / Indicator / Event for their domain, and add named
# instances of the abstract reference classes.
#
# This package is the canonical source of truth. Reference documentation
# (markdown / HTML / JSON) is DERIVED from these `comment:` fields via
# transformations - never authored separately.
# =============================================================================


# =============================================================================
# 1. SNAPSHOT AND THESIS
# =============================================================================

WorldviewSnapshot:
  type: rdfs.Class
  label: Worldview Snapshot
  comment: >
    A point-in-time record of a complete worldview. Conventionally a worldview
    package contains exactly ONE WorldviewSnapshot named `snapshot` plus a list
    of WorldviewThesis instances and the Evidence instances those theses cite.
    The snapshot's `observedAt` timestamp + the package's semver version
    together define the snapshot's identity. Snapshot package versions are
    immutable - a refresh writes a new version, never edits an existing one,
    so `git log` doubles as the audit trail of evolving belief.

WorldviewThesis:
  type: rdfs.Class
  label: Worldview Thesis
  comment: >
    A single falsifiable claim within a worldview. Carries the prose statement
    (`thesisStatement`), an explicit machine-evaluable `invalidationCondition`
    that defines when the thesis breaks, a list of `supportingEvidence` URIs
    backing the claim, a calibrated `confidence` (0.0-1.0), and a `status`
    (active / retired / invalidated). A thesis without an invalidationCondition
    is unfalsifiable belief, not analysis.

# --- WorldviewSnapshot properties ---

observedAt:
  type: owl.DatatypeProperty
  domain: WorldviewSnapshot
  range: xsd.dateTime
  label: Observed At
  comment: >
    ISO-8601 timestamp marking the moment the snapshot was authored. Should
    reflect the data cutoff, not the file write time - a snapshot built from
    a market close should carry that close time.

narrative:
  type: owl.DatatypeProperty
  domain: WorldviewSnapshot
  range: xsd.string
  label: Narrative
  comment: >
    A 1-3 paragraph human-readable summary of the regime, the day's pivotal
    events, and the rationale behind any confidence shifts since the prior
    snapshot. The narrative is for humans; the structured theses and evidence
    are for tools.

hasThesis:
  type: owl.ObjectProperty
  domain: WorldviewSnapshot
  range: WorldviewThesis
  label: Has Thesis
  comment: >
    Ordered list of theses included in this snapshot. Order is significant
    only insofar as it affects the rendering order in transformations; the
    set is the source of truth, not the sequence.

previousSnapshot:
  type: owl.ObjectProperty
  domain: WorldviewSnapshot
  range: WorldviewSnapshot
  label: Previous Snapshot
  comment: >
    Optional explicit reference to the WorldviewSnapshot this snapshot
    succeeds. The conventional package version chain (1.0.0 -> 1.0.1 ->
    1.0.2) implicitly carries succession order, but this property makes
    it machine-walkable without inferring from version numbers and
    handles non-linear cases (a forked experimental branch that
    diverges and rejoins, or a regime-shift major version bump that
    skips intermediate patches). Time-series transformations should
    prefer this property when present; fall back to semver order when
    absent. If absent for a package's first snapshot, that's correct
    (no predecessor).

# --- WorldviewThesis properties ---

thesisStatement:
  type: owl.DatatypeProperty
  domain: WorldviewThesis
  range: xsd.string
  label: Thesis Statement
  comment: >
    Prose statement of the thesis. 2-4 sentences, falsifiable in spirit (the
    structured `invalidationCondition` makes "falsifiable" precise). Authored
    in plain language so a human reader can grasp the claim without parsing
    YAML.

supportingEvidence:
  type: owl.ObjectProperty
  domain: WorldviewThesis
  range: Evidence
  label: Supporting Evidence
  comment: >
    Ordered list of references to Evidence instances (typically defined in the
    same snapshot package). Each cited Evidence should genuinely support the
    thesis - over-citing weak or tangential evidence weakens the thesis's
    credibility, not strengthens it.

invalidationCondition:
  type: owl.ObjectProperty
  domain: WorldviewThesis
  range: Condition
  label: Invalidation Condition
  comment: >
    The structured machine-evaluable condition under which this thesis is
    invalidated. A `Condition` is a tagged-union expression tree (see
    Condition / ConditionForm below). When a rules engine evaluates the
    condition tree against current data and the engine returns `satisfied`,
    the thesis SHOULD be flagged for human review and a status flip to
    `cp.invalidated`. Partial / unsatisfied / unknown states are diagnostic
    inputs to thesis-confidence decisions but do not auto-mutate state.

confidence:
  type: owl.DatatypeProperty
  domain: WorldviewThesis
  range: xsd.decimal
  label: Confidence
  comment: >
    Decimal in 0.0-1.0 expressing the author's conviction. Calibration scale
    (working heuristic, not a formal Brier-style target):
      0.9-1.0 - thesis would survive any one of its invalidation conditions firing.
      0.75-0.85 - high conviction; act on it; multiple independent supports.
      0.5-0.7 - working hypothesis; size modestly.
      0.3-0.45 - watching; one or two structural supports; invalidation in motion.
      0.1-0.25 - mostly invalidated; consider retiring.
      0.0 - should be `status: invalidated`, not active with low confidence.

status:
  type: owl.ObjectProperty
  domain: WorldviewThesis
  range: ThesisStatus
  label: Status
  comment: >
    The thesis's lifecycle state. Transitions allowed - active to retired,
    active to invalidated. Not allowed - invalidated back to active (a
    falsified thesis stays falsified; if the same idea becomes valid again
    it deserves a new thesis with a new name and fresh framing).

confidenceRationale:
  type: owl.DatatypeProperty
  domain: WorldviewThesis
  range: xsd.string
  label: Confidence Rationale
  comment: >
    Optional 1-2 sentence prose explaining why confidence shifted in this
    snapshot relative to the prior one. Splitting the rationale onto each
    thesis (vs. burying it in the snapshot's global narrative) lets a
    time-series view show "thesis X moved 0.5 -> 0.7 because $reason" per
    version without parsing free-form prose. Authors may leave this blank
    and use the snapshot's narrative for the same purpose; the property
    is for tooling that wants the rationale machine-attached to the
    confidence value.

statusTransitionEvidence:
  type: owl.ObjectProperty
  domain: WorldviewThesis
  range: Evidence
  label: Status Transition Evidence
  comment: >
    Optional reference to the Evidence instance that triggered the most
    recent status transition (active -> retired, or active -> invalidated).
    Set when status changes; left absent on initial-active status. Time-
    series visualizations use this to annotate the timeline ("thesis
    invalidated by $evidence on $date") rather than parsing the
    invalidationCondition tree to figure out which condition fired. May
    be a list in v2 if multiple evidence trigger together; v1 single ref
    is the simpler case and covers most patterns.


# =============================================================================
# 2. THESIS STATUS ENUM
# =============================================================================

ThesisStatus:
  type: rdfs.Class
  label: Thesis Status
  comment: >
    Lifecycle state of a thesis. Closed enumeration - the three named instances
    below are the only valid values.

active:
  type: ThesisStatus
  label: Active
  comment: >
    Thesis is in force, supporting evidence is current, invalidation condition
    has not fired. The default state for any thesis appearing in `hasThesis`.

retired:
  type: ThesisStatus
  label: Retired
  comment: >
    Thesis is no longer in force but was NOT falsified - it lost relevance
    because the regime shifted, the framing became obsolete, or a follow-on
    thesis subsumed it. A retired thesis remains in the snapshot's `hasThesis`
    for history; consumers should not treat it as informing current allocation.

invalidated:
  type: ThesisStatus
  label: Invalidated
  comment: >
    Thesis's invalidation condition fired and the thesis is now falsified.
    Stays in the snapshot's `hasThesis` permanently - the falsification record
    is part of the audit trail. A NEW thesis with a different framing should
    be authored if a related claim returns to relevance later.


# =============================================================================
# 3. EVIDENCE BASE AND COMMON PROPERTIES
# =============================================================================

Evidence:
  type: rdfs.Class
  label: Evidence
  comment: >
    Abstract base for any typed claim that supports or weakens a thesis. Never
    instantiated directly - authors instantiate one of the typed subclasses
    (PolicyEvidence, GeopoliticalEvidence, OfficialStatementEvidence,
    EconomicDataEvidence in this package; finance-specific subclasses in
    worldview.genval.ai/finance; future climate-specific subclasses in a
    climate package). Picking the most specific subclass is what lets future
    query tooling slice "show me all AnalystEvidence about gold targets in
    Q1" or "show me all GeopoliticalEvidence involving Iran in 2026".

evidenceStatement:
  type: owl.DatatypeProperty
  domain: Evidence
  range: xsd.string
  label: Evidence Statement
  comment: >
    A 1-3 sentence prose claim distilled from the underlying source. NOT a
    paste of the full source. The statement is what the worldview reasons
    over; the `citation` URI is where to verify it. Keep statements specific
    and quantitative where possible.

evidenceStrength:
  type: owl.ObjectProperty
  domain: Evidence
  range: EvidenceStrength
  label: Evidence Strength
  comment: >
    The author's assessment of how strongly this evidence supports the claim,
    derived primarily from source reputation and primacy (primary source vs.
    aggregator vs. anonymous). See EvidenceStrength named instances for the
    calibration heuristic.

evidenceObservedAt:
  type: owl.DatatypeProperty
  domain: Evidence
  range: xsd.dateTime
  label: Evidence Observed At
  comment: >
    ISO-8601 timestamp of when the underlying fact was observed (price close
    time, news publication time, official meeting time, etc.). Optional but
    strongly preferred - a fact without a timestamp is hard to age out of
    relevance.

citation:
  type: owl.DatatypeProperty
  domain: Evidence
  range: xsd.string
  label: Citation
  comment: >
    URI or other primary-source identifier (typically a URL) that a future
    auditor can follow to verify the recorded statement. The audit pointer.
    Optional but strongly preferred for evidence drawn from external sources.


# =============================================================================
# 4. EVIDENCE STRENGTH ENUM
# =============================================================================

EvidenceStrength:
  type: rdfs.Class
  label: Evidence Strength
  comment: >
    Categorical assessment of how strongly an Evidence instance supports its
    cited claim. Closed enumeration with three levels.

evidence-strong:
  type: EvidenceStrength
  label: Strong
  comment: >
    Primary source, official press release, audited filing, or tier-1 wire
    (Reuters, Bloomberg, WSJ, FT, AP). Confirmed government action with named
    issuing body. The default level for evidence drawn directly from the
    institution that produced the fact.

evidence-moderate:
  type: EvidenceStrength
  label: Moderate
  comment: >
    Tier-2 financial press (CNBC, MarketWatch, Yahoo Finance), industry trade
    press, or analyst notes without primary attribution. Suggestive but
    deserving of corroboration before driving high-confidence theses.

evidence-weak:
  type: EvidenceStrength
  label: Weak
  comment: >
    Blog, secondary aggregation, anonymous source, or unverified social
    media. Should rarely raise thesis confidence on its own; useful as a
    leading indicator pending corroboration.


# =============================================================================
# 5. GENERIC EVIDENCE SUBCLASSES
# =============================================================================

PolicyEvidence:
  type: rdfs.Class
  subClassOf: Evidence
  label: Policy Evidence
  comment: >
    A government action - executive order, appointment, sanction, budget
    appropriation, regulatory ruling, treaty signing. Captures the policy as
    a discrete event rather than as a market reaction to it.

GeopoliticalEvidence:
  type: rdfs.Class
  subClassOf: Evidence
  label: Geopolitical Evidence
  comment: >
    A geopolitical event - war, peace, military operation, election outcome,
    diplomatic accord. Distinct from PolicyEvidence in that it captures
    multi-party events between state-level actors rather than a single
    state's internal policy action.

OfficialStatementEvidence:
  type: rdfs.Class
  subClassOf: Evidence
  label: Official Statement Evidence
  comment: >
    A direct quote or attributable statement from a named official -
    politician, executive, central banker, regulator, judge. The quote
    itself is the evidence; the statement's effects on markets are
    captured separately as MarketDataEvidence (in finance) or other
    domain-specific subclasses.

EconomicDataEvidence:
  type: rdfs.Class
  subClassOf: Evidence
  label: Economic Data Evidence
  comment: >
    A macro economic data release - CPI, NFP, GDP, unemployment, treasury
    yield curve, breakeven inflation. Indicator-based rather than entity-
    based. The `indicatorName` should reference an Indicator instance
    (typically defined in a domain-specific package).

# --- PolicyEvidence properties ---

issuingBody:
  type: owl.ObjectProperty
  domain: PolicyEvidence
  range: GovernmentBody
  label: Issuing Body
  comment: >
    The government body or executive office that issued the policy.
    Reference to a GovernmentBody instance (typically defined in a
    domain-specific or country-specific package).

policy:
  type: owl.ObjectProperty
  domain: PolicyEvidence
  range: Policy
  label: Policy Category
  comment: >
    Categorical type of policy action. References a Policy named instance.
    Generic categories (appointment, executive-order, budget, sanction,
    treaty, investigation) live in this package; domain-specific categories
    may be added in extension packages.

effectiveDate:
  type: owl.DatatypeProperty
  domain: PolicyEvidence
  range: xsd.date
  label: Effective Date
  comment: >
    Date the policy took or takes effect. Distinct from announcement date
    when the two differ. Optional - some policies (public-pressure,
    fiscal-guidance) have no formal effective date.

# --- GeopoliticalEvidence properties ---

eventLocation:
  type: owl.ObjectProperty
  domain: GeopoliticalEvidence
  range: Location
  label: Event Location
  comment: >
    Reference to a Location instance describing where the event took place.
    Locations are typed entities, not free-form strings - use the Location
    class to enable cross-evidence queries like "all events in the Persian
    Gulf in 2026".

partiesInvolved:
  type: owl.ObjectProperty
  domain: GeopoliticalEvidence
  range: Party
  label: Parties Involved
  comment: >
    Ordered list of references to Party instances representing actors in the
    event. Parties are typed entities (nations, organizations, individuals)
    rather than free-form strings.

geopoliticalEventDate:
  type: owl.DatatypeProperty
  domain: GeopoliticalEvidence
  range: xsd.date
  label: Geopolitical Event Date
  comment: >
    Date the event occurred. For events with duration (campaigns, sieges,
    negotiations), use the start date and capture duration in the prose
    `evidenceStatement`. v2 may add structured duration.

# --- OfficialStatementEvidence properties ---

speaker:
  type: owl.ObjectProperty
  domain: OfficialStatementEvidence
  range: Party
  label: Speaker
  comment: >
    The named official making the statement. References a Party instance.
    Use a Party rather than a free-form string so the same speaker across
    multiple statements is unambiguously the same entity.

speakerRole:
  type: owl.ObjectProperty
  domain: OfficialStatementEvidence
  range: Role
  label: Speaker Role
  comment: >
    The role the speaker held at the time of the statement. References a
    Role instance. Use Role rather than a free-form string to disambiguate
    "Fed Chair" vs "Fed Chair (outgoing)" vs "Fed Chair nominee" - those are
    distinct Role instances reflecting position in a transition lifecycle.

statementVenue:
  type: owl.DatatypeProperty
  domain: OfficialStatementEvidence
  range: xsd.string
  label: Statement Venue
  comment: >
    Where the statement was delivered (press conference, hearing, written
    release, interview). String for v1; v2 may upgrade to a typed Venue
    class once usage patterns stabilize.

statementDate:
  type: owl.DatatypeProperty
  domain: OfficialStatementEvidence
  range: xsd.date
  label: Statement Date
  comment: >
    Date of the statement. Distinct from `evidenceObservedAt` (the article
    publication time) when a statement is reported after the fact.

# --- EconomicDataEvidence properties ---

indicatorName:
  type: owl.ObjectProperty
  domain: EconomicDataEvidence
  range: Indicator
  label: Indicator
  comment: >
    The named Indicator this datapoint observes. References an Indicator
    instance defined in a domain package (e.g. `fin.10y-treasury-yield`,
    `fin.unemployment-rate`). Indicators are typed so multiple readings of
    the same indicator across snapshots are unambiguously comparable.

indicatorValue:
  type: owl.DatatypeProperty
  domain: EconomicDataEvidence
  range: xsd.decimal
  label: Indicator Value
  comment: >
    The numeric reading. Units are carried by the Indicator instance, not
    the value - "4.42% 10y yield" stores `4.42` here and `pct` on the
    Indicator. Avoid stuffing units, qualifiers, or ranges into the value.
    For range readings, use evidenceStatement prose; v2 may add a
    structured range type.

indicatorPeriod:
  type: owl.DatatypeProperty
  domain: EconomicDataEvidence
  range: xsd.string
  label: Indicator Period
  comment: >
    String describing the reading's reporting period (e.g. "April 2026",
    "Q1 2026", "trailing 25-30 years"). Free-form for v1; v2 may upgrade
    to a typed FiscalPeriod / RangeRef.


# =============================================================================
# 6. REFERENCE VOCABULARY STUBS
#
# Abstract classes whose concrete instances are typically defined in
# domain-specific packages. This package defines NO instances of these
# classes - finance, climate, scientific extensions add their own.
# =============================================================================

GovernmentBody:
  type: rdfs.Class
  label: Government Body
  comment: >
    A government body - executive office, legislature, regulatory agency,
    judicial body, sovereign wealth manager. Typically defined per-country
    in domain extensions (e.g. `gov-us.white-house`, `gov-us.dod`,
    `gov-us.fed`). The class itself is in core so PolicyEvidence can have a
    typed `issuingBody` regardless of country.

Location:
  type: rdfs.Class
  label: Location
  comment: >
    A geographic or jurisdictional location - country, region, body of water,
    airspace, building, or named area. Locations are typed so the same place
    (e.g. "Persian Gulf") referenced across many GeopoliticalEvidence
    instances is unambiguously a single entity.

Party:
  type: rdfs.Class
  label: Party
  comment: >
    A party in a geopolitical or institutional sense - nation, organization,
    or individual official. Used by GeopoliticalEvidence.partiesInvolved and
    OfficialStatementEvidence.speaker. Concrete Party instances live in
    domain packages.

Role:
  type: rdfs.Class
  label: Role
  comment: >
    An office, title, or functional role held by a Party (typically an
    individual). Roles can be lifecycle-specific - "Fed Chair", "Fed Chair
    (outgoing)", and "Fed Chair nominee" are distinct Role instances during
    a transition because they carry different policy weight.

Institution:
  type: rdfs.Class
  label: Institution
  comment: >
    A persistent organization - corporation, central bank, sell-side analyst
    house, multilateral body, NGO. Domain extensions subclass this for typed
    differentiation (CentralBank, AnalystInstitution, etc.).

Indicator:
  type: rdfs.Class
  label: Indicator
  comment: >
    A named, repeatedly-observed numeric series - a market price, a yield, a
    macro statistic, an aggregate flow. Indicators are typed so cross-
    snapshot comparisons of "the same indicator" are unambiguous. Concrete
    Indicator instances live in domain packages; this package only declares
    the abstract class.

Event:
  type: rdfs.Class
  label: Event
  comment: >
    A named category of event the runtime can detect against a curated event
    log. Used by Condition's event-condition kind. Concrete Event instances
    (e.g. `fin.evt-strait-of-hormuz-reopened`, `fin.evt-opec-supply-shock`)
    live in domain packages. Each named instance is a CATEGORY of event;
    specific event occurrences live in the runtime event log.


# =============================================================================
# 7. POLICY-TYPE ENUMERATION (generic; finance and other domains can add more)
# =============================================================================

Policy:
  type: rdfs.Class
  label: Policy
  comment: >
    A category of government action. Open enumeration - this package
    seeds widely-applicable categories; domain extensions can add specialized
    ones via additional named instances. Named instances represent KINDS of
    policy actions (executive-order, appointment, treaty), not specific
    policies; a specific policy action is a PolicyEvidence instance whose
    `policy` property points at the relevant Policy named instance.

appointment:
  type: Policy
  label: Appointment
  comment: >
    Naming or confirming an individual to a government office or seat -
    cabinet appointments, judicial nominations, central bank chair
    nominations, board seats.

executive-order:
  type: Policy
  label: Executive Order
  comment: >
    A directive issued by a head of state with the force of law within
    their constitutional authority. Captures both new orders and revocations.

budget:
  type: Policy
  label: Budget
  comment: >
    Formal budget appropriation or budget request - whether enacted, vetoed,
    or in process. The `effectiveDate` carries the fiscal year start.

sanction:
  type: Policy
  label: Sanction
  comment: >
    Economic or trade sanction imposed on a target party (nation,
    organization, individual). Sanctions removal is a separate Policy
    instance (`sanction-lifted`).

sanction-lifted:
  type: Policy
  label: Sanction Lifted
  comment: >
    Removal or suspension of a previously-imposed sanction.

treaty:
  type: Policy
  label: Treaty
  comment: >
    A formal international agreement - signed, ratified, withdrawn, or
    amended. Captures bilateral and multilateral instruments alike.

investigation:
  type: Policy
  label: Investigation
  comment: >
    A formal investigative action - opening, halting, settling, or closing
    an inquiry. Investigations of officials are PolicyEvidence; the
    underlying conduct may also generate other Evidence types.

regulatory-ruling:
  type: Policy
  label: Regulatory Ruling
  comment: >
    A formal ruling, order, or rulemaking by an executive-branch regulator.
    Distinct from `executive-order` (which is from the head of state).

public-pressure:
  type: Policy
  label: Public Pressure
  comment: >
    A government actor publicly pressuring another institution for an
    outcome - executive criticizing the central bank, legislator demanding
    agency action. No formal force of law but materially shapes expectations.

fiscal-pressure:
  type: Policy
  label: Fiscal Pressure
  comment: >
    A structural fiscal condition acting as a constraint on policy choices -
    e.g. a debt-service obligation that materially limits fiscal headroom.
    Captures the constraint, not a specific action.


# =============================================================================
# 8. CONDITION DSL
#
# A boolean condition tree for thesis invalidation. Each form (And, Or,
# Threshold, Event, Sequenced, ...) is a real subclass of Condition with
# its own properties. Embedded Conditions inside `operands` / `after` /
# `then` / etc. declare their concrete subclass via `type:` per the
# kanonak-protocol@1.1.0 embedded-type-must-narrow-range rule.
# =============================================================================

Condition:
  type: rdfs.Class
  label: Condition
  comment: >
    Abstract base for nodes in a boolean condition tree. Never instantiated
    directly - authors instantiate one of the subclasses below. A runtime
    evaluator walks the tree against current data plus an event log and
    returns an EvaluationState (satisfied, partially-satisfied, unsatisfied,
    unknown) plus a structured trace.

# --- Boolean composition ---

NaryBoolCondition:
  type: rdfs.Class
  subClassOf: Condition
  label: N-ary Boolean Condition
  comment: >
    Abstract intermediate for boolean conditions that compose N child
    conditions via a single connective (AND, OR). Captures the shared
    `operands` property so AndCondition and OrCondition don't redeclare it.

AndCondition:
  type: rdfs.Class
  subClassOf: NaryBoolCondition
  label: And
  comment: >
    Boolean AND. Satisfied iff every operand is satisfied. Unsatisfied if
    any operand is unsatisfied. Unknown if any operand is unknown (and no
    operand is unsatisfied). Otherwise partially-satisfied.

OrCondition:
  type: rdfs.Class
  subClassOf: NaryBoolCondition
  label: Or
  comment: >
    Boolean OR. Satisfied if any operand is satisfied. Unsatisfied iff every
    operand is unsatisfied. Unknown if any operand is unknown (and no
    operand is satisfied). Otherwise partially-satisfied.

NotCondition:
  type: rdfs.Class
  subClassOf: Condition
  label: Not
  comment: >
    Boolean NOT. Inverts satisfied / unsatisfied of its single `operand`.
    Partial stays partial; unknown stays unknown.

operands:
  type: owl.ObjectProperty
  domain: NaryBoolCondition
  range: Condition
  label: Operands
  comment: >
    Ordered list of child Conditions composed by the boolean connective.
    Used by AndCondition (all-must-pass) and OrCondition (any-passes).

operand:
  type: owl.ObjectProperty
  domain: NotCondition
  range: Condition
  label: Operand
  comment: The single child Condition negated by NotCondition.

# --- Comparison conditions ---

ComparisonCondition:
  type: rdfs.Class
  subClassOf: Condition
  label: Comparison Condition
  comment: >
    Abstract intermediate for conditions that apply a Comparator to two
    sides plus an optional persistence window. Captures the shared
    `comparator`, `persistence`, `unit` properties used by both
    ThresholdCondition (right side is a literal value) and
    IndicatorComparison (right side is another Indicator).

ThresholdCondition:
  type: rdfs.Class
  subClassOf: ComparisonCondition
  label: Threshold
  comment: >
    Numeric threshold check. Reads `observable`'s most recent value and
    compares to `threshold` using `comparator`. With `persistence`, the
    condition is partially-satisfied inside the persistence window and
    satisfied only after the window elapses with the comparator continuously
    true.

IndicatorComparison:
  type: rdfs.Class
  subClassOf: ComparisonCondition
  label: Indicator Comparison
  comment: >
    Cross-indicator comparison. Compares `left` observable against `right`
    observable using `comparator`. Same persistence semantics as
    ThresholdCondition. Typical use: technical-analysis predicates
    ("SPY below 50d MA") where right is a DerivedIndicator on left.

comparator:
  type: owl.ObjectProperty
  domain: ComparisonCondition
  range: Comparator
  label: Comparator
  comment: The comparison operator applied between the two sides.

persistence:
  type: owl.ObjectProperty
  domain: ComparisonCondition
  range: PersistenceWindow
  label: Persistence
  comment: >
    Optional window during which the comparator must remain true before the
    condition is `satisfied`. Without a persistence window, a single
    satisfying reading flips the condition to satisfied; with one, the
    condition is `partially-satisfied` inside the window and `satisfied`
    only after the window elapses.

unit:
  type: owl.DatatypeProperty
  domain: ComparisonCondition
  range: xsd.string
  label: Unit
  comment: >
    Free-form unit string documenting the threshold's units (e.g.
    "usd-per-bbl", "pct"). Informational; the underlying Indicator carries
    the canonical unit. v2 may upgrade to a typed Unit class.

observable:
  type: owl.ObjectProperty
  domain: ThresholdCondition
  range: Indicator
  label: Observable
  comment: The Indicator whose value is compared against `threshold`.

threshold:
  type: owl.DatatypeProperty
  domain: ThresholdCondition
  range: xsd.decimal
  label: Threshold
  comment: Numeric value compared against the observable.

thresholdHigh:
  type: owl.DatatypeProperty
  domain: ThresholdCondition
  range: xsd.decimal
  label: Threshold High
  comment: >
    With comparator=between, the upper bound. Lower bound is `threshold`.
    The condition is satisfied when the observable lies in
    [threshold, thresholdHigh] inclusive.

left:
  type: owl.ObjectProperty
  domain: IndicatorComparison
  range: Indicator
  label: Left
  comment: >
    The left-hand-side observable. May be either a base Indicator or a
    DerivedIndicator.

right:
  type: owl.ObjectProperty
  domain: IndicatorComparison
  range: Indicator
  label: Right
  comment: >
    The right-hand-side observable. Typically a DerivedIndicator (e.g. a
    moving average of `left`) when the comparison expresses a
    technical-analysis condition.

# --- Time-bound conditions (event-log queries + temporal sequencing) ---

TimeBoundCondition:
  type: rdfs.Class
  subClassOf: Condition
  label: Time-Bound Condition
  comment: >
    Abstract intermediate for conditions that may be bounded by a `withinWindow`
    relative to evaluation time. Captures the shared `withinWindow` property.
    Concrete subclasses: EventCondition, SequencedCondition, IndicatorAvailable.

EventCondition:
  type: rdfs.Class
  subClassOf: TimeBoundCondition
  label: Event
  comment: >
    Event-log presence check. Satisfied if an event matching `event` (with
    the optionally-specified `durability`) has been recorded in the event log
    within `withinWindow` if specified, or ever otherwise. The event log
    itself is runtime infrastructure outside this ontology.

SequencedCondition:
  type: rdfs.Class
  subClassOf: TimeBoundCondition
  label: Sequenced
  comment: >
    Temporal sequencing. Satisfied when `after` first became satisfied at
    some time T0 AND `then` is satisfied when evaluated against time >= T0
    (optionally within `withinWindow` of T0). Unknown until T0 is recorded.
    Used for "X following durable Y" patterns.

IndicatorAvailable:
  type: rdfs.Class
  subClassOf: TimeBoundCondition
  label: Indicator Available
  comment: >
    Data-freshness guard. Satisfied if `indicator` has at least one
    observation within `withinWindow` (if specified). Used as a wrapper
    around ThresholdCondition leaves to prevent false-unsatisfied results
    when the underlying data feed is stale.

withinWindow:
  type: owl.ObjectProperty
  domain: TimeBoundCondition
  range: TimeWindow
  label: Within Window
  comment: >
    Optional. Bounds the evaluation to a time window relative to evaluation
    time. For EventCondition - event must be recorded within. For
    SequencedCondition - then-condition must be satisfied within (relative
    to T0). For IndicatorAvailable - the indicator must have at least one
    observation within.

event:
  type: owl.ObjectProperty
  domain: EventCondition
  range: Event
  label: Event
  comment: >
    The category of event the condition tests for, referencing an Event
    named instance. Resolved at evaluation time against a runtime-curated
    event log.

durability:
  type: owl.ObjectProperty
  domain: EventCondition
  range: Durability
  label: Durability
  comment: >
    Optional. Requires the matched event to carry the specified durability
    classification. Filters the event log to events that have been judged
    durable - useful for "after durable peace" semantics where a transient
    ceasefire shouldn't satisfy the condition.

after:
  type: owl.ObjectProperty
  domain: SequencedCondition
  range: Condition
  label: After
  comment: >
    The prerequisite Condition that must become satisfied at some time T0
    before `then` is evaluated. The runtime tracks T0 so re-evaluation
    across days is consistent.

then:
  type: owl.ObjectProperty
  domain: SequencedCondition
  range: Condition
  label: Then
  comment: >
    The Condition evaluated against time >= T0 (where T0 is when `after`
    first became satisfied). Optionally bounded by `withinWindow`.

indicator:
  type: owl.ObjectProperty
  domain: IndicatorAvailable
  range: Indicator
  label: Indicator
  comment: >
    The Indicator whose data freshness is being asserted. Satisfied if the
    indicator has at least one observation within `withinWindow` (if
    specified) or any observation at all (if not).

# --- Deadline check ---

BeforeCondition:
  type: rdfs.Class
  subClassOf: Condition
  label: Before
  comment: >
    Deadline check. Satisfied if `before` becomes satisfied before
    `mustOccur` does - i.e. the deadline passed without the prerequisite
    materializing. The mirror of SequencedCondition for invalidations
    that fire on the absence of an expected event.

before:
  type: owl.ObjectProperty
  domain: BeforeCondition
  range: Condition
  label: Before
  comment: >
    The deadline Condition - if `before` becomes satisfied before
    `mustOccur` does, BeforeCondition is satisfied (i.e. the deadline
    passed without the prerequisite occurring).

mustOccur:
  type: owl.ObjectProperty
  domain: BeforeCondition
  range: Condition
  label: Must Occur
  comment: >
    The prerequisite that must become satisfied before `before` does,
    otherwise BeforeCondition fires.

# --- Constants ---

AlwaysSatisfied:
  type: rdfs.Class
  subClassOf: Condition
  label: Always Satisfied
  comment: >
    Constant. Always returns satisfied. Useful for testing condition trees
    and for placeholder leaves during incremental authoring.

AlwaysUnsatisfied:
  type: rdfs.Class
  subClassOf: Condition
  label: Always Unsatisfied
  comment: >
    Constant. Always returns unsatisfied. Mirror of AlwaysSatisfied.


# =============================================================================
# 9. COMPARATOR
# =============================================================================

Comparator:
  type: rdfs.Class
  label: Comparator
  comment: >
    Numeric comparison operator. Closed enumeration - the six instances
    below are the v1 set.

lt:
  type: Comparator
  label: Less Than
  comment: Strict less-than. Threshold value is exclusive.

lte:
  type: Comparator
  label: Less Than or Equal
  comment: Less-than-or-equal. Threshold value is inclusive.

gt:
  type: Comparator
  label: Greater Than
  comment: Strict greater-than. Threshold value is exclusive.

gte:
  type: Comparator
  label: Greater Than or Equal
  comment: Greater-than-or-equal. Threshold value is inclusive.

eq:
  type: Comparator
  label: Equal
  comment: >
    Numeric equality. Use sparingly with floats; prefer between with a small
    tolerance band when checking near-equality.

between:
  type: Comparator
  label: Between
  comment: >
    Range membership. Requires both `threshold` (low bound) and
    `thresholdHigh` (high bound). Inclusive on both ends.


# =============================================================================
# 10. TIME UNIT
# =============================================================================

TimeUnit:
  type: rdfs.Class
  label: Time Unit
  comment: >
    Duration unit for PersistenceWindow and TimeWindow. Open enumeration -
    domain extensions can add specialized units (e.g. fomc-meetings in
    finance) where the abstract calendar units are insufficient.

minutes:
  type: TimeUnit
  label: Minutes
  comment: One minute = 60 seconds.

hours:
  type: TimeUnit
  label: Hours
  comment: One hour = 60 minutes.

trading-days:
  type: TimeUnit
  label: Trading Days
  comment: >
    Days the relevant market is open. Implementation depends on the
    Indicator's market calendar; the runtime is responsible for resolving
    "5 trading days" against the appropriate calendar.

calendar-days:
  type: TimeUnit
  label: Calendar Days
  comment: 24-hour calendar days, regardless of market or business calendar.

months:
  type: TimeUnit
  label: Months
  comment: >
    Calendar months. "3 months" means three calendar-month boundaries have
    been crossed since the start of the window.

fiscal-quarters:
  type: TimeUnit
  label: Fiscal Quarters
  comment: >
    Standard quarterly periods (Q1, Q2, Q3, Q4). For entities on non-calendar
    fiscal years, the runtime should resolve against the relevant entity's
    fiscal calendar.


# =============================================================================
# 11. DURABILITY
# =============================================================================

Durability:
  type: rdfs.Class
  label: Durability
  comment: >
    Classification of how long an event's effects are expected to last.
    Used by event-condition to filter the event log. The judgment is the
    event-log curator's, not auto-derived.

durable:
  type: Durability
  label: Durable
  comment: >
    The event's effects persist over a meaningful timeframe. Examples - a
    signed treaty, a confirmed appointment, a structurally-implemented
    sanction, a regulatory rulemaking that takes effect.

transient:
  type: Durability
  label: Transient
  comment: >
    The event has occurred but its effects are not expected to persist.
    Examples - a verbal pause in operations, a preliminary indication of
    intent, a non-binding statement of position.

unspecified:
  type: Durability
  label: Unspecified
  comment: >
    The curator has not yet judged durability. Default for newly-recorded
    events. event-condition with durability=unspecified matches any event of
    the type regardless of durability classification.


# =============================================================================
# 12. EVALUATION STATE
# =============================================================================

EvaluationState:
  type: rdfs.Class
  label: Evaluation State
  comment: >
    The four possible outcomes of evaluating a Condition tree. Carried in
    ConditionResult instances at runtime. Closed enumeration.

satisfied:
  type: EvaluationState
  label: Satisfied
  comment: >
    The condition is fully satisfied against current data. For an
    invalidationCondition root, this signals the thesis SHOULD be flagged
    for human review and a status flip to invalidated.

partially-satisfied:
  type: EvaluationState
  label: Partially Satisfied
  comment: >
    The condition is not yet satisfied but is making progress toward
    satisfaction (e.g. inside a persistence window with the underlying
    comparator currently true; sequenced-condition with `after` satisfied
    but `then` not yet). A leading indicator that the thesis may invalidate.

unsatisfied:
  type: EvaluationState
  label: Unsatisfied
  comment: >
    The condition is not satisfied and not currently making progress toward
    satisfaction. The thesis remains intact under this dimension.

unknown:
  type: EvaluationState
  label: Unknown
  comment: >
    The condition cannot be evaluated due to missing or stale data, or an
    unresolved event-log query. Distinct from unsatisfied - "we don't know"
    is operationally important to surface rather than silently treating as
    unsatisfied.


# =============================================================================
# 13. PERSISTENCE WINDOW AND TIME WINDOW
# =============================================================================

PersistenceWindow:
  type: rdfs.Class
  label: Persistence Window
  comment: >
    A duration over which a condition's underlying comparator must remain
    continuously true before the condition is satisfied. Composes a
    `duration` (integer) with a TimeUnit reference. Authors using this
    package must reference the `duration` property with the package alias
    (e.g. `wv.duration: 30`) because the bare name collides with
    `xsd:duration` (the built-in XSD datatype).

duration:
  type: owl.DatatypeProperty
  domain: PersistenceWindow
  range: xsd.integer
  label: Duration
  comment: >
    Number of TimeUnit-units to persist. Positive integer. Must be
    referenced as `wv.duration` (or whatever alias your import uses) due
    to the bare-name collision with `xsd:duration`.

windowUnit:
  type: owl.ObjectProperty
  domain: PersistenceWindow
  range: TimeUnit
  label: Window Unit
  comment: >
    The TimeUnit that scales `duration`. Together they define the window
    size (e.g. duration=30, windowUnit=calendar-days = 30 calendar days).

TimeWindow:
  type: rdfs.Class
  label: Time Window
  comment: >
    A bounded duration relative to evaluation time, used by event-condition
    and sequenced-condition to constrain "within the past N units" matching.
    Composes a `windowDuration` with a `windowTimeUnit`.

windowDuration:
  type: owl.DatatypeProperty
  domain: TimeWindow
  range: xsd.integer
  label: Window Duration
  comment: Number of TimeUnit-units the window spans.

windowTimeUnit:
  type: owl.ObjectProperty
  domain: TimeWindow
  range: TimeUnit
  label: Window Time Unit
  comment: The TimeUnit that scales `windowDuration`.


# =============================================================================
# 14. DERIVED INDICATOR
# =============================================================================

DerivedIndicator:
  type: rdfs.Class
  subClassOf: Indicator
  label: Derived Indicator
  comment: >
    Abstract subclass of Indicator for indicators whose values are computed
    at evaluation time from another Indicator. Distinct from a base Indicator
    whose values come from a data feed. Concrete subclasses (currently
    MovingAverage; future RollingStdev, PercentChange, ZScore) capture
    the specific derivation logic. Embedded DerivedIndicator instances
    declare their concrete subclass via `type:` per the
    kanonak-protocol@1.1.0 embedded-type-must-narrow-range rule.

MovingAverage:
  type: rdfs.Class
  subClassOf: DerivedIndicator
  label: Moving Average
  comment: >
    Simple moving average of the source Indicator over `period` units of
    `periodUnit`. The runtime computes by averaging the trailing `period`
    observations.

of:
  type: owl.ObjectProperty
  domain: DerivedIndicator
  range: Indicator
  label: Of
  comment: The source Indicator the derivation operates on.

period:
  type: owl.DatatypeProperty
  domain: DerivedIndicator
  range: xsd.integer
  label: Period
  comment: >
    The lookback period for the derivation, expressed in TimeUnit-units of
    the periodUnit. For MovingAverage, the number of bars in the average
    (50, 200, etc.).

periodUnit:
  type: owl.ObjectProperty
  domain: DerivedIndicator
  range: TimeUnit
  label: Period Unit
  comment: TimeUnit scaling `period`. Most commonly `trading-days`.


# =============================================================================
# 15. ROLE - generic seed instances
#
# A few broadly-applicable Role instances any worldview can reference.
# Domain extensions add specialized roles (head-of-state-of-us, central-
# bank-chair, etc.).
# =============================================================================

head-of-state:
  type: Role
  label: Head of State
  comment: >
    Generic role for the chief executive of a sovereign nation. Specialize
    per country in domain extensions when the role-name disambiguation
    matters (President-of-US vs Prime-Minister-of-UK).

legislator:
  type: Role
  label: Legislator
  comment: Generic role for an elected member of a legislative body.

regulator:
  type: Role
  label: Regulator
  comment: >
    Generic role for an executive-branch regulator at the agency or
    director level.

central-banker:
  type: Role
  label: Central Banker
  comment: >
    Generic role for a member of a central bank's policymaking committee.
    Specialize in finance extensions when chair vs governor vs regional-
    president disambiguation matters.

judge:
  type: Role
  label: Judge
  comment: Generic role for a judicial officer.

journalist:
  type: Role
  label: Journalist
  comment: >
    Generic role for an attributable financial-press author. Used when
    the press is the speaker rather than the venue.
