@playcraft/cli 0.0.41 → 0.0.42

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.
Files changed (49) hide show
  1. package/dist/commands/tools-generation.js +2 -4
  2. package/dist/commands/tools-utils.js +19 -0
  3. package/dist/utils/version-checker.js +8 -11
  4. package/package.json +3 -3
  5. package/project-template/.claude/agents/designer.md +12 -8
  6. package/project-template/.claude/agents/developer.md +53 -62
  7. package/project-template/.claude/agents/refs/README.md +21 -15
  8. package/project-template/.claude/agents/refs/designer-deliverable-spec.md +24 -0
  9. package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
  10. package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
  11. package/project-template/.claude/agents/refs/pm-workflow-detail.md +6 -0
  12. package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +130 -0
  13. package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +4 -284
  14. package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +27 -6
  15. package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +433 -24
  16. package/project-template/.claude/agents/reviewer.md +62 -38
  17. package/project-template/.claude/agents/technical-artist.md +36 -25
  18. package/project-template/.claude/hooks/README.md +9 -1
  19. package/project-template/.claude/hooks/validate-workflow-stop.mjs +86 -1
  20. package/project-template/.claude/settings.json +4 -0
  21. package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +65 -15
  22. package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +26 -7
  23. package/project-template/.claude/skills/playcraft-workflow/SKILL.md +104 -15
  24. package/project-template/.claude/skills/playwright-cli/SKILL.md +390 -0
  25. package/project-template/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
  26. package/project-template/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
  27. package/project-template/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
  28. package/project-template/.claude/skills/playwright-cli/references/running-code.md +240 -0
  29. package/project-template/.claude/skills/playwright-cli/references/session-management.md +226 -0
  30. package/project-template/.claude/skills/playwright-cli/references/spec-driven-testing.md +312 -0
  31. package/project-template/.claude/skills/playwright-cli/references/storage-state.md +275 -0
  32. package/project-template/.claude/skills/playwright-cli/references/test-generation.md +138 -0
  33. package/project-template/.claude/skills/playwright-cli/references/tracing.md +142 -0
  34. package/project-template/.claude/skills/playwright-cli/references/video-recording.md +157 -0
  35. package/project-template/.cursor/rules/playcraft-orchestrator.mdc +74 -24
  36. package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +1 -1
  37. package/project-template/CLAUDE.md +99 -59
  38. package/project-template/docs/team/agent-conduct.md +42 -26
  39. package/project-template/docs/team/atom-plan-format.md +33 -2
  40. package/project-template/docs/team/collaboration.md +57 -48
  41. package/project-template/docs/team/workflow-changelog.md +28 -14
  42. package/project-template/docs/team/workflow-consistency-checklist.md +12 -0
  43. package/project-template/templates/atom-plan.template.md +35 -3
  44. package/project-template/templates/designer-log.template.md +16 -0
  45. package/project-template/templates/developer-log.template.md +95 -101
  46. package/project-template/templates/layout-spec.template.md +14 -0
  47. package/project-template/templates/project-state.template.md +51 -33
  48. package/project-template/templates/review-report.template.md +76 -151
  49. package/project-template/templates/ta-log.template.md +138 -0
@@ -1,211 +1,136 @@
1
- # Developer Integration Flow — Gameplay + Assets (L2)
1
+ # Developer Flow — ui_pass + gameplay_pass (L2)
2
2
 
3
- > **Trigger**: `docs/project-state.md` stage = `integration`. Agent context + STOP rules: [`../developer.md`](../developer.md).
4
- > **Prerequisites**: Production Pipeline Wave 1 (Designer Ph.2) + Wave 2 (TA) both `done`; TA Compliance green; contract paths have real files on disk.
3
+ > **Trigger**: `docs/project-state.md` stage = `ui_pass`, `ui_rework`, or `gameplay_pass`.
4
+ > Agent context + STOP rules: [`../developer.md`](../developer.md).
5
5
 
6
- > **Before implementation**, read [`developer-impl-cookbook.md`](./developer-impl-cookbook.md) for PGS patterns, `index.html` skeleton, CTA handler, and **atlas binding** (`atlasPath` + `frameId` + WebP + JSON sidecar). Dev ready gate: [`developer-dev-handoff.md`](./developer-dev-handoff.md).
6
+ ---
7
7
 
