{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://getzero.dev/contracts/zero.discovery.v1.schema.json",
  "title": "ZERO discovery manifest",
  "description": "Canonical machine-readable discovery manifest for ZERO agents and public crawlers.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "schema",
    "name",
    "tagline",
    "homepage",
    "canonical_discovery",
    "agent_index",
    "agent_index_full",
    "skill",
    "skills_manifest",
    "surfaces",
    "compatibility",
    "open_core",
    "mcp",
    "public_contracts",
    "verification",
    "safety"
  ],
  "properties": {
    "schema_version": {
      "const": "zero.discovery.v1"
    },
    "schema": {
      "const": "https://getzero.dev/contracts/zero.discovery.v1.schema.json"
    },
    "name": {
      "const": "ZERO"
    },
    "tagline": {
      "type": "string",
      "minLength": 20,
      "pattern": "Operating intelligence"
    },
    "homepage": {
      "const": "https://getzero.dev"
    },
    "canonical_discovery": {
      "const": "https://getzero.dev/.well-known/zero.json"
    },
    "agent_index": {
      "const": "https://getzero.dev/llms.txt"
    },
    "agent_index_full": {
      "const": "https://getzero.dev/llms-full.txt"
    },
    "skill": {
      "const": "https://getzero.dev/skill.md"
    },
    "skills_manifest": {
      "const": "https://getzero.dev/skills/manifest.json"
    },
    "surfaces": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "public_site",
        "market",
        "replay",
        "records",
        "network",
        "doctrine",
        "login",
        "subscribe",
        "oss_mcp",
        "developers",
        "user_app",
        "admin",
        "api"
      ],
      "properties": {
        "public_site": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "market": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/market"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "replay": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/replay"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "records": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/records"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "network": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/network"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "doctrine": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/doctrine"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "login": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/login"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "subscribe": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/api/subscribe"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "oss_mcp": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/oss/mcp"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "developers": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://getzero.dev/developers"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": true
            }
          }
        },
        "user_app": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://app.getzero.dev"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": false
            }
          }
        },
        "admin": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://admin.getzero.dev"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": false
            }
          }
        },
        "api": {
          "$ref": "#/$defs/public_surface",
          "properties": {
            "url": {
              "const": "https://api.getzero.dev"
            },
            "audience": {
              "type": "string",
              "minLength": 10
            },
            "purpose": {
              "type": "string",
              "minLength": 10
            },
            "public": {
              "const": false
            }
          }
        }
      }
    },
    "compatibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "rule",
        "route_aliases",
        "schema_names",
        "mcp_tool_names"
      ],
      "properties": {
        "rule": {
          "type": "string",
          "minLength": 20,
          "pattern": "compatibility identifiers"
        },
        "route_aliases": {
          "type": "array",
          "minItems": 2,
          "uniqueItems": true,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "from",
              "to",
              "status"
            ],
            "properties": {
              "from": {
                "enum": [
                  "/api/engine",
                  "/api/market"
                ]
              },
              "to": {
                "enum": [
                  "/api/runtime",
                  "/api/registry"
                ]
              },
              "status": {
                "const": "compatibility-alias"
              }
            }
          }
        },
        "schema_names": {
          "type": "array",
          "minItems": 4,
          "uniqueItems": true,
          "items": {
            "enum": [
              "zero.engine_product_truth.v1",
              "zero.engine.proof.v1",
              "zero.engine.evidence_depth.v1",
              "zero.engine.native_dimension_readback.v1"
            ]
          }
        },
        "mcp_tool_names": {
          "type": "array",
          "minItems": 4,
          "uniqueItems": true,
          "items": {
            "enum": [
              "zero_get_engine_product",
              "zero_get_engine_proof",
              "zero_get_engine_evidence_depth",
              "zero_get_engine_cadence"
            ]
          }
        }
      }
    },
    "open_core": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "open",
        "commercial"
      ],
      "properties": {
        "open": {
          "type": "string",
          "minLength": 20
        },
        "commercial": {
          "type": "string",
          "minLength": 20,
          "pattern": "ZERO Protocol services"
        }
      }
    },
    "mcp": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "public",
        "operator"
      ],
      "properties": {
        "public": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "url",
            "transport",
            "auth",
            "boundary",
            "can_execute_orders",
            "can_mutate_runtime"
          ],
          "properties": {
            "url": {
              "const": "https://getzero.dev/oss/mcp"
            },
            "transport": {
              "const": "streamable-http"
            },
            "auth": {
              "const": "none"
            },
            "boundary": {
              "const": "public-read-only"
            },
            "can_execute_orders": {
              "const": false
            },
            "can_mutate_runtime": {
              "const": false
            }
          }
        },
        "operator": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "url",
            "transport",
            "auth",
            "boundary"
          ],
          "properties": {
            "url": {
              "const": "https://getzero.dev/mcp"
            },
            "transport": {
              "const": "streamable-http"
            },
            "auth": {
              "const": "bearer_token"
            },
            "boundary": {
              "const": "scoped-operator"
            }
          }
        }
      }
    },
    "public_contracts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "guide",
        "openapi",
        "examples",
        "replay_examples",
        "schemas",
        "endpoints"
      ],
      "properties": {
        "guide": {
          "const": "https://getzero.dev/contracts/public-operator.md"
        },
        "openapi": {
          "const": "https://getzero.dev/contracts/public-operator.openapi.yaml"
        },
        "examples": {
          "const": "https://getzero.dev/contracts/public-operator.examples.json"
        },
        "replay_examples": {
          "const": "https://getzero.dev/contracts/decision-replay.examples.json"
        },
        "schemas": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "discovery",
            "mcp_tools",
            "developer_proof_api",
            "capital_operation",
            "mcp_refusal",
            "mcp_public_tool_results",
            "public_operators",
            "public_operator",
            "decision_replay",
            "decision_receipt_card",
            "public_decision_artifacts",
            "replay_entrypoints",
            "replay_graph_context",
            "replay_decision_graph",
            "coliseum_paper_bracket",
            "coliseum_league_retention",
            "registry_catalog",
            "registry_reputation",
            "marketplace_paid_call_gate",
            "marketplace_seller_disclosure",
            "marketplace_paid_response_receipt",
            "engine_proof",
            "runtime_capability_state",
            "authority_ceremony",
            "growth_receipt_repeatability",
            "growth_multi_operator_history",
            "pricing_contract",
            "intelligence_warehouse",
            "status_contract",
            "vibe_deploy_readiness",
            "vibe_deploy_runtime_manifest",
            "vibe_deploy_lifecycle_contract",
            "vibe_deploy_recovery_hardening",
            "vibe_deploy_proof_chain",
            "hosted_operator_launch_receipt"
          ],
          "properties": {
            "discovery": {
              "const": "https://getzero.dev/contracts/zero.discovery.v1.schema.json"
            },
            "mcp_tools": {
              "const": "https://getzero.dev/contracts/zero.mcp.tools.v1.schema.json"
            },
            "developer_proof_api": {
              "const": "https://getzero.dev/contracts/zero.developer_proof_api.v1.schema.json"
            },
            "capital_operation": {
              "const": "https://getzero.dev/contracts/zero.capital_operation.v1.schema.json"
            },
            "mcp_refusal": {
              "const": "https://getzero.dev/contracts/zero.mcp.refusal.v1.schema.json"
            },
            "mcp_public_tool_results": {
              "const": "https://getzero.dev/contracts/zero.mcp.public_tool_results.v1.schema.json"
            },
            "public_operators": {
              "const": "https://getzero.dev/contracts/zero.public_operators.v1.schema.json"
            },
            "public_operator": {
              "const": "https://getzero.dev/contracts/zero.public_operator.v1.schema.json"
            },
            "decision_replay": {
              "const": "https://getzero.dev/contracts/zero.decision_replay.v1.schema.json"
            },
            "decision_receipt_card": {
              "const": "https://getzero.dev/contracts/zero.decision_receipt_card.v1.schema.json"
            },
            "public_decision_artifacts": {
              "const": "https://getzero.dev/contracts/zero.public_decision_artifacts.v1.schema.json"
            },
            "replay_entrypoints": {
              "const": "https://getzero.dev/contracts/zero.replay_entrypoints.v1.schema.json"
            },
            "replay_graph_context": {
              "const": "https://getzero.dev/contracts/zero.replay_graph_context.v1.schema.json"
            },
            "replay_decision_graph": {
              "const": "https://getzero.dev/contracts/zero.replay_decision_graph.v1.schema.json"
            },
            "coliseum_paper_bracket": {
              "const": "https://getzero.dev/contracts/zero.coliseum.paper_bracket.v1.schema.json"
            },
            "coliseum_league_retention": {
              "const": "https://getzero.dev/contracts/zero.coliseum.league_retention.v0.schema.json"
            },
            "registry_catalog": {
              "const": "https://getzero.dev/contracts/zero.registry.catalog.v0.schema.json"
            },
            "registry_reputation": {
              "const": "https://getzero.dev/contracts/zero.registry.reputation.v0.schema.json"
            },
            "marketplace_reputation": {
              "const": "https://getzero.dev/contracts/zero.marketplace.reputation.v0.schema.json"
            },
            "marketplace_paid_call_gate": {
              "const": "https://getzero.dev/contracts/zero.marketplace.paid_call_gate.v0.schema.json"
            },
            "marketplace_seller_disclosure": {
              "const": "https://getzero.dev/contracts/zero.marketplace.seller_disclosure.v0.schema.json"
            },
            "marketplace_paid_response_receipt": {
              "const": "https://getzero.dev/contracts/zero.marketplace.paid_response_receipt.v0.schema.json"
            },
            "engine_product_truth": {
              "const": "https://getzero.dev/contracts/zero.engine_product_truth.v1.schema.json"
            },
            "engine_proof": {
              "const": "https://getzero.dev/contracts/zero.engine.proof.v1.schema.json"
            },
            "engine_evidence_depth": {
              "const": "https://getzero.dev/contracts/zero.engine.evidence_depth.v1.schema.json"
            },
            "engine_native_dimension_readback": {
              "const": "https://getzero.dev/contracts/zero.engine.native_dimension_readback.v1.schema.json"
            },
            "runtime_capability_state": {
              "const": "https://getzero.dev/contracts/zero.runtime_capability_state.v1.schema.json"
            },
            "authority_ceremony": {
              "const": "https://getzero.dev/contracts/zero.authority_ceremony.v1.schema.json"
            },
            "growth_receipt_repeatability": {
              "const": "https://getzero.dev/contracts/zero.growth_receipt_repeatability.v1.schema.json"
            },
            "growth_multi_operator_history": {
              "const": "https://getzero.dev/contracts/zero.growth_multi_operator_history.v1.schema.json"
            },
            "pricing_contract": {
              "const": "https://getzero.dev/contracts/zero.pricing_contract.v1.schema.json"
            },
            "intelligence_warehouse": {
              "const": "https://getzero.dev/contracts/zero.intelligence_warehouse.v1.schema.json"
            },
            "status_contract": {
              "const": "https://getzero.dev/contracts/zero.status.v1.schema.json"
            },
            "vibe_deploy_readiness": {
              "const": "https://getzero.dev/contracts/zero.vibe_deploy_readiness.v1.schema.json"
            },
            "vibe_deploy_runtime_manifest": {
              "const": "https://getzero.dev/contracts/zero.vibe_deploy.runtime_manifest.v1.schema.json"
            },
            "vibe_deploy_lifecycle_contract": {
              "const": "https://getzero.dev/contracts/zero.vibe_deploy.lifecycle_contract.v1.schema.json"
            },
            "vibe_deploy_recovery_hardening": {
              "const": "https://getzero.dev/contracts/zero.vibe_deploy.recovery_hardening.v1.schema.json"
            },
            "vibe_deploy_proof_chain": {
              "const": "https://getzero.dev/contracts/zero.vibe_deploy.proof_chain.v1.schema.json"
            },
            "hosted_operator_launch_receipt": {
              "const": "https://getzero.dev/contracts/zero.hosted_operator_launch_receipt.v1.schema.json"
            }
          }
        },
        "endpoints": {
          "type": "array",
          "minItems": 6,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "pattern": "^GET https://getzero\\.dev/(api/developers/proof|api/public/operators|api/public/operators/foundation|api/replays|api/replays/entrypoints|api/replays/decision-artifacts|api/replays/foundation-genesis/receipt-card|api/replays/foundation-genesis/graph-context|api/replays/decision-graph|api/replays/foundation-genesis|api/reliability/gauntlet|api/arena|api/arena/rewards|api/seasons|api/coliseum|api/coliseum/history|api/registry|api/registry/reputation|api/market/paid-call-gate|api/market/seller-disclosure|api/pricing|api/intelligence/warehouse|api/status|api/runtime\\?q=product|api/runtime\\?q=proof|api/runtime\\?q=evidence-depth|api/runtime/capability-state|api/runtime\\?q=immune|api/runtime\\?q=circuit-breaker|api/runtime\\?q=rejections|api/runtime\\?q=near-misses|api/runtime\\?q=execution-quality|api/ops/engine-evidence-cadence|api/growth/repeatability|api/growth/multi-operator-history|api/deployments/vibe-deploy-readiness|api/deployments/vibe-deploy-proof-chain|api/deployments/vibe-deploy-recovery|api/deployments/hosted-operator-launch-receipt)$"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "public_contracts",
        "public_mcp_workflow",
        "public_mcp_target",
        "checks"
      ],
      "properties": {
        "public_contracts": {
          "const": "schema-validated in CI"
        },
        "public_mcp_workflow": {
          "const": "OSS MCP Smoke"
        },
        "public_mcp_target": {
          "const": "https://getzero.dev"
        },
        "checks": {
          "type": "array",
          "minItems": 4,
          "uniqueItems": true,
          "items": {
            "enum": [
              "tool_discovery",
              "read_only_annotations",
              "public_proof_calls",
              "mutation_refusal"
            ]
          }
        }
      }
    },
    "safety": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "paper_first",
        "public_mcp_read_only",
        "private_keys_in_public_payloads",
        "operator_live_mode_requires_explicit_authorization"
      ],
      "properties": {
        "paper_first": {
          "const": true
        },
        "public_mcp_read_only": {
          "const": true
        },
        "private_keys_in_public_payloads": {
          "const": false
        },
        "operator_live_mode_requires_explicit_authorization": {
          "const": true
        }
      }
    }
  },
  "$defs": {
    "public_surface": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "url",
        "audience",
        "purpose",
        "public"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "audience": {
          "type": "string",
          "minLength": 10
        },
        "purpose": {
          "type": "string",
          "minLength": 10
        },
        "public": {
          "type": "boolean"
        }
      }
    }
  }
}
