{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/zzh-newlearner/dsh-postmortem/schemas/diagnosis-adjudication-v1.schema.json",
  "title": "DSH Postmortem diagnosis adjudication v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "recordId", "adjudicatorId", "reviewerIds", "primaryIssue", "evidenceSteps", "actionability"],
  "properties": {
    "schemaVersion": { "const": "1" },
    "recordId": { "type": "string", "minLength": 1 },
    "adjudicatorId": { "type": "string", "minLength": 1, "description": "Pseudonymous adjudicator identifier; do not use a personal name or email." },
    "reviewerIds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 2, "maxItems": 2, "uniqueItems": true },
    "primaryIssue": { "enum": ["tool_error", "retry_loop", "missing_result", "turn_failed", "model_retry", "compat_mismatch", "none", "other", "cancelled"] },
    "evidenceSteps": { "type": "array", "items": { "type": "integer", "minimum": 1 }, "uniqueItems": true },
    "actionability": { "enum": ["actionable", "partly_actionable", "not_actionable", "insufficient_evidence"] },
    "notes": { "type": "string", "maxLength": 500, "description": "Do not include secrets, user content, raw tool input, raw tool output, paths, or credentials." }
  }
}
