{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SpecPlatformConfig",
  "description": "Root configuration schema for the Specification Management Platform (spec-platform.config.json)",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "checkAnchors": {
      "type": "boolean",
      "default": true
    },
    "codeRoots": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "packages"
      ]
    },
    "contractRoots": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "docSnippets": {
      "description": "Verifiable code snippet markers configuration",
      "type": "object",
      "properties": {
        "allowedLanguages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "markerPattern": {
          "type": "string"
        },
        "requireSnippets": {
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false
    },
    "documentRoots": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": [
        "docs"
      ]
    },
    "ignoredDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "includeTests": {
      "type": "boolean",
      "default": false
    },
    "pairedDocs": {
      "description": "Bilingual paired documentation configuration (Context-Action convention)",
      "type": "object",
      "properties": {
        "enforceSymmetricLinks": {
          "type": "boolean",
          "default": true
        },
        "primaryDir": {
          "description": "Primary language directory, e.g. \"docs/en\"",
          "type": "string",
          "minLength": 1
        },
        "secondaryDir": {
          "description": "Secondary language directory, e.g. \"docs/ko\"",
          "type": "string",
          "minLength": 1
        },
        "subdirectories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "primaryDir",
        "secondaryDir"
      ],
      "additionalProperties": false
    },
    "scopePolicy": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "permissive",
            "recommended",
            "strict"
          ]
        },
        {
          "type": "object",
          "properties": {
            "rules": {
              "description": "Custom link scope rules",
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {}
              }
            }
          },
          "required": [
            "rules"
          ],
          "additionalProperties": false
        }
      ],
      "default": "recommended"
    }
  },
  "additionalProperties": false,
  "$id": "https://spec-platform.org/schemas/spec-platform.config.schema.json"
}
