Scaffold a new game entity type with a branded ID, Readonly shape, and deterministic ID generation
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
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: