{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openmobiledocumentagent.org/schemas/v0.1/skill-manifest.schema.json",
  "title": "OMDA skill manifest (§10)",
  "description": "Skills read and report. Actions belong to the product layer (OD-032).",
  "type": "object",
  "required": ["id", "version", "publisher", "reads", "triggers", "outputs", "network"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": "string", "pattern": "^x-[a-z0-9-]+\\.[a-z0-9_.-]+$" },
    "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+" },
    "publisher": { "type": "string" },
    "signature": { "type": "string" },
    "reads": {
      "type": "array",
      "minItems": 1,
      "items": {
        "anyOf": [
          { "$ref": "common.schema.json#/$defs/fieldName" },
          { "type": "string", "pattern": "^tier:(basic|personal|identifier|special)$" }
        ]
      }
    },
    "triggers": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string", "pattern": "^(on_ingest|on_query|on_entity_status|schedule:(hourly|daily|weekly|monthly))$" }
    },
    "outputs": {
      "type": "array",
      "minItems": 1,
      "items": { "enum": ["finding", "reminder", "answer", "form_answers", "proposed_assertion"] }
    },
    "models": {
      "type": "array",
      "items": { "enum": ["ocr", "layout", "classifier", "extraction", "embedding", "interpreter", "answer_generator", "matcher"] }
    },
    "network": {
      "description": "Declared hosts; empty by default. Each needs an owner grant (OD-033).",
      "type": "array",
      "items": { "type": "string", "format": "hostname" }
    }
  }
}
