Commit Graph

1 Commits

Author SHA1 Message Date
rshtirmer e0895d6b5b Add OpenGame Debug Skill seed-protocol port (Apache-2.0 attribution)
Adapts the proactive cross-file consistency checks from
leigest519/OpenGame's debug-skill into a single-file ESM script that
can run on any game-creator project. Wires it into make-game's Phase
4 verification protocol alongside the existing
validate-architecture.mjs.

What's checked (proactive):
- ASSET_KEY_CONSISTENCY: code references texture/audio keys via
  this.add.image/sprite/audio or this.load.* that exist in
  public/assets/asset-pack.json.
- SCENE_REGISTRATION_CONSISTENCY: every scene.start()/scene.launch()
  target appears either as a Phaser scene class' super('Key') or in a
  game.scene.add() / scene-config-array key.
- ANIMATION_KEY_CONSISTENCY: .play('key') references match
  animations.json or anims.create({ key }) calls.

Each check no-ops gracefully when its prerequisite (asset-pack.json,
animations.json, Phaser scenes) is absent — non-Phaser games and shape-
only games are correctly reported as inapplicable rather than failed.

What's dropped from upstream: 4 TS-specific entries (TS2307, TS2339,
IMPORT_TYPE_KEYWORD, OVERRIDE_VISIBILITY) since game-creator templates
ship plain JS, plus 2 entries (CONFIG_FIELD_CONSISTENCY,
LEVEL_ORDER_MISMATCH) whose conventions don't match game-creator's
core/Constants.js + non-LevelManager template shape. Drop rationale
documented inline in debug-protocol.json's _notes field and on the
sibling repo (OpusGameLabs/game-eval) at
decisions/PORT-opengame-debug-protocol-2026-05-08.md.

Validation:
- 3 templates: 0 false positives (phaser-2d 1 PASS, plus-template +
  threejs-3d correctly skip 3 each).
- 23 example games: 0 false positives across all checks.
- 10-fixture broken-game corpus (sibling repo): 1/10 fixtures caught
  statically (scene-not-registered, the one consistency violation),
  9/10 correctly defer to runtime/visual/intent axes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:51:19 -04:00