{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://freebuff.local/emotion-ontology/schema/emotion-node.schema.json",
  "title": "EmotionOntologyNode",
  "description": "A node in the Human Emotion Ontology. Nodes represent emotional states, moods, feelings, drives, needs, appraisals, physiological states, behavioral tendencies, traits, mental states, and related constructs. Fields are optional where evidence does not permit filling them; an absent field means 'unknown', not 'false'.",
  "type": "object",
  "required": ["id", "name", "category", "subcategory", "definition", "parents", "confidence", "evidence_status"],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]*\\.[a-z0-9_]+$",
      "description": "Stable identifier, namespaced by category prefix, e.g. emotion.fear, mood.irritable, appraisal.threat."
    },
    "name": {
      "type": "string",
      "description": "Canonical display name."
    },
    "category": {
      "type": "string",
      "enum": [
        "abstract", "construct", "emotion", "mood", "feeling", "drive", "need",
        "motivation", "desire", "appraisal", "physiological_state", "behavioral_tendency",
        "trait", "sentiment", "mental_state", "affective_system", "meta_state"
      ],
      "description": "Ontological kind of the node. Distinguishes emotions from moods, drives, appraisals, traits, etc. See docs/02-ontology-design.md for the conceptual distinctions."
    },
    "subcategory": {
      "type": "string",
      "description": "Finely-grained class within the category, e.g. basic_emotion, social_emotion, self_conscious_emotion, moral_emotion, epistemic_emotion, aesthetic_emotion, prospective_emotion, retrospective_emotion, empathic_emotion, mixed_emotion, cultural_emotion, homeostatic_drive, neurobehavioral_system, mood_state, bodily_feeling, affective_trait, appraisal_type, category_grouper, superordinate."
    },
    "definition": {
      "type": "string",
      "description": "Concise definition distinguishing the state from near neighbors."
    },
    "distinguishing_features": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Features that differentiate this state from its near synonyms and parents."
    },
    "synonyms": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Alternative labels for the SAME concept (not distinct nodes)."
    },
    "near_synonyms": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Node ids of closely related but genuinely distinct states. Near-synonym edges are generated from this list."
    },
    "parents": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Node ids of direct superordinate classes (category roots and subcategory groupers). Subtype-of edges are generated from this list."
    },
    "children": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Computed at build time: node ids whose parents include this node."
    },
    "dimensions": {
      "type": "object",
      "description": "Prototypical dimensional location. Numeric values are ESTIMATES anchored on dimensional norms (Russell 1980; Mehrabian & Russell 1974; Warriner et al. 2013), not measurements of any individual. See docs/05-confidence-model.md.",
      "properties": {
        "valence": { "type": "number", "minimum": -1, "maximum": 1 },
        "arousal": { "type": "number", "minimum": 0, "maximum": 1 },
        "dominance": { "type": "number", "minimum": -1, "maximum": 1 },
        "approach_avoidance": { "type": "string", "enum": ["approach", "avoidance", "mixed", "neutral"] },
        "certainty": { "type": "number", "minimum": -1, "maximum": 1 },
        "agency": { "type": "number", "minimum": -1, "maximum": 1 },
        "sociality": { "type": "number", "minimum": 0, "maximum": 1 },
        "temporal_orientation": { "type": "string", "enum": ["past", "present", "future", "mixed", "atemporal"] },
        "confidence": { "type": "string", "enum": ["high", "medium", "low"] }
      },
      "additionalProperties": false
    },
    "common_triggers": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Prototypical eliciting situations."
    },
    "appraisals": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Node ids of appraisal nodes characteristic of this state."
    },
    "physiological_associations": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Node ids of physiological states reported to co-occur (often weakly and inconsistently; see docs/04-disagreement-registry.md)."
    },
    "behavioral_tendencies": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Node ids of action tendencies associated with this state."
    },
    "duration": {
      "type": "string",
      "enum": ["seconds", "seconds_minutes", "minutes_hours", "hours_days", "days_weeks", "weeks_years", "variable"],
      "description": "Typical duration of the state as an episode."
    },
    "object_directedness": {
      "type": "string",
      "enum": ["object_directed", "diffuse", "variable"],
      "description": "Whether the state is about a specific object/event (emotion-like), diffuse (mood-like), or variable."
    },
    "cultural_scope": {
      "type": "string",
      "enum": ["broad", "western_bias", "culturally_specific", "unclear"],
      "description": "How cross-culturally general the concept appears to be. culturally_specific marks terms with no direct equivalent in many languages."
    },
    "cultural_origin": {
      "type": "string",
      "description": "Language/culture of origin for culturally specific terms, e.g. 'Portuguese (Portugal/Brazil)'."
    },
    "theoretical_frameworks": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Theoretical traditions that treat this as a genuine, distinct construct."
    },
    "confidence": {
      "type": "string",
      "enum": ["high", "medium", "low"],
      "description": "Confidence that this node is a defensible, distinct construct and that its definition/placement is right. See docs/05-confidence-model.md."
    },
    "evidence_status": {
      "type": "string",
      "enum": ["empirically_established", "strongly_supported", "plausible_theoretical", "disputed", "speculative"],
      "description": "Status of the evidence supporting the node's existence/distinctness."
    },
    "evidence": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Short citation keys, e.g. 'Ekman 1999', 'Warriner et al. 2013'. Resolved in data/ontology-meta.json -> sources."
    },
    "notes": { "type": "string" }
  },
  "additionalProperties": false
}
