{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_result_capture_no_write_readback_v1.schema.json",
  "title": "AI Agent Result Capture No-write Readback v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "prior_reviewer_queue_readback",
    "readback_truth",
    "result_capture_readback_fixtures",
    "capture_field_mappings",
    "readback_verifier_checks",
    "blocked_result_capture_writes",
    "operator_actions",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": {
      "const": "ai_agent_result_capture_no_write_readback_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-118"
        },
        "next_task_id": {
          "const": "P2-119"
        },
        "read_only_mode": {
          "const": true
        },
        "runtime_authority": {
          "const": "result_capture_no_write_readback_only_no_capture_or_learning_write"
        },
        "status_note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "source_refs": {
      "$ref": "#/$defs/string_array"
    },
    "prior_reviewer_queue_readback": {
      "type": "object"
    },
    "readback_truth": {
      "type": "object"
    },
    "result_capture_readback_fixtures": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/result_capture_fixture"
      }
    },
    "capture_field_mappings": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/capture_field_mapping"
      }
    },
    "readback_verifier_checks": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/readback_verifier_check"
      }
    },
    "blocked_result_capture_writes": {
      "type": "array",
      "minItems": 5,
      "items": {
        "$ref": "#/$defs/blocked_result_capture_write"
      }
    },
    "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_owner_review",
        "approval_required",
        "blocked_by_policy"
      ]
    },
    "severity": {
      "enum": [
        "high",
        "critical"
      ]
    },
    "result_capture_fixture": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "fixture_id",
        "display_name",
        "owner_agent",
        "source_queue_mapping_id",
        "status",
        "capture_lane",
        "readback_mode",
        "result_capture_write_enabled",
        "next_manual_action",
        "evidence_hash"
      ],
      "properties": {
        "fixture_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "source_queue_mapping_id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "capture_lane": {
          "type": "string"
        },
        "readback_mode": {
          "const": "no_write_fixture"
        },
        "result_capture_write_enabled": {
          "const": false
        },
        "next_manual_action": {
          "type": "string",
          "minLength": 1
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "capture_field_mapping": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mapping_id",
        "display_name",
        "status",
        "source_fixture_id",
        "target_capture",
        "capture_write_enabled",
        "required_owner",
        "evidence_hash"
      ],
      "properties": {
        "mapping_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "source_fixture_id": {
          "type": "string"
        },
        "target_capture": {
          "const": "result_capture_preview"
        },
        "capture_write_enabled": {
          "const": false
        },
        "required_owner": {
          "type": "string"
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "readback_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"
        },
        "failure_if_missing": {
          "type": "string"
        },
        "live_execution_enabled": {
          "const": false
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "blocked_result_capture_write": {
      "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"
        },
        "blocked_until": {
          "type": "string"
        },
        "evidence_hash": {
          "$ref": "#/$defs/hash"
        }
      }
    },
    "operator_action": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action_id",
        "display_name",
        "owner_agent",
        "operator_instruction",
        "runtime_capture_write_allowed"
      ],
      "properties": {
        "action_id": {
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "owner_agent": {
          "$ref": "#/$defs/owner_agent"
        },
        "operator_instruction": {
          "type": "string",
          "minLength": 1
        },
        "runtime_capture_write_allowed": {
          "const": false
        }
      }
    }
  }
}
