{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agoragentic.com/schema/finance-agent-data-minimization-plan.v1.json",
  "title": "Finance Agent Data Minimization Plan V1",
  "description": "Redacted owner-approved data minimization plan for Version C finance-agent readiness and any future Robinhood live-read beta review. The plan defines allowed read categories, allowed output field families, excluded private data families, refs/hashes, and forced-false authority. It does not run Robinhood MCP probes, dispatch providers, read account values, place or cancel orders, fetch card details, make purchases, enable options execution, mutate wallet/x402 state, call execute/invoke, publish marketplace listings, or publish capabilities.",
  "type": "object",
  "required": [
    "schema",
    "schema_ref",
    "deployment_id",
    "owner_id",
    "plan_state",
    "read_only",
    "no_live_action_assertion",
    "reviewed_schema_refs",
    "allowed_read_categories",
    "allowed_output_field_families",
    "excluded_private_data_families",
    "required_false_authority",
    "evidence_refs",
    "redaction_summary"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "agoragentic.agent-os.finance-agent-data-minimization-plan.v1"
    },
    "schema_ref": {
      "type": "string",
      "const": "/schema/finance-agent-data-minimization-plan.v1.json"
    },
    "deployment_id": { "type": "string", "minLength": 1 },
    "owner_id": { "type": "string", "minLength": 1 },
    "plan_state": {
      "type": "string",
      "enum": [
        "draft",
        "blocked_missing_mcp_schema_proof",
        "blocked_missing_owner_compliance_review",
        "ready_for_owner_review",
        "submitted_redacted_refs_only"
      ]
    },
    "read_only": { "type": "boolean", "const": true },
    "no_live_action_assertion": { "type": "boolean", "const": true },
    "reviewed_schema_refs": {
      "type": "object",
      "required": [
        "finance_policy",
        "mcp_schema_proof",
        "compliance_approval",
        "readiness_requirements",
        "version_c_gate_matrix",
        "external_gate_bundle",
        "owner_approval_checklist",
        "stop_control_drill",
        "robinhood_connector"
      ],
      "properties": {
        "finance_policy": { "type": "string", "const": "/schema/finance-agent-policy.v1.json" },
        "mcp_schema_proof": { "type": "string", "const": "/schema/finance-agent-mcp-schema-proof.v1.json" },
        "compliance_approval": { "type": "string", "const": "/schema/finance-agent-compliance-approval.v1.json" },
        "readiness_requirements": { "type": "string", "const": "/schema/finance-agent-readiness-requirements.v1.json" },
        "version_c_gate_matrix": { "type": "string", "const": "/schema/finance-agent-version-c-gate-matrix.v1.json" },
        "external_gate_bundle": { "type": "string", "const": "/schema/finance-agent-external-gate-bundle.v1.json" },
        "owner_approval_checklist": { "type": "string", "const": "/schema/finance-agent-owner-approval-checklist.v1.json" },
        "stop_control_drill": { "type": "string", "const": "/schema/finance-agent-stop-control-drill.v1.json" },
        "robinhood_connector": { "type": "string", "const": "/schema/robinhood-agent-os-connector.v1.json" }
      },
      "additionalProperties": true
    },
    "allowed_read_categories": {
      "type": "object",
      "required": [
        "connector_status",
        "schema_metadata",
        "account_metadata_summary",
        "portfolio_metadata_summary",
        "raw_account_values",
        "raw_positions",
        "raw_balances",
        "raw_transactions",
        "raw_orders",
        "raw_card_values",
        "raw_payment_payloads",
        "raw_provider_payloads"
      ],
      "properties": {
        "connector_status": { "type": "boolean", "const": true },
        "schema_metadata": { "type": "boolean", "const": true },
        "account_metadata_summary": { "type": "boolean" },
        "portfolio_metadata_summary": { "type": "boolean" },
        "raw_account_values": { "type": "boolean", "const": false },
        "raw_positions": { "type": "boolean", "const": false },
        "raw_balances": { "type": "boolean", "const": false },
        "raw_transactions": { "type": "boolean", "const": false },
        "raw_orders": { "type": "boolean", "const": false },
        "raw_card_values": { "type": "boolean", "const": false },
        "raw_payment_payloads": { "type": "boolean", "const": false },
        "raw_provider_payloads": { "type": "boolean", "const": false }
      },
      "additionalProperties": true
    },
    "allowed_output_field_families": {
      "type": "object",
      "required": [
        "booleans",
        "status_strings",
        "coarse_timestamps",
        "refs",
        "hashes",
        "redacted_counts",
        "account_numbers",
        "routing_numbers",
        "balances",
        "positions",
        "order_ids",
        "transaction_ids",
        "card_values",
        "payment_payloads",
        "raw_tool_arguments",
        "raw_tool_outputs",
        "auth_redirects",
        "session_cookies",
        "oauth_tokens",
        "private_owner_notes"
      ],
      "properties": {
        "booleans": { "type": "boolean", "const": true },
        "status_strings": { "type": "boolean", "const": true },
        "coarse_timestamps": { "type": "boolean", "const": true },
        "refs": { "type": "boolean", "const": true },
        "hashes": { "type": "boolean", "const": true },
        "redacted_counts": { "type": "boolean", "const": true },
        "account_numbers": { "type": "boolean", "const": false },
        "routing_numbers": { "type": "boolean", "const": false },
        "balances": { "type": "boolean", "const": false },
        "positions": { "type": "boolean", "const": false },
        "order_ids": { "type": "boolean", "const": false },
        "transaction_ids": { "type": "boolean", "const": false },
        "card_values": { "type": "boolean", "const": false },
        "payment_payloads": { "type": "boolean", "const": false },
        "raw_tool_arguments": { "type": "boolean", "const": false },
        "raw_tool_outputs": { "type": "boolean", "const": false },
        "auth_redirects": { "type": "boolean", "const": false },
        "session_cookies": { "type": "boolean", "const": false },
        "oauth_tokens": { "type": "boolean", "const": false },
        "private_owner_notes": { "type": "boolean", "const": false }
      },
      "additionalProperties": true
    },
    "excluded_private_data_families": {
      "type": "array",
      "minItems": 10,
      "items": {
        "type": "string",
        "enum": [
          "account_numbers",
          "routing_numbers",
          "balances",
          "positions",
          "order_ids",
          "transaction_ids",
          "card_values",
          "payment_payloads",
          "raw_provider_payloads",
          "raw_tool_arguments",
          "raw_tool_outputs",
          "oauth_tokens",
          "auth_redirects",
          "session_cookies",
          "private_ecf",
          "private_owner_notes",
          "wallet_private_data"
        ]
      }
    },
    "required_false_authority": {
      "type": "object",
      "required": [
        "robinhood_provider_dispatch",
        "external_provider_call",
        "live_read_route",
        "live_order_execution",
        "order_cancellation",
        "card_detail_fetch",
        "card_purchase",
        "options_execution",
        "options_order_schema",
        "wallet_mutation",
        "x402_settlement",
        "public_execute_mutation",
        "global_execute_mutation",
        "global_invoke_mutation",
        "marketplace_publication",
        "capability_publication",
        "data_minimization_plan_grants_live_authority"
      ],
      "properties": {
        "robinhood_provider_dispatch": { "type": "boolean", "const": false },
        "external_provider_call": { "type": "boolean", "const": false },
        "live_read_route": { "type": "boolean", "const": false },
        "live_order_execution": { "type": "boolean", "const": false },
        "order_cancellation": { "type": "boolean", "const": false },
        "card_detail_fetch": { "type": "boolean", "const": false },
        "card_purchase": { "type": "boolean", "const": false },
        "options_execution": { "type": "boolean", "const": false },
        "options_order_schema": { "type": "boolean", "const": false },
        "wallet_mutation": { "type": "boolean", "const": false },
        "x402_settlement": { "type": "boolean", "const": false },
        "public_execute_mutation": { "type": "boolean", "const": false },
        "global_execute_mutation": { "type": "boolean", "const": false },
        "global_invoke_mutation": { "type": "boolean", "const": false },
        "marketplace_publication": { "type": "boolean", "const": false },
        "capability_publication": { "type": "boolean", "const": false },
        "data_minimization_plan_grants_live_authority": { "type": "boolean", "const": false }
      },
      "additionalProperties": false
    },
    "evidence_refs": {
      "type": "object",
      "required": [
        "mcp_schema_proof_ref",
        "mcp_schema_proof_hash",
        "compliance_approval_ref",
        "compliance_approval_hash",
        "stop_control_drill_ref",
        "stop_control_drill_hash",
        "policy_ref",
        "policy_hash",
        "redaction_policy_ref",
        "redaction_policy_hash"
      ],
      "properties": {
        "mcp_schema_proof_ref": { "$ref": "#/$defs/bounded_ref" },
        "mcp_schema_proof_hash": { "$ref": "#/$defs/bounded_ref" },
        "compliance_approval_ref": { "$ref": "#/$defs/bounded_ref" },
        "compliance_approval_hash": { "$ref": "#/$defs/bounded_ref" },
        "stop_control_drill_ref": { "$ref": "#/$defs/bounded_ref" },
        "stop_control_drill_hash": { "$ref": "#/$defs/bounded_ref" },
        "policy_ref": { "$ref": "#/$defs/bounded_ref" },
        "policy_hash": { "$ref": "#/$defs/bounded_ref" },
        "redaction_policy_ref": { "$ref": "#/$defs/bounded_ref" },
        "redaction_policy_hash": { "$ref": "#/$defs/bounded_ref" }
      },
      "not": {
        "anyOf": [
          { "required": ["raw_schema"] },
          { "required": ["raw_payload"] },
          { "required": ["raw_approval"] },
          { "required": ["raw_review"] },
          { "required": ["account_values"] },
          { "required": ["card_values"] },
          { "required": ["order_values"] },
          { "required": ["payment_values"] },
          { "required": ["wallet_values"] },
          { "required": ["auth_token"] },
          { "required": ["access_token"] },
          { "required": ["refresh_token"] }
        ]
      },
      "additionalProperties": true
    },
    "redaction_summary": {
      "type": "object",
      "required": [
        "raw_schema_excluded",
        "raw_private_values_excluded",
        "raw_account_values_excluded",
        "raw_card_values_excluded",
        "raw_order_values_excluded",
        "raw_payment_values_excluded",
        "raw_wallet_values_excluded",
        "provider_credentials_excluded",
        "private_ecf_excluded",
        "secrets_excluded"
      ],
      "properties": {
        "raw_schema_excluded": { "type": "boolean", "const": true },
        "raw_private_values_excluded": { "type": "boolean", "const": true },
        "raw_account_values_excluded": { "type": "boolean", "const": true },
        "raw_card_values_excluded": { "type": "boolean", "const": true },
        "raw_order_values_excluded": { "type": "boolean", "const": true },
        "raw_payment_values_excluded": { "type": "boolean", "const": true },
        "raw_wallet_values_excluded": { "type": "boolean", "const": true },
        "provider_credentials_excluded": { "type": "boolean", "const": true },
        "private_ecf_excluded": { "type": "boolean", "const": true },
        "secrets_excluded": { "type": "boolean", "const": true }
      },
      "additionalProperties": true
    }
  },
  "not": {
    "anyOf": [
      { "required": ["raw_schema"] },
      { "required": ["schema_payload"] },
      { "required": ["raw_payload"] },
      { "required": ["raw_approval"] },
      { "required": ["raw_review"] },
      { "required": ["account_values"] },
      { "required": ["card_values"] },
      { "required": ["order_values"] },
      { "required": ["payment_values"] },
      { "required": ["wallet_values"] },
      { "required": ["auth_token"] },
      { "required": ["access_token"] },
      { "required": ["refresh_token"] },
      { "required": ["private_key"] }
    ]
  },
  "additionalProperties": true,
  "$defs": {
    "bounded_ref": {
      "anyOf": [
        { "type": "null" },
        { "$ref": "#/$defs/redacted_ref" }
      ]
    },
    "redacted_ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "not": {
        "anyOf": [
          { "pattern": "^[a-z][a-z0-9+.-]*://" },
          { "pattern": "^data:" },
          { "pattern": "^[\\[{]" },
          { "pattern": "[\\r\\n]" },
          { "pattern": "([Bb][Ee][Aa][Rr][Ee][Rr]|[Bb][Aa][Ss][Ii][Cc])\\s+[A-Za-z0-9._~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