{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://w3id.org/aow/schemas/skill.schema.json",
  "title": "Skill",
  "description": "A reusable capability that an Actor can invoke.",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/ref",
      "description": "Stable identifier of the entity. Serialized as the node's IRI."
    },
    "type": {
      "const": "Skill",
      "description": "The AOW class of the entity (for example, \"Intent\")."
    },
    "label": {
      "description": "Short human-readable name.",
      "type": "string"
    },
    "description": {
      "description": "Longer human-readable explanation.",
      "type": "string"
    },
    "version": {
      "description": "Version of this entity definition, ideally a semantic version such as \"1.4.2\".",
      "type": "string"
    },
    "created_at": {
      "description": "When this entity or version was created.",
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "description": "The Actor responsible for creating this entity or version.",
      "$ref": "#/$defs/ref"
    },
    "revision_of": {
      "description": "The earlier version this entity revises.",
      "$ref": "#/$defs/ref"
    },
    "input_schema": {
      "description": "JSON Schema (or equivalent) for the Skill's inputs."
    },
    "output_schema": {
      "description": "JSON Schema (or equivalent) for the Skill's outputs."
    },
    "binding": {
      "description": "How to invoke it, for example an MCP tool name, an API endpoint, or a UI automation.",
      "type": "string"
    },
    "side_effects": {
      "description": "Whether invoking the Skill changes external state, and whether that can be undone.",
      "enum": [
        "none",
        "reversible",
        "irreversible"
      ]
    },
    "latency": {
      "description": "Typical or maximum latency, for example \"< 1s\".",
      "type": "string"
    },
    "cost_profile": {
      "description": "Relative cost per invocation.",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "constrained_by": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ref"
      },
      "description": "Policies that apply."
    },
    "requires_assurance": {
      "$ref": "#/$defs/ref",
      "description": "The highest Assurance Level at which this work may be done. The effective level is the lowest of the Intent's, the Task's, the Skill's, and the performing Agent's autonomy_level."
    }
  },
  "patternProperties": {
    "^[A-Za-z][A-Za-z0-9_-]*:[A-Za-z0-9_-]+$": {
      "description": "Extension property, namespaced with a prefix."
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "type"
  ],
  "$defs": {
    "ref": {
      "type": "string",
      "minLength": 1,
      "description": "Identifier of an entity: an IRI, a compact IRI such as aow:AL2, or an id relative to the document base."
    }
  }
}
