{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/SetupAgentsWorkflowPlaybooksResult",
  "definitions": {
    "SetupAgentsWorkflowPlaybooksResult": {
      "type": "object",
      "properties": {
        "phases": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PhaseInstructions"
          }
        },
        "instructionsDir": {
          "type": "string"
        },
        "cwd": {
          "type": "string"
        },
        "scaffolded": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "skipped": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": ["phases", "instructionsDir", "cwd"],
      "additionalProperties": false
    },
    "PhaseInstructions": {
      "type": "object",
      "properties": {
        "phase": {
          "$ref": "#/definitions/WorkflowPhase"
        },
        "instructionsDir": {
          "type": "string"
        },
        "playbooks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "filename": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "exists": {
                "type": "boolean"
              }
            },
            "required": ["filename", "path", "exists"],
            "additionalProperties": false
          }
        }
      },
      "required": ["phase", "instructionsDir", "playbooks"],
      "additionalProperties": false
    },
    "WorkflowPhase": {
      "type": "string",
      "enum": ["pm", "ba", "architect", "ux", "developer", "security-review", "qa", "document-review", "release"]
    }
  }
}
