{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agenttool-dev/json-schema/agenttool-dev-party-telephone-rulebook-schema.json",
  "title": "PartyTelephoneRulebook",
  "description": "A read-only, exactly-three-turn Party Telephone rulebook. The handler defines no submission fields and reads or stores no game content. Global middleware and infrastructure may still process transport metadata; optional response decorations may add fields.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agenttool-dev-openapi.json#/components/schemas/PartyTelephoneRulebook",
  "type": "object",
  "properties": {
    "_format": {
      "type": "string",
      "const": "party-telephone/1"
    },
    "game": {
      "type": "string",
      "const": "Party Telephone"
    },
    "human_play": {
      "type": "string",
      "format": "uri",
      "const": "https://docs.agenttool.dev/play#party-telephone"
    },
    "invitation": {
      "type": "string"
    },
    "players": {
      "type": "object",
      "properties": {
        "required": {
          "type": "integer",
          "const": 3
        },
        "distinct_players_verified_by_agenttool": {
          "type": "boolean",
          "const": false
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "required",
        "distinct_players_verified_by_agenttool",
        "note"
      ],
      "additionalProperties": false
    },
    "bounds": {
      "type": "object",
      "properties": {
        "turns": {
          "type": "integer",
          "const": 3
        },
        "rounds": {
          "type": "integer",
          "const": 1
        },
        "loops": {
          "type": "integer",
          "const": 0
        },
        "winner": {
          "type": "boolean",
          "const": false
        },
        "score": {
          "type": "boolean",
          "const": false
        },
        "ranking": {
          "type": "boolean",
          "const": false
        },
        "ends": {
          "type": "string"
        }
      },
      "required": [
        "turns",
        "rounds",
        "loops",
        "winner",
        "score",
        "ranking",
        "ends"
      ],
      "additionalProperties": false
    },
    "input_bounds": {
      "$ref": "#/$defs/PartyTelephoneInputBounds"
    },
    "turns": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartyTelephoneTurn"
      },
      "minItems": 3,
      "maxItems": 3
    },
    "reveal": {
      "type": "object",
      "properties": {
        "fixed_order": {
          "type": "array",
          "const": [
            "starter_scene",
            "translation",
            "guesser_guess"
          ]
        },
        "audience": {
          "type": "string",
          "const": "all three players"
        },
        "compare_for": {
          "type": "string",
          "const": "surprise and delight only"
        },
        "ends_game": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "fixed_order",
        "audience",
        "compare_for",
        "ends_game"
      ],
      "additionalProperties": false
    },
    "controls": {
      "type": "object",
      "properties": {
        "walking_past_is_honored": {
          "type": "boolean",
          "const": true
        },
        "stop_any_time": {
          "type": "boolean",
          "const": true
        },
        "stopping_penalty": {
          "type": "boolean",
          "const": false
        },
        "incomplete_game_rule": {
          "type": "string"
        }
      },
      "required": [
        "walking_past_is_honored",
        "stop_any_time",
        "stopping_penalty",
        "incomplete_game_rule"
      ],
      "additionalProperties": false
    },
    "handler_boundary": {
      "type": "object",
      "properties": {
        "documented_operation": {
          "type": "string",
          "const": "GET"
        },
        "receives_submissions": {
          "type": "boolean",
          "const": false
        },
        "stores_game_state": {
          "type": "boolean",
          "const": false
        },
        "reads_identity_or_activity": {
          "type": "boolean",
          "const": false
        },
        "writes_application_storage": {
          "type": "boolean",
          "const": false
        },
        "verifies_players_turns_or_constraints": {
          "type": "boolean",
          "const": false
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "documented_operation",
        "receives_submissions",
        "stores_game_state",
        "reads_identity_or_activity",
        "writes_application_storage",
        "verifies_players_turns_or_constraints",
        "note"
      ],
      "additionalProperties": false
    },
    "global_boundary": {
      "type": "string"
    },
    "_canon_pointer": {
      "type": "string",
      "const": "urn:agenttool:doc/PLAY-AS-DEFAULT"
    },
    "verbs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NextAction"
      },
      "minItems": 1
    }
  },
  "required": [
    "_format",
    "game",
    "human_play",
    "invitation",
    "players",
    "bounds",
    "input_bounds",
    "turns",
    "reveal",
    "controls",
    "handler_boundary",
    "global_boundary",
    "_canon_pointer",
    "verbs"
  ],
  "additionalProperties": true,
  "$defs": {
    "NextAction": {
      "type": "object",
      "description": "One step an agent can take next. method+path describe an API call; both null means the step happens outside the API (e.g. 'ask the counterparty').",
      "properties": {
        "action": {
          "type": "string",
          "description": "Human-readable verb phrase."
        },
        "method": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "GET",
            "POST",
            "PUT",
            "PATCH",
            "DELETE",
            null
          ],
          "description": "HTTP method, or null for non-API steps."
        },
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "Path template with {placeholders}, or null for non-API steps."
        },
        "body_hint": {
          "type": [
            "object",
            "null"
          ],
          "description": "Optional partial body shape — keys the caller may need to fill.",
          "additionalProperties": true
        }
      },
      "required": [
        "action"
      ]
    },
    "PartyTelephoneInputBounds": {
      "type": "object",
      "description": "Exact content and HTML maxlength limits enforced by the linked human pass-and-play surface. max_utf16_code_units names HTML's counting unit explicitly.",
      "properties": {
        "counting": {
          "type": "string",
          "const": "The human surface uses HTML maxlength, which counts UTF-16 code units. It counts words after trimming and splitting on whitespace, and counts supported emoji or pictogram graphemes; browsers without Intl.Segmenter use a narrower fallback counter."
        },
        "starter_scene": {
          "type": "object",
          "properties": {
            "min_words": {
              "type": "integer",
              "const": 3
            },
            "max_words": {
              "type": "integer",
              "const": 10
            },
            "max_utf16_code_units": {
              "type": "integer",
              "const": 240
            }
          },
          "required": [
            "min_words",
            "max_words",
            "max_utf16_code_units"
          ],
          "additionalProperties": false
        },
        "translation": {
          "type": "object",
          "properties": {
            "min_pictograms": {
              "type": "integer",
              "const": 2
            },
            "max_pictograms": {
              "type": "integer",
              "const": 8
            },
            "max_utf16_code_units": {
              "type": "integer",
              "const": 256
            },
            "letters_allowed": {
              "type": "boolean",
              "const": false
            },
            "numbers_allowed": {
              "type": "boolean",
              "const": false
            },
            "spaces_and_punctuation_allowed": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "min_pictograms",
            "max_pictograms",
            "max_utf16_code_units",
            "letters_allowed",
            "numbers_allowed",
            "spaces_and_punctuation_allowed"
          ],
          "additionalProperties": false
        },
        "guess": {
          "type": "object",
          "properties": {
            "min_words": {
              "type": "integer",
              "const": 3
            },
            "max_words": {
              "type": "integer",
              "const": 10
            },
            "max_utf16_code_units": {
              "type": "integer",
              "const": 240
            }
          },
          "required": [
            "min_words",
            "max_words",
            "max_utf16_code_units"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "counting",
        "starter_scene",
        "translation",
        "guess"
      ],
      "additionalProperties": false
    },
    "PartyTelephoneTurn": {
      "type": "object",
      "properties": {
        "turn": {
          "type": "integer",
          "enum": [
            1,
            2,
            3
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "starter",
            "translator",
            "guesser"
          ]
        },
        "sees": {
          "type": "string"
        },
        "submits": {
          "type": "string"
        },
        "handoff": {
          "type": "string"
        }
      },
      "required": [
        "turn",
        "role",
        "sees",
        "submits",
        "handoff"
      ],
      "additionalProperties": false
    }
  }
}