{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://regseal.ai/regseal-yml-schema.json",
  "title": ".regseal.yml",
  "description": "Configuration file for RegSeal AI compliance verification in CI/CD pipelines.",
  "type": "object",
  "required": ["version", "model", "compliance"],
  "additionalProperties": false,
  "properties": {
    "version": {
      "type": "integer",
      "const": 1,
      "description": "Schema version. Must be 1."
    },
    "model": {
      "type": "object",
      "description": "AI model identification.",
      "required": ["name"],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Human-readable model name."
        },
        "version": {
          "type": "string",
          "maxLength": 50,
          "description": "Model version (e.g. '3.1.0')."
        },
        "architecture": {
          "type": "string",
          "maxLength": 200,
          "description": "Model architecture (e.g. 'XGBoost + LSTM ensemble')."
        }
      }
    },
    "compliance": {
      "type": "object",
      "description": "Compliance requirements to enforce.",
      "additionalProperties": false,
      "properties": {
        "frameworks": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": ["eu-ai-act", "colorado-ai-act", "nist-ai-rmf", "iso-42001", "pqc"]
          },
          "description": "Regulatory frameworks the model must be assessed against."
        },
        "minimum_score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "Minimum overall compliance score required (0-100). CI fails if the model's score is below this."
        },
        "require_attestation": {
          "type": "boolean",
          "description": "If true, CI fails unless the model has an active cryptographic attestation."
        }
      }
    },
    "registry": {
      "type": "object",
      "description": "Registry lookup configuration.",
      "additionalProperties": false,
      "properties": {
        "slug": {
          "type": "string",
          "maxLength": 100,
          "description": "Registry entry slug to look up (e.g. 'huggingface-my-org-fraud-detection')."
        },
        "auto_register": {
          "type": "boolean",
          "description": "If true, automatically register the model if not found in the registry."
        }
      }
    }
  }
}
