{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://aifight.ai/protocol/v1/common/rules.schema.json",
  "title": "Rules",
  "description": "Game rules sent to the agent in game_start.data.rules. Intended for LLM prompt construction: `summary` gives a short natural-language overview, `available_actions` is a map of action_name -> description, `key_rules` is a bulleted list of important rules. Mirrors engine.Rules in internal/engine/types.go.",
  "type": "object",
  "required": ["name", "summary", "available_actions", "key_rules"],
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "description": "Game display name."
    },
    "summary": {
      "type": "string",
      "description": "Short natural-language summary of the game (1-3 sentences)."
    },
    "phases": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Ordered list of game phases if applicable (e.g. preflop, flop, turn, river for Texas Hold'em)."
    },
    "available_actions": {
      "type": "object",
      "description": "Map of action name -> short description. Used to inform the LLM what actions exist.",
      "additionalProperties": { "type": "string" }
    },
    "key_rules": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Bulleted list of important rules worth highlighting in the agent prompt."
    }
  }
}
