{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/intent.schema.json",
  "title": "Intent",
  "description": "What the Core understood. It must resolve to one entry in the API Index or System Map.",
  "type": "object",
  "required": [
    "target",
    "arguments",
    "tier"
  ],
  "properties": {
    "target": {
      "description": "operationId from the API Index, or a capability name.",
      "type": "string"
    },
    "arguments": {
      "type": "object"
    },
    "grounding": {
      "description": "For each argument, where the value came from.",
      "type": "object",
      "additionalProperties": {
        "enum": [
          "stated",
          "default",
          "system-state"
        ]
      }
    },
    "tier": {
      "$ref": "common.schema.json#/$defs/tier"
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "A numeric score, 0 to 1, of how sure the Core is of this reading. Not the shared Confidence word list (low, medium, high)."
    },
    "alternatives": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