8
- ## Step 0: Upstream Intake (mandatory, before Spec Quick-Check)
8
+ # Part A: ui_pass (UI shell only)
9
9
 
10
- > **Purpose:** Know what happened before `integration` PM contracts, Designer visual lock, TA delivery so gameplay and UI match intent.
10
+ > **Goal:** Runnable UI matching MCscene switching, asset binding, simple states. **No core gameplay rules.**
11
11
 
12
- Read each file (Read tool or shell), then fill **`logs/developer-log.md` § Upstream Intake** before any `game/` edit or Spec Quick-Check.
12
+ ## Step 0: Upstream Intake (mandatory)
13
13
 
14
- ```bash
15
- cat docs/project-state.md
16
- cat docs/design-brief.md
17
- cat docs/layout-spec.md
18
- cat docs/atom-plan.json docs/atom-plan.md
19
- cat docs/style-exploration.md
20
- cat logs/designer-log.md
21
- cat logs/ta-log.md
22
- # Spot-check contract paths exist:
23
- ls assets/images/ assets/audio/ assets/bundles/ assets/models/ 2>/dev/null | head
24
- ```
14
+ Read each file; fill **`logs/developer-log.md` § Upstream Intake** before any `game/` edit.
25
15
 
26
- | Doc | You need from it (one line in developer-log) |
16
+ | Doc | You need from it |
27
17
  | ------------------- | -------------------------------------------------- |
28
- | `project-state` | Pipeline complete, `devBlockers`, dev fields |
29
- | `design-brief` | Gameplay type, flow, first-level success, Near-Win |
18
+ | `project-state` | Wave 2 done, stage `ui_pass`, dev fields |
19
+ | `design-brief` | Experience flow scene names (for navigation only) |
30
20
  | `layout-spec` | Zones, elementIds, assetMapping, atlasPath/frameId |
31
- | `atom-plan.json` | Developer atoms, `skillRef`, `dependsOn`(机器源) |
32
- | `atom-plan.md` | Acceptance criteria + Impl/Asset/TA Context |
33
- | `style-exploration` | MC + experience flow input for Step 2 mapping |
34
- | `designer-log` | Palette / motion / ASR coverage notes |
35
- | `ta-log` | Compliance status, atlas params |
36
-
37
- **MUST NOT** proceed to Step 1 until every row is ticked with a concrete takeaway.
38
-
39
- ---
21
+ | `atom-plan.json` | Developer atoms, skillRef, dependsOn |
22
+ | `atom-plan.md` | Acceptance + Impl Context |
23
+ | `style-exploration` | MC panelsprimary UI reference |
24
+ | `designer-log` | Palette / motion notes |
25
+ | `ta-log` | Compliance / atlas params |
40
26
 
41
- ## Step 1: Spec Quick-Check (30s, mandatory)
27
+ ## Step 1: Spec Quick-Check (30s)
42
28
 
43
- > Formerly Step 0a.
29
+ - Every referenced `elementId` exists in `assetMapping`
30
+ - Gaps → `spec-gap` in project-state → wait for PM
44
31
 
45
- Before any implementation, validate Layout Spec:
32
+ ## Step 2: Experience Flow → Code Mapping
46
33
 
47
- - Every GameplayAtom's referenced `elementId` exists in `assetMapping`
48
- - Every code-referenced path has a corresponding assetMapping entry
49
- - If gaps found → write `spec-gap` to `project-state.md`, wait for PM to supplement (≤ 5 min)
34
+ Write to `developer-log.md` map MC panels to scenes (Hook / Tutorial / EndCard / CTA). See template.
50
35
 
51
- ## Step 2: Experience Flow Visual Mapping (mandatory)
36
+ ## Step 3: Skill Preflight + Scaffold
52
37
 
53
- > Formerly Step 0c.
38
+ Per `atom-plan.json` Developer `skillRef` entries — read `.claude/skills/<skillRef>/` or CLI fallback; run `playcraft skills scaffold --out ./game` once.
54
39
 
