{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://freebuff.local/emotion-ontology/schema/relationship.schema.json",
  "title": "EmotionOntologyRelationship",
  "description": "A directed or undirected edge in the emotion knowledge graph. Strength is qualitative unless a numeric value is genuinely supported; absent means unknown. See docs/02-ontology-design.md for edge-type semantics.",
  "type": "object",
  "required": ["source", "target", "type", "directional", "confidence", "evidence_status"],
  "properties": {
    "source": { "type": "string", "description": "Source node id." },
    "target": { "type": "string", "description": "Target node id." },
    "type": {
      "type": "string",
      "enum": [
        "is_a", "subtype_of", "part_of", "blend_of", "similar_to", "near_synonym_of",
        "opposite_of", "co_occurs_with", "amplifies", "inhibits", "transitions_to",
        "often_follows", "often_precedes", "triggered_by", "appraised_as", "motivates",
        "behavioral_expression_of", "physiological_association", "culturally_related_to",
        "component_of"
      ],
      "description": "Edge semantics. subtype_of: class-subclass. part_of: whole-part within a construct (e.g. core_affect part_of affect). blend_of: target is a combination of the source and sibling blends. similar_to: continuous similarity. opposite_of: bipolar contrast. transitions_to: a person commonly moves from source state to target state. often_follows/often_precedes: weaker temporal regularities (mirror relations, included for query convenience). appraised_as: source state characteristically involves the target appraisal. motivates: source state typically instigates the target motivation/behavior. behavioral_expression_of: target is the expressive behavior of source. physiological_association: source state co-occurs with target bodily state. culturally_related_to: source cultural concept maps partially onto target."
    },
    "directional": { "type": "boolean", "description": "True if source->target order is meaningful (transitions_to, amplifies, inhibits, motivates, triggered_by, often_follows/precedes, appraised_as, behavioral_expression_of, physiological_association, part_of, component_of, subtype_of, is_a). False for symmetric types (similar_to, near_synonym_of, opposite_of, co_occurs_with, blend_of, culturally_related_to)." },
    "strength": {
      "type": "string",
      "enum": ["strong", "moderate", "weak", "unknown"],
      "description": "Qualitative strength. Numeric strengths are NOT invented; use strength_value only when supported."
    },
    "strength_value": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Numeric strength, present only where a defensible quantitative estimate exists (e.g. similarity from semantic-norm data). Absent means unsupported."
    },
    "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
    "evidence_status": {
      "type": "string",
      "enum": ["empirically_established", "strongly_supported", "plausible_theoretical", "disputed", "speculative"]
    },
    "evidence": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Short citation keys supporting this specific relationship."
    },
    "notes": { "type": "string" }
  },
  "additionalProperties": false
}
