# Prototype: Game Contract Boundary Verification This directory contains five executable contract tests against the shared AI-GM vertical-slice implementation. It does not contain a duplicate Game Contract, validator, engine, state service or projection implementation. Authoritative dependencies: - [`../../2026-07-25-ai-gm-vertical-slice/prototype/src/fixtures.ts`](../../2026-07-25-ai-gm-vertical-slice/prototype/src/fixtures.ts) provides `loadFixtureBundle()`; - [`../../2026-07-25-ai-gm-vertical-slice/prototype/fixtures/game-contract.json`](../../2026-07-25-ai-gm-vertical-slice/prototype/fixtures/game-contract.json) is the single Game Contract/rules-profile fixture; - the shared `contracts`, `engine`, `event-log`, `hash`, `orchestrator`, `projection`, `state` and `validators` modules are imported directly by `game-contract.verification.test.ts`. Run from the repository root on Node.js `v24.14.0`: ```bash node --test RnD/technical/2026-07-25-game-contract-canonical-state/prototype/game-contract.verification.test.ts ``` Run from the study directory: ```bash node --test prototype/game-contract.verification.test.ts ``` The recorded result is `5` tests, `5` pass, `0` fail, `0` skipped and `0` TODO: - AC-01 rejects all labelled invalid commands before RNG/event/state work; - AC-02 keeps narrator projection/output mutations outside canonical state; - AC-03 accepts the supported contract and returns structured errors for missing, ill-typed and unsupported contract/state versions; - AC-04 matches explicit participant allow-lists for player, GM, party, branch and public visibility cases. Unsupported `contractVersion` and `stateVersion` values `999.0.0` are asserted to produce `schema_const` issues at `/game/contractVersion` and `/game/stateVersion`. Run the root compiler separately: ```bash npm run typecheck ``` The final compiler run exits successfully. No experimental Node flag, network service, environment variable or study-local dependency install is required.