{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "FableSkillPackageManifestV2",
  "description": "Strict resource inventory for a Fable Skill Package. Declared scripts are inert data and are never executed by the package runtime.",
  "type": "object",
  "required": ["schemaVersion", "id", "entry", "agents", "references", "templates", "examples", "evals", "scripts", "scriptPolicy"],
  "additionalProperties": false,
  "properties": {
    "$schema": { "type": "string" },
    "schemaVersion": { "type": "integer", "enum": [2] },
    "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
    "entry": { "type": "string", "enum": ["SKILL.md"] },
    "agents": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^agents/[a-zA-Z0-9._/-]+\\.(yaml|yml|json)$" } },
    "references": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^references/[a-zA-Z0-9._/-]+\\.(md|json|yaml|yml|txt)$" } },
    "templates": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^templates/[a-zA-Z0-9._/-]+\\.(md|json|yaml|yml|ts|js|txt)$" } },
    "examples": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^examples/[a-zA-Z0-9._/-]+\\.(md|json|yaml|yml|ts|js|txt)$" } },
    "evals": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^evals/[a-zA-Z0-9._/-]+\\.(json|yaml|yml)$" } },
    "scripts": { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "^scripts/[a-zA-Z0-9._/-]+\\.(sh|bash|py|js|mjs|ts)$" } },
    "scriptPolicy": { "type": "string", "enum": ["data-only"] }
  }
}
