Skip to content

Architecture map

The SDK is organized around one boundary: reusable behavior belongs in the SDK; authored meaning and product policy stay with the game.

Package entry points

Entry pointPurposeRuntime assumptions
package rootGAOS-hosted Arena client and Arena observation typesfetch
./protocolGeneric turn envelopes, cursors, idempotency, simultaneous intents, game registryJSON-serializable values
./engineGrid mechanics, geometry, settlement, solver, replay, scoring, agent environment and toolsInjected world/reducer policy
./agentProvider-neutral driver contract and keyed HTTP model driversfetch and a provider key
./agent-cliCLI discovery, launch recipes, MCP configuration, subprocess lifecycleNode.js
Python distributionHosted client, Gym-style environment, agent evaluation helpersPython 3.10+, standard library only at runtime

Choose the narrowest entry point your integration needs. A deterministic game engine should not need the hosted Arena adapter; an MCP server should not need to depend on a model provider.

Mechanism map

ConcernSDK mechanismProduct supplies
Movementsimultaneous destinations, footprints, collisions, rotations, swaps, priorityterrain and static-blocker policy
Turn consequencesordered worklist, waves, coalescing, once-only work, deferral, convergence guard, causal tracejob meaning, mutations, stable keys and priorities
Propagationbreadth-first once-per-identity chain reactionsneighbors and effects
Projectiles and pushespath advancement, flight passes, atomic push planning and commit ordercollision, damage, landing and visuals
Gates and triggerslatch/automatic transitions, authored-order one-shot triggeringsources, conditions, effects and persistence
Rays and visibilityordered ray traversal, Bresenham lines, line of sight, cone geometryblockers, hits, damage and visibility policy
Transportlink components, directed proposals, bounded runs and interlockspower, occupancy and world mutation
Decisionsgeneric behavior-tree traversal and shortest-path searchconditions, leaf actions and traversability
Outcomesstar calculation and budget-failure precedencethresholds and budgets
Verificationseeded randomness, solving, transcript re-simulationreducer, levels and action schema

Read the mechanism reference for detailed contracts, ordering, examples, edge cases, and product responsibilities.

One deterministic core

text
                  product content and policy
                            |
                     GridReducer adapter
                            |
          +-----------------+-----------------+
          |                 |                 |
       gameplay          solver/replay   AgentEnvironment
          |                                   |
      renderer/API                    tools + model drivers
                                             |
                                       MCP-capable CLIs

The reducer adapter prevents local agents, hosted sessions, replay verification, and ordinary gameplay from drifting into separate rule implementations.

SDK versus product ownership

SDK

  • deterministic algorithms and ordering;
  • reusable mechanism state transitions;
  • generic turn and agent lifecycle contracts;
  • replay, solver, scoring behavior, tools and integration adapters; and
  • provider and CLI extension points.

Product

  • characters, abilities, items, dialogue, levels, objectives and game modes;
  • board tokens, numeric tuning, thresholds and reward policy;
  • prompts, matchmaking, authentication, persistence and anti-cheat rules; and
  • rendering, animation, sound, seasonal content and server-only policy.

The SDK may report that a ray stopped at a cell. The product decides whether that cell is a wall, a shield, a character, or a visual-only effect. The SDK may settle a trigger in authored order. The product decides what the condition means and which mutation follows.

Why this is AI-native

Agent support is part of the engine contract, not a UI automation layer:

  1. A seeded reducer produces deterministic observations and outcomes.
  2. The environment exposes complete, concrete legal actions.
  3. Illegal model output is rejected before reaching the reducer.
  4. Every decision produces a versioned transcript suitable for replay.
  5. The same cases can be evaluated across local policies, keyed models, or MCP-capable CLIs.

That makes agent play reproducible, provider-neutral, headless, and directly comparable with human or renderer-driven play.

Reusable mechanics in the toolkit. Product content stays in the product.