{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.cuddler.dev/standards/document-role/template/v1.0.0/cuddler.template.base.defs.schema.1.0.0.json",
  "title": "Cuddler Template Base Definitions",
  "$defs": {
    "NonEmptyString": {
      "type": "string",
      "minLength": 1
    },
    "KebabCaseId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{2,62}$"
    },
    "SemVer": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$"
    },
    "LanguageTag": {
      "type": "string",
      "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$"
    },
    "MimeType": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*/[a-zA-Z0-9][a-zA-Z0-9!#$&^_.+-]*$"
    },
    "Uri": {
      "type": "string",
      "format": "uri",
      "minLength": 1
    },
    "MarkdownOptions": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "renderer",
        "flavor"
      ],
      "properties": {
        "renderer": {
          "const": "Markdig"
        },
        "flavor": {
          "const": "CommonMark+GFM"
        },
        "preferReferenceLinks": {
          "type": "boolean"
        },
        "gfmTagFilterOnHtmlRender": {
          "type": "boolean"
        }
      }
    },
    "MarkdownDocument": {
      "$ref": "https://www.cuddler.dev/standards/document-role/template/v1.0.0/commonmark-gfm-markdig.schema.1.0.0.json"
    }
  },
  "for-ai": [
    {
      "instruction": "Use this guidance when preparing a valid value for this schema node.",
      "input": "",
      "output": "Reusable base definitions for Template Artifact Definitions. Anchor report-instance validation to the CommonMark plus GFM Markdig markdown AST and then narrow that document shape to the artifact family's exact headings, tables, lists, quotations, and other allowed markdown blocks."
    }
  ]
}


