{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mda.sno.dev/spec/v1.0/schemas/frontmatter-source.schema.json",
  "title": "MDA source frontmatter",
  "description": "Permissive schema for .mda source files. MDA-extended fields MAY appear at the top level. Open-standard fields are also accepted at the top level. Use frontmatter-skill-md / frontmatter-agents-md / frontmatter-mcp-server-md for compiled outputs.",
  "type": "object",
  "properties": {
    "name": { "$ref": "_defs/name.schema.json" },
    "description": { "$ref": "_defs/description.schema.json" },
    "license": { "type": "string" },
    "compatibility": { "type": "string", "maxLength": 500 },
    "allowed-tools": { "type": "string" },
    "metadata": { "$ref": "_defs/metadata-namespaces.schema.json" },

    "integrity": { "$ref": "_defs/integrity.schema.json" },
    "signatures": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "_defs/signature.schema.json" }
    },

    "doc-id": { "$ref": "_defs/mda-extended.schema.json#/properties/doc-id" },
    "title": { "$ref": "_defs/mda-extended.schema.json#/properties/title" },
    "version": { "$ref": "_defs/mda-extended.schema.json#/properties/version" },
    "requires": { "$ref": "_defs/requires.schema.json" },
    "depends-on": { "$ref": "_defs/mda-extended.schema.json#/properties/depends-on" },
    "author": { "$ref": "_defs/mda-extended.schema.json#/properties/author" },
    "tags": { "$ref": "_defs/mda-extended.schema.json#/properties/tags" },
    "created-date": { "$ref": "_defs/iso8601.schema.json" },
    "updated-date": { "$ref": "_defs/iso8601.schema.json" },
    "relationships": { "$ref": "_defs/mda-extended.schema.json#/properties/relationships" }
  },
  "dependentRequired": {
    "signatures": ["integrity"]
  },
  "additionalProperties": false
}
