{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://markitect.io/schemas/markitect-metaschema.json",
  "type": "object",
  "title": "MarkiTect Extended JSON Schema Metaschema",
  "description": "Metaschema for MarkiTect JSON schemas that extends standard JSON Schema with MarkiTect-specific features for document structure analysis and generation",
  "allOf": [
    {
      "$ref": "http://json-schema.org/draft-07/schema#"
    },
    {
      "properties": {
        "x-markitect-heading-text": {
          "type": "string",
          "description": "Preserve actual heading text from source document for validation and template generation"
        },
        "x-markitect-content-instructions": {
          "type": "string",
          "description": "Instructions for content authors about what should go in this section"
        },
        "x-markitect-outline-mode": {
          "type": "boolean",
          "description": "Indicates if this schema was generated in outline mode, focusing on structural hierarchy"
        },
        "x-markitect-outline-depth": {
          "type": "integer",
          "minimum": 1,
          "description": "Maximum heading depth captured in outline mode"
        },
        "x-markitect-instruction-type": {
          "type": "string",
          "enum": ["description", "example", "constraint", "template"],
          "description": "Type of content instruction provided"
        },
        "x-markitect-generated-from": {
          "type": "string",
          "description": "Source file or document this schema was generated from"
        },
        "x-markitect-generation-mode": {
          "type": "string",
          "enum": ["outline", "full"],
          "description": "Mode used to generate this schema"
        }
      },
      "patternProperties": {
        "^x-markitect-": {
          "description": "MarkiTect extension properties"
        }
      }
    }
  ]
}