{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://codingplans.dev/schemas/enterprise.schema.json",
  "title": "Enterprise plan",
  "description": "A contract-based AI coding plan for organisations. Self-serve team tiers stay in plans.json (buyer: \"team\") and are linked through upgrades_from.",
  "type": "object",
  "required": [
    "id",
    "name",
    "vendor",
    "upgrades_from",
    "purchase",
    "seat_price",
    "min_seats",
    "max_seats",
    "usage_model",
    "usage_notes",
    "included_models",
    "contract",
    "features",
    "vendor_notes",
    "source",
    "source_date"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]*$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "vendor": {
      "type": "string",
      "minLength": 1
    },
    "upgrades_from": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]*$"
      },
      "description": "plans.json ids of the self-serve team tiers this plan replaces. Empty when the vendor has no team tier."
    },
    "purchase": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "sales_led",
          "self_serve"
        ]
      },
      "description": "How a company can buy it. Some enterprise plans (e.g. Claude Enterprise) offer both."
    },
    "seat_price": {
      "type": "object",
      "required": [
        "amount",
        "billing",
        "confidence",
        "reason",
        "source",
        "source_date"
      ],
      "properties": {
        "amount": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "description": "USD per seat per month. null when unpublished; then reason is required."
        },
        "low": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "high": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "billing": {
          "type": "string",
          "enum": [
            "annual",
            "monthly",
            "annual_or_monthly",
            "custom"
          ]
        },
        "confidence": {
          "type": "string",
          "enum": [
            "published",
            "reported",
            "estimated",
            "unpublished"
          ],
          "description": "published: on the vendor's own page. reported: secondary source quoting deals or invoices. estimated: our arithmetic from cited inputs. unpublished: the vendor does not disclose it."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Starts with an em dash when amount is null."
        },
        "bands": {
          "type": "array",
          "description": "Seat-count price bands, e.g. reported volume discounts.",
          "items": {
            "type": "object",
            "required": [
              "from",
              "to",
              "low",
              "high"
            ],
            "properties": {
              "from": {
                "type": "integer",
                "minimum": 1
              },
              "to": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1
              },
              "low": {
                "type": "number",
                "minimum": 0
              },
              "high": {
                "type": "number",
                "minimum": 0
              }
            },
            "additionalProperties": false
          }
        },
        "source": {
          "type": "string",
          "pattern": "^https://"
        },
        "source_date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        }
      },
      "additionalProperties": false
    },
    "min_seats": {
      "type": "object",
      "required": [
        "value",
        "confidence"
      ],
      "properties": {
        "value": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "confidence": {
          "type": "string",
          "enum": [
            "published",
            "reported",
            "estimated",
            "unpublished"
          ],
          "description": "published: on the vendor's own page. reported: secondary source quoting deals or invoices. estimated: our arithmetic from cited inputs. unpublished: the vendor does not disclose it."
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "source": {
          "type": "string",
          "pattern": "^https://"
        }
      },
      "additionalProperties": false
    },
    "max_seats": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1
    },
    "usage_model": {
      "type": "string",
      "enum": [
        "included",
        "metered",
        "hybrid",
        "custom"
      ],
      "description": "included: the seat carries a usage allowance. metered: the seat carries none and every token is billed. hybrid: an allowance plus metered overage. custom: negotiated per contract; the vendor publishes no usage model."
    },
    "usage_notes": {
      "type": "string",
      "minLength": 1
    },
    "included_models": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "contract": {
      "type": "object",
      "required": [
        "term_months",
        "prepaid",
        "notes"
      ],
      "properties": {
        "term_months": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "prepaid": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "notes": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "features": {
      "type": "object",
      "required": [
        "sso",
        "scim",
        "audit_logs",
        "zero_data_retention",
        "data_residency",
        "ip_indemnity",
        "spend_caps",
        "self_host_or_vpc"
      ],
      "properties": {
        "sso": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "scim": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "audit_logs": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "zero_data_retention": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "data_residency": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "ip_indemnity": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "spend_caps": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        },
        "self_host_or_vpc": {
          "description": "true = included, false = not offered, \"add-on\" = extra cost, \"on-request\" = per organisation subject to vendor approval, null = vendor does not say.",
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "enum": [
            true,
            false,
            "add-on",
            "on-request",
            null
          ]
        }
      },
      "additionalProperties": false
    },
    "features_source": {
      "type": "string",
      "pattern": "^https://"
    },
    "features_additional_sources": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^https://"
      }
    },
    "vendor_notes": {
      "type": "string",
      "minLength": 1
    },
    "source": {
      "type": "string",
      "pattern": "^https://"
    },
    "source_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    }
  },
  "additionalProperties": false
}
