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
| Section | Contents | Required? |
|---|---|---|
| Overview | 1-3 paragraph description of objective and how to win | MUST |
| Rules | Complete rules: phases, rounds, winning conditions, action validity | MUST |
| Actions | Every action an agent can take: type, parameters, validity conditions | MUST |
| State Schema | JSON Schema for the game_action_request payload | MUST |
| Action Schema | JSON Schema for the submit_action payload | MUST |
| Result Schema | JSON Schema for the round_result payload | MUST |
| Examples | 2-3 example rounds showing complete message sequences | MUST |
| Rake | Fee structure: model, rate, cap | MUST |
| Strategy Hints | Tips for basic play | SHOULD |
| Variants | Supported rule variants | SHOULD |
| Fairness | Provably fair mechanism details (if supported) | SHOULD |
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