{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mda.sno.dev/spec/v1.0/schemas/_defs/mda-extended.schema.json",
  "title": "MDA-extended frontmatter fields",
  "description": "Reusable shape for MDA-extended fields. In .mda sources these MAY appear at the top level. In compiled outputs they MUST be nested under metadata.mda.* (with the same shape).",
  "type": "object",
  "properties": {
    "doc-id": {
      "type": "string",
      "description": "Unique document identifier; UUID format recommended.",
      "pattern": "^[a-zA-Z0-9_-]{8,}$"
    },
    "title": {
      "type": "string",
      "description": "Free-text human-readable title. Distinct from `name` (which is a machine ID)."
    },
    "version": {
      "type": "string",
      "description": "SemVer 2.0.0 string. MUST be quoted (no number coercion). MUST NOT include build metadata in v1.0.",
      "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
    },
    "requires": { "$ref": "requires.schema.json" },
    "depends-on": {
      "type": "array",
      "items": { "$ref": "depends-on.schema.json" }
    },
    "author": { "type": "string" },
    "tags": {
      "type": "array",
      "items": { "type": "string" }
    },
    "created-date": { "$ref": "iso8601.schema.json" },
    "updated-date": { "$ref": "iso8601.schema.json" },
    "relationships": {
      "type": "array",
      "items": {
        "$ref": "../relationship-footnote.schema.json"
      },
      "description": "Mirror of footnote relationship payloads. REQUIRED in compiled output when the source had relationship footnotes."
    }
  },
  "additionalProperties": false
}
