{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/agentic-pattern-registry.v1.json",
  "title": "Agoragentic Agentic Pattern Registry",
  "description": "Machine-readable registry for the Pattern Runtime Layer. This is a planning and contract artifact, not a generic agent framework or live execution authority.",
  "type": "object",
  "required": [
    "schema",
    "registry_id",
    "patterns",
    "template_mappings",
    "safety_rules",
    "generic_framework_clone",
    "public_boundary"
  ],
  "properties": {
    "schema": {
      "const": "agoragentic.agentic-pattern-registry.v1"
    },
    "registry_id": {
      "type": "string"
    },
    "product_layer": {
      "type": "string"
    },
    "generic_framework_clone": {
      "const": false
    },
    "patterns": {
      "type": "array",
      "minItems": 21,
        "items": {
        "type": "object",
        "required": [
          "pattern_id",
          "product_contract",
          "required_controls",
          "primary_surfaces"
        ],
        "properties": {
          "pattern_id": {
            "enum": [
              "prompt_chaining",
              "routing",
              "parallelization",
              "reflection",
              "tool_use",
              "planning",
              "multi_agent_collaboration",
              "memory_management",
              "learning_adaptation",
              "model_context_protocol",
              "goal_setting_monitoring",
              "exception_handling_recovery",
              "human_in_the_loop",
              "knowledge_retrieval_rag",
              "inter_agent_communication_a2a",
              "resource_aware_optimization",
              "reasoning_techniques",
              "guardrails_safety",
              "evaluation_monitoring",
              "prioritization",
              "exploration_discovery"
            ]
          },
          "product_contract": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required_controls": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "primary_surfaces": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "agent_os",
                "router_marketplace",
                "seller_os",
                "x402",
                "ecf_context_exports",
                "harness",
                "agent_toolkit",
                "discovery",
                "trust",
                "marketplace",
                "launch_to_liquidity"
              ]
            }
          },
          "high_risk": {
            "type": "boolean"
          },
          "runtime_contract_required": {
            "type": "boolean"
          },
          "receipts_required_for_consequential_use": {
            "type": "boolean"
          },
          "owner_policy_required_for_side_effects": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      }
    },
    "template_mappings": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "template_id",
          "patterns_used",
          "required_receipts",
          "required_approval_gates",
          "failure_modes",
          "evaluation_metrics",
          "marketplace_readiness_requirements"
        ],
        "properties": {
          "template_id": {
            "type": "string"
          },
          "patterns_used": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "product_surfaces": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "agent_os_template",
                "seller_os_listing",
                "x402_canary",
                "ecf_context_export",
                "harness_workflow",
                "router_marketplace",
                "discovery_surface"
              ]
            }
          },
          "required_receipts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "required_approval_gates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failure_modes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "evaluation_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "marketplace_readiness_requirements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": true
      }
    },
    "safety_rules": {
      "type": "array",
      "items": {
        "enum": [
          "no_public_marketplace_listing_without_owner_approval",
          "no_x402_readiness_without_paid_canary_receipt",
          "no_private_ecf_context_in_public_evidence",
          "no_unreviewed_memory_propagation",
          "no_tool_side_effects_without_policy",
          "no_agent_team_mode_without_replay_cycle_detection_and_receipt_chaining",
          "no_self_modification_without_owner_approval"
        ]
      }
    },
    "public_boundary": {
      "type": "object",
      "properties": {
        "runtime_executed": {
          "const": false
        },
        "runtime_behavior_wired": {
          "const": false
        },
        "marketplace_publication_triggered": {
          "const": false
        },
        "x402_route_created": {
          "const": false
        },
        "settlement_triggered": {
          "const": false
        },
        "trust_mutation_triggered": {
          "const": false
        },
        "deployment_policy_mutated": {
          "const": false
        },
        "memory_propagation_triggered": {
          "const": false
        },
        "private_ecf_context_exposed": {
          "const": false
        }
      },
      "additionalProperties": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": true
}
