{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-options-paper-review-packet.v1.json",
  "title": "Finance Agent Options Paper Review Packet V1",
  "description": "Standalone C1 paper-review packet for Triptych OS (Agent OS). It packages a C0 options signal artifact and C1 fixture/delayed-data-only paper simulation artifact into owner-review evidence without satisfying external hard gates, creating routes, dispatching Robinhood MCP/providers, enabling live data, creating options order schema, mutating wallet/x402, calling execute/invoke, publishing marketplace listings, or publishing capabilities.",
  "type": "object",
  "required": [
    "schema",
    "schema_ref",
    "artifact",
    "paper_review_packet_id",
    "created_at",
    "status",
    "owner_review_state",
    "source_signal",
    "paper_simulation",
    "paper_evidence_summary",
    "review_summary",
    "remaining_live_action_external_gates",
    "does_not_satisfy_external_gates",
    "required_false_authority",
    "receipt",
    "non_personalized",
    "paper_mode_only",
    "executable_directly",
    "can_execute_orders",
    "live_fills_recorded",
    "broker_order_recorded",
    "options_execution_enabled",
    "option_order_schema_allowed",
    "provider_dispatch_enabled",
    "route_can_create_live_read_route",
    "route_can_execute",
    "route_can_dispatch_provider",
    "route_can_approve_options_execution",
    "wallet_mutation_enabled",
    "x402_settlement_enabled",
    "marketplace_publication_enabled",
    "capability_publication_enabled"
  ],
  "additionalProperties": false,
  "properties": {
    "schema": { "type": "string", "const": "agoragentic.agent-os.finance-agent-options-paper-review-packet.v1" },
    "schema_ref": { "type": "string", "const": "/schema/finance-agent-options-paper-review-packet.v1.json" },
    "artifact": { "type": "string", "const": "options_paper_review_packet" },
    "paper_review_packet_id": {
      "type": "string",
      "pattern": "^optprv_[a-zA-Z0-9_-]{8,64}$"
    },
    "created_at": { "type": "string", "format": "date-time" },
    "status": { "type": "string", "const": "paper_review_packet_created" },
    "owner_review_state": {
      "type": "string",
      "enum": ["pending_owner_review", "owner_reviewed_no_live_authority", "rejected"]
    },
    "source_signal": {
      "type": "object",
      "required": ["signal_id", "schema_ref", "artifact_hash", "underlying_symbol", "strategy_type"],
      "additionalProperties": false,
      "properties": {
        "signal_id": { "type": "string", "pattern": "^optsig_[a-zA-Z0-9_-]{8,64}$" },
        "schema_ref": { "type": "string", "const": "/schema/finance-agent-options-signal-intelligence.v1.json" },
        "artifact_hash": { "$ref": "#/$defs/sha256_hash" },
        "underlying_symbol": { "$ref": "#/$defs/public_safe_symbol" },
        "strategy_type": { "$ref": "#/$defs/strategy_type" }
      }
    },
    "paper_simulation": {
      "type": "object",
      "required": ["paper_simulation_id", "schema_ref", "artifact_hash", "receipt_id", "created_at"],
      "additionalProperties": false,
      "properties": {
        "paper_simulation_id": { "type": "string", "pattern": "^optsim_[a-zA-Z0-9_-]{8,64}$" },
        "schema_ref": { "type": "string", "const": "/schema/finance-agent-options-paper-simulation.v1.json" },
        "artifact_hash": { "$ref": "#/$defs/sha256_hash" },
        "receipt_id": { "type": "string", "pattern": "^rcpt_[a-f0-9]{24}$" },
        "created_at": { "type": "string", "format": "date-time" }
      }
    },
    "paper_evidence_summary": {
      "type": "object",
      "required": [
        "data_mode",
        "position_state",
        "simulated_total_pl_usd",
        "simulated_return_pct",
        "observation_count",
        "paper_receipt_count",
        "delayed_or_fixture_data_only",
        "no_live_action_assertion",
        "no_brokerage_execution_assertion"
      ],
      "additionalProperties": false,
      "properties": {
        "data_mode": { "type": "string", "const": "fixture_or_delayed_public_data_only" },
        "position_state": { "type": "string", "enum": ["paper_open", "paper_closed"] },
        "simulated_total_pl_usd": { "type": "number" },
        "simulated_return_pct": { "type": ["number", "null"] },
        "observation_count": { "type": "integer", "minimum": 1, "maximum": 25 },
        "paper_receipt_count": { "type": "integer", "const": 1 },
        "delayed_or_fixture_data_only": { "type": "boolean", "const": true },
        "no_live_action_assertion": { "type": "boolean", "const": true },
        "no_brokerage_execution_assertion": { "type": "boolean", "const": true }
      }
    },
    "review_summary": {
      "type": "object",
      "required": [
        "reviewer_ref",
        "reviewed_at",
        "risk_notes",
        "paper_performance_notes",
        "evidence_limitations",
        "decision_notes",
        "owner_review_required",
        "compliance_review_required",
        "brokerage_options_approval_required",
        "mcp_schema_proof_required"
      ],
      "additionalProperties": false,
      "properties": {
        "reviewer_ref": {
          "anyOf": [
            { "$ref": "#/$defs/public_safe_id_128" },
            { "type": "null" }
          ]
        },
        "reviewed_at": {
          "anyOf": [
            { "type": "string", "format": "date-time" },
            { "type": "null" }
          ]
        },
        "risk_notes": { "$ref": "#/$defs/public_safe_text_array" },
        "paper_performance_notes": { "$ref": "#/$defs/public_safe_text_array" },
        "evidence_limitations": {
          "type": "array",
          "minItems": 1,
          "maxItems": 8,
          "items": { "$ref": "#/$defs/public_safe_text_500" }
        },
        "decision_notes": { "$ref": "#/$defs/public_safe_text_array" },
        "owner_review_required": { "type": "boolean", "const": true },
        "compliance_review_required": { "type": "boolean", "const": true },
        "brokerage_options_approval_required": { "type": "boolean", "const": true },
        "mcp_schema_proof_required": { "type": "boolean", "const": true }
      }
    },
    "remaining_live_action_external_gates": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "owner_approval_required",
          "compliance_review_required",
          "brokerage_options_approval_required",
          "mcp_schema_proof_required"
        ]
      },
      "allOf": [
        { "contains": { "const": "owner_approval_required" } },
        { "contains": { "const": "compliance_review_required" } },
        { "contains": { "const": "brokerage_options_approval_required" } },
        { "contains": { "const": "mcp_schema_proof_required" } }
      ]
    },
    "does_not_satisfy_external_gates": { "type": "boolean", "const": true },
    "required_false_authority": { "$ref": "#/$defs/false_authority" },
    "receipt": {
      "type": "object",
      "required": [
        "receipt_type",
        "receipt_id",
        "paper_review_packet_id",
        "source_signal_hash",
        "paper_simulation_hash",
        "created_at",
        "redaction_summary",
        "no_live_action_assertion",
        "no_brokerage_execution_assertion"
      ],
      "additionalProperties": false,
      "properties": {
        "receipt_type": { "type": "string", "const": "options_paper_review_packet_receipt" },
        "receipt_id": { "type": "string", "pattern": "^rcpt_[a-f0-9]{24}$" },
        "paper_review_packet_id": { "type": "string", "pattern": "^optprv_[a-zA-Z0-9_-]{8,64}$" },
        "source_signal_hash": { "$ref": "#/$defs/sha256_hash" },
        "paper_simulation_hash": { "$ref": "#/$defs/sha256_hash" },
        "created_at": { "type": "string", "format": "date-time" },
        "redaction_summary": {
          "type": "object",
          "required": [
            "raw_provider_payload_excluded",
            "private_account_values_excluded",
            "order_payload_excluded",
            "wallet_values_excluded",
            "live_brokerage_payload_excluded",
            "raw_review_notes_excluded"
          ],
          "additionalProperties": false,
          "properties": {
            "raw_provider_payload_excluded": { "type": "boolean", "const": true },
            "private_account_values_excluded": { "type": "boolean", "const": true },
            "order_payload_excluded": { "type": "boolean", "const": true },
            "wallet_values_excluded": { "type": "boolean", "const": true },
            "live_brokerage_payload_excluded": { "type": "boolean", "const": true },
            "raw_review_notes_excluded": { "type": "boolean", "const": true }
          }
        },
        "no_live_action_assertion": { "type": "boolean", "const": true },
        "no_brokerage_execution_assertion": { "type": "boolean", "const": true }
      }
    },
    "non_personalized": { "type": "boolean", "const": true },
    "paper_mode_only": { "type": "boolean", "const": true },
    "executable_directly": { "type": "boolean", "const": false },
    "can_execute_orders": { "type": "boolean", "const": false },
    "live_fills_recorded": { "type": "boolean", "const": false },
    "broker_order_recorded": { "type": "boolean", "const": false },
    "options_execution_enabled": { "type": "boolean", "const": false },
    "option_order_schema_allowed": { "type": "boolean", "const": false },
    "provider_dispatch_enabled": { "type": "boolean", "const": false },
    "route_can_create_live_read_route": { "type": "boolean", "const": false },
    "route_can_execute": { "type": "boolean", "const": false },
    "route_can_dispatch_provider": { "type": "boolean", "const": false },
    "route_can_approve_options_execution": { "type": "boolean", "const": false },
    "wallet_mutation_enabled": { "type": "boolean", "const": false },
    "x402_settlement_enabled": { "type": "boolean", "const": false },
    "marketplace_publication_enabled": { "type": "boolean", "const": false },
    "capability_publication_enabled": { "type": "boolean", "const": false }
  },
  "allOf": [
    {
      "if": {
        "properties": { "owner_review_state": { "enum": ["owner_reviewed_no_live_authority", "rejected"] } },
        "required": ["owner_review_state"]
      },
      "then": {
        "properties": {
          "review_summary": {
            "properties": {
              "reviewer_ref": { "$ref": "#/$defs/public_safe_id_128" },
              "reviewed_at": { "type": "string", "format": "date-time" }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": { "owner_review_state": { "const": "pending_owner_review" } },
        "required": ["owner_review_state"]
      },
      "then": {
        "properties": {
          "review_summary": {
            "properties": {
              "reviewer_ref": { "type": "null" },
              "reviewed_at": { "type": "null" }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "strategy_type": {
      "type": "string",
      "enum": ["long_call", "long_put", "debit_spread", "credit_spread", "spread_template"]
    },
    "sha256_hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "public_safe_symbol": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10,
      "pattern": "^[A-Z][A-Z0-9.]{0,9}$"
    },
    "public_safe_id_128": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[a-zA-Z0-9_.:-]+$",
      "not": { "$ref": "#/$defs/private_or_token_text" }
    },
    "public_safe_text_array": {
      "type": "array",
      "minItems": 0,
      "maxItems": 8,
      "items": { "$ref": "#/$defs/public_safe_text_500" }
    },
    "public_safe_text_500": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "not": { "$ref": "#/$defs/private_or_token_text" }
    },
    "private_or_token_text": {
      "anyOf": [
        { "pattern": "^[a-z][a-z0-9+.-]*://" },
        { "pattern": "[?&](token|access_token|refresh_token|api_key|key|secret|authorization)=" },
        { "pattern": "([Aa][Pp][Ii][_-]?[Kk][Ee][Yy]|[Aa]ccess[_-]?[Tt]oken|[Rr]efresh[_-]?[Tt]oken|[Oo][Aa]uth|[Pp]assword|[Ss]ecret|[Mm][Ff][Aa]|[Cc][Vv][Vv])" },
        { "pattern": "([Aa]ccount|[Cc]ard|[Pp]ayment|[Ww]allet|[Rr]outing)[\\s_-]?([Nn]umber|[Pp]ayload|[Rr]aw|[Vv]alue|[Vv]alues)" },
        { "pattern": "\\b([Ss][Kk]|[Pp][Kk]|[Aa][Mm][Kk]|[Xx][Oo][Xx][BbAaPpRrSs]|[Gg][Hh][PpOoUuSsRr])_[A-Za-z0-9_=-]{8,}\\b" }
      ]
    },
    "false_authority": {
      "type": "object",
      "required": [
        "executable_directly",
        "can_execute_orders",
        "live_fills_recorded",
        "broker_order_recorded",
        "options_execution_enabled",
        "option_order_schema_allowed",
        "provider_dispatch_enabled",
        "route_can_create_live_read_route",
        "route_can_execute",
        "route_can_dispatch_provider",
        "route_can_approve_options_execution",
        "wallet_mutation_enabled",
        "x402_settlement_enabled",
        "marketplace_publication_enabled",
        "capability_publication_enabled"
      ],
      "additionalProperties": false,
      "properties": {
        "executable_directly": { "type": "boolean", "const": false },
        "can_execute_orders": { "type": "boolean", "const": false },
        "live_fills_recorded": { "type": "boolean", "const": false },
        "broker_order_recorded": { "type": "boolean", "const": false },
        "options_execution_enabled": { "type": "boolean", "const": false },
        "option_order_schema_allowed": { "type": "boolean", "const": false },
        "provider_dispatch_enabled": { "type": "boolean", "const": false },
        "route_can_create_live_read_route": { "type": "boolean", "const": false },
        "route_can_execute": { "type": "boolean", "const": false },
        "route_can_dispatch_provider": { "type": "boolean", "const": false },
        "route_can_approve_options_execution": { "type": "boolean", "const": false },
        "wallet_mutation_enabled": { "type": "boolean", "const": false },
        "x402_settlement_enabled": { "type": "boolean", "const": false },
        "marketplace_publication_enabled": { "type": "boolean", "const": false },
        "capability_publication_enabled": { "type": "boolean", "const": false }
      }
    }
  }
}
