{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/WorkflowDecomposeResult",
  "definitions": {
    "WorkflowDecomposeResult": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string"
        },
        "vote": {
          "$ref": "#/definitions/DecompositionVote"
        },
        "consensus": {
          "type": "string",
          "enum": ["pending", "proceed", "decompose"]
        },
        "pendingVoter": {
          "type": "string",
          "enum": ["ba", "ta"]
        },
        "suggestedSplits": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": ["taskId", "vote", "consensus", "suggestedSplits"],
      "additionalProperties": false
    },
    "DecompositionVote": {
      "type": "object",
      "properties": {
        "voter": {
          "type": "string",
          "enum": ["ba", "ta"]
        },
        "verdict": {
          "type": "string",
          "enum": ["proceed", "decompose"]
        },
        "reason": {
          "type": "string"
        },
        "suggestedSplits": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": ["voter", "verdict", "reason"],
      "additionalProperties": false
    }
  }
}
