{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/SetupAgentsClarifyListResult",
  "definitions": {
    "SetupAgentsClarifyListResult": {
      "$ref": "#/definitions/CommandListResult%3CClarificationRecord%3E"
    },
    "CommandListResult<ClarificationRecord>": {
      "type": "object",
      "properties": {
        "records": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ClarificationRecord"
          }
        },
        "file": {
          "type": "string"
        },
        "cwd": {
          "type": "string"
        }
      },
      "required": ["records", "file", "cwd"],
      "additionalProperties": false
    },
    "ClarificationRecord": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "runId": {
          "type": "string"
        },
        "storyId": {
          "type": "string"
        },
        "fromRole": {
          "$ref": "#/definitions/WorkflowPhase"
        },
        "toRole": {
          "$ref": "#/definitions/ClarificationToRole"
        },
        "question": {
          "type": "string"
        },
        "answer": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/ClarificationStatus"
        },
        "createdAt": {
          "type": "string"
        },
        "answeredAt": {
          "type": "string"
        }
      },
      "required": ["id", "runId", "storyId", "fromRole", "toRole", "question", "status", "createdAt"],
      "additionalProperties": false
    },
    "WorkflowPhase": {
      "type": "string",
      "enum": ["pm", "ba", "architect", "ux", "developer", "security-review", "qa", "document-review", "release"]
    },
    "ClarificationToRole": {
      "type": "string",
      "enum": ["po", "ta"]
    },
    "ClarificationStatus": {
      "type": "string",
      "enum": ["open", "answered"]
    }
  }
}
