Scaffold a new game entity type with a branded ID, Readonly shape, and deterministic ID generation
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Scaffold a new game entity type with a branded ID, Readonly shape, and deterministic ID generation
Scaffold Entity
Use when introducing a new game entity (e.g. Enemy, Item, Projectile).
Rules
All entity types are Readonly<{…}> — no mutable fields.
Every entity has a branded ID: Brand<string, "EntityNameId"> — never a plain string.
IDs are deterministically generated via the seeded PRNG stored in state — never Math.random(), never crypto.randomUUID().
IDs are never reused within a run; spawn order is tracked for deterministic tie-breaking.
Board actors use GridCell for gameplay position. Do not add actor xPos / yPos; pixel coordinates belong only to render commands and raw browser input events.
Composition over nesting: share sub-shapes via type aliases, not inheritance.
Steps
Declare the branded ID type in packages/game/lib/core/types.ts: