{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hogarmas.net/mcp-2026/schema.json",
  "title": "H/M MCP 2026 transition trace",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "ruleset", "generatedAt", "target", "input", "assessment", "limitations"],
  "properties": {
    "schema": { "const": "hm.mcp-2026-transition.v1" },
    "ruleset": { "const": "2026-07-21.1" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "target": { "$ref": "#/$defs/target" },
    "input": { "$ref": "#/$defs/input" },
    "assessment": { "$ref": "#/$defs/assessment" },
    "limitations": { "$ref": "#/$defs/limitations" }
  },
  "$defs": {
    "target": {
      "type": "object",
      "additionalProperties": false,
      "required": ["from", "to", "targetStatus", "lockedOn", "expectedFinalOn", "assessedAsOf"],
      "properties": {
        "from": { "const": "2025-11-25" },
        "to": { "const": "2026-07-28" },
        "targetStatus": { "const": "locked-release-candidate" },
        "lockedOn": { "const": "2026-05-21" },
        "expectedFinalOn": { "const": "2026-07-28" },
        "assessedAsOf": { "const": "2026-07-21" }
      }
    },
    "input": {
      "type": "object",
      "additionalProperties": false,
      "required": ["sha256", "sample", "rawCodeIncluded", "projectNameIncluded", "repositoryIncluded", "endpointIncluded", "credentialIncluded"],
      "properties": {
        "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
        "sample": { "type": "boolean" },
        "rawCodeIncluded": { "const": false },
        "projectNameIncluded": { "const": false },
        "repositoryIncluded": { "const": false },
        "endpointIncluded": { "const": false },
        "credentialIncluded": { "const": false }
      }
    },
    "assessment": {
      "type": "object",
      "required": ["schema", "ruleset", "target", "decision", "profile", "summary", "dimensions", "findings", "migrationOrder", "limitations"],
      "properties": {
        "schema": { "const": "hm.mcp-2026-transition.assessment.v1" },
        "ruleset": { "const": "2026-07-21.1" },
        "target": { "$ref": "#/$defs/target" },
        "decision": { "enum": ["migration-blocked", "changes-required", "insufficient-evidence", "declared-ready"] },
        "profile": {
          "type": "object",
          "additionalProperties": false,
          "required": ["transport", "accessMode", "usesTools", "usesTasks", "usesElicitation", "usesSubscriptions", "usesExtensions", "usesDynamicRegistration"],
          "properties": {
            "transport": { "enum": ["streamable-http", "sse", "stdio", "other", "unknown"] },
            "accessMode": { "enum": ["public", "protected", "unknown"] },
            "usesTools": { "$ref": "#/$defs/featureState" },
            "usesTasks": { "$ref": "#/$defs/featureState" },
            "usesElicitation": { "$ref": "#/$defs/featureState" },
            "usesSubscriptions": { "$ref": "#/$defs/featureState" },
            "usesExtensions": { "$ref": "#/$defs/featureState" },
            "usesDynamicRegistration": { "$ref": "#/$defs/featureState" }
          }
        },
        "summary": { "$ref": "#/$defs/summary" },
        "dimensions": { "type": "array", "items": { "$ref": "#/$defs/dimension" } },
        "findings": { "type": "array", "items": { "$ref": "#/$defs/finding" }, "minItems": 28, "maxItems": 28 },
        "migrationOrder": { "type": "array", "items": { "$ref": "#/$defs/migrationAction" } },
        "limitations": { "$ref": "#/$defs/limitations" }
      }
    },
    "featureState": { "enum": ["yes", "no", "unknown"] },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["blocker", "review", "unknown", "aligned", "notApplicable", "total"],
      "properties": {
        "blocker": { "type": "integer", "minimum": 0 },
        "review": { "type": "integer", "minimum": 0 },
        "unknown": { "type": "integer", "minimum": 0 },
        "aligned": { "type": "integer", "minimum": 0 },
        "notApplicable": { "type": "integer", "minimum": 0 },
        "total": { "const": 28 }
      }
    },
    "dimensionCounts": {
      "type": "object",
      "additionalProperties": false,
      "required": ["blocker", "review", "unknown", "aligned", "notApplicable", "total"],
      "properties": {
        "blocker": { "type": "integer", "minimum": 0 },
        "review": { "type": "integer", "minimum": 0 },
        "unknown": { "type": "integer", "minimum": 0 },
        "aligned": { "type": "integer", "minimum": 0 },
        "notApplicable": { "type": "integer", "minimum": 0 },
        "total": { "type": "integer", "minimum": 1, "maximum": 28 }
      }
    },
    "dimension": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "state", "counts"],
      "properties": {
        "id": { "type": "string" },
        "state": { "$ref": "#/$defs/findingState" },
        "counts": { "$ref": "#/$defs/dimensionCounts" }
      }
    },
    "finding": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "group", "severity", "state", "summary", "action", "source"],
      "properties": {
        "id": { "type": "string" },
        "group": { "type": "string" },
        "severity": { "enum": ["critical", "high", "medium", "info"] },
        "state": { "$ref": "#/$defs/findingState" },
        "summary": { "type": "string" },
        "action": { "type": "string" },
        "source": { "type": "string" }
      }
    },
    "migrationAction": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "group", "severity", "action", "source"],
      "properties": {
        "id": { "type": "string" },
        "group": { "type": "string" },
        "severity": { "enum": ["critical", "high", "medium", "info"] },
        "action": { "type": "string" },
        "source": { "type": "string" }
      }
    },
    "findingState": { "enum": ["blocker", "review", "unknown", "aligned", "not-applicable"] },
    "limitations": {
      "type": "object",
      "additionalProperties": false,
      "required": ["declarationOnly", "sourceCodeInspected", "networkRequestsObserved", "runtimeConformanceTested", "officialConformanceSuiteRun", "finalSpecificationVerified", "releaseCandidateMayChange", "compatibilityCertified"],
      "properties": {
        "declarationOnly": { "const": true },
        "sourceCodeInspected": { "const": false },
        "networkRequestsObserved": { "const": false },
        "runtimeConformanceTested": { "const": false },
        "officialConformanceSuiteRun": { "const": false },
        "finalSpecificationVerified": { "const": false },
        "releaseCandidateMayChange": { "const": true },
        "compatibilityCertified": { "const": false }
      }
    }
  }
}
