{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:awoooi:agent-replacement-replay-v1",
  "title": "AWOOOI Agent Replacement Replay Record (v1)",
  "type": "object",
  "required": [
    "schema_version",
    "run_id",
    "incident_id",
    "candidate_id",
    "rca_correct",
    "tool_dry_run_pass",
    "repair_success",
    "audit_trace_complete",
    "latency_ms",
    "cost_usd"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "agent_replacement_replay_v1"
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "incident_id": {
      "type": "string",
      "minLength": 1
    },
    "candidate_id": {
      "type": "string",
      "minLength": 1,
      "examples": [
        "openclaw_incumbent",
        "openai_agents_sdk_coordinator",
        "langgraph_incident_kernel",
        "nemo_nemotron_fabric",
        "claude_agent_sdk_remediator"
      ]
    },
    "candidate_role": {
      "type": "string"
    },
    "rca_correct": {
      "type": ["boolean", "null"]
    },
    "tool_dry_run_pass": {
      "type": ["boolean", "null"]
    },
    "repair_success": {
      "type": ["boolean", "null"]
    },
    "false_repair": {
      "type": "boolean",
      "default": false
    },
    "fallback_used": {
      "type": "boolean",
      "default": false
    },
    "dangerous_action_detected": {
      "type": "boolean",
      "default": false
    },
    "dangerous_action_blocked": {
      "type": "boolean",
      "default": true
    },
    "high_risk_action": {
      "type": "boolean",
      "default": false
    },
    "hitl_preserved": {
      "type": "boolean",
      "default": true
    },
    "audit_trace_complete": {
      "type": "boolean"
    },
    "latency_ms": {
      "type": "number",
      "minimum": 0
    },
    "cost_usd": {
      "type": "number",
      "minimum": 0
    },
    "error": {
      "type": ["string", "null"]
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}
