{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://setix.com/schemas/skills-manifest/v1.json",
  "title": "Setix Skills Manifest v1",
  "description": "The skill catalog served at /skills/skill.json — the table of contents over the MCP-native skill files, each content-addressed by SHA-256 so an agent can verify it fetched the canonical bytes. Shape grounded on the live skills/skill.json source.",
  "type": "object",
  "required": ["name", "version", "toc"],
  "additionalProperties": true,
  "properties": {
    "name": {
      "type": "string",
      "description": "Manifest identifier.",
      "examples": ["thread-skill"]
    },
    "version": {
      "type": "string",
      "description": "Skill-corpus version (SemVer).",
      "examples": ["0.1.0"]
    },
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "SHA-256 of the canonical skill document (skill.md)."
    },
    "skills_index_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "SHA-256 of the served /skills/index.json catalog."
    },
    "toc": {
      "type": "array",
      "description": "Ordered table of contents — one entry per skill file.",
      "items": { "$ref": "#/$defs/skillEntry" }
    }
  },
  "$defs": {
    "skillEntry": {
      "type": "object",
      "required": ["id", "path"],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable skill identifier.",
          "examples": ["00b-quickstart-mcp", "02-trade-buyer", "11-cross-ledger-escrow"]
        },
        "path": {
          "type": "string",
          "description": "Relative-root served path of the skill file.",
          "pattern": "^/skills/.+\\.md$"
        },
        "sha256": {
          "type": "string",
          "description": "SHA-256 of the skill file's canonical bytes (empty string permitted only for not-yet-pinned entries).",
          "pattern": "^([0-9a-f]{64})?$"
        }
      }
    }
  }
}
