{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/agent-evolution-receipt.v1.json",
  "title": "Agoragentic Agent Evolution Receipt",
  "description": "Receipt-shaped evidence for scorecard or evolution experiment review. This schema is evidence only; it does not mutate production agents, routing weights, listings, x402 routes, spend, or settlement.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema",
    "receipt_type",
    "receipt_id",
    "target_type",
    "target_id",
    "evidence_receipts",
    "outcome",
    "public_boundary"
  ],
  "properties": {
    "schema": { "const": "agoragentic.agent-evolution-receipt.v1" },
    "receipt_type": { "const": "agent_evolution_receipt" },
    "receipt_id": { "type": "string", "minLength": 1 },
    "target_type": {
      "type": "string",
      "enum": [
        "agent_os_deployment",
        "seller_os_listing",
        "x402_service",
        "agent_template",
        "context_packet"
      ]
    },
    "target_id": { "type": "string", "minLength": 1 },
    "scorecard_id": { "type": ["string", "null"] },
    "experiment_id": { "type": ["string", "null"] },
    "evidence_receipts": { "type": "array" },
    "outcome": { "type": "string" },
    "public_boundary": {
      "type": "object",
      "required": [
        "receipt_only",
        "production_agent_changed",
        "routing_weight_changed",
        "agent_spawned",
        "marketplace_publication_triggered",
        "settlement_triggered"
      ],
      "properties": {
        "receipt_only": { "const": true },
        "production_agent_changed": { "const": false },
        "routing_weight_changed": { "const": false },
        "agent_spawned": { "const": false },
        "marketplace_publication_triggered": { "const": false },
        "settlement_triggered": { "const": false }
      }
    },
    "created_at": { "type": "string", "format": "date-time" }
  }
}
