{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json",
  "title": "Brand Guide Template Schema",
  "cuddler": {
    "specVersion": "1.0.0",
    "documentTypeId": "brand-guide",
    "schemaVersion": "1.0.0",
    "dataSchema": {
      "uri": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/data.schema.json"
    },
    "output": {
      "primaryContentType": "application/pdf",
      "supportedContentTypes": [
        "application/pdf",
        "text/html"
      ]
    },
    "profile": {
      "id": "brand-guide",
      "version": "1.0.0",
      "for-ai": [
        {
          "instruction": "Explain what this Cuddler schema profile governs so AI consumers understand when to use this schema family.",
          "input": "",
          "output": "Brand Guide data-and-template schema family for publishing markdown-compliant brand guidance reports."
        }
      ]
    },
    "schemaLinks": [
      {
        "rel": "related",
        "targetSchema": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/data.schema.json",
        "targetDocumentTypeId": "brand-guide",
        "for-ai": [
          {
            "instruction": "Explain why this related schema is linked here and when an AI consumer should follow it.",
            "input": "",
            "output": "Use the paired Brand Guide data schema when validating the source facts that later inform the markdown template document governed by this template schema."
          }
        ]
      }
    ],
    "artifactType": "Brand Guide",
    "status": "Public normative publication",
    "publisher": "TrackThat Inc.",
    "sourceUrl": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/",
    "attributionNotice": "© 2026 TrackThat. This work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). See https://www.cuddler.dev/license/ for the site license summary. You are free to share, use, adapt, and modify this material, including for commercial purposes, provided you give appropriate attribution and include a link to the original source URL and the CC BY 4.0 license at https://creativecommons.org/licenses/by/4.0/.",
    "governingDomainSpecification": {
      "title": "Data Document Role",
      "url": "https://www.cuddler.dev/standards/document-role/data/v1.0.0/"
    },
    "governingArtifactSpecification": {
      "title": "Cuddler Artifact Specification",
      "version": "1.0.0",
      "url": "https://www.cuddler.dev/standards/artifact-specification/v1.0.0/"
    }
  },
  "allOf": [
    {
      "$ref": "https://www.cuddler.dev/standards/document-role/template/v1.0.0/commonmark-gfm-markdig.schema.1.0.0.json"
    },
    {
      "type": "object",
      "required": [
        "$schema",
        "type",
        "options",
        "children"
      ],
      "properties": {
        "$schema": {
          "const": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json",
          "for-ai": [
            {
              "instruction": "Use this guidance when preparing a valid value for this schema node.",
              "input": "",
              "output": "Canonical schema identity for Brand Guide template instances."
            }
          ]
        },
        "type": {
          "const": "document"
        },
        "options": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "renderer",
            "flavor",
            "gfmTagFilterOnHtmlRender"
          ],
          "properties": {
            "renderer": {
              "const": "Markdig"
            },
            "flavor": {
              "const": "CommonMark+GFM"
            },
            "gfmTagFilterOnHtmlRender": {
              "const": true
            },
            "preferReferenceLinks": {
              "type": "boolean"
            }
          },
          "for-ai": [
            {
              "instruction": "Use this guidance when preparing a valid value for this schema node.",
              "input": "",
              "output": "Render the template document through Markdig using the CommonMark plus GFM feature surface and keep HTML tag filtering enabled."
            }
          ]
        },
        "children": {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/BrandGuideChildren",
          "for-ai": [
            {
              "instruction": "Use this guidance when preparing a valid value for this schema node.",
              "input": "",
              "output": "Publish the Brand Guide as one ordered markdown document: title, summary, primary-logo section, principles table, voice list, applications list, and audiences list."
            }
          ]
        }
      }
    }
  ],
  "$defs": {
    "TextNode": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "text"
      ],
      "properties": {
        "type": {
          "const": "text"
        },
        "text": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "InlineChildren": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "https://www.cuddler.dev/standards/document-role/template/v1.0.0/commonmark-gfm-markdig.schema.1.0.0.json#/$defs/inlineNode"
      }
    },
    "SingleTextChildren": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/TextNode"
      }
    },
    "SimpleParagraph": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "children"
      ],
      "properties": {
        "type": {
          "const": "paragraph"
        },
        "children": {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/InlineChildren"
        }
      }
    },
    "SimpleListItem": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "children"
      ],
      "properties": {
        "type": {
          "const": "listItem"
        },
        "children": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/SimpleParagraph"
          }
        }
      }
    },
    "UnorderedList": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "ordered",
        "children",
        "syntax"
      ],
      "properties": {
        "type": {
          "const": "list"
        },
        "ordered": {
          "const": false
        },
        "tight": {
          "type": "boolean"
        },
        "syntax": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "bulletMarker"
          ],
          "properties": {
            "bulletMarker": {
              "enum": [
                "-",
                "+",
                "*"
              ]
            }
          }
        },
        "children": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/SimpleListItem"
          }
        }
      }
    },
    "InlineImageParagraph": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "children"
      ],
      "properties": {
        "type": {
          "const": "paragraph"
        },
        "children": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "style",
              "destination",
              "children"
            ],
            "properties": {
              "type": {
                "const": "image"
              },
              "style": {
                "const": "inline"
              },
              "destination": {
                "type": "string",
                "format": "uri"
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "children": {
                "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/SingleTextChildren"
              }
            }
          }
        }
      }
    },
    "HeadingLevelOne": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 1
        },
        "children": {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/SingleTextChildren"
        }
      }
    },
    "PrimaryLogoHeading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 2
        },
        "children": {
          "const": [
            {
              "type": "text",
              "text": "Primary Logo"
            }
          ]
        }
      }
    },
    "CorePrinciplesHeading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 2
        },
        "children": {
          "const": [
            {
              "type": "text",
              "text": "Core Principles"
            }
          ]
        }
      }
    },
    "VoiceHeading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 2
        },
        "children": {
          "const": [
            {
              "type": "text",
              "text": "Voice"
            }
          ]
        }
      }
    },
    "ApplicationsHeading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 2
        },
        "children": {
          "const": [
            {
              "type": "text",
              "text": "Applications"
            }
          ]
        }
      }
    },
    "AudiencesHeading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "level",
        "children"
      ],
      "properties": {
        "type": {
          "const": "heading"
        },
        "level": {
          "const": 2
        },
        "children": {
          "const": [
            {
              "type": "text",
              "text": "Audiences"
            }
          ]
        }
      }
    },
    "TableCell": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "children"
      ],
      "properties": {
        "type": {
          "const": "tableCell"
        },
        "children": {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/InlineChildren"
        }
      }
    },
    "TwoColumnRow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "cells"
      ],
      "properties": {
        "type": {
          "const": "tableRow"
        },
        "cells": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/TableCell"
          }
        }
      }
    },
    "PrinciplesTable": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "header",
        "align",
        "rows"
      ],
      "properties": {
        "type": {
          "const": "table"
        },
        "header": {
          "const": {
            "type": "tableRow",
            "cells": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "text": "Principle"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "text": "Meaning"
                  }
                ]
              }
            ]
          }
        },
        "align": {
          "const": [
            "left",
            "left"
          ]
        },
        "rows": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/TwoColumnRow"
          }
        }
      }
    },
    "BrandGuideChildren": {
      "type": "array",
      "minItems": 12,
      "maxItems": 12,
      "prefixItems": [
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/HeadingLevelOne"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/SimpleParagraph"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/PrimaryLogoHeading"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/InlineImageParagraph"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/CorePrinciplesHeading"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/PrinciplesTable"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/VoiceHeading"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/UnorderedList"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/ApplicationsHeading"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/UnorderedList"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/AudiencesHeading"
        },
        {
          "$ref": "https://www.cuddler.dev/standards/artifact-definitions/brand-guide/1.0.0/template.schema.json#/$defs/UnorderedList"
        }
      ],
      "items": false
    }
  },
  "for-ai": [
    {
      "instruction": "Use this guidance when preparing a valid value for this schema node.",
      "input": "",
      "output": "Strict v1.0.0 Brand Guide Template Schema that validates a markdown-compliant template document JSON using the CommonMark plus GFM Markdig AST. Publish reader-visible content in the authored markdown document instead of encoding bindings, loops, or render-time component graphs."
    }
  ]
}

