@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
|
@@ -14,6 +14,23 @@ triggers: ASR,asset state reference,state reference sheet,UI state sheet,element
|
|
|
14
14
|
- **仅在 Gate #2a 通过、`selectedMcOption` 已写入 `project-state.md` 之后** 才能生成 ASR
|
|
15
15
|
- **禁止**为未选中的 MC 方案生成 ASR
|
|
16
16
|
- 两张板均使用已确认 MC 作 `--reference-image`,且 `--image-model` 与 MC 一致
|
|
17
|
+
- **生成 ASR 前必读** `playcraft-image-generation` Skill §3(色幕矩阵)— 格内元素须可抠
|
|
18
|
+
|
|
19
|
+
## 0.1 Sheet 底色 + 格内抠图(必读)
|
|
20
|
+
|
|
21
|
+
> **整图 opaque 是预期行为** — ASR PNG 本身**不需要**也**不应**交付透明 PNG。TA 负责 `crop → remove-background → WebP atlas`。
|
|
22
|
+
> Designer 的职责是:让 **每个格内的单元素** 在 crop 后能被 TA 可靠抠图。
|
|
23
|
+
|
|
24
|
+
| 层级 | 规则 |
|
|
25
|
+
| --------------------- | --------------------------------------------------------------------------------- |
|
|
26
|
+
| **Sheet canvas** | 不透明;默认 **中性灰 `#808080` flat background**(整板统一,禁止渐变/场景/纹理) |
|
|
27
|
+
| **Sheet 备选** | 若全板元素均非金/橙/绿,可用 **统一绿幕 `#00FF00`** 整板底色 |
|
|
28
|
+
| **Cell 内容** | **单元素 isolated、居中**;禁止格内地面/阴影/白盒/场景/context |
|
|
29
|
+
| **金/橙/黄/绿元素格** | 该格背景用 **蓝幕 `#0000FF`**(见 `playcraft-image-generation` 色幕矩阵) |
|
|
30
|
+
| **蓝/紫元素格** | 该格背景用 **绿幕 `#00FF00`** |
|
|
31
|
+
| **Designer 禁止** | 对 ASR 做 `remove-background` 量产;那是 TA 在 `production` 的工作 |
|
|
32
|
+
|
|
33
|
+
**错误示例(必须重生成)**:格内白底方块、渐变底、整屏 HUD 截屏、两元素叠在同一格、元素带地面阴影。
|
|
17
34
|
|
|
18
35
|
## 1. 交付物:两张状态参考板
|
|
19
36
|
|
|
@@ -24,6 +41,8 @@ triggers: ASR,asset state reference,state reference sheet,UI state sheet,element
|
|
|
24
41
|
|
|
25
42
|
`[X]` = `selectedMcOption`(A/B/C)。
|
|
26
43
|
|
|
44
|
+
**多板扩展**(`unique element types > 12` 或 Layer1 槽位 > 12):允许追加 `element_state_sheet_[X]_2.png`;Coverage Matrix 的 `sheet` 列填 `element_2`。详见 `docs/team/atom-plan-format.md` § `asrSlot`.
|
|
45
|
+
|
|
27
46
|
### UI State Reference Sheet — 放什么
|
|
28
47
|
|
|
29
48
|
- CTA 按钮、安装条、HUD 条、进度/分数框、手指引导、高亮框、徽章、弹窗底板等
|
|
@@ -35,11 +54,23 @@ triggers: ASR,asset state reference,state reference sheet,UI state sheet,element
|
|
|
35
54
|
### Element State Reference Sheet — 放什么
|
|
36
55
|
|
|
37
56
|
- 棋子、牌面、角色、道具、匹配特效关键帧等(MC 概念面板里出现的玩法元素)
|
|
38
|
-
-
|
|
57
|
+
- 每个元素 **type** 至少 **1 个代表态** 占物理槽位;同 type 的 color 变体可标 `CoverageLayer: ta-extends`(见 `designer-deliverable-spec.md`)
|
|
58
|
+
- 每 type **2–3 个代表状态** 优先(完整全集由 TA 在 `production` 扩展),例如:
|
|
39
59
|
- `tile_gold`: idle | selected | matched
|
|
40
60
|
- `panda_char`: idle | happy | win
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
**物理槽位预算**:每张板 **8–12 个状态槽**(宁可少槽、加大间距,也不要重叠)。
|
|
63
|
+
**Coverage Matrix 100% 行** ≠ 每行都有物理槽位 — 见 §1.1 三层覆盖。
|
|
64
|
+
|
|
65
|
+
### 1.1 三层覆盖(与 Coverage Matrix 对齐)
|
|
66
|
+
|
|
67
|
+
| CoverageLayer | 含义 | Matrix 填写 |
|
|
68
|
+
| -------------- | ------------------------------------------- | ---------------------------------------- |
|
|
69
|
+
| **on-asr** | 该 contract id 在 ASR PNG 有物理槽位 `R#C#` | `ASR sheet` + `Grid` |
|
|
70
|
+
| **mc-crop** | MC Panel 1 可见、ASR 无槽位 | `ASR sheet` = `MC-crop` + Panel 区域说明 |
|
|
71
|
+
| **ta-extends** | 颜色变体 / 额外状态,TA 从 ASR 或 MC 扩展 | `TA extends? = yes` + Style Intent 一句 |
|
|
72
|
+
|
|
73
|
+
**硬规则**:每种 **element type** 至少在 **on-asr** 或 **mc-crop** 有一处代表态;禁止全部 `ta-extends` 且 MC/ASR 均无参考。
|
|
43
74
|
|
|
44
75
|
## 2. 布局策略 — 规则网格、零重叠
|
|
45
76
|
|
|
@@ -64,17 +95,21 @@ Row 2: [char idle] [char happy] [char win] (empty)
|
|
|
64
95
|
|
|
65
96
|
## 3. Prompt 模板
|
|
66
97
|
|
|
98
|
+
**生成前**:按 `playcraft-image-generation` §3 为每格元素选定 cell 背景色(灰/绿/蓝幕)。
|
|
99
|
+
|
|
67
100
|
**UI 板** — 在 prompt 中显式写 `UI component state reference sprite sheet`:
|
|
68
101
|
|
|
69
102
|
```
|
|
70
103
|
UI component state reference sprite sheet for [GAME_TYPE] playable ad.
|
|
71
|
-
|
|
104
|
+
3840x2160 canvas, solid flat #808080 gray background on entire sheet. NO gradient, NO scene.
|
|
72
105
|
|
|
73
106
|
STRICT LAYOUT: orthographic grid, fixed non-overlapping cells. Each UI widget state in exactly one cell, 80px margin, 100px column gap, 120px row gap. NO overlapping.
|
|
74
107
|
|
|
108
|
+
Each cell: ONE isolated UI widget, centered, no drop shadow on floor, no white box behind widget, no scene context.
|
|
109
|
+
|
|
75
110
|
Row 1 — CTA / HUD:
|
|
76
|
-
- CTA install button, default state
|
|
77
|
-
- CTA install button, pressed state
|
|
111
|
+
- Cell 1: CTA install button, default state, isolated, centered ...
|
|
112
|
+
- Cell 2: CTA install button, pressed state, isolated, centered ...
|
|
78
113
|
...
|
|
79
114
|
|
|
80
115
|
Art style: [SAME as Master Composite]. Front-facing UI, crisp edges, consistent lighting.
|
|
@@ -84,18 +119,21 @@ Art style: [SAME as Master Composite]. Front-facing UI, crisp edges, consistent
|
|
|
84
119
|
|
|
85
120
|
```
|
|
86
121
|
Gameplay element state reference sprite sheet for [GAME_TYPE].
|
|
87
|
-
|
|
122
|
+
3840x2160 canvas, solid flat #808080 gray background on entire sheet. NO gradient, NO scene.
|
|
123
|
+
|
|
124
|
+
STRICT LAYOUT: [same as UI sheet]
|
|
125
|
+
|
|
126
|
+
Each cell: ONE isolated game element, centered. Gold/orange/yellow elements: cell background solid bright blue #0000FF. Blue/purple elements: cell background solid bright green #00FF00. NO white box, NO ground shadow, NO scene.
|
|
88
127
|
|
|
89
128
|
Row 1 — Core tiles/items:
|
|
90
|
-
- [Element] idle
|
|
91
|
-
- [Element] selected
|
|
92
|
-
- [Element] matched: ...
|
|
129
|
+
- Cell 1: [Element type A] idle, isolated, centered ...
|
|
130
|
+
- Cell 2: [Element type A] selected, isolated, centered ...
|
|
93
131
|
...
|
|
94
132
|
|
|
95
133
|
Art style: [SAME as Master Composite].
|
|
96
134
|
```
|
|
97
135
|
|
|
98
|
-
**Prompt 必须包含**:`sprite sheet` 或 `state reference sheet`、`STRICT LAYOUT`、`non-overlapping cells`、具体 gap
|
|
136
|
+
**Prompt 必须包含**:`sprite sheet` 或 `state reference sheet`、`STRICT LAYOUT`、`non-overlapping cells`、具体 gap 像素、`isolated`、`NO white box`、`NO scene`.
|
|
99
137
|
|
|
100
138
|
## 4. 生成命令
|
|
101
139
|
|
|
@@ -117,25 +155,41 @@ playcraft tools generate-image \
|
|
|
117
155
|
--image-model <与 MC 相同> \
|
|
118
156
|
--aspect-ratio 16:9 \
|
|
119
157
|
--image-size 4K
|
|
158
|
+
|
|
159
|
+
# 元素板溢出时(可选第二张)
|
|
160
|
+
playcraft tools generate-image \
|
|
161
|
+
--prompt "<Element sheet part 2 prompt>" \
|
|
162
|
+
--output assets/images/reference/element_state_sheet_[X]_2.png \
|
|
163
|
+
--reference-image assets/images/storyboard/master_composite_option_[X].png \
|
|
164
|
+
--image-model <与 MC 相同> \
|
|
165
|
+
--aspect-ratio 16:9 \
|
|
166
|
+
--image-size 4K
|
|
120
167
|
```
|
|
121
168
|
|
|
122
169
|
## 5. 核查清单
|
|
123
170
|
|
|
124
|
-
| # | 核查项
|
|
125
|
-
| --- |
|
|
126
|
-
| 1 | 时机
|
|
127
|
-
| 2 | 数量
|
|
128
|
-
| 3 | 视觉
|
|
129
|
-
| 4 | 语义
|
|
130
|
-
| 5 |
|
|
171
|
+
| # | 核查项 | 标准 |
|
|
172
|
+
| --- | ------------ | ------------------------------------------------------------------------------ |
|
|
173
|
+
| 1 | 时机 | `selectedMcOption` 已设置 |
|
|
174
|
+
| 2 | 数量 | UI 板 + 元素板各至少一张 |
|
|
175
|
+
| 3 | 视觉 | 两板均无重叠;有重叠则重生成 |
|
|
176
|
+
| 4 | 语义 | UI 板无玩法棋子;元素板无整屏 HUD 截屏 |
|
|
177
|
+
| 5 | 格内可抠 | 目视:无白盒/场景底/格内渐变;金橙元素格用蓝幕 |
|
|
178
|
+
| 6 | 整图 opaque | 预期行为 — 不要求透明 PNG |
|
|
179
|
+
| 7 | 清单 | `designer-log` § **ASR Coverage Matrix** 100% contract 行 + `CoverageLayer` 列 |
|
|
180
|
+
| 8 | 网格元数据 | Sheet grid 表:rows × cols + cell W×H + padding(非 `{{placeholder}}`) |
|
|
181
|
+
| 9 | type 代表态 | 每种 element type 至少在 on-asr 或 mc-crop 有一处 |
|
|
182
|
+
| 10 | asrSlot 镜像 | on-asr 行已写入 `atom-plan.json` → `atoms[].asrSlot` |
|
|
131
183
|
|
|
132
184
|
## 6. 与 TA 的协作协议
|
|
133
185
|
|
|
134
|
-
Designer:风格与 MC 一致;在 `designer-log.md`
|
|
186
|
+
Designer:风格与 MC 一致;在 `designer-log.md` § **ASR Coverage Matrix** 标注 **CoverageLayer** 与 **TA 需扩展的状态**。
|
|
135
187
|
|
|
136
188
|
TA 提取(详见 `playcraft-masking`):
|
|
137
189
|
|
|
138
|
-
| 来源图 | 推荐方式 | 说明
|
|
139
|
-
| -------------------- | -------------------------- |
|
|
140
|
-
| **ASR**(规则网格) | `playcraft image crop` | 槽位坐标来自 `designer-log` ASR
|
|
141
|
-
| **Master Composite** | `decompose-layers` 或 crop |
|
|
190
|
+
| 来源图 | 推荐方式 | 说明 |
|
|
191
|
+
| -------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
192
|
+
| **ASR**(规则网格) | `playcraft image crop` | 槽位坐标来自 `designer-log` § **ASR Coverage Matrix**(含 Sheet grid 元数据)或 `atom-plan.json` → `asrSlot`;**禁止**对 ASR 用纯 text `segment` |
|
|
193
|
+
| **Master Composite** | `decompose-layers` 或 crop | `mc-crop` 层从此补提取 |
|
|
194
|
+
|
|
195
|
+
**若 TA crop 后仍不可抠**(白边/色幕残留/元素被截断)→ `routeTo: designer` 重生成 ASR 格,**非** TA 自行重画 ASR。
|
|
@@ -135,7 +135,18 @@ playcraft tools generate-image \
|
|
|
135
135
|
|
|
136
136
|
> **IEGG LiteLLM** 在 fallback 链中排第一,但 Azure gpt-image 最大约 1536px 宽 — 达不到 5×9:16 横排。故事板请用 **`mulerouter/gpt-image-2`**(跳过 litellm)+ `--width 3600 --height 1280`(或 4096×1455)。
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
### Master Composite(MC)模型白名单
|
|
139
|
+
|
|
140
|
+
Designer 生成 MC 时**不得**套用上方通用决策树里的 gemini / flux / hy-image 等——MC 只允许:
|
|
141
|
+
|
|
142
|
+
| 允许 | 禁止(MC) |
|
|
143
|
+
| -------------------------- | --------------------------------------------------- |
|
|
144
|
+
| `mulerouter/gpt-image-2` | `gemini-*`、`flux-*`、`hy-image-*`、`wan*`、`qwen*` |
|
|
145
|
+
| `mulerouter/nano-banana-2` | 裸 `gpt-image-2`(会走 iegg-litellm 压扁五格) |
|
|
146
|
+
|
|
147
|
+
完整 prompt / 尺寸规范见 **`playcraft-storyboard`** skill。ASR 双板 `--image-model` 须与已选 MC **完全一致**。
|
|
148
|
+
|
|
149
|
+
**Phase 1(概念图)**:纯文生图,`--image-size 4K` + MC 白名单内模型。
|
|
139
150
|
**Phase 2(批量生产)**:必须带 `--reference-image` 指向 Phase 1 确认的概念图,同一批次使用**相同模型 + 相同 reference image + 相同 image-size**。
|
|
140
151
|
|
|
141
152
|
### --reference-image 路径支持
|
|
@@ -172,17 +183,24 @@ playcraft image sprite-sheet \
|
|
|
172
183
|
|
|
173
184
|
## 3. 背景处理决策树
|
|
174
185
|
|
|
175
|
-
>
|
|
186
|
+
> **核心原则**:先确定素材类型,再决定是否需要去背景,再按素材主色调选择色幕颜色,最后做去背景 + 深色背景验证。
|
|
176
187
|
|
|
177
188
|
```
|
|
178
189
|
生成的素材需要做什么?
|
|
179
190
|
│
|
|
180
|
-
├─
|
|
191
|
+
├─ 需要透明背景的独立元素(角色、道具、图标、文字图片、HUD、VFX)?
|
|
181
192
|
│ ├─ 检查模型 ALPHA 列(playcraft tools list-image-models)
|
|
182
193
|
│ ├─ ALPHA = yes → prompt 加 "transparent background, PNG with alpha"
|
|
183
|
-
│ └─ ALPHA = no →
|
|
184
|
-
│ ├─
|
|
185
|
-
│
|
|
194
|
+
│ └─ ALPHA = no → 色幕策略(按素材主色调选择):
|
|
195
|
+
│ ├─ 素材为金色/黄色/橙色/绿色 → 蓝幕 #0000FF
|
|
196
|
+
│ │ ├─ prompt 末尾加 "on solid bright blue #0000FF background, isolated, centered"
|
|
197
|
+
│ │ └─ 后处理:remove-background(tolerance 25)→ 深色背景验证
|
|
198
|
+
│ ├─ 素材为蓝色/紫色/靛蓝 → 绿幕 #00FF00
|
|
199
|
+
│ │ ├─ prompt 末尾加 "on solid bright green #00FF00 background, isolated, centered"
|
|
200
|
+
│ │ └─ 后处理:remove-background(tolerance 25)→ 深色背景验证
|
|
201
|
+
│ └─ 其他颜色 → 绿幕 #00FF00(默认)
|
|
202
|
+
│ ├─ prompt 末尾加 "on solid bright green #00FF00 background, isolated, centered"
|
|
203
|
+
│ └─ 后处理:remove-background(tolerance 25)→ 深色背景验证
|
|
186
204
|
│
|
|
187
205
|
├─ 卡牌/棋盘格子/UI 面板(本身就是矩形有边框)?
|
|
188
206
|
│ ├─ 不要去背景!白色牌面就是牌的一部分
|
|
@@ -190,21 +208,72 @@ playcraft image sprite-sheet \
|
|
|
190
208
|
│ └─ 后处理:直接 resize(skipRemoveBg = true)
|
|
191
209
|
│
|
|
192
210
|
└─ 场景背景(天空、地面、全屏图)?
|
|
193
|
-
|
|
211
|
+
├─ 不做背景处理,直接 resize
|
|
212
|
+
└─ ⚠️ prompt 必须加 "full bleed, edge to edge, no vignette, no fade"
|
|
213
|
+
→ 后处理验证:四角四边颜色一致,无褪色/白色
|
|
194
214
|
```
|
|
195
215
|
|
|
196
|
-
###
|
|
216
|
+
### 为什么需要色幕策略?
|
|
217
|
+
|
|
218
|
+
**当前所有已接入模型均不支持原生透明 PNG(ALPHA = no)**。白色背景 + 白色物体 = floodfill 无法区分边界。纯色背景 + 非撞色游戏素材 = 抠图几乎完美。与影视 chroma-key 原理相同。
|
|
197
219
|
|
|
198
|
-
|
|
220
|
+
### 色幕选型矩阵(Color Conflict Avoidance)
|
|
221
|
+
|
|
222
|
+
> ⚠️ **不要默认全用绿幕!** 金色素材 + 绿幕 = 绿色与金色色相接近,floodfill 会在边缘残留绿色,或误删金色像素。
|
|
223
|
+
|
|
224
|
+
| 素材主色调 | ❌ 禁用 | ✅ 推荐 | 原因 |
|
|
225
|
+
| --------------------- | ------- | ---------------- | ------------------------------------------ |
|
|
226
|
+
| 金色/黄色/橙色/琥珀色 | 绿幕 | **蓝幕 #0000FF** | 金色与绿色色相接近(黄绿区),边缘残留绿色 |
|
|
227
|
+
| 绿色/翠绿/青色 | 绿幕 | **蓝幕 #0000FF** | 同色系,无法区分边界 |
|
|
228
|
+
| 蓝色/靛蓝/紫色 | 蓝幕 | **绿幕 #00FF00** | 同色系冲突 |
|
|
229
|
+
| 红色/粉色/白色/黑色 | — | 绿幕或蓝幕均可 | 与两者色相距离都大 |
|
|
230
|
+
| 多色/彩虹 | — | **品红 #FF00FF** | 品红在自然素材中最少出现(最后手段) |
|
|
199
231
|
|
|
200
232
|
### Prompt 后缀速查表
|
|
201
233
|
|
|
202
|
-
| 素材类型
|
|
203
|
-
|
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
234
|
+
| 素材类型 | prompt 建议后缀 | 后处理 | skipRemoveBg |
|
|
235
|
+
| -------------------------- | ------------------------------------------------------------------- | ------------------------------------------- | ------------ |
|
|
236
|
+
| 独立元素(需透明,非金色) | `"on solid bright green #00FF00 background, isolated, centered"` | remove-background (tolerance 25) → 深色验证 | `false` |
|
|
237
|
+
| 独立元素(金/黄/橙/绿色) | `"on solid bright blue #0000FF background, isolated, centered"` | remove-background (tolerance 25) → 深色验证 | `false` |
|
|
238
|
+
| 独立元素(多色/彩虹) | `"on solid bright magenta #FF00FF background, isolated, centered"` | remove-background (tolerance 20) → 深色验证 | `false` |
|
|
239
|
+
| VFX 特效(发光/粒子) | `"on solid bright blue #0000FF background, isolated, centered"` | remove-background (tolerance 25) → 逐帧验证 | `false` |
|
|
240
|
+
| 卡牌/棋子(矩形本体) | `"flat 2D, no shadow, no 3D effect, clean edges, white background"` | 只做 resize | `true` |
|
|
241
|
+
| UI 按钮/面板 | `"flat UI element, no shadow, clean edges"` | trim + resize | `true` |
|
|
242
|
+
| 场景背景 | `"full scene, full bleed, edge to edge, no vignette, no fade"` | resize → 四角全覆盖检查 | `true` |
|
|
243
|
+
|
|
244
|
+
### 去背景后必做:深色背景渲证
|
|
245
|
+
|
|
246
|
+
> 每个需要透明的资产,去背景后**必须**在深色背景上叠合验证。这一步是防止白底/色幕残留/黑块的最后防线。
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
playcraft image overlay \
|
|
250
|
+
--base ta-workspace/tmp/dark_verify_bg.png \
|
|
251
|
+
--overlay <processed>.png \
|
|
252
|
+
--output ta-workspace/tmp/verify_<name>.png \
|
|
253
|
+
--gravity center
|
|
254
|
+
# 目视检查:无白边、无色幕残留色、无黑色不透明块、边缘干净
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**不通过时的修复**:见 `ta-pipeline-cookbook.md` Step 0e §3 及 Compliance Gate 失败修复表。
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 3.1 ASR 专用分支(Designer · Gate #2b)
|
|
262
|
+
|
|
263
|
+
> **Read `playcraft-asset-state-sheet` Skill first.** ASR 是制作期参考板,不是 runtime 透明资产。
|
|
264
|
+
|
|
265
|
+
| 阶段 | Designer | TA |
|
|
266
|
+
| ----------------- | ------------------------------------- | ----------------------------- |
|
|
267
|
+
| ASR 整图 | **opaque**(灰底或统一色幕)— 正常 | — |
|
|
268
|
+
| ASR 格内元素 | **isolated** + 按色幕矩阵选 cell 背景 | `crop` 后 `remove-background` |
|
|
269
|
+
| remove-background | **禁止** — Designer 不做 | production Wave 2 |
|
|
270
|
+
|
|
271
|
+
**Designer ASR prompt 要点**:
|
|
272
|
+
|
|
273
|
+
1. Sheet canvas:`solid flat #808080` 或整板统一绿幕(非渐变)
|
|
274
|
+
2. 每格:`ONE isolated element, centered, NO white box, NO scene, NO ground shadow`
|
|
275
|
+
3. 金/橙/黄/绿元素格 → cell 背景 `#0000FF`;蓝/紫 → `#00FF00`
|
|
276
|
+
4. 生成后**目视**格内可抠性 — 不要求 `channels=4`(那是 TA 后处理产物)
|
|
208
277
|
|
|
209
278
|
---
|
|
210
279
|
|
|
@@ -91,10 +91,23 @@ Total image exactly [3600] pixels wide by [1280] pixels tall (five 720x1280 cell
|
|
|
91
91
|
|
|
92
92
|
## 3. 生成命令
|
|
93
93
|
|
|
94
|
+
### MC 模型白名单(强制)
|
|
95
|
+
|
|
96
|
+
Master Composite **只允许**下列高质量模型(须带 **provider 前缀**,禁止裸模型名):
|
|
97
|
+
|
|
98
|
+
| 用途 | `--image-model` | 说明 |
|
|
99
|
+
| -------- | -------------------------- | ------------------------------------------------- |
|
|
100
|
+
| **首选** | `mulerouter/gpt-image-2` | 细节、光影、复杂 UI;默认 Option A |
|
|
101
|
+
| **备选** | `mulerouter/nano-banana-2` | Gemini 3.1 Flash Image;Option B/C 或需不同画风时 |
|
|
102
|
+
|
|
103
|
+
**禁止**用于 MC:`gemini-*`、`flux-*`、`hy-image-*`、`wan*`、`qwen*`、裸 `gpt-image-2`、以及 `list-image-models` 中未列入上表的模型。
|
|
104
|
+
|
|
105
|
+
多方案(A/B/C)应用 **不同 prompt / 美术方向** 探索,**不得**用低档模型换方案——质量门槛对所有 MC 选项相同。
|
|
106
|
+
|
|
94
107
|
```bash
|
|
95
108
|
playcraft tools generate-image \
|
|
96
109
|
--prompt "<Section 2>" \
|
|
97
|
-
--output assets/images/storyboard/
|
|
110
|
+
--output assets/images/storyboard/master_composite_option_A.png \
|
|
98
111
|
--image-model mulerouter/gpt-image-2 \
|
|
99
112
|
--aspect-ratio 45:16 \
|
|
100
113
|
--image-size 2K \
|
|
@@ -102,15 +115,21 @@ playcraft tools generate-image \
|
|
|
102
115
|
--height 1280
|
|
103
116
|
```
|
|
104
117
|
|
|
105
|
-
|
|
118
|
+
Option B 示例(仍须白名单内):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
--image-model mulerouter/nano-banana-2 \
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
> **必须**带 `mulerouter/` 前缀。**禁止**裸 `gpt-image-2`——fallback 会先走 `iegg-litellm`,成功时只能出 **1536×1024**,五格竖屏会被压扁。CLI 会在保存后自动校验像素,不合格直接失败。
|
|
106
125
|
|
|
107
126
|
**4K 档**:`--image-size 4K --width 4096 --height 1455`
|
|
108
127
|
|
|
109
|
-
| 参数 | 要求
|
|
110
|
-
| ---------------------- |
|
|
111
|
-
| `--aspect-ratio` | **`45:16`**(5 个 9:16 横排);**禁止 `1:1`、`10:3`**
|
|
112
|
-
| `--width` / `--height` | **3600×1280**(2K)或 **4096×1455**(4K)
|
|
113
|
-
| `--image-model` | **`mulerouter/gpt-image-2
|
|
128
|
+
| 参数 | 要求 |
|
|
129
|
+
| ---------------------- | ----------------------------------------------------------------------------------------- |
|
|
130
|
+
| `--aspect-ratio` | **`45:16`**(5 个 9:16 横排);**禁止 `1:1`、`10:3`** |
|
|
131
|
+
| `--width` / `--height` | **3600×1280**(2K)或 **4096×1455**(4K) |
|
|
132
|
+
| `--image-model` | **`mulerouter/gpt-image-2`** 或 **`mulerouter/nano-banana-2`** only(强制 provider 前缀) |
|
|
114
133
|
|
|
115
134
|
### 生成后验收(强制)
|
|
116
135
|
|
|
@@ -22,10 +22,59 @@ triggers: 构建游戏,开始开发,创建项目,选择组件,选择 skill,查
|
|
|
22
22
|
- `gate_pending` 非 null 且 `waiting_for: user_gate` 时:**只跑 Gate**,不得 invoke 子 Agent
|
|
23
23
|
- `subagent_stop: true` 时:只执行 `next_orchestrator_action`
|
|
24
24
|
- Gate #1 / #2a / #2b:`AskUserQuestion`(子 Agent 更新 handoff 后 STOP)
|
|
25
|
-
- Gate #
|
|
25
|
+
- **Gate #1 / #2b 前**:先 invoke `@reviewer design_check`(软性 checklist)
|
|
26
|
+
- Gate #3:Reviewer `load_check` 通过后展示 **devUrl**(用户只点链;玩法由用户判断)
|
|
26
27
|
- Gate / handoff 细则:`docs/team/collaboration.md` § Gate Protocol、§ Agent Handoff
|
|
27
|
-
6. `devStatus:
|
|
28
|
-
7.
|
|
28
|
+
6. `devStatus: ui_ready` → `@reviewer ui_diff`;`ui_rework` → 按 report 修复 → 再 `@reviewer ui_diff`
|
|
29
|
+
7. `devStatus: ready` → `@reviewer load_check` → Gate #3
|
|
30
|
+
8. `devStatus: blocked_upstream` → 按 `devBlockers.routeTo` 调度 TA/Designer → 再 `@developer`
|
|
31
|
+
9. 当前交付终点 = 用户在 Dev URL 验收通过(`done`),**不要求** `playcraft build`
|
|
32
|
+
|
|
33
|
+
### ⚠️ Orchestrator 调度原则:传 WHAT 不传 HOW
|
|
34
|
+
|
|
35
|
+
**Orchestrator 不是全知全能的指挥官。** 不要在调度时给子 Agent 写详细步骤——子 Agent 有完整的 `.claude/agents/<role>.md` + `refs/` + 相关 Skills。
|
|
36
|
+
|
|
37
|
+
**正确的调度方式:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
@technical-artist
|
|
41
|
+
目标:完成 atom-plan.json 中所有 assignTo: TA 的 atoms。
|
|
42
|
+
注意:atom-plan.json → skillsMatch.mediaGroups 有 3 个预制图片资产可复用,优先 link。
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**错误的调度方式(越俎代庖):**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
@technical-artist
|
|
49
|
+
1. 先生成 tile_01.png,用绿幕...
|
|
50
|
+
2. 然后 remove-background --tolerance 25...
|
|
51
|
+
3. 接着 resize 到 128x128...
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**原则:**
|
|
55
|
+
|
|
56
|
+
- Orchestrator 只传递 **目标 + 约束 + 关键提醒**(如 mediaGroups 可用)
|
|
57
|
+
- 子 Agent 自己读 `refs/` + Skills 找到正确方法论
|
|
58
|
+
- Orchestrator 在 sub-agent STOP 后 **验证结果**(atom status 是否更新、Context 是否填写)
|
|
59
|
+
|
|
60
|
+
### Orchestrator STOP 后验证清单
|
|
61
|
+
|
|
62
|
+
Sub-agent STOP 返回后,Orchestrator 必须验证:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 检查 atom status 是否全部更新
|
|
66
|
+
cat docs/atom-plan.json | jq '[.atoms[] | select(.assignTo == "<agent>") | select(.status == "pending")] | length'
|
|
67
|
+
# 应该 = 0(所有该 agent 的 atom 都已 done / skipped)
|
|
68
|
+
|
|
69
|
+
# 检查 Context 是否填写
|
|
70
|
+
grep -c "Pending" docs/atom-plan.md
|
|
71
|
+
# 对应 agent 的 Context 区不应包含 "Pending"
|
|
72
|
+
|
|
73
|
+
# 检查 actualOutput 文件是否存在
|
|
74
|
+
cat docs/atom-plan.json | jq '.atoms[] | select(.assignTo == "<agent>" and .status == "done") | .actualOutput' | xargs -I {} test -f {}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
如果验证失败 → 不转入下一阶段,而是要求该 agent 补全。
|
|
29
78
|
|
|
30
79
|
### Single-Agent Mode(降级模式,当 sub-agent 不可用时)
|
|
31
80
|
|
|
@@ -33,7 +82,7 @@ triggers: 构建游戏,开始开发,创建项目,选择组件,选择 skill,查
|
|
|
33
82
|
|
|
34
83
|
- 每进入一个新阶段时,先完整读取对应 `.claude/agents/<role>.md` 的所有指令
|
|
35
84
|
- 不可跳过任何阶段的必选产出(特别是 TA 的完整素材生产——UI 图、VFX、精灵图都必须生产)
|
|
36
|
-
- 必须执行 Spec Quick-Check:TA 在 production Wave 2 启动后 30s 内;Developer 在 `
|
|
85
|
+
- 必须执行 Spec Quick-Check:TA 在 production Wave 2 启动后 30s 内;Developer 在 `ui_pass` 启动后 30s 内
|
|
37
86
|
- PM 定稿后运行 `playcraft skills link --from-atom-plan`;Developer 优先读 `.claude/skills/<atomId>/SKILL.md`,仅断链时用 `playcraft skills read`
|
|
38
87
|
|
|
39
88
|
---
|
|
@@ -238,13 +287,47 @@ Skills 路径真源:`playcraft.config.json` → `agent.skillsDir`(**不要**
|
|
|
238
287
|
|
|
239
288
|
### 各 Agent 的读写职责
|
|
240
289
|
|
|
241
|
-
| Agent | 读取
|
|
242
|
-
| -------------------- |
|
|
243
|
-
| **PM** | design-brief, layout-spec
|
|
244
|
-
| **Designer** | `atoms[]` + design-brief | `atom-plan.md` § Asset Skill Context
|
|
245
|
-
| **Technical Artist** | `atoms[]` + Asset Context + designer-log | `atom-plan.md` § TA Skill Context;`atoms[].status`
|
|
246
|
-
| **Developer** | `atoms[]` + Context 区 + design-brief
|
|
247
|
-
| **Reviewer** | JSON + MD(只读)
|
|
290
|
+
| Agent | 读取 | 写入 |
|
|
291
|
+
| -------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
292
|
+
| **PM** | design-brief, layout-spec | `atom-plan.json`(skillsMatch + atoms[]) |
|
|
293
|
+
| **Designer** | `atoms[]` + `mediaGroups` + design-brief | `atom-plan.md` § Asset Skill Context;`atoms[].status` + `atoms[].actualOutput` |
|
|
294
|
+
| **Technical Artist** | `atoms[]` + `mediaGroups` + Asset Context + designer-log | `atom-plan.md` § TA Skill Context;`atoms[].status` + `atoms[].actualOutput` |
|
|
295
|
+
| **Developer** | `atoms[]` + Context 区 + design-brief | `atom-plan.md` § Impl Skill Context;`atoms[].status` + `atoms[].actualOutput` |
|
|
296
|
+
| **Reviewer** | JSON + MD(只读) | 不写 |
|
|
297
|
+
|
|
298
|
+
### ⚠️ Status Update 纪律(所有 Agent 必须遵守)
|
|
299
|
+
|
|
300
|
+
每个 Agent 完成 atom 后 **立即** 更新 `atom-plan.json`:
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
{
|
|
304
|
+
"atomId": "<id>",
|
|
305
|
+
"status": "done",
|
|
306
|
+
"actualOutput": "<deliverable_path>"
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
- **Designer**: `actualOutput` = 文件路径 或 `"ASR:<sheet>:<region>"` (when covered by ASR)
|
|
311
|
+
- **TA**: `actualOutput` = `"assets/images/<path>.webp"` (final WebP contract path)
|
|
312
|
+
- **Developer**: `actualOutput` = `"game/<path>.ts"` (implementation file)
|
|
313
|
+
|
|
314
|
+
**atom-plan 不是 PM 的一次性输出文档,而是贯穿全流程的活依赖追踪系统。**
|
|
315
|
+
|
|
316
|
+
### mediaGroups 使用纪律(Designer + TA 必须遵守)
|
|
317
|
+
|
|
318
|
+
`skillsMatch.mediaGroups` 包含 PM 通过 `playcraft skills match` 找到的可复用预制资产。
|
|
319
|
+
|
|
320
|
+
**流程**:
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Designer/TA 读 mediaGroups
|
|
324
|
+
├─ 匹配当前 atom?
|
|
325
|
+
│ ├─ 是 → `playcraft skills link --atom <atomId>` → 后处理 → status=done
|
|
326
|
+
│ └─ 否 / 质量不够 → 记录跳过原因到 dagRevisions → 正常生产流程
|
|
327
|
+
└─ mediaGroups 为空?→ 正常生产流程
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**禁止**:忽略 mediaGroups 中存在匹配的预制资产而从零生成(浪费 token + 引入不一致风险)。
|
|
248
331
|
|
|
249
332
|
### 为什么这样设计能避免冲突
|
|
250
333
|
|
|
@@ -297,22 +380,28 @@ Reviewer:
|
|
|
297
380
|
|
|
298
381
|
`aiimage` / `aiaudio` Skill 没有 `ref/` 代码文件,只有 `manifest.json` 中的 `generation` 字段(prompt、aspectRatio、duration 等)。Designer 和 TA 读取这些参数作为生成基准,通过 `playcraft image *`、`playcraft tools generate-image` 等 CLI 命令执行,不复制任何文件到项目。
|
|
299
382
|
|
|
300
|
-
|
|
383
|
+
**Reviewer(convergence-v1)**
|
|
384
|
+
|
|
385
|
+
- **`design_check`**:Gate #1 / #2b 前 — 文档完整性 checklist(无需浏览器)
|
|
386
|
+
- **`ui_diff`**:读取 **`playwright-cli`** skill — 截图 vs MC 各面板
|
|
387
|
+
- **`load_check`**:读取 **`playwright-cli`** skill — 页面加载 + console 无 Error
|
|
388
|
+
|
|
389
|
+
### Production 串行编排(convergence-v1)
|
|
301
390
|
|
|
302
391
|
Gate #2b 通过后 **严格串行**(见 `workflow-changelog.md`):
|
|
303
392
|
|
|
304
393
|
```
|
|
305
|
-
Wave 1 Designer Ph.2 → Wave 2 TA →
|
|
394
|
+
Wave 1 Designer Ph.2 → Wave 2 TA → ui_pass Developer → ui_review (Reviewer ui_diff) → gameplay_pass Developer → load_check → Gate #3
|
|
306
395
|
```
|
|
307
396
|
|
|
308
|
-
Developer
|
|
397
|
+
Developer 在 **`ui_pass`** 写入 UI shell(无核心玩法);**`gameplay_pass`** 叠加玩法逻辑。TA 已交付合同路径上的真实资产。
|
|
309
398
|
|
|
310
399
|
### 避免重复 Scaffold 的规则
|
|
311
400
|
|
|
312
401
|
同一个 Skill 不应被多次 Scaffold 到同一目录:
|
|
313
402
|
|
|
314
403
|
- PM 在 `atom-plan.json` → `atoms[]` 标注 `skillRef`(若有)+ 调度元信息(assignTo/dependsOn/priority/parallelGroup/referenceSource)
|
|
315
|
-
- Developer 在
|
|
404
|
+
- Developer 在 **`ui_pass`** 开始时,按 `atoms[]` 中 `assignTo: Developer` 批量 scaffold 一次
|
|
316
405
|
- **不要在实现单个 Atom 时反复 scaffold** — 先统一 scaffold 所有依赖,再逐一实现
|
|
317
406
|
|
|
318
407
|
---
|