{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://workspai.dev/schemas/release-readiness.v1.json",
  "title": "Workspai Release Readiness Evidence",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "workspacePath",
    "projectPath",
    "overallStatus",
    "blocking",
    "blockingReasons",
    "gates"
  ],
  "properties": {
    "schemaVersion": {
      "enum": ["release-readiness-v1", "v1"]
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspacePath": { "type": "string", "minLength": 1 },
    "projectPath": { "type": "string", "minLength": 1 },
    "action": {
      "enum": ["dev", "test", "build", "start", "lint", "format"]
    },
    "overallStatus": {
      "enum": ["pass", "warn", "fail"]
    },
    "blocking": { "type": "boolean" },
    "blockingReasons": {
      "type": "array",
      "items": { "type": "string" }
    },
    "gates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["gate", "status", "summary", "details"],
        "properties": {
          "gate": {
            "enum": ["env", "doctor", "analyze", "verify", "dependency"]
          },
          "status": { "enum": ["pass", "warn", "fail"] },
          "summary": { "type": "string" },
          "details": {
            "type": "array",
            "items": { "type": "string" }
          },
          "evidencePath": { "type": "string" }
        },
        "additionalProperties": true
      }
    },
    "evidencePath": { "type": "string" }
  },
  "additionalProperties": true
}
