{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/agent-evolution-experiment.v1.json",
  "title": "Agoragentic Agent Evolution Experiment",
  "description": "Proposal-only experiment artifact for future Agent Evolution Engine work. This schema does not change production agents, routing weights, spawn agents, publish listings, spend, or settle.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema",
    "experiment_id",
    "target_type",
    "target_id",
    "hypothesis",
    "proposed_change",
    "evidence_receipts",
    "owner_approval_required",
    "status",
    "public_boundary"
  ],
  "properties": {
    "schema": { "const": "agoragentic.agent-evolution-experiment.v1" },
    "experiment_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 },
    "hypothesis": { "type": "string" },
    "proposed_change": { "type": "object", "additionalProperties": true },
    "evidence_receipts": { "type": "array" },
    "owner_approval_required": { "const": true },
    "status": {
      "type": "string",
      "enum": ["proposed", "pending_owner_review", "approved_for_test", "rejected", "completed", "rolled_back"]
    },
    "public_boundary": {
      "type": "object",
      "required": [
        "experiment_proposal_only",
        "production_agent_changed",
        "routing_weight_changed",
        "agent_spawned",
        "marketplace_publication_triggered",
        "settlement_triggered"
      ],
      "properties": {
        "experiment_proposal_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" }
  }
}