55
- **Read `docs/style-exploration.md` Master Composite + experience flow design before any implementation.**
40
+ Fill **`§ Skill Preflight`** in developer-log.
56
41
 
57
- The Master Composite is five 9:16 panels in one image: **Panel 1 = concept panel** (Main Gameplay — full UI + all element types); **Panels 2–5 = storyboard** (Hook, Onboarding, End Card, CTA). TA extracts from concept panel / ASR state sheets; study each panel for per-stage visual intent.
42
+ ## Step 3b: UI Pass Plan (mandatory before `game/` edits)
58
43
 
59
- Write to `logs/developer-log.md` "Experience Flow Code Mapping":
44
+ Write **`logs/developer-log.md` § UI Pass Plan**:
60
45
 
61
- | Storyboard Frame | Scene/State | Code Location | Visual Intent |
62
- | ------------------------- | ---------------- | ------------------------- | ------------------------------------------------------- |
63
- | Hook (0-3s) | `scene.hook` | `game/scenes/hook.ts` | {{from storyboard: contrast, pace, first interaction}} |
64
- | Tutorial (3-10s) | `scene.tutorial` | `game/scenes/tutorial.ts` | {{from storyboard: low pressure, guaranteed success}} |
65
- | Gameplay+NearWin (10-25s) | `scene.gameplay` | `game/scenes/gameplay.ts` | {{from storyboard: core mechanic, near-win visual cue}} |
66
- | EndCard (25-30s) | `scene.endcard` | `game/scenes/endcard.ts` | {{from storyboard: CTA prominence, unresolved emotion}} |
46
+ 1. **Architecture** engine, entry, scene flow
47
+ 2. **Scene-Asset Binding Plan** verify every path with `ls`
48
+ 3. **Scene navigation** how Reviewer reaches each MC panel (URL param or button)
49
+ 4. **Risk Checklist** all `[x]`
67
50
 
68
- **Rules**:
51
+ **Forbidden in ui_pass:** PGS rules, scoring, elimination, win/lose, Near-Win logic.
69
52
 
70
- - Every scene file MUST have a top comment: `// Visual reference: Master Composite (frame: [position])`
71
- - If storyboard visuals conflict with layout-spec zones → storyboard takes precedence; ask PM in `intent-clarifications.md`
72
- - Visual Intent captures EMOTION and ATTENTION FLOW, not just mechanics
53
+ Hook validates § UI Pass Plan on STOP.
73
54
 
74
- ## Step 3: 读活 DAG + Skill Discovery + 统一 Scaffold(必须先做,只做一次)
55
+ ## Step 4: Implement UI shell
75
56
 
76
- > Formerly Step 0b.
57
+ - Bind **real** assets at contract paths (WebP atlas + JSON sidecar)
58
+ - Implement scenes + `index.html` skeleton (see [`developer-impl-cookbook.md`](./developer-impl-cookbook.md))
59
+ - Scene switching only — static/simple interactive states OK
60
+ - Text-as-image per `playcraft-text-rendering` skill
77
61
 
78
- **第一步:读取骨架与已有上下文**
62
+ ## Step 5: Dev self-check (ui_pass)
79
63
 
80
64
  ```bash
81
- cat docs/design-brief.md # gameplayType, engine, StyleDirection
82
- cat docs/atom-plan.json # atoms[] skillRef + dependsOn
83
- cat docs/atom-plan.md # Asset Skill Context + acceptance criteria
65
+ npm run dev
84
66
  ```
85
67
 
86
- **第二步:读取 PM 已标注的 skillRef 内容(必须)**
87
-
88
- > **Skill 获取优先级**(见 [`atom-plan-format.md`](../../../docs/team/atom-plan-format.md)):
89
- >
90
- > 1. **Project Skills**(PM 已执行 `playcraft skills link`):`.claude/skills/<skillRef>/SKILL.md` + `ref/`
91
- > 2. **兜底**:软链不存在或断链 → `playcraft skills read <skillRef>`(自动读 `playcraft.config.json` → `skillsDir`)
92
- > 3. `skillRef` 为空 → 独立 `playcraft skills match` 搜索
93
- > 4. 完全无匹配 → `playcraft-research` 后自行实现
68
+ - All MC-reachable scenes render with real assets
69
+ - No white screen; layout matches zones
70
+ - Record devUrl in developer-log
94
71
 
