{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_candidate_operation_dry_run_evidence_v1.schema.json",
  "title": "AI Agent Candidate Operation Dry-Run Evidence v1",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "dry_run_truth",
    "candidate_operations",
    "verifier_plans",
    "gate_evidence_requirements",
    "operator_handoffs",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": { "const": "ai_agent_candidate_operation_dry_run_evidence_v1" },
    "generated_at": { "type": "string" },
    "program_status": {
      "type": "object",
      "required": [
        "overall_completion_percent",
        "current_priority",
        "current_task_id",
        "next_task_id",
        "read_only_mode",
        "runtime_authority",
        "status_note"
      ],
      "properties": {
        "overall_completion_percent": { "type": "integer", "minimum": 0, "maximum": 100 },
        "current_priority": { "enum": ["P0", "P1", "P2", "P3"] },
        "current_task_id": { "const": "P2-102" },
        "next_task_id": { "const": "P2-103" },
        "read_only_mode": { "const": true },
        "runtime_authority": { "const": "candidate_operation_dry_run_evidence_only_no_live_execution_or_send" },
        "status_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "source_refs": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
    "dry_run_truth": {
      "type": "object",
      "required": [
        "p2_101_permission_model_loaded",
        "dry_run_evidence_gate_ready",
        "all_candidate_operations_have_dry_run_evidence",
        "side_effect_counter_ready",
        "verifier_plan_ready",
        "rollback_or_noop_plan_ready",
        "owner_review_packet_ready",
        "runtime_execution_enabled",
        "gateway_queue_write_enabled",
        "telegram_send_enabled",
        "telegram_bot_api_call_enabled",
        "delivery_receipt_write_enabled",
        "ai_runtime_worker_enabled",
        "medium_low_auto_worker_enabled",
        "post_action_verifier_live_readback_enabled",
        "production_write_enabled",
        "secret_value_read_enabled",
        "paid_provider_call_enabled",
        "host_or_cluster_command_enabled",
        "destructive_operation_enabled",
        "work_window_transcript_display_allowed",
        "runtime_execution_count_24h",
        "gateway_queue_write_count_24h",
        "telegram_send_count_24h",
        "telegram_bot_api_call_count_24h",
        "delivery_receipt_write_count_24h",
        "ai_runtime_worker_run_count_24h",
        "medium_low_auto_execution_count_24h",
        "post_action_verifier_live_readback_count_24h",
        "production_write_count_24h",
        "secret_value_read_count_24h",
        "paid_provider_call_count_24h",
        "host_or_cluster_command_count_24h",
        "destructive_operation_count_24h",
        "truth_note"
      ],
      "properties": {
        "p2_101_permission_model_loaded": { "const": true },
        "dry_run_evidence_gate_ready": { "const": true },
        "all_candidate_operations_have_dry_run_evidence": { "const": true },
        "side_effect_counter_ready": { "const": true },
        "verifier_plan_ready": { "const": true },
        "rollback_or_noop_plan_ready": { "const": true },
        "owner_review_packet_ready": { "const": true },
        "runtime_execution_enabled": { "const": false },
        "gateway_queue_write_enabled": { "const": false },
        "telegram_send_enabled": { "const": false },
        "telegram_bot_api_call_enabled": { "const": false },
        "delivery_receipt_write_enabled": { "const": false },
        "ai_runtime_worker_enabled": { "const": false },
        "medium_low_auto_worker_enabled": { "const": false },
        "post_action_verifier_live_readback_enabled": { "const": false },
        "production_write_enabled": { "const": false },
        "secret_value_read_enabled": { "const": false },
        "paid_provider_call_enabled": { "const": false },
        "host_or_cluster_command_enabled": { "const": false },
        "destructive_operation_enabled": { "const": false },
        "work_window_transcript_display_allowed": { "const": false },
        "runtime_execution_count_24h": { "const": 0 },
        "gateway_queue_write_count_24h": { "const": 0 },
        "telegram_send_count_24h": { "const": 0 },
        "telegram_bot_api_call_count_24h": { "const": 0 },
        "delivery_receipt_write_count_24h": { "const": 0 },
        "ai_runtime_worker_run_count_24h": { "const": 0 },
        "medium_low_auto_execution_count_24h": { "const": 0 },
        "post_action_verifier_live_readback_count_24h": { "const": 0 },
        "production_write_count_24h": { "const": 0 },
        "secret_value_read_count_24h": { "const": 0 },
        "paid_provider_call_count_24h": { "const": 0 },
        "host_or_cluster_command_count_24h": { "const": 0 },
        "destructive_operation_count_24h": { "const": 0 },
        "truth_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "candidate_operations": {
      "type": "array",
      "minItems": 13,
      "items": {
        "type": "object",
        "required": [
          "candidate_id",
          "source_category_id",
          "display_name",
          "risk_tier",
          "permission_lane",
          "owner_agent",
          "dry_run_status",
          "dry_run_scope",
          "input_evidence_hash",
          "output_evidence_hash",
          "side_effect_count",
          "production_write_count",
          "gateway_queue_write_count",
          "telegram_send_count",
          "secret_value_read_count",
          "destructive_action_count",
          "blocked_actions",
          "required_human_decision",
          "verifier_plan_id",
          "rollback_or_noop_plan",
          "next_gate"
        ],
        "properties": {
          "candidate_id": { "type": "string" },
          "source_category_id": { "type": "string" },
          "display_name": { "type": "string" },
          "risk_tier": { "enum": ["low", "medium", "high", "critical"] },
          "permission_lane": {
            "enum": [
              "observe_only",
              "no_write_replay_allowed",
              "proposal_only",
              "human_approval_required",
              "explicitly_blocked"
            ]
          },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "dry_run_status": {
            "enum": [
              "passed_no_write",
              "needs_owner_review",
              "blocked_until_allowlist",
              "blocked_by_policy"
            ]
          },
          "dry_run_scope": { "type": "string" },
          "input_evidence_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
          "output_evidence_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
          "side_effect_count": { "const": 0 },
          "production_write_count": { "const": 0 },
          "gateway_queue_write_count": { "const": 0 },
          "telegram_send_count": { "const": 0 },
          "secret_value_read_count": { "const": 0 },
          "destructive_action_count": { "const": 0 },
          "blocked_actions": { "type": "array", "items": { "type": "string" } },
          "required_human_decision": { "type": "string" },
          "verifier_plan_id": { "type": "string" },
          "rollback_or_noop_plan": { "type": "string" },
          "next_gate": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "verifier_plans": {
      "type": "array",
      "minItems": 5,
      "items": {
        "type": "object",
        "required": [
          "plan_id",
          "display_name",
          "owner_agent",
          "verifier_scope",
          "expected_signal",
          "failure_lane",
          "live_readback_enabled",
          "writes_result",
          "requires_secret_value",
          "evidence_hash"
        ],
        "properties": {
          "plan_id": { "type": "string" },
          "display_name": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "verifier_scope": { "type": "string" },
          "expected_signal": { "type": "string" },
          "failure_lane": { "type": "string" },
          "live_readback_enabled": { "const": false },
          "writes_result": { "const": false },
          "requires_secret_value": { "const": false },
          "evidence_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
        },
        "additionalProperties": false
      }
    },
    "gate_evidence_requirements": {
      "type": "array",
      "minItems": 6,
      "items": {
        "type": "object",
        "required": [
          "gate_id",
          "display_name",
          "required_evidence",
          "missing_or_blocked",
          "opens_live_execution"
        ],
        "properties": {
          "gate_id": { "type": "string" },
          "display_name": { "type": "string" },
          "required_evidence": { "type": "array", "items": { "type": "string" } },
          "missing_or_blocked": { "type": "array", "items": { "type": "string" } },
          "opens_live_execution": { "const": false }
        },
        "additionalProperties": false
      }
    },
    "operator_handoffs": {
      "type": "array",
      "minItems": 5,
      "items": {
        "type": "object",
        "required": [
          "handoff_id",
          "display_name",
          "owner_agent",
          "human_instruction",
          "creates_runtime_action",
          "requires_human_review"
        ],
        "properties": {
          "handoff_id": { "type": "string" },
          "display_name": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "human_instruction": { "type": "string" },
          "creates_runtime_action": { "const": false },
          "requires_human_review": { "const": true }
        },
        "additionalProperties": false
      }
    },
    "display_redaction_contract": {
      "type": "object",
      "required": [
        "redaction_required",
        "raw_prompt_display_allowed",
        "private_reasoning_display_allowed",
        "secret_value_display_allowed",
        "raw_telegram_payload_display_allowed",
        "work_window_transcript_display_allowed",
        "allowed_display_fields",
        "blocked_display_fields"
      ],
      "properties": {
        "redaction_required": { "const": true },
        "raw_prompt_display_allowed": { "const": false },
        "private_reasoning_display_allowed": { "const": false },
        "secret_value_display_allowed": { "const": false },
        "raw_telegram_payload_display_allowed": { "const": false },
        "work_window_transcript_display_allowed": { "const": false },
        "allowed_display_fields": { "type": "array", "items": { "type": "string" } },
        "blocked_display_fields": { "type": "array", "items": { "type": "string" } }
      },
      "additionalProperties": false
    },
    "rollups": {
      "type": "object",
      "required": [
        "candidate_operation_count",
        "candidate_with_dry_run_evidence_count",
        "passed_no_write_count",
        "needs_owner_review_count",
        "blocked_until_allowlist_count",
        "blocked_by_policy_count",
        "verifier_plan_count",
        "gate_evidence_requirement_count",
        "operator_handoff_count",
        "side_effect_count",
        "runtime_execution_count",
        "gateway_queue_write_count",
        "telegram_send_count",
        "production_write_count",
        "secret_value_read_count",
        "destructive_operation_count"
      ],
      "properties": {
        "candidate_operation_count": { "type": "integer" },
        "candidate_with_dry_run_evidence_count": { "type": "integer" },
        "passed_no_write_count": { "type": "integer" },
        "needs_owner_review_count": { "type": "integer" },
        "blocked_until_allowlist_count": { "type": "integer" },
        "blocked_by_policy_count": { "type": "integer" },
        "verifier_plan_count": { "type": "integer" },
        "gate_evidence_requirement_count": { "type": "integer" },
        "operator_handoff_count": { "type": "integer" },
        "side_effect_count": { "const": 0 },
        "runtime_execution_count": { "const": 0 },
        "gateway_queue_write_count": { "const": 0 },
        "telegram_send_count": { "const": 0 },
        "production_write_count": { "const": 0 },
        "secret_value_read_count": { "const": 0 },
        "destructive_operation_count": { "const": 0 }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
