Architectural and cross-package changes — dependency direction, editor/runtime boundaries, scene schema, persistence, renderer packages. Use when changing package boundaries, serialized formats, or multiple layers. Do not apply to localized UI, styling, or test-only edits.
Split oversized TypeScript modules and classes. Use when adding features to large files, extracting helpers, reviewing god objects, or a module exceeds 300–500 lines with mixed responsibilities.
Browser input is untrusted. All project filesystem access goes through ProjectService.resolveProjectPath → ProjectRootGuard.resolveSafe. Do not call path.resolve/readFile/writeFile on user-influenced paths without that guard.
Add a new supported asset format/type through catalogue schema, importer or editor workflow, project-server, Asset Browser, preview, Inspector picker, resolver, runtime load, and tests. Use when introducing a new AssetType, importer, generated artifact, or when import works but editor/runtime cannot resolve the file.
Add an undoable editor command for scene, asset, prefab, or tilemap mutations. Use when implementing create/delete/rename/move/property edits, continuous gestures that must commit one history entry, or when UI currently mutates DocumentManager without CommandManager.
Add a dockable editor panel (Dockview id, React view, default layout, persisted layout version, subscriptions, cleanup). Use when adding panels such as Animation, Profiler, Tilemap tools, Physics debugger, Audio mixer, or Prefab overrides as a new dock region — not Inspector sections.
Add a new scene node type end-to-end (domain component, Zod schema, factory, editor registry, Inspector, Pixi/Three renderer, clone/undo, tests). Use when adding a creatable Hierarchy/Node-menu type, visual or Three leaf, Hit Zone / Mask-like extra, or when schema is added but renderer/editor support is missing.
Plan and land architectural or cross-package changes (dependency direction, scene/domain schema, runtime/editor boundaries, persistence format, renderer abstractions, project-server APIs). Use when changing multiple packages, serialized formats, or package boundaries — not for localized UI, styling, or test-only edits.
Create game Script components (defineComponent + OOP behaviour class) for games/ /src/components or packages/game-components. Use when adding a game component, script component, behaviour, Loading/Change Scene logic, bus event handlers, or Inspector Add Component entries.
Scaffold a new independently buildable game under games/ (package.json, project.json, Vite, scenes, runtime boot). Use when adding a new game, game package, games/ project, Pixi-only / Three-only / hybrid game, or copying editor-features-demo / solitaire / muonline-game.
Plan and implement a production-quality feature in the hybrid PixiJS/Three.js game editor while preserving architecture, undo/redo, persistence and tests. Use for editor UI/core work that is not a specialized add-node-type, add-asset-type, add-editor-command, add-editor-panel, or modify-scene-schema slice.
Implement gameplay/runtime features (GameRuntime services, input, audio, timers, scene transitions, script lifecycle, shared game systems) without importing editor UI. Use when changing runtime packages or games/ behaviour that is not a new Script component and not editor chrome.
Safely change persisted scene, prefab, project, asset, or tileset JSON (Zod, TypeScript, defaults, loaders, backward compatibility, tests). Use when adding/removing/renaming serialized fields, bumping format versions, or loading old games//assets JSON would otherwise break.
Measure and fix editor or runtime performance regressions (per-frame work, Pixi/Three loops, React rerenders, scene rebuilds, allocations). Use when investigating jank, GC pressure, high draw calls, or before optimizing hot paths — not for speculative micro-edits.
Update repository documentation so it matches the implementation (README, PROJECT.md, docs/ topic pages, hotkeys, feature tables). Use after a user-visible or architectural change when existing docs would be wrong or incomplete — not to rewrite roadmap or add churn.