95
- `atoms[]` 中每个 `assignTo: Developer` 且 `skillRef` 非空的 atom,逐一读取 Recipe:
72
+ ## Step 6: ui_pass STOP
96
73
 
97
- ```bash
98
- # 优先:项目内软链(PM 应在 Gate #1 前已 link)
99
- test -f .claude/skills/memory_match.aigameplay/SKILL.md && echo "linked OK"
74
+ - `devStatus: ui_ready` (not `ready`)
75
+ - handoff: `Invoke @reviewer ui_diff`
76
+ - **Do not** set mainline `stage`
100
77
 
101
- # 读 Recipe(二选一,link 正常时用文件路径即可)
102
- cat .claude/skills/memory_match.aigameplay/SKILL.md
103
-
104
- # 仅当上面 test 失败时兜底:
105
- playcraft skills read memory_match.aigameplay
106
- ```
78
+ ---
107
79
 
108
- **访问 ref/ 文件**(同样优先 Project Skills):
80
+ # Part B: ui_rework
109
81
 
110
- ```bash
111
- cat .claude/skills/memory_match.aigameplay/ref/pgs-schema.json
82
+ 1. Read `logs/review-report.md` UI Diff section
83
+ 2. Fix only Action Items with `routeTo: Developer`
84
+ 3. Re-run `npm run dev` → `devStatus: ui_ready` → handoff `Invoke @reviewer ui_diff`
112
85
 
113
- # 兜底:playcraft skills read 输出的 skillDir,或 playcraft.config.json 中的 skillsDir
114
- # cat <skillsDir>/memory_match.aigameplay/ref/pgs-schema.json
115
- ```
86
+ If `routeTo: ta` or `designer` STOP; orchestrator invokes them first.
116
87
 
117
- 不读 SKILL.md 就 scaffold 或实现 = 丢弃 PM 的规则蓝图。Skill Preflight 须记录每个 `skillRef` 用的是 `linked` 还是 `cli-fallback`。
88
+ ---
118
89
 
119
- **STOP 门槛**:`logs/developer-log.md` **§ Skill Preflight** 必须已填(每个 `skillRef` 一行 + CLI 输出摘要)。未填则不得编辑 `game/**`,不得将 atom 标为 `done`,handoff 不得写 Ph.1 完成。
90
+ # Part C: gameplay_pass (core gameplay)
120
91
 
121
- **第三步:补充搜索你域内的 Skills**
92
+ > **Prerequisites:** `uiReviewStatus: passed` (or max ui rework rounds). **Do not rewrite UI layout.**
122
93
 
123
- ```bash
124
- # 按引擎 + 玩法类型搜索(可发现 PM 未找到的组件层 Skill)
125
- playcraft skills match --engine <engine> --intent "<gameplayType>,rules,algorithm" --json
126
- # 搜索代码组件层
127
- playcraft skills match --engine <engine> --intent "<layout>,<ui_components>,<state>" --json
128
- # 列出配置封包
129
- playcraft skills list --category config --json
130
- ```
94
+ ## Step 0: Read UI baseline
131
95
 
132
- **第四步:富集 `## Impl Skill Context`(写入 atom-plan.md)**
96
+ - Confirm `devStatus` was `ui_ready` / UI diff passed
97
+ - Read existing `game/` scenes — extend, do not replace layout
133
98
 
134
- ```markdown
135
- ### {{atom_id}} — {{slot_name}}
99
+ ## Step 1: Gameplay Pass Plan (mandatory)
136
100
 
137
- - 实现方案:(简述,基于 SKILL.md Recipe)
138
- - 匹配 Skills:`memory_match.aigameplay` — 提供 PGS 规则 schema + reducer 接口约束
139
- - ref 文件:ref/pgs-schema.json(规则骨架)、ref/reducer.template.ts(接口模板)
140
- - Scaffold 路径:game/gameplay/reducer.ts
141
- - 实现决策:与 Skill 模板的差异点(如网格从 4×4 改为 4×3)
142
- ```
101
+ Write **`logs/developer-log.md` § Gameplay Pass Plan**:
143
102
 
