{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_owner_approved_result_capture_promotion_dry_run_v1.schema.json",
  "title": "AI Agent Owner Approved Result Capture Promotion Dry-run v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "prior_result_capture_promotion_gate",
    "dry_run_truth",
    "promotion_dry_run_templates",
    "owner_acceptance_dry_run_fixtures",
    "dry_run_verifier_checks",
    "blocked_runtime_promotions",
    "operator_actions",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": {
      "const": "ai_agent_owner_approved_result_capture_promotion_dry_run_v1"
    },
    "generated_at": {
      "type": "string",
      "minLength": 1
    },
    "program_status": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "overall_completion_percent",
        "current_priority",
        "current_task_id",
        "next_task_id",
        "read_only_mode",
        "runtime_authority",
        "status_note"
      ],
      "properties": {
        "overall_completion_percent": {
          "const": 100
        },
        "current_priority": {
          "const": "P2"
        },
        "current_task_id": {
          "const": "P2-120"
        },
        "next_task_id": {
          "const": "P2-121"
        },
        "read_only_mode": {
          "const": true
        },
        "runtime_authority": {
          "const": "owner_approved_result_capture_promotion_dry_run_only_no_live_write"
        },
        "status_note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "source_refs": {
      "$ref": "#/$defs/string_array"
    },
    "prior_result_capture_promotion_gate": {
      "type": "object"
    },
    "dry_run_truth": {
      "type": "object"
    },
    "promotion_dry_run_templates": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/promotion_dry_run_template"
      }
    },
    "owner_acceptance_dry_run_fixtures": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/owner_acceptance_fixture"
      }
    },
    "dry_run_verifier_checks": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/dry_run_verifier_check"
      }
    },
    "blocked_runtime_promotions": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/blocked_runtime_promotion"
      }
    },
    "operator_actions": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/operator_action"
      }
    },
    "display_redaction_contract": {
      "type": "object"
    },
    "rollups": {
      "type": "object"
    }
  },
  "$defs": {
    "string_array": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "hash": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "owner_agent": {
      "enum": [
        "openclaw",
        "hermes",
        "nemotron"
      ]
    },
    "status": {
      "enum": [
        "ready",
        "ready_for_dry_run",
        "ready_for_owner_review",
        "approval_required",
        "blocked_by_policy"
      ]
    },
    "severity": {
      "enum": [
        "high",
        "critical"
      ]
    },
    "promotion_dry_run_template": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "template_id",
        "display_name",
        "owner_agent",
        "source_packet_id",
        "status",
        "target_dry_run",
        "dry_run_mode",
        "runtime_write_enabled",
        "preview_summary",
        "evidence_hash"
      ],
      "properties": {
        "template_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "source_packet_id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "target_dry_run": {
          "const": "result_capture_promotion_dry_run_preview"
        },
        "dry_run_mode": {
          "const": "preview_only"
        },
        "runtime_write_enabled": {
          "const": false
        },
        "preview_summary": {
          "type": "string",
          "minLength": 1
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "owner_acceptance_fixture": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fixture_id",
        "display_name",
        "owner_agent",
        "status",
        "required_owner",
        "fixture_only",
        "runtime_write_enabled",
        "verifies",
        "evidence_hash"
      ],
      "properties": {
        "fixture_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "required_owner": {
          "type": "string"
        },
        "fixture_only": {
          "const": true
        },
        "runtime_write_enabled": {
          "const": false
        },
        "verifies": {
          "type": "string",
          "minLength": 1
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "dry_run_verifier_check": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "verifier_id",
        "display_name",
        "owner_agent",
        "status",
        "verifies",
        "failure_if_missing",
        "live_execution_enabled",
        "evidence_hash"
      ],
      "properties": {
        "verifier_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "verifies": {
          "type": "string",
          "minLength": 1
        },
        "failure_if_missing": {
          "type": "string",
          "minLength": 1
        },
        "live_execution_enabled": {
          "const": false
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "blocked_runtime_promotion": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "blocker_id",
        "display_name",
        "severity",
        "status",
        "blocked_action",
        "blocked_until",
        "evidence_hash"
      ],
      "properties": {
        "blocker_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "severity": {
          "$ref": "#/$defs/severity"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "blocked_action": {
          "type": "string",
          "minLength": 1
        },
        "blocked_until": {
          "type": "string",
          "minLength": 1
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "operator_action": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action_id",
        "display_name",
        "owner_agent",
        "operator_instruction",
        "runtime_write_allowed"
      ],
      "properties": {
        "action_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "operator_instruction": {
          "type": "string",
          "minLength": 1
        },
        "runtime_write_allowed": {
          "const": false
        }
      }
    }
  }
}
