{
  "schema_version": "ai_agent_owner_approved_result_capture_dry_run_v1",
  "generated_at": "2026-06-13T12:05:00+08:00",
  "program_status": {
    "overall_completion_percent": 100,
    "current_priority": "P2",
    "current_task_id": "P2-106",
    "next_task_id": "P2-107",
    "read_only_mode": true,
    "runtime_authority": "owner_approved_result_capture_dry_run_only_no_live_write",
    "status_note": "P2-106 將 P2-105 的 scorecard、result capture contract 與 promotion gate 收斂成 owner-approved 無寫入 dry-run；本快照只定義批准包、預覽模板、評分 fixture 與 verifier fixture，不寫 runtime 結果。"
  },
  "source_refs": [
    "docs/evaluations/ai_agent_critic_reviewer_result_capture_2026-06-13.json",
    "apps/api/src/services/ai_agent_critic_reviewer_result_capture.py",
    "apps/api/src/services/learning_service.py",
    "apps/api/src/services/approval_execution.py",
    "apps/api/src/services/post_execution_verifier.py",
    "apps/api/src/services/telegram_gateway.py",
    "docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md"
  ],
  "prior_contract_readback": {
    "source_schema_version": "ai_agent_critic_reviewer_result_capture_v1",
    "readback_at": "2026-06-13T01:46:00+08:00",
    "approval_24h_total": 66,
    "scorecard_count": 5,
    "result_capture_contract_count": 5,
    "promotion_gate_count": 6,
    "candidate_route_count": 4,
    "approved_without_execution_meta_24h": 63,
    "execution_failed_with_matched_24h": 1,
    "pending_with_matched_24h": 2,
    "result_capture_runtime_write_count": 0,
    "learning_write_count": 0,
    "playbook_trust_write_count": 0,
    "telegram_send_count": 0,
    "readback_note": "P2-105 已固定 score/result-capture 欄位；P2-106 只建立 owner approval 後的 dry-run preview，不產生 live write。"
  },
  "dry_run_truth": {
    "p2_105_contract_loaded": true,
    "owner_approval_required": true,
    "dry_run_preview_allowed": true,
    "result_capture_payload_template_ready": true,
    "critic_reviewer_score_fixture_ready": true,
    "post_write_verifier_fixture_required": true,
    "redacted_operator_digest_ready": true,
    "runtime_result_capture_write_enabled": false,
    "runtime_score_write_enabled": false,
    "runtime_learning_write_enabled": false,
    "playbook_trust_write_enabled": false,
    "gateway_queue_write_enabled": false,
    "telegram_send_enabled": false,
    "production_write_enabled": false,
    "secret_read_enabled": false,
    "destructive_operation_enabled": false,
    "owner_approval_received_count": 0,
    "dry_run_preview_generated_count": 0,
    "result_capture_write_count_24h": 0,
    "score_write_count_24h": 0,
    "learning_write_count_24h": 0,
    "playbook_trust_write_count_24h": 0,
    "gateway_queue_write_count_24h": 0,
    "telegram_send_count_24h": 0,
    "production_write_count_24h": 0,
    "secret_read_count_24h": 0,
    "destructive_operation_count_24h": 0,
    "truth_note": "統帥批准後也只允許產生 無寫入 preview 與 verifier fixture；任何 score、result capture、learning、trust、Gateway queue、Telegram 與 production write 仍為 0。"
  },
  "approval_packet": {
    "packet_id": "owner_packet_p2_106_result_capture_dry_run",
    "display_name": "P2-106 owner-approved result capture dry-run 批准包",
    "required_owner_fields": [
      "owner_approval_id",
      "owner_role",
      "approval_scope",
      "approved_result_capture_contract_ids",
      "redacted_evidence_refs",
      "dry_run_plan_fingerprint",
      "rollback_plan_ref",
      "post_write_verifier_plan_ref"
    ],
    "forbidden_inputs": [
      "未脫敏提示內容",
      "私有推理內容",
      "機密明文",
      "未脫敏工具輸出",
      "未脫敏瀏覽器狀態"
    ],
    "operator_meaning": "統帥批准時只批准產生 dry-run preview，不批准正式寫入 result capture、score、learning 或 Telegram 實發。",
    "dry_run_plan_fingerprint": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
  },
  "result_capture_dry_run_templates": [
    {
      "template_id": "dry_run_capture_approved_execution_result",
      "display_name": "APPROVED result capture dry-run",
      "source_contract_id": "capture_approved_execution_result",
      "owner_agent": "openclaw",
      "result_state": "approved_without_execution_meta",
      "status": "approval_required",
      "candidate_count_24h": 63,
      "required_inputs": [
        "owner_approval_id",
        "approval_id",
        "incident_id",
        "matched_playbook_id",
        "operator_outcome",
        "verifier_plan_ref"
      ],
      "preview_outputs": [
        "redacted_result_capture_payload",
        "post_write_verifier_fixture",
        "rollback_or_noop_plan",
        "operator_digest_preview"
      ],
      "write_enabled": false,
      "runtime_writer_enabled": false,
      "blocked_write_action": "result_capture_table_insert",
      "no_write_evidence_hash": "sha256:1212121212121212121212121212121212121212121212121212121212121212"
    },
    {
      "template_id": "dry_run_capture_execution_failed_candidate",
      "display_name": "EXECUTION_FAILED negative-learning candidate dry-run",
      "source_contract_id": "capture_execution_failed_candidate",
      "owner_agent": "nemotron",
      "result_state": "execution_failed",
      "status": "approval_required",
      "candidate_count_24h": 1,
      "required_inputs": [
        "owner_approval_id",
        "approval_id",
        "matched_playbook_id",
        "failure_reason_ref",
        "negative_learning_weight_preview",
        "verifier_plan_ref"
      ],
      "preview_outputs": [
        "failure_candidate_payload_preview",
        "negative_learning_preview",
        "trust_update_hold_reason",
        "operator_digest_preview"
      ],
      "write_enabled": false,
      "runtime_writer_enabled": false,
      "blocked_write_action": "negative_learning_insert",
      "no_write_evidence_hash": "sha256:2323232323232323232323232323232323232323232323232323232323232323"
    },
    {
      "template_id": "dry_run_capture_pending_human_gate",
      "display_name": "PENDING human gate dry-run",
      "source_contract_id": "capture_pending_human_gate",
      "owner_agent": "hermes",
      "result_state": "pending_human_gate",
      "status": "blocked_by_policy",
      "candidate_count_24h": 2,
      "required_inputs": [
        "approval_id",
        "matched_playbook_id",
        "pending_reason",
        "human_decision_required",
        "expires_at"
      ],
      "preview_outputs": [
        "hold_reason_preview",
        "owner_followup_packet",
        "no_learning_write_notice"
      ],
      "write_enabled": false,
      "runtime_writer_enabled": false,
      "blocked_write_action": "pending_to_learning_promotion",
      "no_write_evidence_hash": "sha256:3434343434343434343434343434343434343434343434343434343434343434"
    },
    {
      "template_id": "dry_run_capture_manual_or_noop",
      "display_name": "manual / no-op result dry-run",
      "source_contract_id": "capture_noop_manual_resolution",
      "owner_agent": "hermes",
      "result_state": "manual_or_noop",
      "status": "ready_for_dry_run",
      "candidate_count_24h": 0,
      "required_inputs": [
        "incident_id",
        "approval_id",
        "manual_resolution_note",
        "noop_reason",
        "operator_verified"
      ],
      "preview_outputs": [
        "manual_result_payload_preview",
        "noop_classification_preview",
        "learning_exclusion_reason"
      ],
      "write_enabled": false,
      "runtime_writer_enabled": false,
      "blocked_write_action": "manual_result_capture_write",
      "no_write_evidence_hash": "sha256:4545454545454545454545454545454545454545454545454545454545454545"
    },
    {
      "template_id": "dry_run_capture_post_write_verifier_receipt",
      "display_name": "post-write verifier receipt dry-run",
      "source_contract_id": "capture_post_write_verifier_receipt",
      "owner_agent": "nemotron",
      "result_state": "verifier_receipt",
      "status": "blocked_by_policy",
      "candidate_count_24h": 0,
      "required_inputs": [
        "verifier_plan_ref",
        "expected_result_hash",
        "rollback_plan_ref",
        "operator_ack_required"
      ],
      "preview_outputs": [
        "verifier_receipt_fixture",
        "rollback_trigger_preview",
        "operator_digest_preview"
      ],
      "write_enabled": false,
      "runtime_writer_enabled": false,
      "blocked_write_action": "verifier_receipt_write",
      "no_write_evidence_hash": "sha256:5656565656565656565656565656565656565656565656565656565656565656"
    }
  ],
  "critic_reviewer_score_fixtures": [
    {
      "fixture_id": "fixture_openclaw_critic_decision_quality",
      "source_scorecard_id": "scorecard_openclaw_critic_decision_quality",
      "owner_agent": "openclaw",
      "minimum_score": 80,
      "fixture_only": true,
      "runtime_score_write_enabled": false,
      "required_inputs": [
        "hypothesis_count",
        "challenge_count",
        "unsafe_action_detected",
        "verdict"
      ],
      "failure_if_missing": "缺 Critic 反方挑戰時，dry-run preview 必須停在 rework。",
      "evidence_hash": "sha256:6767676767676767676767676767676767676767676767676767676767676767"
    },
    {
      "fixture_id": "fixture_openclaw_reviewer_safety_verdict",
      "source_scorecard_id": "scorecard_openclaw_reviewer_safety_verdict",
      "owner_agent": "openclaw",
      "minimum_score": 90,
      "fixture_only": true,
      "runtime_score_write_enabled": false,
      "required_inputs": [
        "risk_level",
        "hard_rules_hit",
        "dry_run_evidence_hash",
        "rollback_owner"
      ],
      "failure_if_missing": "缺 Reviewer 安全裁決時，不得產生 owner-approved dry-run preview。",
      "evidence_hash": "sha256:7878787878787878787878787878787878787878787878787878787878787878"
    },
    {
      "fixture_id": "fixture_hermes_redaction_operator_report",
      "source_scorecard_id": "scorecard_hermes_redaction_operator_report",
      "owner_agent": "hermes",
      "minimum_score": 85,
      "fixture_only": true,
      "runtime_score_write_enabled": false,
      "required_inputs": [
        "redacted_summary",
        "blocked_fields",
        "allowed_display_fields",
        "operator_next_action"
      ],
      "failure_if_missing": "缺公開遮罩報告時，治理頁與摘要不得顯示 dry-run preview。",
      "evidence_hash": "sha256:8989898989898989898989898989898989898989898989898989898989898989"
    },
    {
      "fixture_id": "fixture_nemotron_failure_candidate_verifier",
      "source_scorecard_id": "scorecard_nemotron_failure_candidate_verifier",
      "owner_agent": "nemotron",
      "minimum_score": 80,
      "fixture_only": true,
      "runtime_score_write_enabled": false,
      "required_inputs": [
        "failure_reason",
        "result_state",
        "verifier_plan",
        "no_write_replay_hash"
      ],
      "failure_if_missing": "NemoTron 僅能驗證 failure candidate dry-run，不得直接寫負向 learning。",
      "evidence_hash": "sha256:9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a"
    },
    {
      "fixture_id": "fixture_coordinator_disagreement_gate",
      "source_scorecard_id": "scorecard_coordinator_disagreement_gate",
      "owner_agent": "openclaw",
      "minimum_score": 95,
      "fixture_only": true,
      "runtime_score_write_enabled": false,
      "required_inputs": [
        "critic_verdict",
        "reviewer_verdict",
        "disagreement_reason",
        "human_gate_required"
      ],
      "failure_if_missing": "Critic / Reviewer 不一致時，dry-run preview 必須停在 owner hold。",
      "evidence_hash": "sha256:abababababababababababababababababababababababababababababababab"
    }
  ],
  "dry_run_gates": [
    {
      "gate_id": "gate_owner_approval_packet_complete",
      "display_name": "Owner approval packet complete",
      "owner_agent": "openclaw",
      "status": "approval_required",
      "required_evidence": "必須有 owner role、scope、approved contract ids、公開遮罩證據與 plan fingerprint。",
      "blocked_write_action": "result_capture_write_without_owner_packet",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_critic_reviewer_score_fixture_complete",
      "display_name": "Critic / Reviewer score fixture complete",
      "owner_agent": "openclaw",
      "status": "ready",
      "required_evidence": "5 張 score fixture 必須齊備，且 runtime score write 維持 false。",
      "blocked_write_action": "score_table_insert",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_result_capture_payload_preview_complete",
      "display_name": "Result capture payload preview complete",
      "owner_agent": "hermes",
      "status": "ready",
      "required_evidence": "5 組 result capture dry-run template 必須輸出公開遮罩 preview。",
      "blocked_write_action": "result_capture_table_insert",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_redaction_public_display_safe",
      "display_name": "Public display redaction safe",
      "owner_agent": "hermes",
      "status": "ready",
      "required_evidence": "治理頁只能顯示公開遮罩 summary、hash 與 operator instruction。",
      "blocked_write_action": "unredacted_display",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_no_live_write_enforced",
      "display_name": "No live write enforced",
      "owner_agent": "openclaw",
      "status": "blocked_by_policy",
      "required_evidence": "P2-106 不得寫 score/result/learning/trust/Gateway/Telegram/production target。",
      "blocked_write_action": "any_live_write",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_post_write_verifier_fixture_ready",
      "display_name": "Post-write verifier fixture ready",
      "owner_agent": "nemotron",
      "status": "approval_required",
      "required_evidence": "post-write verifier 只能產生 fixture 與 rollback preview，不讀 canonical target。",
      "blocked_write_action": "post_write_verifier_execution",
      "creates_runtime_write": false
    },
    {
      "gate_id": "gate_operator_digest_preview_only",
      "display_name": "Operator digest preview only",
      "owner_agent": "hermes",
      "status": "ready",
      "required_evidence": "Telegram 只允許摘要預覽，不呼叫 Bot API、不寫 Gateway queue。",
      "blocked_write_action": "telegram_or_gateway_send",
      "creates_runtime_write": false
    }
  ],
  "operator_actions": [
    {
      "action_id": "op_review_owner_packet",
      "action_type": "review",
      "display_name": "審查 owner approval packet",
      "owner_agent": "openclaw",
      "operator_instruction": "檢查批准範圍與 contract ids 是否只涵蓋 dry-run preview。",
      "runtime_write_allowed": false
    },
    {
      "action_id": "op_collect_redacted_evidence",
      "action_type": "collect_evidence",
      "display_name": "收集公開遮罩證據",
      "owner_agent": "hermes",
      "operator_instruction": "只收公開遮罩 refs、hash 與 rollback / verifier refs。",
      "runtime_write_allowed": false
    },
    {
      "action_id": "op_approve_no_write_dry_run",
      "action_type": "approve_dry_run",
      "display_name": "批准 無寫入 dry-run",
      "owner_agent": "openclaw",
      "operator_instruction": "批准後仍只產生 preview artifact，不寫任何 runtime target。",
      "runtime_write_allowed": false
    },
    {
      "action_id": "op_reject_or_rework_packet",
      "action_type": "reject_or_rework",
      "display_name": "退回或補件",
      "owner_agent": "hermes",
      "operator_instruction": "缺任一 owner 欄位、遮罩證據或 verifier plan 時，退回補件。",
      "runtime_write_allowed": false
    },
    {
      "action_id": "op_promote_to_p2_107_gate",
      "action_type": "promote_to_next_gate",
      "display_name": "推進 P2-107 verifier gate",
      "owner_agent": "nemotron",
      "operator_instruction": "僅在 dry-run preview 與 verifier fixture 都通過後，提出下一關審核。",
      "runtime_write_allowed": false
    }
  ],
  "display_redaction_contract": {
    "redaction_required": true,
    "frontend_display_policy": "治理頁只顯示公開遮罩 summary、hash、gate、fixture 與 operator action；不得顯示內部協作逐字稿、未脫敏提示內容、私有推理內容、未脫敏工具輸出或機密明文。",
    "raw_prompt_display_allowed": false,
    "private_reasoning_display_allowed": false,
    "secret_value_display_allowed": false,
    "raw_telegram_payload_display_allowed": false,
    "work_window_transcript_display_allowed": false
  },
  "rollups": {
    "result_capture_template_count": 5,
    "score_fixture_count": 5,
    "dry_run_gate_count": 7,
    "operator_action_count": 5,
    "approval_required_gate_count": 2,
    "blocked_gate_count": 1,
    "approval_24h_total": 66,
    "approved_without_execution_meta_24h": 63,
    "execution_failed_with_matched_24h": 1,
    "owner_approval_received_count": 0,
    "dry_run_preview_generated_count": 0,
    "result_capture_write_count": 0,
    "score_write_count": 0,
    "learning_write_count": 0,
    "playbook_trust_write_count": 0,
    "gateway_queue_write_count": 0,
    "telegram_send_count": 0,
    "production_write_count": 0,
    "secret_read_count": 0,
    "destructive_operation_count": 0
  }
}