144
- **第五步:统一 Scaffold(一次性执行,不拆分)**
103
+ 1. **PGS Strategy** — rules from design-brief + Skill recipe
104
+ 2. **First level guarantee** — how tutorial/config ensures win
105
+ 3. **State machine** — Hook → Tutorial → Gameplay → EndCard transitions with logic
106
+ 4. **Risk Checklist** — all `[x]`
145
107
 
146
- ```bash
147
- playcraft skills scaffold \
148
- --engine <engine> \
149
- --atoms <skillRef1>,<skillRef2>,<skillRef3> \
150
- --out ./game
151
- ```
108
+ Hook validates § Gameplay Pass Plan on STOP.
152
109
 
153
- 注:scaffold 对标注了 `merge-json` 的文件(package.json / tsconfig.json)会自动合并而非覆盖。
110
+ ## Step 2: Implement GameplayAtom + ConfigAtom
154
111
 
155
- 若某 Atom 本地无结果:参阅 `playcraft-research` SKILL 执行定向网络研究 → 写入 Impl Skill Context → 标注"候选新 Skill" → 基于研究方案实现。
112
+ - Write testCases FIRST
113
+ - Core rules, scoring, Near-Win, CTA handler
114
+ - First level MUST guarantee player success
156
115
 
157
- ## Step 4: Validate Prerequisites
116
+ ## Step 3: Dev self-check (gameplay_pass)
158
117
 
159
118
  ```bash
160
- ls docs/project-state.md docs/design-brief.md docs/layout-spec.md docs/atom-plan.md
161
- ```
162
-
163
- Verify: stage is `integration`, Production Pipeline Wave 2 = `done`, you have atoms with `assignTo: Developer`, Layout Spec has element IDs / grid size / zones.
164
-
165
- **Use real assets on disk** at Asset Contract paths from `assetMapping` (TA Wave 2 must have completed):
166
-
167
- ```
168
- Layout Spec assetMapping:
169
- { elementId: "strawberry", visualAsset: "assets/images/tiles/strawberry_atlas.webp", frameId: "strawberry_01" }
170
-
171
- Your code:
172
- loadAtlas('assets/images/tiles/strawberry_atlas.webp', 'assets/images/tiles/strawberry_atlas.json', 'strawberry_01')
173
-
174
- If file missing → devStatus: blocked_upstream, routeTo TA (do not placeholder)
119
+ npm run dev
175
120
  ```
176
121
 
177
- ## Step 5: Implement GameplayAtom + ConfigAtom
178
-
179
- - **GameplayAtom**: entities from `colorPalette.tileColors[].id`, rules from design-brief flow, write testCases FIRST
180
- - **ConfigAtom**: number of levels, difficulty progression, score targets — **first level MUST guarantee player success**
181
-
182
- ## Text-as-Image Rendering
183
-
184
- **All visible text in the game is image assets — no font files, no CSS text.** Static text is loaded as images from `layout-spec.md` `textAssets` paths. Dynamic numbers use a Digit Sprite Strip with runtime frame-cutting.
122
+ - Gameplay loop works; CTA fires; audio loads
123
+ - Record devUrl
185
124
 
186
- > **Invoke the `playcraft-text-rendering` skill** for the full spec, rendering code templates (Canvas 2D + PlayCanvas), alignment helpers, and per-role responsibilities.
125
+ ## Step 4: gameplay_pass STOP
187
126
 
188
- ## Step 6: Write index.html Skeleton
127
+ - `devStatus: ready`
128
+ - handoff: `Invoke @reviewer load_check`
129
+ - **Do not** set Gate #3 or `stage: done`
189
130
 
190
- > **Read [`developer-impl-cookbook.md`](./developer-impl-cookbook.md)** for the complete skeleton with multi-platform CTA handler.
191
-
192
- Key requirements: viewport meta with `user-scalable=no`, CTA handler with mraid/FbPlayableAd/ExitApi fallbacks, all CSS/JS inline.
193
-
194
- ## Step 7: Early Dev smoke (recommended)
195
-
196
- After scaffold + core scenes exist:
197
-
198
- ```bash
199
- cat package.json # confirm scripts.dev exists
200
- npm run dev
201
- ```
202
-
203
- Fix fatal errors early. Record devUrl in `developer-log.md` when useful.
204
-
205
- ## Step 8: Integration completion
131
+ ---
206
132
 
