{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "General Executor Report",
  "description": "Structured execution report produced by the general-executor agent. Callers may pass this schema as outputSchema at dispatch; the agent validates its report against it.",
  "type": "object",
  "additionalProperties": false,
  "required": ["status", "summary"],
  "properties": {
    "task_id": {
      "type": "string",
      "minLength": 1,
      "description": "Caller-provided task identifier, echoed back."
    },
    "status": {
      "type": "string",
      "enum": ["completed", "completed_with_deviations", "blocked", "checkpoint"],
      "description": "completed: every criterion passed; completed_with_deviations: something unmet but deliverable; blocked: cannot proceed without user input; checkpoint: decision point reached."
    },
    "summary": {
      "type": "string",
      "minLength": 1,
      "description": "One-paragraph outcome of the execution."
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["path", "change_type", "summary"],
        "properties": {
          "path": { "type": "string", "minLength": 1 },
          "change_type": {
            "type": "string",
            "enum": ["created", "modified", "deleted", "moved", "untouched"]
          },
          "summary": { "type": "string", "minLength": 1 }
        }
      }
    },
    "verification": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["criterion", "result", "evidence"],
        "properties": {
          "criterion": { "type": "string", "minLength": 1 },
          "result": {
            "type": "string",
            "enum": ["pass", "fail", "not_run"]
          },
          "evidence": { "type": "string" }
        }
      }
    },
    "tests": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["command", "result", "output_summary"],
        "properties": {
          "command": { "type": "string", "minLength": 1 },
          "result": {
            "type": "string",
            "enum": ["pass", "fail", "skipped"]
          },
          "output_summary": { "type": "string" }
        }
      }
    },
    "deviations": {
      "type": "array",
      "items": { "type": "string" }
    },
    "notes": {
      "type": "array",
      "items": { "type": "string" }
    }
  }
}
