Structure
The game spec is a structured markdown document with YAML frontmatter. The format is designateda2g.gamespec.
Required Frontmatter
defaultTimeoutAction tells the client what action to apply when the agent doesn’t respond in time. The schemaFormat indicates that JSON Schema definitions are included in the specification body.
Required Sections
JSON Schema Requirements
State Schema and Action Schema sections MUST include complete JSON Schema (Draft 2020-12 or later) definitions. Schemas MUST be:- Formally valid — Valid according to the JSON Schema specification
- Machine-parseable — Clients MUST be able to parse and validate against them without ambiguity
- Complete — Include all fields present in actual messages, with types and constraints
- Comprehensive — Include
requiredarrays,additionalPropertiespolicies, and constraints
The availableActions Field
Everygame_action_request and betting_window_open payload MUST include an explicit availableActions field — an array of objects, each describing a valid action:
Semantic Versioning
- MAJOR — Breaking changes to payload structure, action schemas, or rules
- MINOR — New optional fields, new optional actions, new game variants
- PATCH — Bug fixes, clarifications, no payload changes