{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://workspai.dev/schemas/workspace-intelligence/workspace-explain.v1.json",
  "title": "Workspai Workspace Explain Report",
  "type": "object",
  "required": ["schemaVersion", "generatedAt", "workspacePath", "target", "summary", "sections"],
  "properties": {
    "schemaVersion": { "const": "workspace-explain.v1" },
    "runId": { "type": "string", "minLength": 1 },
    "generatedAt": { "type": "string", "format": "date-time" },
    "workspacePath": { "type": "string" },
    "target": { "type": "object", "additionalProperties": true },
    "summary": { "type": "string" },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "title", "body"],
        "properties": {
          "id": { "type": "string" },
          "title": { "type": "string" },
          "body": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "releaseVerdict": { "enum": ["ready", "needs-attention", "blocked"] },
    "evidenceFreshness": { "enum": ["fresh", "stale", "unknown"] },
    "blocking": { "type": "boolean" },
    "releaseRisk": { "type": "string" },
    "blockingReasons": { "type": "array", "items": { "type": "string" } },
    "resolutionHints": { "type": "array", "items": { "type": "object" } }
  },
  "additionalProperties": false
}