207
- > **Exit criteria**: see [`../developer.md`](../developer.md) → **Goals** → `integration` row.
133
+ ## Shared references
208
134
 
209
- 1. All GameplayAtom + ConfigAtom marked `done` in `atom-plan.json` `atoms[]`
210
- 2. `developer-log.md` includes Experience Flow → Code Mapping + **UI/gameplay self-check notes**
211
- 3. Complete [`developer-dev-handoff.md`](./developer-dev-handoff.md) → `devStatus: ready` + devUrl → handoff `Invoke @reviewer` — **do not** set `stage: review` yourself.
135
+ - PGS patterns, CTA, atlas binding: [`developer-impl-cookbook.md`](./developer-impl-cookbook.md)
136
+ - Dev ready gate details: [`developer-dev-handoff.md`](./developer-dev-handoff.md)
@@ -143,6 +143,8 @@ Design the shared contract between Designer, TA, and Developer:
143
143
 
144
144
  **Critical**: `assetMapping` paths are **locked after Gate #1**. No agent may unilaterally change paths — this is the Asset Contract: TA fills paths in production Wave 2; Developer binds **real files** in `integration` after TA Compliance green.
145
145
 
146
+ **Transparency**: TA auto-derives transparency requirements from `assetMapping` path conventions (`bg/` = opaque, `ui/`/`vfx/`/`txt/` = needs alpha, `tiles/` = needs alpha unless card faces). PM does NOT need to define transparency fields — chroma key selection and background removal are TA's technical domain. See `ta-pipeline-cookbook.md` Step 0e.
147
+
146
148
  ---
147
149
 
148
150
  ## Atlas grouping at Gate #1
@@ -403,6 +405,10 @@ Scheduling:
403
405
  - [ ] Every group with **≥ 2** raster elements names **one** `.webp` + **one** `.json` path in `assetMapping`
404
406
  - [ ] Audio entries specify **`.mp3`** paths where applicable
405
407
 
408
+ **Transparency (no PM action needed)**:
409
+
410
+ - [ ] `assetMapping` paths follow directory conventions (`bg/` for backgrounds, `ui/` for overlays, `vfx/` for effects, `txt/` for text images, `tiles/` for game elements) — TA derives transparency requirements from these paths automatically
411
+
406
412
  ---
407
413
 
408
414
  ## Design North Star
