@codyswann/lisa 2.179.0 → 2.180.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/phaser/merge/.claude/settings.json +1 -0
- package/phaser/merge/.mcp.json +8 -0
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/rules/phaser.md +25 -2
- package/plugins/lisa-phaser/skills/phaser-accessibility/SKILL.md +1 -1
- package/plugins/lisa-phaser/skills/phaser-asset-pipeline/SKILL.md +4 -4
- package/plugins/lisa-phaser/skills/phaser-i18n/SKILL.md +1 -1
- package/plugins/lisa-phaser/skills/phaser-project-structure/SKILL.md +5 -5
- package/plugins/lisa-phaser/skills/phaser-services/SKILL.md +1 -1
- package/plugins/lisa-phaser/skills/phaser-testing/SKILL.md +2 -2
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/skills/phaser-accessibility/SKILL.md +1 -1
- package/plugins/lisa-phaser-agy/skills/phaser-asset-pipeline/SKILL.md +4 -4
- package/plugins/lisa-phaser-agy/skills/phaser-i18n/SKILL.md +1 -1
- package/plugins/lisa-phaser-agy/skills/phaser-project-structure/SKILL.md +5 -5
- package/plugins/lisa-phaser-agy/skills/phaser-services/SKILL.md +1 -1
- package/plugins/lisa-phaser-agy/skills/phaser-testing/SKILL.md +2 -2
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/rules/phaser.md +25 -2
- package/plugins/lisa-phaser-copilot/skills/phaser-accessibility/SKILL.md +1 -1
- package/plugins/lisa-phaser-copilot/skills/phaser-asset-pipeline/SKILL.md +4 -4
- package/plugins/lisa-phaser-copilot/skills/phaser-i18n/SKILL.md +1 -1
- package/plugins/lisa-phaser-copilot/skills/phaser-project-structure/SKILL.md +5 -5
- package/plugins/lisa-phaser-copilot/skills/phaser-services/SKILL.md +1 -1
- package/plugins/lisa-phaser-copilot/skills/phaser-testing/SKILL.md +2 -2
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/rules/phaser.mdc +25 -2
- package/plugins/lisa-phaser-cursor/skills/phaser-accessibility/SKILL.md +1 -1
- package/plugins/lisa-phaser-cursor/skills/phaser-asset-pipeline/SKILL.md +4 -4
- package/plugins/lisa-phaser-cursor/skills/phaser-i18n/SKILL.md +1 -1
- package/plugins/lisa-phaser-cursor/skills/phaser-project-structure/SKILL.md +5 -5
- package/plugins/lisa-phaser-cursor/skills/phaser-services/SKILL.md +1 -1
- package/plugins/lisa-phaser-cursor/skills/phaser-testing/SKILL.md +2 -2
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/phaser/rules/phaser.md +25 -2
- package/plugins/src/phaser/skills/phaser-accessibility/SKILL.md +1 -1
- package/plugins/src/phaser/skills/phaser-asset-pipeline/SKILL.md +4 -4
- package/plugins/src/phaser/skills/phaser-i18n/SKILL.md +1 -1
- package/plugins/src/phaser/skills/phaser-project-structure/SKILL.md +5 -5
- package/plugins/src/phaser/skills/phaser-services/SKILL.md +1 -1
- package/plugins/src/phaser/skills/phaser-testing/SKILL.md +2 -2
- package/plugins/lisa-phaser/skills/phaser-assets/SKILL.md +0 -96
- package/plugins/lisa-phaser/skills/phaser-assets/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser/skills/phaser-gameobjects/SKILL.md +0 -94
- package/plugins/lisa-phaser/skills/phaser-gameobjects/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser/skills/phaser-physics/SKILL.md +0 -86
- package/plugins/lisa-phaser/skills/phaser-physics/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser/skills/phaser-rendering/SKILL.md +0 -89
- package/plugins/lisa-phaser/skills/phaser-rendering/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser/skills/phaser-scenes/SKILL.md +0 -86
- package/plugins/lisa-phaser/skills/phaser-scenes/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser/skills/phaser-v3-migration/SKILL.md +0 -81
- package/plugins/lisa-phaser/skills/phaser-v3-migration/agents/openai.yaml +0 -4
- package/plugins/lisa-phaser-agy/skills/phaser-assets/SKILL.md +0 -96
- package/plugins/lisa-phaser-agy/skills/phaser-gameobjects/SKILL.md +0 -94
- package/plugins/lisa-phaser-agy/skills/phaser-physics/SKILL.md +0 -86
- package/plugins/lisa-phaser-agy/skills/phaser-rendering/SKILL.md +0 -89
- package/plugins/lisa-phaser-agy/skills/phaser-scenes/SKILL.md +0 -86
- package/plugins/lisa-phaser-agy/skills/phaser-v3-migration/SKILL.md +0 -81
- package/plugins/lisa-phaser-copilot/skills/phaser-assets/SKILL.md +0 -96
- package/plugins/lisa-phaser-copilot/skills/phaser-gameobjects/SKILL.md +0 -94
- package/plugins/lisa-phaser-copilot/skills/phaser-physics/SKILL.md +0 -86
- package/plugins/lisa-phaser-copilot/skills/phaser-rendering/SKILL.md +0 -89
- package/plugins/lisa-phaser-copilot/skills/phaser-scenes/SKILL.md +0 -86
- package/plugins/lisa-phaser-copilot/skills/phaser-v3-migration/SKILL.md +0 -81
- package/plugins/lisa-phaser-cursor/skills/phaser-assets/SKILL.md +0 -96
- package/plugins/lisa-phaser-cursor/skills/phaser-gameobjects/SKILL.md +0 -94
- package/plugins/lisa-phaser-cursor/skills/phaser-physics/SKILL.md +0 -86
- package/plugins/lisa-phaser-cursor/skills/phaser-rendering/SKILL.md +0 -89
- package/plugins/lisa-phaser-cursor/skills/phaser-scenes/SKILL.md +0 -86
- package/plugins/lisa-phaser-cursor/skills/phaser-v3-migration/SKILL.md +0 -81
- package/plugins/src/phaser/skills/phaser-assets/SKILL.md +0 -96
- package/plugins/src/phaser/skills/phaser-gameobjects/SKILL.md +0 -94
- package/plugins/src/phaser/skills/phaser-physics/SKILL.md +0 -86
- package/plugins/src/phaser/skills/phaser-rendering/SKILL.md +0 -89
- package/plugins/src/phaser/skills/phaser-scenes/SKILL.md +0 -86
- package/plugins/src/phaser/skills/phaser-v3-migration/SKILL.md +0 -81
package/package.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"ws": ">=8.20.1"
|
|
94
94
|
},
|
|
95
95
|
"name": "@codyswann/lisa",
|
|
96
|
-
"version": "2.
|
|
96
|
+
"version": "2.180.0",
|
|
97
97
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
98
98
|
"main": "dist/index.js",
|
|
99
99
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.180.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.180.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.180.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.180.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.180.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -5,6 +5,29 @@ on the official `template-vite-ts` layout (Vite + TypeScript 6). Phaser 4 is the
|
|
|
5
5
|
only supported target — never introduce Phaser 3 idioms. These decisions are
|
|
6
6
|
**locked** and most are **lint-enforced**; do not disable a rule, fix the code.
|
|
7
7
|
|
|
8
|
+
## Official Phaser skills — use these for API knowledge
|
|
9
|
+
|
|
10
|
+
Phaser ships **28 official, authoritative agent skills** inside the installed
|
|
11
|
+
package at **`node_modules/phaser/skills/<topic>/SKILL.md`** — e.g. `scenes`,
|
|
12
|
+
`sprites-and-images`, `physics-arcade`, `physics-matter`, `tweens`, `particles`,
|
|
13
|
+
`filters-and-postfx`, `loading-assets`, `animations`, `tilemaps`, `cameras`,
|
|
14
|
+
`input-keyboard-mouse-touch`, `audio-and-sound`, `game-object-components`,
|
|
15
|
+
`v3-to-v4-migration`, `v4-new-features`, and more. The Phaser team maintains them
|
|
16
|
+
in lockstep with the engine, and they cite exact `src/...` source paths.
|
|
17
|
+
|
|
18
|
+
**For any Phaser API or subsystem question, read the matching official skill
|
|
19
|
+
first.** Do not rely on memory, and do not expect Lisa to duplicate that
|
|
20
|
+
knowledge — the `lisa-phaser` skills intentionally cover only the opinionated,
|
|
21
|
+
project-specific, and lint-enforced layer (project structure, services, asset
|
|
22
|
+
pipeline, i18n, accessibility, build/deploy, testing gates) that the official
|
|
23
|
+
skills do not. When this file points at a Phaser subsystem (physics, rendering,
|
|
24
|
+
scenes, …) the authority is the official skill of that name.
|
|
25
|
+
|
|
26
|
+
An optional **Phaser Editor MCP server** (`@phaserjs/editor-mcp-server`, 40+
|
|
27
|
+
tools for scenes/assets/tilemaps) is defined for this project type but
|
|
28
|
+
**disabled by default** — enable it only when working with Phaser Editor v5. See
|
|
29
|
+
`.mcp.json` and `disabledMcpjsonServers` in `.claude/settings.json`.
|
|
30
|
+
|
|
8
31
|
## Locked architecture decisions
|
|
9
32
|
|
|
10
33
|
1. **Thin scenes over a pure-logic core.** Scenes and GameObjects are thin
|
|
@@ -18,7 +41,7 @@ only supported target — never introduce Phaser 3 idioms. These decisions are
|
|
|
18
41
|
as an upgrade path — it is not the default and is not added unless required.
|
|
19
42
|
3. **Arcade physics by default; Matter is opt-in.** Matter is heavier and does
|
|
20
43
|
not interop with Arcade. Switching is a one-line config swap. See
|
|
21
|
-
`
|
|
44
|
+
the official `physics-arcade` skill.
|
|
22
45
|
4. **Determinism.** No `Math.random()`, `Date.now()`, or `performance.now()` in
|
|
23
46
|
game code. Use the seeded `Phaser.Math.RandomDataGenerator` (`Phaser.Math.RND`
|
|
24
47
|
or a local instance seeded from one place) so replays and tests reproduce.
|
|
@@ -31,7 +54,7 @@ only supported target — never introduce Phaser 3 idioms. These decisions are
|
|
|
31
54
|
6. **Performance.** Pool transient objects via `Group`s; make **no allocations
|
|
32
55
|
and create no objects/tweens/timers inside `update()`**; atlas everything; use
|
|
33
56
|
`BitmapText` for high-churn text; use `SpriteGPULayer` / `TilemapGPULayer` for
|
|
34
|
-
mass rendering. See `
|
|
57
|
+
mass rendering. See the official `game-object-components` skill.
|
|
35
58
|
7. **Baked-in asset pipeline.** Raw art in `assets/src` is packed at build time
|
|
36
59
|
(free-tex-packer-core atlases, audiosprite, BMFont) into `public/assets`, and
|
|
37
60
|
a codegen step emits typed keys to `src/assets.ts` so a missing or renamed key
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-accessibility
|
|
3
|
-
description: This skill should be used when making a Phaser 4 game accessible — honoring prefers-reduced-motion, pausing on window/tab blur, keyboard navigation and visible focus for menus, colorblind-safe palettes, and a screen-reader live region that announces game state through the DOM. Use it when building menus, settings, HUD, or any player-facing UI, or when an accessibility requirement comes up. Pairs with phaser-services, phaser-i18n, and
|
|
3
|
+
description: This skill should be used when making a Phaser 4 game accessible — honoring prefers-reduced-motion, pausing on window/tab blur, keyboard navigation and visible focus for menus, colorblind-safe palettes, and a screen-reader live region that announces game state through the DOM. Use it when building menus, settings, HUD, or any player-facing UI, or when an accessibility requirement comes up. Pairs with phaser-services, phaser-i18n, and the official scenes skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Accessibility
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-asset-pipeline
|
|
3
|
-
description: This skill should be used when setting up or changing the build-time asset pipeline of a Phaser 4 game — packing raw art in assets/src into public/assets (free-tex-packer-core texture atlases, audiosprite audio sprites, BMFont bitmap fonts) and the codegen step that emits typed keys to src/assets.ts so a missing or renamed key is a compile error. Use it when adding source art, wiring packing into the build, regenerating typed keys, or eliminating raw string asset keys. Pairs with
|
|
3
|
+
description: This skill should be used when setting up or changing the build-time asset pipeline of a Phaser 4 game — packing raw art in assets/src into public/assets (free-tex-packer-core texture atlases, audiosprite audio sprites, BMFont bitmap fonts) and the codegen step that emits typed keys to src/assets.ts so a missing or renamed key is a compile error. Use it when adding source art, wiring packing into the build, regenerating typed keys, or eliminating raw string asset keys. Pairs with the official loading-assets skill, phaser-build-deploy, and phaser-services.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Asset Pipeline
|
|
@@ -13,7 +13,7 @@ Runtime assets are **generated, not hand-placed**. Raw source art lives in
|
|
|
13
13
|
key constants into `src/assets.ts`**. The payoff: a missing or renamed asset is a
|
|
14
14
|
**compile error**, not a green square or silent-missing audio at runtime. No raw
|
|
15
15
|
string asset / scene / event keys anywhere — they all come from the generated
|
|
16
|
-
module (
|
|
16
|
+
module (the official `loading-assets` skill covers loading those keys at runtime).
|
|
17
17
|
|
|
18
18
|
## Layout
|
|
19
19
|
|
|
@@ -52,7 +52,7 @@ for (const f of files) await writeFile(`public/assets/atlases/${f.name}`, f.buff
|
|
|
52
52
|
|
|
53
53
|
The frame names in the manifest become the atlas frame keys you reference as
|
|
54
54
|
generated constants. Atlas everything that renders together — loose images break
|
|
55
|
-
sprite batching (
|
|
55
|
+
sprite batching (the official `loading-assets` skill).
|
|
56
56
|
|
|
57
57
|
## Step 2: audio sprites with audiosprite
|
|
58
58
|
|
|
@@ -70,7 +70,7 @@ with `this.load.audioSprite(Audio.Sfx, "audio/sfx.json")` and play by sprite key
|
|
|
70
70
|
## Step 3: bitmap fonts with BMFont
|
|
71
71
|
|
|
72
72
|
`BitmapText` is the performant choice for high-churn text (scores, timers) —
|
|
73
|
-
|
|
73
|
+
the official `loading-assets` skill / [[phaser-i18n]]. Generate the `.fnt` (XML/JSON) + PNG page
|
|
74
74
|
from a font source with a BMFont tool (`msdf-bmfont-xml` or the `bmfont` CLI) in
|
|
75
75
|
the same script:
|
|
76
76
|
|
|
@@ -86,7 +86,7 @@ Persist the chosen locale via SaveService and apply it on boot; default from
|
|
|
86
86
|
|
|
87
87
|
## BitmapText vs Text — the localization trade-off
|
|
88
88
|
|
|
89
|
-
The performance advice "use BitmapText for hot text" (
|
|
89
|
+
The performance advice "use BitmapText for hot text" (the official `game-object-components` skill)
|
|
90
90
|
collides with i18n: a bitmap font only contains the glyphs it was generated with.
|
|
91
91
|
|
|
92
92
|
- **BitmapText** — fastest, but the BMFont must include every glyph the locale
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-project-structure
|
|
3
|
-
description: This skill should be used when creating, restructuring, or reasoning about a Phaser 4 game project — the game config, the Vite + TypeScript layout, the Boot → Preloader → MainMenu → Game scene flow, scale/resolution setup for desktop and mobile, and where code and assets belong. Use it before scaffolding a project, adding a major subsystem, or deciding where a file should live. Pairs with
|
|
3
|
+
description: This skill should be used when creating, restructuring, or reasoning about a Phaser 4 game project — the game config, the Vite + TypeScript layout, the Boot → Preloader → MainMenu → Game scene flow, scale/resolution setup for desktop and mobile, and where code and assets belong. Use it before scaffolding a project, adding a major subsystem, or deciding where a file should live. Pairs with the official scenes skill, the official loading-assets skill, the official filters-and-postfx skill, and phaser-testing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Project Structure
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
This stack targets **Phaser 4** (v4.
|
|
10
|
+
This stack targets **Phaser 4** (v4.2+, npm package `phaser@^4.2.0`), built
|
|
11
11
|
with **Vite + TypeScript** — the layout the official `phaserjs/template-vite-ts`
|
|
12
12
|
template and `npm create @phaserjs/game@latest` scaffold. Phaser 4 ships its own
|
|
13
13
|
type definitions (`types/phaser.d.ts`); do not add `@types/phaser`.
|
|
@@ -55,17 +55,17 @@ v4-specific config facts:
|
|
|
55
55
|
- Pixel-art games: `pixelArt: true` (nearest-neighbor + roundPixels), or the new
|
|
56
56
|
**`render.smoothPixelArt: true`** (WebGL-only) for pixel art that rotates or
|
|
57
57
|
scales smoothly. Pick one per project and record the choice.
|
|
58
|
-
- Custom render nodes register under `render.renderNodes` — see
|
|
58
|
+
- Custom render nodes register under `render.renderNodes` — see the official `filters-and-postfx` skill.
|
|
59
59
|
- `Phaser.HEADLESS` exists for logic-only boots (tests) — see [[phaser-testing]].
|
|
60
60
|
|
|
61
61
|
## Scene flow
|
|
62
62
|
|
|
63
|
-
Four-stage boot, in order (see
|
|
63
|
+
Four-stage boot, in order (see the official `scenes` skill for lifecycle detail):
|
|
64
64
|
|
|
65
65
|
1. **Boot** — loads only the handful of assets the Preloader's loading screen
|
|
66
66
|
needs (logo, progress-bar art). No game assets here.
|
|
67
67
|
2. **Preloader** — renders the loading UI and loads everything else, preferably
|
|
68
|
-
via a single asset-pack manifest (see
|
|
68
|
+
via a single asset-pack manifest (see the official `loading-assets` skill), then starts MainMenu.
|
|
69
69
|
3. **MainMenu** — entry UI; starts Game.
|
|
70
70
|
4. **Game** (+ overlay scenes like `HUD`, `Pause` run in parallel) — gameplay.
|
|
71
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-services
|
|
3
|
-
description: This skill should be used when wiring cross-cutting services and shared state in a Phaser 4 game — the typed registry wrapper for global state, a single dedicated EventsCenter bus (never game.events), the .on()/.off() listener discipline enforced in scene shutdown, SoundService (mobile audio unlock on first gesture), InputService (semantic actions instead of raw keys), and SaveService (versioned localStorage with a migration chain). Use it when adding global state, an event bus, audio/input/save plumbing, or fixing listener leaks and lost saves. Pairs with
|
|
3
|
+
description: This skill should be used when wiring cross-cutting services and shared state in a Phaser 4 game — the typed registry wrapper for global state, a single dedicated EventsCenter bus (never game.events), the .on()/.off() listener discipline enforced in scene shutdown, SoundService (mobile audio unlock on first gesture), InputService (semantic actions instead of raw keys), and SaveService (versioned localStorage with a migration chain). Use it when adding global state, an event bus, audio/input/save plumbing, or fixing listener leaks and lost saves. Pairs with the official scenes skill, phaser-testing, and phaser-i18n.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Services and Shared State
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-testing
|
|
3
|
-
description: This skill should be used when writing or designing tests for a Phaser 4 game — unit-testing pure game logic with Vitest, keeping logic Phaser-free so it tests without a browser, the Phaser.HEADLESS renderer for logic-only boots, asset-manifest coverage tests, and the CI runtime gates (boot smoke, allocation/perf budget, leak gate, determinism gate, deterministic Playwright visual regression, bundle-size budget) that verify scenes and entities that are excluded from unit coverage. Use it when adding tests, setting up CI verification, or deciding what is testable at which level. Pairs with phaser-project-structure,
|
|
3
|
+
description: This skill should be used when writing or designing tests for a Phaser 4 game — unit-testing pure game logic with Vitest, keeping logic Phaser-free so it tests without a browser, the Phaser.HEADLESS renderer for logic-only boots, asset-manifest coverage tests, and the CI runtime gates (boot smoke, allocation/perf budget, leak gate, determinism gate, deterministic Playwright visual regression, bundle-size budget) that verify scenes and entities that are excluded from unit coverage. Use it when adding tests, setting up CI verification, or deciding what is testable at which level. Pairs with phaser-project-structure, the official loading-assets skill, and phaser-services.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Testing
|
|
@@ -56,7 +56,7 @@ Cheap tests that catch the silent runtime failures Phaser is famous for:
|
|
|
56
56
|
|
|
57
57
|
- **Asset coverage**: every key constant in `src/assets.ts` appears in
|
|
58
58
|
`public/assets/pack.json` (and optionally vice versa). A missing pack entry
|
|
59
|
-
otherwise ships as a green-square texture (
|
|
59
|
+
otherwise ships as a green-square texture (the official `loading-assets` skill).
|
|
60
60
|
- **Scene registry**: every `SceneKeys` constant has a scene class registered in
|
|
61
61
|
the game config's `scene` array.
|
|
62
62
|
- These are plain Vitest tests reading JSON/TS — no Phaser instance needed.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-accessibility
|
|
3
|
-
description: This skill should be used when making a Phaser 4 game accessible — honoring prefers-reduced-motion, pausing on window/tab blur, keyboard navigation and visible focus for menus, colorblind-safe palettes, and a screen-reader live region that announces game state through the DOM. Use it when building menus, settings, HUD, or any player-facing UI, or when an accessibility requirement comes up. Pairs with phaser-services, phaser-i18n, and
|
|
3
|
+
description: This skill should be used when making a Phaser 4 game accessible — honoring prefers-reduced-motion, pausing on window/tab blur, keyboard navigation and visible focus for menus, colorblind-safe palettes, and a screen-reader live region that announces game state through the DOM. Use it when building menus, settings, HUD, or any player-facing UI, or when an accessibility requirement comes up. Pairs with phaser-services, phaser-i18n, and the official scenes skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Accessibility
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-asset-pipeline
|
|
3
|
-
description: This skill should be used when setting up or changing the build-time asset pipeline of a Phaser 4 game — packing raw art in assets/src into public/assets (free-tex-packer-core texture atlases, audiosprite audio sprites, BMFont bitmap fonts) and the codegen step that emits typed keys to src/assets.ts so a missing or renamed key is a compile error. Use it when adding source art, wiring packing into the build, regenerating typed keys, or eliminating raw string asset keys. Pairs with
|
|
3
|
+
description: This skill should be used when setting up or changing the build-time asset pipeline of a Phaser 4 game — packing raw art in assets/src into public/assets (free-tex-packer-core texture atlases, audiosprite audio sprites, BMFont bitmap fonts) and the codegen step that emits typed keys to src/assets.ts so a missing or renamed key is a compile error. Use it when adding source art, wiring packing into the build, regenerating typed keys, or eliminating raw string asset keys. Pairs with the official loading-assets skill, phaser-build-deploy, and phaser-services.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Asset Pipeline
|
|
@@ -13,7 +13,7 @@ Runtime assets are **generated, not hand-placed**. Raw source art lives in
|
|
|
13
13
|
key constants into `src/assets.ts`**. The payoff: a missing or renamed asset is a
|
|
14
14
|
**compile error**, not a green square or silent-missing audio at runtime. No raw
|
|
15
15
|
string asset / scene / event keys anywhere — they all come from the generated
|
|
16
|
-
module (
|
|
16
|
+
module (the official `loading-assets` skill covers loading those keys at runtime).
|
|
17
17
|
|
|
18
18
|
## Layout
|
|
19
19
|
|
|
@@ -52,7 +52,7 @@ for (const f of files) await writeFile(`public/assets/atlases/${f.name}`, f.buff
|
|
|
52
52
|
|
|
53
53
|
The frame names in the manifest become the atlas frame keys you reference as
|
|
54
54
|
generated constants. Atlas everything that renders together — loose images break
|
|
55
|
-
sprite batching (
|
|
55
|
+
sprite batching (the official `loading-assets` skill).
|
|
56
56
|
|
|
57
57
|
## Step 2: audio sprites with audiosprite
|
|
58
58
|
|
|
@@ -70,7 +70,7 @@ with `this.load.audioSprite(Audio.Sfx, "audio/sfx.json")` and play by sprite key
|
|
|
70
70
|
## Step 3: bitmap fonts with BMFont
|
|
71
71
|
|
|
72
72
|
`BitmapText` is the performant choice for high-churn text (scores, timers) —
|
|
73
|
-
|
|
73
|
+
the official `loading-assets` skill / [[phaser-i18n]]. Generate the `.fnt` (XML/JSON) + PNG page
|
|
74
74
|
from a font source with a BMFont tool (`msdf-bmfont-xml` or the `bmfont` CLI) in
|
|
75
75
|
the same script:
|
|
76
76
|
|
|
@@ -86,7 +86,7 @@ Persist the chosen locale via SaveService and apply it on boot; default from
|
|
|
86
86
|
|
|
87
87
|
## BitmapText vs Text — the localization trade-off
|
|
88
88
|
|
|
89
|
-
The performance advice "use BitmapText for hot text" (
|
|
89
|
+
The performance advice "use BitmapText for hot text" (the official `game-object-components` skill)
|
|
90
90
|
collides with i18n: a bitmap font only contains the glyphs it was generated with.
|
|
91
91
|
|
|
92
92
|
- **BitmapText** — fastest, but the BMFont must include every glyph the locale
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-project-structure
|
|
3
|
-
description: This skill should be used when creating, restructuring, or reasoning about a Phaser 4 game project — the game config, the Vite + TypeScript layout, the Boot → Preloader → MainMenu → Game scene flow, scale/resolution setup for desktop and mobile, and where code and assets belong. Use it before scaffolding a project, adding a major subsystem, or deciding where a file should live. Pairs with
|
|
3
|
+
description: This skill should be used when creating, restructuring, or reasoning about a Phaser 4 game project — the game config, the Vite + TypeScript layout, the Boot → Preloader → MainMenu → Game scene flow, scale/resolution setup for desktop and mobile, and where code and assets belong. Use it before scaffolding a project, adding a major subsystem, or deciding where a file should live. Pairs with the official scenes skill, the official loading-assets skill, the official filters-and-postfx skill, and phaser-testing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Project Structure
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
This stack targets **Phaser 4** (v4.
|
|
10
|
+
This stack targets **Phaser 4** (v4.2+, npm package `phaser@^4.2.0`), built
|
|
11
11
|
with **Vite + TypeScript** — the layout the official `phaserjs/template-vite-ts`
|
|
12
12
|
template and `npm create @phaserjs/game@latest` scaffold. Phaser 4 ships its own
|
|
13
13
|
type definitions (`types/phaser.d.ts`); do not add `@types/phaser`.
|
|
@@ -55,17 +55,17 @@ v4-specific config facts:
|
|
|
55
55
|
- Pixel-art games: `pixelArt: true` (nearest-neighbor + roundPixels), or the new
|
|
56
56
|
**`render.smoothPixelArt: true`** (WebGL-only) for pixel art that rotates or
|
|
57
57
|
scales smoothly. Pick one per project and record the choice.
|
|
58
|
-
- Custom render nodes register under `render.renderNodes` — see
|
|
58
|
+
- Custom render nodes register under `render.renderNodes` — see the official `filters-and-postfx` skill.
|
|
59
59
|
- `Phaser.HEADLESS` exists for logic-only boots (tests) — see [[phaser-testing]].
|
|
60
60
|
|
|
61
61
|
## Scene flow
|
|
62
62
|
|
|
63
|
-
Four-stage boot, in order (see
|
|
63
|
+
Four-stage boot, in order (see the official `scenes` skill for lifecycle detail):
|
|
64
64
|
|
|
65
65
|
1. **Boot** — loads only the handful of assets the Preloader's loading screen
|
|
66
66
|
needs (logo, progress-bar art). No game assets here.
|
|
67
67
|
2. **Preloader** — renders the loading UI and loads everything else, preferably
|
|
68
|
-
via a single asset-pack manifest (see
|
|
68
|
+
via a single asset-pack manifest (see the official `loading-assets` skill), then starts MainMenu.
|
|
69
69
|
3. **MainMenu** — entry UI; starts Game.
|
|
70
70
|
4. **Game** (+ overlay scenes like `HUD`, `Pause` run in parallel) — gameplay.
|
|
71
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phaser-services
|
|
3
|
-
description: This skill should be used when wiring cross-cutting services and shared state in a Phaser 4 game — the typed registry wrapper for global state, a single dedicated EventsCenter bus (never game.events), the .on()/.off() listener discipline enforced in scene shutdown, SoundService (mobile audio unlock on first gesture), InputService (semantic actions instead of raw keys), and SaveService (versioned localStorage with a migration chain). Use it when adding global state, an event bus, audio/input/save plumbing, or fixing listener leaks and lost saves. Pairs with
|
|
3
|
+
description: This skill should be used when wiring cross-cutting services and shared state in a Phaser 4 game — the typed registry wrapper for global state, a single dedicated EventsCenter bus (never game.events), the .on()/.off() listener discipline enforced in scene shutdown, SoundService (mobile audio unlock on first gesture), InputService (semantic actions instead of raw keys), and SaveService (versioned localStorage with a migration chain). Use it when adding global state, an event bus, audio/input/save plumbing, or fixing listener leaks and lost saves. Pairs with the official scenes skill, phaser-testing, and phaser-i18n.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Phaser 4 Services and Shared State
|