Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.17 KB

File metadata and controls

22 lines (17 loc) · 1.17 KB

Contribution Contract

Ten non-negotiable rules for anyone (human or AI) changing this codebase.

  1. No domain logic in Phaser scenes. Scenes create sprites and bind input. Gameplay rules live in src/domain/**.
  2. No Phaser imports in src/domain/**. Enforced by lint and dep-cruiser. Move Phaser code to src/runtime/phaser/**.
  3. Keep modules small and single-purpose. If a *.behavior.ts file approaches 400 lines, split it.
  4. Prefer adding a new behavior file over expanding a scene file.
  5. Every changed domain behavior must have an added or updated test.
  6. Content changes must validate against the schema. Run pnpm dev after editing JSON; validation errors fail early.
  7. Use the existing file naming conventions exactly. See docs/ai/naming-conventions.md.
  8. Do not introduce new architectural patterns without an ADR. Use pnpm new:adr "<Title>".
  9. Prefer explicit interfaces over hidden framework magic. If you need something from the engine, go through a port.
  10. When in doubt, keep runtime imperative and domain pure.

Before you claim done

pnpm check

Must pass. Do not --no-verify past hooks. Fix the root cause.