@@ -0,0 +1,130 @@
1
+ # Reviewer: Convergence Evaluation (design_check / ui_diff / load_check)
2
+
3
+ > **Read before executing any Reviewer mode.** Replaces six-dimension final review in `convergence-v1`.
4
+ > Invoked from `agents/reviewer.md` — orchestrator specifies mode per invoke.
5
+
6
+ ---
7
+
8
+ ## Mode: design_check
9
+
10
+ Soft checklist only — **do not judge subjective design quality**.
11
+
12
+ ### Gate #1 checklist (PM four docs)
13
+
14
+ ```
15
+ [ ] design-brief exists; Style Direction has Dimension / Modality / Arc
16
+ [ ] layout-spec exists; assetMapping non-empty
17
+ [ ] atom-plan.json exists; skillsMatch non-empty
18
+ [ ] every atom has assignTo + dependsOn
19
+ [ ] no obvious cross-doc contradictions (assetMapping paths align with atoms)
20
+ ```
21
+
22
+ **Fail →** list missing items + `routeTo: pm` (or `designer` if visual doc gap).
23
+
24
+ ### Gate #2b additional checklist
25
+
26
+ ```
27
+ [ ] MC five panels complete (concept + 4 storyboard)
28
+ [ ] MC aspect ratio correct — verify with: playcraft image info <mc-path>
29
+ [ ] ASR dual sheets (UI + element) exist under assets/images/reference/
30
+ [ ] ASR covers main assetMapping element ids
31
+ ```
32
+
33
+ **Pass →** handoff `Run Gate #1` or `Run Gate #2b`. **Fail →** routeTo PM/Designer with specific gaps.
34
+
35
+ ---
36
+
37
+ ## Mode: ui_diff
38
+
39
+ > **Read `playwright-cli` skill first.** Save all screenshots under `logs/`.
40
+
41
+ ### Procedure
42
+
43
+ 1. Read MC panel paths from `style-exploration.md` / `assets/images/reference/`.
44
+ 2. `npm run dev` if devUrl down; read devUrl from `project-state.md`.
45
+ 3. For each scene Developer exposed (URL param or UI button):
46
+
47
+ ```bash
48
+ playwright-cli open <devUrl>[?scene=hook|tutorial|endcard|cta]
49
+ playwright-cli resize 390 844
50
+ playwright-cli screenshot --filename=logs/ui-diff-<scene>.png
51
+ ```
52
+
53
+ 4. Compare each screenshot vs corresponding MC panel:
54
+
55
+ | Scene | MC panel | Check |
56
+ | ---------- | --------------- | --------------------------------------- |
57
+ | Initial | Panel 1 Concept | Layout, hierarchy, element completeness |
58
+ | Hook | Panel 2 | Color mood, hook composition |
59
+ | Onboarding | Panel 3 | Tutorial UI, low-pressure layout |
60
+ | EndCard | Panel 4 | CTA zone, unresolved emotion |
61
+ | CTA | Panel 5 | Button prominence, accent color |
62
+
63
+ 5. `playwright-cli console` — log errors (informational for ui_diff; critical only if UI broken).
64
+ 6. `playwright-cli close`.
65
+
66
+ ### UI Diff Report (write to review-report.md)
67
+
68
+ For each difference:
69
+
70
+ - Screenshot path + MC reference path
71
+ - Description + severity (`critical` / `major` / `minor`)
72
+ - `routeTo: developer | ta | designer`
73
+ - Fix suggestion
74
+
75
+ **Pass:** no critical/major diffs (minor logged, do not block).
76
+ **Fail:** `uiReworkRound` +1; handoff orchestrator to `ui_rework`.
77
+
78
+ ### Routing guide
79
+
80
+ | Issue type | routeTo |
81
+ | ---------------------------------- | --------- |
82
+ | Layout, code binding, scene switch | developer |
83
+ | Wrong asset color/size/style | ta |
84
+ | Ambiguous design intent | designer |
85
+
86
+ ---
87
+
88
+ ## Mode: load_check
89
+
90
+ Minimal pre-Gate #3 sanity check — **not gameplay QA**.
91
+
92
+ ### Procedure
93
+
94
+ 1. `npm run dev` if needed; `playwright-cli open <devUrl>`.
95
+ 2. Wait for load (≤10s); confirm not white screen.
96
+ 3. `playwright-cli console` — fail if any **Error**-level log.
97
+ 4. `playwright-cli screenshot --filename=logs/load-check.png`.
98
+ 5. `playwright-cli close`.
99
+
100
+ ### Checklist
101
+
102
+ ```
103
+ [ ] Page loads within 10s (not white screen)
104
+ [ ] Console has no Error-level messages
105
+ [ ] game/index.html reachable
106
+ ```
107
+
108
+ **Pass →** `loadCheck: passed`, handoff `Run Gate #3 with devUrl`.
109
+ **Fail →** routeTo Developer with console error summary.
110
+
111
+ ---
112
+
113
+ ## Severity (ui_diff only)
114
+
115
+ | Severity | Meaning | Blocks pass? |
116
+ | -------- | --------------------------- | ------------ |
117
+ | critical | UI broken / missing | Yes |
118
+ | major | Clear visual mismatch vs MC | Yes |
119
+ | minor | Polish / slight drift | No (log) |
120
+
121
+ ---
122
+
123
+ ## project-state fields (Reviewer writes)
124
+
125
+ | Field | Mode | Values |
126
+ | ---------------- | ------------ | ------------------------- |
127
+ | `uiReviewStatus` | ui_diff | pending / passed / failed |
128
+ | `uiReworkRound` | ui_diff fail | 0–5 |
129
+ | `loadCheck` | load_check | pending / passed / failed |
130
+ | `loadCheckNotes` | load_check | console + load summary |