{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_owner_approved_fixture_dry_run_v1.schema.json",
  "title": "AI Agent Owner Approved Fixture Dry Run",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "dry_run_truth",
    "fixture_package",
    "fixture_sets",
    "dry_run_gates",
    "simulation_steps",
    "rollback_contract",
    "approval_boundaries",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": {
      "const": "ai_agent_owner_approved_fixture_dry_run_v1"
    },
    "generated_at": {
      "type": "string"
    },
    "program_status": {
      "type": "object",
      "required": [
        "overall_completion_percent",
        "current_task_id",
        "next_task_id",
        "read_only_mode",
        "runtime_authority"
      ],
      "properties": {
        "overall_completion_percent": { "type": "integer" },
        "current_priority": { "type": "string" },
        "current_task_id": { "const": "P2-403F" },
        "next_task_id": { "const": "P2-403G" },
        "read_only_mode": { "const": true },
        "runtime_authority": { "const": "owner_approved_fixture_dry_run_only_no_live_write" },
        "status_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "dry_run_truth": {
      "type": "object",
      "properties": {
        "owner_fixture_scope_approved": { "const": true },
        "production_write_approved": { "const": false },
        "fixture_dry_run_allowed": { "const": true },
        "km_write_allowed": { "const": false },
        "playbook_trust_write_allowed": { "const": false },
        "timeline_learning_write_allowed": { "const": false },
        "agent_replay_score_write_allowed": { "const": false },
        "gateway_queue_write_allowed": { "const": false },
        "telegram_send_allowed": { "const": false },
        "redis_consumer_group_allowed": { "const": false },
        "db_migration_allowed": { "const": false },
        "workflow_trigger_allowed": { "const": false },
        "runtime_worker_allowed": { "const": false },
        "host_or_cluster_command_allowed": { "const": false },
        "secret_or_paid_api_allowed": { "const": false },
        "live_learning_write_count": { "const": 0 },
        "live_playbook_trust_update_count": { "const": 0 },
        "live_km_update_count": { "const": 0 },
        "live_timeline_write_count": { "const": 0 },
        "live_replay_score_write_count": { "const": 0 },
        "live_gateway_queue_write_count": { "const": 0 },
        "live_telegram_send_count": { "const": 0 },
        "truth_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "fixture_package": {
      "type": "object",
      "required": [
        "required_fields",
        "forbidden_fields",
        "owner_review_required",
        "rollback_required",
        "no_write_proof_required"
      ],
      "properties": {
        "required_fields": { "type": "array", "items": { "type": "string" } },
        "forbidden_fields": { "type": "array", "items": { "type": "string" } },
        "owner_review_required": { "const": true },
        "rollback_required": { "const": true },
        "no_write_proof_required": { "const": true },
        "operator_meaning": { "type": "string" }
      },
      "additionalProperties": false
    },
    "fixture_sets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["fixture_id", "display_name", "scenario_type", "owner_agent", "status", "target_surface", "operator_visible_result", "blocked_runtime_action"],
        "properties": {
          "fixture_id": { "type": "string" },
          "display_name": { "type": "string" },
          "scenario_type": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "status": { "type": "string" },
          "target_surface": { "type": "string" },
          "operator_visible_result": { "type": "string" },
          "blocked_runtime_action": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "dry_run_gates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["gate_id", "display_name", "owner_agent", "status", "required_evidence", "blocked_runtime_action"],
        "properties": {
          "gate_id": { "type": "string" },
          "display_name": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "status": { "type": "string" },
          "required_evidence": { "type": "string" },
          "blocked_runtime_action": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "simulation_steps": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["step_id", "display_name", "status", "expected_artifact"],
        "properties": {
          "step_id": { "type": "string" },
          "display_name": { "type": "string" },
          "status": { "type": "string" },
          "expected_artifact": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "rollback_contract": {
      "type": "object",
      "required": ["rollback_required", "rollback_steps"],
      "properties": {
        "rollback_required": { "const": true },
        "rollback_steps": { "type": "array", "items": { "type": "string" } }
      },
      "additionalProperties": false
    },
    "approval_boundaries": {
      "type": "object",
      "additionalProperties": { "const": false }
    },
    "display_redaction_contract": {
      "type": "object",
      "properties": {
        "redaction_required": { "const": true },
        "raw_payload_display_allowed": { "const": false },
        "private_reasoning_display_allowed": { "const": false },
        "secret_value_display_allowed": { "const": false },
        "action_button_allowed": { "const": false },
        "allowed_frontend_content": { "type": "array", "items": { "type": "string" } },
        "forbidden_frontend_content": { "type": "array", "items": { "type": "string" } },
        "frontend_display_policy": { "type": "string" }
      },
      "additionalProperties": false
    },
    "rollups": {
      "type": "object",
      "required": [
        "fixture_set_count",
        "dry_run_gate_count",
        "simulation_step_count",
        "approved_fixture_only_count",
        "approval_required_gate_ids",
        "blocked_runtime_action_count",
        "required_field_count",
        "forbidden_field_count",
        "live_write_count_total",
        "live_send_count_total",
        "live_receipt_count_total"
      ],
      "properties": {
        "fixture_set_count": { "type": "integer" },
        "dry_run_gate_count": { "type": "integer" },
        "simulation_step_count": { "type": "integer" },
        "approved_fixture_only_count": { "type": "integer" },
        "approval_required_gate_ids": { "type": "array", "items": { "type": "string" } },
        "blocked_runtime_action_count": { "type": "integer" },
        "required_field_count": { "type": "integer" },
        "forbidden_field_count": { "type": "integer" },
        "live_write_count_total": { "const": 0 },
        "live_send_count_total": { "const": 0 },
        "live_receipt_count_total": { "const": 0 }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
