@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.
- package/dist/commands/tools-generation.js +2 -4
- package/dist/commands/tools-utils.js +19 -0
- package/dist/utils/version-checker.js +8 -11
- package/package.json +3 -3
- package/project-template/.claude/agents/designer.md +12 -8
- package/project-template/.claude/agents/developer.md +53 -62
- package/project-template/.claude/agents/refs/README.md +21 -15
- package/project-template/.claude/agents/refs/designer-deliverable-spec.md +24 -0
- package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +6 -0
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +130 -0
- package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +4 -284
- package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +27 -6
- package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +433 -24
- package/project-template/.claude/agents/reviewer.md +62 -38
- package/project-template/.claude/agents/technical-artist.md +36 -25
- package/project-template/.claude/hooks/README.md +9 -1
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +86 -1
- package/project-template/.claude/settings.json +4 -0
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +65 -15
- package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +26 -7
- package/project-template/.claude/skills/playcraft-workflow/SKILL.md +104 -15
- package/project-template/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-template/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-template/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-template/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-template/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-template/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-template/.claude/skills/playwright-cli/references/spec-driven-testing.md +312 -0
- package/project-template/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-template/.claude/skills/playwright-cli/references/test-generation.md +138 -0
- package/project-template/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-template/.claude/skills/playwright-cli/references/video-recording.md +157 -0
- package/project-template/.cursor/rules/playcraft-orchestrator.mdc +74 -24
- package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +1 -1
- package/project-template/CLAUDE.md +99 -59
- package/project-template/docs/team/agent-conduct.md +42 -26
- package/project-template/docs/team/atom-plan-format.md +33 -2
- package/project-template/docs/team/collaboration.md +57 -48
- package/project-template/docs/team/workflow-changelog.md +28 -14
- package/project-template/docs/team/workflow-consistency-checklist.md +12 -0
- package/project-template/templates/atom-plan.template.md +35 -3
- package/project-template/templates/designer-log.template.md +16 -0
- package/project-template/templates/developer-log.template.md +95 -101
- package/project-template/templates/layout-spec.template.md +14 -0
- package/project-template/templates/project-state.template.md +51 -33
- package/project-template/templates/review-report.template.md +76 -151
- package/project-template/templates/ta-log.template.md +138 -0
|
@@ -1,211 +1,136 @@
|
|
|
1
|
-
# Developer
|
|
1
|
+
# Developer Flow — ui_pass + gameplay_pass (L2)
|
|
2
2
|
|
|
3
|
-
> **Trigger**: `docs/project-state.md` stage = `
|
|
4
|
-
>
|
|
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
|
-
|
|
6
|
+
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
# Part A: ui_pass (UI shell only)
|
|
9
9
|
|
|
10
|
-
> **
|
|
10
|
+
> **Goal:** Runnable UI matching MC — scene switching, asset binding, simple states. **No core gameplay rules.**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Step 0: Upstream Intake (mandatory)
|
|
13
13
|
|
|
14
|
-
|
|
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
|
|
16
|
+
| Doc | You need from it |
|
|
27
17
|
| ------------------- | -------------------------------------------------- |
|
|
28
|
-
| `project-state` |
|
|
29
|
-
| `design-brief` |
|
|
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,
|
|
32
|
-
| `atom-plan.md` | Acceptance
|
|
33
|
-
| `style-exploration` | MC
|
|
34
|
-
| `designer-log` | Palette / motion
|
|
35
|
-
| `ta-log` | Compliance
|
|
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 panels — primary UI reference |
|
|
24
|
+
| `designer-log` | Palette / motion notes |
|
|
25
|
+
| `ta-log` | Compliance / atlas params |
|
|
40
26
|
|
|
41
|
-
## Step 1: Spec Quick-Check (30s
|
|
27
|
+
## Step 1: Spec Quick-Check (30s)
|
|
42
28
|
|
|
43
|
-
|
|
29
|
+
- Every referenced `elementId` exists in `assetMapping`
|
|
30
|
+
- Gaps → `spec-gap` in project-state → wait for PM
|
|
44
31
|
|
|
45
|
-
|
|
32
|
+
## Step 2: Experience Flow → Code Mapping
|
|
46
33
|
|
|
47
|
-
-
|
|
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
|
|
36
|
+
## Step 3: Skill Preflight + Scaffold
|
|
52
37
|
|
|
53
|
-
|
|
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
|
-
|
|
40
|
+
Fill **`§ Skill Preflight`** in developer-log.
|
|
56
41
|
|
|
57
|
-
|
|
42
|
+
## Step 3b: UI Pass Plan (mandatory before `game/` edits)
|
|
58
43
|
|
|
59
|
-
Write
|
|
44
|
+
Write **`logs/developer-log.md` § UI Pass Plan**:
|
|
60
45
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
**
|
|
51
|
+
**Forbidden in ui_pass:** PGS rules, scoring, elimination, win/lose, Near-Win logic.
|
|
69
52
|
|
|
70
|
-
|
|
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
|
|
55
|
+
## Step 4: Implement UI shell
|
|
75
56
|
|
|
76
|
-
|
|
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
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
72
|
+
## Step 6: ui_pass STOP
|
|
96
73
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
74
|
+
- `devStatus: ui_ready` (not `ready`)
|
|
75
|
+
- handoff: `Invoke @reviewer ui_diff`
|
|
76
|
+
- **Do not** set mainline `stage`
|
|
100
77
|
|
|
101
|
-
|
|
102
|
-
cat .claude/skills/memory_match.aigameplay/SKILL.md
|
|
103
|
-
|
|
104
|
-
# 仅当上面 test 失败时兜底:
|
|
105
|
-
playcraft skills read memory_match.aigameplay
|
|
106
|
-
```
|
|
78
|
+
---
|
|
107
79
|
|
|
108
|
-
|
|
80
|
+
# Part B: ui_rework
|
|
109
81
|
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
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
|
-
|
|
88
|
+
---
|
|
118
89
|
|
|
119
|
-
|
|
90
|
+
# Part C: gameplay_pass (core gameplay)
|
|
120
91
|
|
|
121
|
-
|
|
92
|
+
> **Prerequisites:** `uiReviewStatus: passed` (or max ui rework rounds). **Do not rewrite UI layout.**
|
|
122
93
|
|
|
123
|
-
|
|
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
|
-
|
|
96
|
+
- Confirm `devStatus` was `ui_ready` / UI diff passed
|
|
97
|
+
- Read existing `game/` scenes — extend, do not replace layout
|
|
133
98
|
|
|
134
|
-
|
|
135
|
-
### {{atom_id}} — {{slot_name}}
|
|
99
|
+
## Step 1: Gameplay Pass Plan (mandatory)
|
|
136
100
|
|
|
137
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
110
|
+
## Step 2: Implement GameplayAtom + ConfigAtom
|
|
154
111
|
|
|
155
|
-
|
|
112
|
+
- Write testCases FIRST
|
|
113
|
+
- Core rules, scoring, Near-Win, CTA handler
|
|
114
|
+
- First level MUST guarantee player success
|
|
156
115
|
|
|
157
|
-
## Step
|
|
116
|
+
## Step 3: Dev self-check (gameplay_pass)
|
|
158
117
|
|
|
159
118
|
```bash
|
|
160
|
-
|
|
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
|
-
|
|
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
|
-
|
|
125
|
+
## Step 4: gameplay_pass STOP
|
|
187
126
|
|
|
188
|
-
|
|
127
|
+
- `devStatus: ready`
|
|
128
|
+
- handoff: `Invoke @reviewer load_check`
|
|
129
|
+
- **Do not** set Gate #3 or `stage: done`
|
|
189
130
|
|
|
190
|
-
|
|
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
|
-
|
|
133
|
+
## Shared references
|
|
208
134
|
|
|
209
|
-
|
|
210
|
-
|
|
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 |
|