@playcraft/cli 0.0.41 → 0.0.43
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/atom-plan/validate-asr-coverage.js +317 -0
- package/dist/commands/prad.js +61 -0
- package/dist/commands/remix.js +4 -2
- package/dist/commands/skills.js +24 -0
- package/dist/commands/tools-generation.js +2 -4
- package/dist/commands/tools-utils.js +19 -0
- package/dist/prad/atom-ref.js +23 -0
- package/dist/prad/check.js +377 -0
- package/dist/prad/check.test.js +27 -0
- package/dist/prad/explain.js +109 -0
- package/dist/prad/load-spec.js +23 -0
- package/dist/prad/paths.js +83 -0
- package/dist/prad/skills-index.js +60 -0
- package/dist/utils/version-checker.js +8 -11
- package/package.json +3 -3
- package/project-template/.claude/agents/designer.md +34 -26
- package/project-template/.claude/agents/developer.md +55 -62
- package/project-template/.claude/agents/pm.md +3 -1
- package/project-template/.claude/agents/refs/README.md +21 -15
- package/project-template/.claude/agents/refs/designer-deliverable-spec.md +70 -7
- package/project-template/.claude/agents/refs/designer-handoff-v2-checklist.md +21 -13
- package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
- package/project-template/.claude/agents/refs/designer-style-exploration-flow.md +39 -9
- package/project-template/.claude/agents/refs/developer-dev-handoff.md +1 -1
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +24 -2
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +142 -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 +474 -29
- package/project-template/.claude/agents/reviewer.md +65 -38
- package/project-template/.claude/agents/technical-artist.md +38 -25
- package/project-template/.claude/hooks/README.md +40 -4
- package/project-template/.claude/hooks/asr-coverage-validate.mjs +381 -0
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +196 -5
- package/project-template/.claude/settings.json +4 -0
- package/project-template/.claude/skills/playcraft-asset-state-sheet/SKILL.md +76 -22
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +84 -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/agent-runtime-matrix.md +71 -39
- package/project-template/docs/team/atom-plan-format.md +101 -2
- package/project-template/docs/team/collaboration.md +57 -48
- package/project-template/docs/team/core-model.md +20 -19
- package/project-template/docs/team/workflow-changelog.md +28 -14
- package/project-template/docs/team/workflow-consistency-checklist.md +64 -0
- package/project-template/templates/atom-plan.template.json +18 -0
- package/project-template/templates/atom-plan.template.md +35 -3
- package/project-template/templates/designer-log.template.md +94 -5
- package/project-template/templates/developer-log.template.md +95 -101
- package/project-template/templates/layout-spec.template.md +62 -8
- 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 +180 -14
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
- [ ] `selectedMcOption` set (Gate #2a passed)
|
|
9
9
|
- [ ] MC path: `assets/images/storyboard/master_composite_option_[X].png`
|
|
10
10
|
- [ ] ASR paths exist and pass zero-overlap visual check
|
|
11
|
+
- [ ] ASR cells: isolated elements, no white box / scene inside cells (whole sheet opaque is OK)
|
|
12
|
+
- [ ] § **Image Production Preflight** filled (Phase 1 — three Skills read)
|
|
11
13
|
|
|
12
|
-
## 1. ASR Coverage Matrix (100%)
|
|
14
|
+
## 1. ASR Coverage Matrix (100% rows)
|
|
13
15
|
|
|
14
16
|
In `logs/designer-log.md` § ASR Coverage Matrix:
|
|
15
17
|
|
|
16
|
-
1. List every `elementId` from `layout-spec.md` § Asset Mapping (
|
|
18
|
+
1. List every `elementId` from `layout-spec.md` § Asset Mapping (atlas `frameId` groups = one row per logical element).
|
|
17
19
|
2. List every static text `id` from § Text Assets → Static Text.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
+
3. **Row count** must equal assetMapping + static text id count (verify before STOP).
|
|
21
|
+
4. For each row, set **CoverageLayer** = `on-asr` | `mc-crop` | `ta-extends`.
|
|
22
|
+
5. For each row: `ASR sheet` = `ui` | `element` | `element_2` | `MC-crop` | `ICP-pending`.
|
|
23
|
+
6. `TA extends?` = `no` only when on-asr shows final representative state; else `yes`.
|
|
24
|
+
7. **Sheet grid metadata** table filled with real numbers (not `{{placeholder}}`).
|
|
20
25
|
|
|
21
|
-
**
|
|
26
|
+
**Type representative rule**: each distinct **elementType** (Matrix column or `layout-spec` § Element Type Registry) must have at least one row with CoverageLayer `on-asr` or `mc-crop`.
|
|
27
|
+
|
|
28
|
+
**Stop rule**: any contract row missing → do not set `#2b` pending.
|
|
22
29
|
|
|
23
30
|
## 2. Palette Locked
|
|
24
31
|
|
|
@@ -50,9 +57,9 @@ In `docs/style-exploration.md` under confirmed option:
|
|
|
50
57
|
```
|
|
51
58
|
For each atom-plan row where assignTo = Designer:
|
|
52
59
|
├─ VisualAtom + covered in Coverage Matrix?
|
|
53
|
-
│ └─ yes → status=done, actualOutput=ASR:...
|
|
60
|
+
│ └─ yes → status=done, actualOutput=ASR:... (on-asr rows → asrSlot in atom-plan.json)
|
|
54
61
|
├─ AudioAtom?
|
|
55
|
-
│ └─ deliver MP3 at path → done
|
|
62
|
+
│ └─ deliver MP3 at path → done (Phase 2 only)
|
|
56
63
|
├─ Gap / TA extract failed (ICP)?
|
|
57
64
|
│ └─ generate one PNG → done with path, or blocked until answered
|
|
58
65
|
└─ Never: done with only "will extract later"
|
|
@@ -60,9 +67,10 @@ For each atom-plan row where assignTo = Designer:
|
|
|
60
67
|
|
|
61
68
|
## 5. Files to verify before STOP
|
|
62
69
|
|
|
63
|
-
| File
|
|
64
|
-
|
|
|
65
|
-
| `docs/style-exploration.md`
|
|
66
|
-
| `logs/designer-log.md`
|
|
67
|
-
| `assets/images/reference/ui_state_sheet_[X].png`
|
|
68
|
-
| `assets/images/reference/element_state_sheet_[X].png`
|
|
70
|
+
| File | Contains |
|
|
71
|
+
| ------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
72
|
+
| `docs/style-exploration.md` | MC paths, Motion Notes, Experience Flow |
|
|
73
|
+
| `logs/designer-log.md` | Image Production Preflight, Coverage Matrix, Palette Locked, Style Intent |
|
|
74
|
+
| `assets/images/reference/ui_state_sheet_[X].png` | exists |
|
|
75
|
+
| `assets/images/reference/element_state_sheet_[X].png` | exists |
|
|
76
|
+
| `assets/images/reference/element_state_sheet_[X]_2.png` | if types > 12 / overflow |
|
|
@@ -2,35 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
> 本文件供 Designer 在生成 Master Composite 时按需查阅。核心规则见 `playcraft-storyboard` skill。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 模型策略(MC 专用 — 仅高质量模型)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Master Composite **禁止**使用低档或实验性模型。生成前可运行 `playcraft tools list-image-models` 核对 capability,但 **MC 只允许下表**:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### 推荐分配策略
|
|
9
|
+
| 允许 `--image-model` | 典型分配 |
|
|
10
|
+
| ------------------------------ | ----------------------------------------------- |
|
|
11
|
+
| **`mulerouter/gpt-image-2`** | Option A(主推);Option C 可复用 + 不同 prompt |
|
|
12
|
+
| **`mulerouter/nano-banana-2`** | Option B;或 A/B 各用一模型做画风对比 |
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
| ---------------------- | --------------------------------------------------- | ---------------------------------- |
|
|
17
|
-
| Option A(最精细方案) | `gpt-image-2` | 最高质量,细节最丰富,适合主推方案 |
|
|
18
|
-
| Option B(风格化方案) | `gemini-3.1-flash-image-preview` 或 `hy-image-v3.0` | 风格更鲜明、艺术感更强 |
|
|
19
|
-
| Option C(探索方案) | `flux-kontext-pro` 或 `nano-banana-2` | 不同画风,提供对比参考 |
|
|
14
|
+
**禁止用于 MC**:`gemini-*`、`flux-*`、`hy-image-*`、`wan*`、`qwen*`、裸 `gpt-image-2`、以及上表以外的任何模型。
|
|
20
15
|
|
|
21
|
-
>
|
|
16
|
+
> 多方案差异应来自 **prompt / 配色 / 构图**,不是换弱模型。ASR 双板 `--image-model` 须与已选 MC **完全一致**(见 `playcraft-asset-state-sheet` skill)。
|
|
22
17
|
|
|
23
|
-
###
|
|
18
|
+
### 模型特性速查(仅白名单内)
|
|
24
19
|
|
|
25
|
-
| 模型
|
|
26
|
-
|
|
|
27
|
-
| `gpt-image-2`
|
|
28
|
-
| `
|
|
29
|
-
| `hy-image-v3.0` | 亚洲审美偏向、角色设计好 | IP 风格、Q 版角色 |
|
|
30
|
-
| `flux-kontext-pro` | 艺术感强、风格独特 | 手绘风、艺术插画 |
|
|
31
|
-
| `nano-banana-2` | 快速、适合探索 | 简洁图形、平面设计风 |
|
|
20
|
+
| 模型 | 特点 | 适合 |
|
|
21
|
+
| -------------------------- | ----------------------------- | ----------------------------------- |
|
|
22
|
+
| `mulerouter/gpt-image-2` | 细节、光影、复杂 UI、中文元素 | 写实、半写实、精细卡通、麻将/汉字类 |
|
|
23
|
+
| `mulerouter/nano-banana-2` | 色彩、构图、速度快 | 明亮卡通、简洁 UI、快速迭代第二方案 |
|
|
32
24
|
|
|
33
|
-
> `--reference-image` 只能用于 CAPABILITY 为 `text+image` 或 `image→image`
|
|
25
|
+
> `--reference-image` 只能用于 CAPABILITY 为 `text+image` 或 `image→image` 的模型;白名单内两模型均支持图生图。
|
|
34
26
|
|
|
35
27
|
---
|
|
36
28
|
|
|
@@ -56,7 +48,7 @@ Panel 5 '5. CTA Always Visible': Mid-game screenshot showing normal gameplay in
|
|
|
56
48
|
|
|
57
49
|
[STYLE_KEYWORDS]. All 5 panels are portrait-oriented mobile screenshots arranged left-to-right. Every panel has complete game UI (HUD bar, score display, buttons). Consistent art style across all panels. Thin vertical dividers between panels. Each panel has its numbered label at the top." \
|
|
58
50
|
--output assets/images/storyboard/master_composite_option_A.png \
|
|
59
|
-
--image-model
|
|
51
|
+
--image-model mulerouter/gpt-image-2 \
|
|
60
52
|
--image-size 4K
|
|
61
53
|
```
|
|
62
54
|
|
|
@@ -80,7 +72,7 @@ Panel 5 '5. CTA Always Visible': Mid-game screenshot with character dodging obst
|
|
|
80
72
|
|
|
81
73
|
[STYLE_KEYWORDS]. All 5 panels are portrait-oriented mobile screenshots arranged left-to-right. Every panel has complete game UI. Consistent art style across all panels. Thin vertical dividers. Numbered labels at top." \
|
|
82
74
|
--output assets/images/storyboard/master_composite_option_A.png \
|
|
83
|
-
--image-model
|
|
75
|
+
--image-model mulerouter/gpt-image-2 \
|
|
84
76
|
--image-size 4K
|
|
85
77
|
```
|
|
86
78
|
|
|
@@ -104,7 +96,7 @@ Panel 5 '5. CTA Always Visible': Mid-game screenshot showing active gameplay wit
|
|
|
104
96
|
|
|
105
97
|
Premium casual style, warm amber lighting, traditional Chinese aesthetic with modern UI, glossy tile surfaces. All 5 panels portrait-oriented, left-to-right. Every panel has complete game UI. Consistent art style. Thin vertical dividers. Numbered labels." \
|
|
106
98
|
--output assets/images/storyboard/master_composite_option_A.png \
|
|
107
|
-
--image-model
|
|
99
|
+
--image-model mulerouter/gpt-image-2 \
|
|
108
100
|
--image-size 4K
|
|
109
101
|
```
|
|
110
102
|
|
|
@@ -128,7 +120,7 @@ Panel 5 '5. CTA Always Visible': Mid-game screenshot with active combat, 'Play N
|
|
|
128
120
|
|
|
129
121
|
[STYLE_KEYWORDS]. All 5 panels portrait-oriented left-to-right. Every panel has complete game UI. Consistent art style. Thin vertical dividers. Numbered labels at top." \
|
|
130
122
|
--output assets/images/storyboard/master_composite_option_A.png \
|
|
131
|
-
--image-model
|
|
123
|
+
--image-model mulerouter/gpt-image-2 \
|
|
132
124
|
--image-size 4K
|
|
133
125
|
```
|
|
134
126
|
|
|
@@ -184,7 +176,7 @@ Master Composite 是 Phase 1 的**第一张生成图**,通常无前序图可
|
|
|
184
176
|
playcraft tools generate-image \
|
|
185
177
|
--prompt "<5-panel prompt>" \
|
|
186
178
|
--output assets/images/storyboard/master_composite_option_A.png \
|
|
187
|
-
--image-model gpt-image-2 \
|
|
179
|
+
--image-model mulerouter/gpt-image-2 \
|
|
188
180
|
--image-size 4K
|
|
189
181
|
```
|
|
190
182
|
|
|
@@ -197,7 +189,7 @@ playcraft tools generate-image \
|
|
|
197
189
|
--prompt "<方案 B prompt>" \
|
|
198
190
|
--output assets/images/storyboard/master_composite_option_B.png \
|
|
199
191
|
--reference-image assets/images/storyboard/master_composite_option_A.png \
|
|
200
|
-
--image-model
|
|
192
|
+
--image-model mulerouter/nano-banana-2 \
|
|
201
193
|
--image-size 4K
|
|
202
194
|
```
|
|
203
195
|
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
# Designer — Style exploration flow (Phase 1, steps 2–5)
|
|
2
2
|
|
|
3
|
-
> **Scope**: After **Step 1 — Skill Discovery** in `agents/designer.md`, follow this document for MC
|
|
3
|
+
> **Scope**: After **Step 1 — Skill Discovery** in `agents/designer.md`, follow this document for **image production** (MC + ASR) through Gate #2b STOP. **Exit criteria**: see `agents/designer.md` Goals § Success criteria.
|
|
4
4
|
>
|
|
5
5
|
> **Deliverable shapes & tables**: `refs/designer-deliverable-spec.md`.
|
|
6
6
|
|
|
7
7
|
**Trigger**: `project-state.md` stage = `style_exploration`
|
|
8
8
|
|
|
9
|
+
## Step 1.5 — Image Production Preflight (before MC option B+ or before ASR)
|
|
10
|
+
|
|
11
|
+
Fill `logs/designer-log.md` § **Image Production Preflight**:
|
|
12
|
+
|
|
13
|
+
1. Read `playcraft-storyboard`, `playcraft-asset-state-sheet`, `playcraft-image-generation` (§3 + §3.1)
|
|
14
|
+
2. Mark each Skill row ✓ with one-line decision summary
|
|
15
|
+
3. Read `layout-spec.md` — count assetMapping rows + note Element Type Registry (if present)
|
|
16
|
+
|
|
17
|
+
**Do not generate ASR until this section is complete.**
|
|
18
|
+
|
|
9
19
|
## Step 2 — Generate Master Composite only (one image per option A/B[/C])
|
|
10
20
|
|
|
11
21
|
- Follow `playcraft-storyboard` skill:**每格完整 9:16 H5**;`45:16` + `--width 3600 --height 1280`(2K)或 `4096×1455`(4K);**禁止 `1:1` / `10:3`**
|
|
12
|
-
-
|
|
22
|
+
- **Panel 1 must show every element type** from `layout-spec` (or Element Type Registry)
|
|
23
|
+
- 每个方案用不同 prompt/美术方向(模型均用白名单,见 `refs/designer-master-composite-recipes.md`)
|
|
13
24
|
- 生成后立即 `playcraft image info`:总比例 **width/height ≈ 2.81**,**(width÷5)/height ≈ 0.5625**;不合格则重生成
|
|
14
25
|
- **Review the auto-generated `.json` sidecar** — 确认 `aspectRatio` / `imageSize` / 实际像素正确
|
|
15
26
|
|
|
@@ -22,16 +33,35 @@
|
|
|
22
33
|
## Step 4 — Generate ASR sheets(仅针对 `project-state.selectedMcOption`)
|
|
23
34
|
|
|
24
35
|
- Read `selectedMcOption` from `docs/project-state.md` — if missing, **STOP**
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- `--reference-image` = `master_composite_option_[selectedMcOption].png`
|
|
28
|
-
-
|
|
36
|
+
- **Re-read** `playcraft-asset-state-sheet` + `playcraft-image-generation` §3.1 (cell chroma / isolated)
|
|
37
|
+
- 输出:`ui_state_sheet_[X].png` + `element_state_sheet_[X].png`(类型 >12 时可加 `element_state_sheet_[X]_2.png`)
|
|
38
|
+
- `--reference-image` = `master_composite_option_[selectedMcOption].png`;`--image-model` 与 MC 一致
|
|
39
|
+
- Prompt:sheet `#808080` 或统一色幕;每格 **one isolated element**;金/橙格用蓝幕
|
|
40
|
+
- 生成后 `playcraft image info`;目视:零重叠、格内无白盒/场景底
|
|
41
|
+
- **Do not** `remove-background` on ASR — TA handles post-crop
|
|
29
42
|
|
|
30
43
|
## Step 5 — Gate #2b Handoff Pack
|
|
31
44
|
|
|
32
45
|
> **Checklist**: `refs/designer-handoff-v2-checklist.md`
|
|
33
46
|
|
|
34
47
|
1. 补全 `docs/style-exploration.md`(ASR 路径、**Motion Notes**、Experience Flow)
|
|
35
|
-
2. 更新 `logs/designer-log.md
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
2. 更新 `logs/designer-log.md`:
|
|
49
|
+
- **ASR Coverage Matrix** — 100% contract rows + **CoverageLayer** column
|
|
50
|
+
- 每种 **elementType** ≥1 行 `on-asr` 或 `mc-crop`
|
|
51
|
+
- **Palette Locked**、Style Intent / Anti-Pattern
|
|
52
|
+
- Mirror `on-asr` rows → `atom-plan.json` → `atoms[].asrSlot`
|
|
53
|
+
3. **Self-check before STOP**:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# MC ratio
|
|
57
|
+
playcraft image info --input assets/images/storyboard/master_composite_option_[X].png
|
|
58
|
+
|
|
59
|
+
# Count contract rows (adjust grep to your layout-spec format)
|
|
60
|
+
grep -c 'elementId\|"id":' docs/layout-spec.md # approximate — Matrix row count must match
|
|
61
|
+
|
|
62
|
+
# ASR files exist
|
|
63
|
+
ls assets/images/reference/ui_state_sheet_[X].png assets/images/reference/element_state_sheet_[X].png
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
4. 更新 handoff + `gates.#2b = pending`
|
|
67
|
+
5. **STOP** — 禁止 Phase 2 音频与批量视觉样本 PNG
|
|
@@ -96,7 +96,7 @@ Set `project-state.md`:
|
|
|
96
96
|
2. `npm run dev`
|
|
97
97
|
3. Re-run UI + gameplay + runtime checklists for affected areas
|
|
98
98
|
4. Close blocker rows (`status: resolved`) or escalate if still wrong
|
|
99
|
-
5. Only then set `devStatus: ready` and
|
|
99
|
+
5. Only then set `devStatus: ui_ready` (after `ui_pass`) or `devStatus: ready` (after `gameplay_pass`) and handoff `next_orchestrator_action: "Invoke @reviewer ui_diff"` (or `load_check`)
|
|
100
100
|
|
|
101
101
|
## Dev ready checklist (`devStatus: ready` — all required)
|
|
102
102
|
|
|
@@ -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)
|
|
@@ -141,7 +141,9 @@ Design the shared contract between Designer, TA, and Developer:
|
|
|
141
141
|
3. **Asset specifications** — size, format, naming for each type
|
|
142
142
|
4. **Asset mapping** — element ID → file path (the integration bridge)
|
|
143
143
|
|
|
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 `
|
|
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 `ui_pass` after TA Compliance green.
|
|
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.
|
|
145
147
|
|
|
146
148
|
---
|
|
147
149
|
|
|
@@ -161,6 +163,22 @@ Single-element groups stay as single-file paths; do not invent atlases for one t
|
|
|
161
163
|
|
|
162
164
|
---
|
|
163
165
|
|
|
166
|
+
## Element Type Registry + ASR budget (Gate #1)
|
|
167
|
+
|
|
168
|
+
After atlas groups, add **§ Element Type Registry** in `layout-spec.md`:
|
|
169
|
+
|
|
170
|
+
- Group variant elementIds under a shared `typeId` (e.g. `tile` → red/blue/green ids)
|
|
171
|
+
- Count **unique types** — target **≤ 20** for playable ads
|
|
172
|
+
- ASR physical slot budget: ~12 ui + ~12 element states; overflow → second element sheet or mc-crop/ta-extends plan
|
|
173
|
+
- If user request implies >20 types, PM degrades or splits variants to TA-extends in Gate #1 options
|
|
174
|
+
|
|
175
|
+
Pre-Write checklist addition:
|
|
176
|
+
|
|
177
|
+
- [ ] Element Type Registry present; unique type count documented
|
|
178
|
+
- [ ] Variant-only ids marked for TA-extends in Designer handoff notes (optional one line in atom-plan.md)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
164
182
|
## Step 7: Experience Flow Design
|
|
165
183
|
|
|
166
184
|
Design each stage with four fields — from "what happens" to "what the player feels" (MDA player perspective):
|
|
@@ -242,7 +260,7 @@ playcraft skills link --from-atom-plan --prune
|
|
|
242
260
|
- `validate-atom-plan`:PM 定稿前手动跑;**PM STOP** 时 hook 再拦一层(invalid skillRef 无法 STOP)。
|
|
243
261
|
- `link`:读取 `atom-plan.json` 中所有非空 `skillRef`。
|
|
244
262
|
|
|
245
|
-
**PM does not** pre-fill `atom-plan.md` § Impl Skill Context — **Developer** in `
|
|
263
|
+
**PM does not** pre-fill `atom-plan.md` § Impl Skill Context — **Developer** in `ui_pass` / `gameplay_pass`.
|
|
246
264
|
|
|
247
265
|
### 8e. `atom-plan.md`(可选)
|
|
248
266
|
|
|
@@ -403,6 +421,10 @@ Scheduling:
|
|
|
403
421
|
- [ ] Every group with **≥ 2** raster elements names **one** `.webp` + **one** `.json` path in `assetMapping`
|
|
404
422
|
- [ ] Audio entries specify **`.mp3`** paths where applicable
|
|
405
423
|
|
|
424
|
+
**Transparency (no PM action needed)**:
|
|
425
|
+
|
|
426
|
+
- [ ] `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
|
|
427
|
+
|
|
406
428
|
---
|
|
407
429
|
|
|
408
430
|
## Design North Star
|