{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_owner_approved_result_capture_readback_v1.schema.json",
  "title": "AI Agent Owner Approved Result Capture Readback v1",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "prior_dry_run_readback",
    "readback_truth",
    "result_capture_readback_digests",
    "promotion_readiness_reviews",
    "failure_lanes",
    "reviewer_queue_preview",
    "operator_actions",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": { "const": "ai_agent_owner_approved_result_capture_readback_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-107" },
        "next_task_id": { "const": "P2-108" },
        "read_only_mode": { "const": true },
        "runtime_authority": { "const": "owner_approved_result_capture_readback_only_no_live_write" },
        "status_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "source_refs": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
    "prior_dry_run_readback": {
      "type": "object",
      "required": [
        "source_schema_version",
        "readback_at",
        "result_capture_template_count",
        "score_fixture_count",
        "dry_run_gate_count",
        "operator_action_count",
        "approval_required_gate_count",
        "blocked_gate_count",
        "approved_without_execution_meta_24h",
        "execution_failed_with_matched_24h",
        "owner_approval_received_count",
        "dry_run_preview_generated_count",
        "result_capture_write_count",
        "score_write_count",
        "learning_write_count",
        "playbook_trust_write_count",
        "gateway_queue_write_count",
        "telegram_send_count",
        "production_write_count",
        "readback_note"
      ],
      "properties": {
        "source_schema_version": { "const": "ai_agent_owner_approved_result_capture_dry_run_v1" },
        "readback_at": { "type": "string" },
        "result_capture_template_count": { "const": 5 },
        "score_fixture_count": { "const": 5 },
        "dry_run_gate_count": { "const": 7 },
        "operator_action_count": { "const": 5 },
        "approval_required_gate_count": { "const": 2 },
        "blocked_gate_count": { "const": 1 },
        "approved_without_execution_meta_24h": { "const": 63 },
        "execution_failed_with_matched_24h": { "const": 1 },
        "owner_approval_received_count": { "const": 0 },
        "dry_run_preview_generated_count": { "const": 0 },
        "result_capture_write_count": { "const": 0 },
        "score_write_count": { "const": 0 },
        "learning_write_count": { "const": 0 },
        "playbook_trust_write_count": { "const": 0 },
        "gateway_queue_write_count": { "const": 0 },
        "telegram_send_count": { "const": 0 },
        "production_write_count": { "const": 0 },
        "readback_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "readback_truth": {
      "type": "object",
      "required": [
        "p2_106_dry_run_loaded",
        "fixture_readback_allowed",
        "readback_digest_ready",
        "promotion_readiness_review_ready",
        "owner_review_required_before_promotion",
        "canonical_runtime_readback_enabled",
        "runtime_result_capture_write_enabled",
        "runtime_score_write_enabled",
        "runtime_learning_write_enabled",
        "playbook_trust_write_enabled",
        "reviewer_queue_write_enabled",
        "gateway_queue_write_enabled",
        "telegram_send_enabled",
        "production_write_enabled",
        "secret_read_enabled",
        "destructive_operation_enabled",
        "owner_approval_received_count",
        "readback_digest_generated_count",
        "promotion_approved_count",
        "reviewer_queue_write_count",
        "result_capture_write_count_24h",
        "score_write_count_24h",
        "learning_write_count_24h",
        "playbook_trust_write_count_24h",
        "gateway_queue_write_count_24h",
        "telegram_send_count_24h",
        "production_write_count_24h",
        "secret_read_count_24h",
        "destructive_operation_count_24h",
        "truth_note"
      ],
      "properties": {
        "p2_106_dry_run_loaded": { "const": true },
        "fixture_readback_allowed": { "const": true },
        "readback_digest_ready": { "const": true },
        "promotion_readiness_review_ready": { "const": true },
        "owner_review_required_before_promotion": { "const": true },
        "canonical_runtime_readback_enabled": { "const": false },
        "runtime_result_capture_write_enabled": { "const": false },
        "runtime_score_write_enabled": { "const": false },
        "runtime_learning_write_enabled": { "const": false },
        "playbook_trust_write_enabled": { "const": false },
        "reviewer_queue_write_enabled": { "const": false },
        "gateway_queue_write_enabled": { "const": false },
        "telegram_send_enabled": { "const": false },
        "production_write_enabled": { "const": false },
        "secret_read_enabled": { "const": false },
        "destructive_operation_enabled": { "const": false },
        "owner_approval_received_count": { "const": 0 },
        "readback_digest_generated_count": { "const": 0 },
        "promotion_approved_count": { "const": 0 },
        "reviewer_queue_write_count": { "const": 0 },
        "result_capture_write_count_24h": { "const": 0 },
        "score_write_count_24h": { "const": 0 },
        "learning_write_count_24h": { "const": 0 },
        "playbook_trust_write_count_24h": { "const": 0 },
        "gateway_queue_write_count_24h": { "const": 0 },
        "telegram_send_count_24h": { "const": 0 },
        "production_write_count_24h": { "const": 0 },
        "secret_read_count_24h": { "const": 0 },
        "destructive_operation_count_24h": { "const": 0 },
        "truth_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "result_capture_readback_digests": { "type": "array", "minItems": 5 },
    "promotion_readiness_reviews": { "type": "array", "minItems": 5 },
    "failure_lanes": { "type": "array", "minItems": 4 },
    "reviewer_queue_preview": { "type": "array", "minItems": 4 },
    "operator_actions": { "type": "array", "minItems": 5 },
    "display_redaction_contract": { "type": "object" },
    "rollups": { "type": "object" }
  },
  "additionalProperties": false
}
