{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://awoooi.wooo.work/schemas/ai_agent_report_automation_review_v1.schema.json",
  "title": "AI Agent Report Automation Review v1",
  "type": "object",
  "required": [
    "schema_version",
    "generated_at",
    "program_status",
    "source_refs",
    "report_truth",
    "report_cadences",
    "agent_workload_metrics",
    "report_charts",
    "risk_tier_policy",
    "analysis_recommendations",
    "approval_boundaries",
    "display_redaction_contract",
    "rollups"
  ],
  "properties": {
    "schema_version": { "const": "ai_agent_report_automation_review_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": { "type": "string" },
        "next_task_id": { "type": "string" },
        "read_only_mode": { "const": true },
        "runtime_authority": { "const": "reporting_and_risk_policy_review_only_no_live_execution" },
        "status_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "source_refs": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
    "report_truth": {
      "type": "object",
      "required": [
        "daily_report_ready",
        "weekly_report_ready",
        "monthly_report_ready",
        "per_agent_workload_ready",
        "chart_package_ready",
        "report_delivery_enabled",
        "report_delivery_count_24h",
        "report_read_receipt_count_24h",
        "ai_analysis_after_report_enabled",
        "medium_low_auto_policy_defined",
        "medium_low_auto_execution_enabled",
        "low_medium_high_controlled_auto_policy_defined",
        "low_medium_high_controlled_auto_execution_enabled",
        "live_medium_low_auto_execution_count_24h",
        "high_risk_requires_approval",
        "critical_break_glass_required",
        "live_auto_optimization_count_24h",
        "truth_note"
      ],
      "properties": {
        "daily_report_ready": { "const": true },
        "weekly_report_ready": { "const": true },
        "monthly_report_ready": { "const": true },
        "per_agent_workload_ready": { "const": true },
        "chart_package_ready": { "const": true },
        "report_delivery_enabled": { "const": false },
        "report_delivery_count_24h": { "const": 0 },
        "report_read_receipt_count_24h": { "const": 0 },
        "ai_analysis_after_report_enabled": { "const": false },
        "medium_low_auto_policy_defined": { "const": true },
        "medium_low_auto_execution_enabled": { "const": true },
        "low_medium_high_controlled_auto_policy_defined": { "const": true },
        "low_medium_high_controlled_auto_execution_enabled": { "const": true },
        "live_medium_low_auto_execution_count_24h": { "const": 0 },
        "high_risk_requires_approval": { "const": false },
        "critical_break_glass_required": { "const": true },
        "live_auto_optimization_count_24h": { "const": 0 },
        "truth_note": { "type": "string" }
      },
      "additionalProperties": false
    },
    "report_cadences": {
      "type": "array",
      "minItems": 3,
      "items": {
        "type": "object",
        "required": [
          "cadence_id",
          "display_name",
          "owner_agent",
          "schedule",
          "sections",
          "chart_ids",
          "delivery_channel",
          "status",
          "live_delivery_count"
        ],
        "properties": {
          "cadence_id": { "enum": ["daily", "weekly", "monthly"] },
          "display_name": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "schedule": { "type": "string" },
          "sections": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
          "chart_ids": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
          "delivery_channel": { "type": "string" },
          "status": { "type": "string" },
          "live_delivery_count": { "const": 0 }
        },
        "additionalProperties": false
      }
    },
    "agent_workload_metrics": {
      "type": "array",
      "minItems": 3,
      "items": {
        "type": "object",
        "required": [
          "agent_id",
          "display_name",
          "primary_role",
          "deployment_targets",
          "delegable_capabilities",
          "report_owned_sections",
          "analysis_owned_recommendations",
          "work_units_total",
          "work_units_done",
          "work_units_waiting_approval",
          "work_units_in_controlled_queue",
          "live_runtime_work_units_24h",
          "workload_note"
        ],
        "properties": {
          "agent_id": { "enum": ["openclaw", "hermes", "nemotron"] },
          "display_name": { "type": "string" },
          "primary_role": { "type": "string" },
          "deployment_targets": { "type": "integer", "minimum": 0 },
          "delegable_capabilities": { "type": "integer", "minimum": 0 },
          "report_owned_sections": { "type": "integer", "minimum": 0 },
          "analysis_owned_recommendations": { "type": "integer", "minimum": 0 },
          "work_units_total": { "type": "integer", "minimum": 0 },
          "work_units_done": { "type": "integer", "minimum": 0 },
          "work_units_waiting_approval": { "type": "integer", "minimum": 0 },
          "work_units_in_controlled_queue": { "type": "integer", "minimum": 0 },
          "live_runtime_work_units_24h": { "const": 0 },
          "workload_note": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "report_charts": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["chart_id", "display_name", "chart_type", "unit", "series", "operator_question"],
        "properties": {
          "chart_id": { "type": "string" },
          "display_name": { "type": "string" },
          "chart_type": { "type": "string" },
          "unit": { "type": "string" },
          "series": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": ["label", "value", "tone"],
              "properties": {
                "label": { "type": "string" },
                "value": { "type": "integer", "minimum": 0 },
                "tone": { "enum": ["ok", "warn", "danger", "neutral"] }
              },
              "additionalProperties": false
            }
          },
          "operator_question": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "risk_tier_policy": {
      "type": "object",
      "required": ["policy_summary", "risk_tiers"],
      "properties": {
        "policy_summary": { "type": "string" },
        "risk_tiers": {
          "type": "array",
          "minItems": 4,
          "items": {
            "type": "object",
            "required": [
              "risk_id",
              "display_name",
              "approval_required",
              "auto_action_policy",
              "current_execution_enabled",
              "required_before_enable"
            ],
            "properties": {
              "risk_id": { "enum": ["low", "medium", "high", "critical"] },
              "display_name": { "type": "string" },
              "approval_required": { "type": "boolean" },
              "auto_action_policy": { "type": "string" },
              "current_execution_enabled": { "type": "boolean" },
              "required_before_enable": { "type": "array", "items": { "type": "string" }, "minItems": 1 }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "analysis_recommendations": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "recommendation_id",
          "display_name",
          "owner_agent",
          "risk_tier",
          "approval_required",
          "current_auto_execution_enabled",
          "problem",
          "proposed_solution",
          "expected_report_signal",
          "blocked_runtime_action"
        ],
        "properties": {
          "recommendation_id": { "type": "string" },
          "display_name": { "type": "string" },
          "owner_agent": { "enum": ["openclaw", "hermes", "nemotron"] },
          "risk_tier": { "enum": ["low", "medium", "high", "critical"] },
          "approval_required": { "type": "boolean" },
          "current_auto_execution_enabled": { "type": "boolean" },
          "problem": { "type": "string" },
          "proposed_solution": { "type": "string" },
          "expected_report_signal": { "type": "string" },
          "blocked_runtime_action": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "approval_boundaries": {
      "type": "object",
      "required": [
        "low_risk_auto_execute_allowed",
        "medium_risk_auto_execute_allowed",
        "high_risk_auto_execute_allowed",
        "low_medium_high_controlled_apply_allowed",
        "high_risk_requires_human_approval",
        "critical_break_glass_required"
      ],
      "properties": {
        "low_risk_auto_execute_allowed": { "const": true },
        "medium_risk_auto_execute_allowed": { "const": true },
        "high_risk_auto_execute_allowed": { "const": true },
        "low_medium_high_controlled_apply_allowed": { "const": true },
        "high_risk_requires_human_approval": { "const": false },
        "critical_break_glass_required": { "const": true }
      },
      "additionalProperties": { "type": "boolean" }
    },
    "display_redaction_contract": {
      "type": "object",
      "required": [
        "redaction_required",
        "raw_report_payload_display_allowed",
        "private_reasoning_display_allowed",
        "secret_value_display_allowed",
        "work_window_transcript_display_allowed",
        "allowed_frontend_content",
        "forbidden_frontend_content",
        "frontend_display_policy"
      ],
      "properties": {
        "redaction_required": { "const": true },
        "raw_report_payload_display_allowed": { "const": false },
        "private_reasoning_display_allowed": { "const": false },
        "secret_value_display_allowed": { "const": false },
        "work_window_transcript_display_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": [
        "report_cadence_count",
        "agent_count",
        "chart_count",
        "recommendation_count",
        "workload_unit_total",
        "workload_done_total",
        "workload_waiting_approval_total",
        "approval_required_recommendation_ids",
        "medium_low_auto_policy_count",
        "low_medium_high_controlled_policy_count",
        "workload_controlled_queue_total",
        "current_auto_execution_enabled_count",
        "live_report_delivery_count",
        "live_auto_optimization_count"
      ],
      "properties": {
        "report_cadence_count": { "type": "integer", "minimum": 3 },
        "agent_count": { "type": "integer", "minimum": 3 },
        "chart_count": { "type": "integer", "minimum": 1 },
        "recommendation_count": { "type": "integer", "minimum": 1 },
        "workload_unit_total": { "type": "integer", "minimum": 0 },
        "workload_done_total": { "type": "integer", "minimum": 0 },
        "workload_waiting_approval_total": { "type": "integer", "minimum": 0 },
        "low_risk_recommendation_count": { "type": "integer", "minimum": 0 },
        "medium_risk_recommendation_count": { "type": "integer", "minimum": 0 },
        "high_risk_recommendation_count": { "type": "integer", "minimum": 0 },
        "critical_risk_recommendation_count": { "type": "integer", "minimum": 0 },
        "approval_required_recommendation_ids": { "type": "array", "items": { "type": "string" } },
        "medium_low_auto_policy_count": { "type": "integer", "minimum": 0 },
        "low_medium_high_controlled_policy_count": { "type": "integer", "minimum": 0 },
        "workload_controlled_queue_total": { "type": "integer", "minimum": 0 },
        "current_auto_execution_enabled_count": { "type": "integer", "minimum": 0 },
        "live_report_delivery_count": { "const": 0 },
        "live_auto_optimization_count": { "const": 0 }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
