@playcraft/cli 0.0.40 → 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/README.md +66 -3
- package/dist/atom-plan/validate-atom-plan.js +298 -0
- package/dist/cli-root-help.js +1 -1
- package/dist/commands/3d.js +363 -0
- package/dist/commands/create.js +337 -0
- package/dist/commands/image.js +1337 -43
- package/dist/commands/recommend.js +1 -1
- package/dist/commands/remix.js +213 -0
- package/dist/commands/skills.js +1379 -0
- package/dist/commands/tools-3d.js +473 -0
- package/dist/commands/tools-generation.js +452 -0
- package/dist/commands/tools-project.js +400 -0
- package/dist/commands/tools-research.js +37 -0
- package/dist/commands/tools-research.test.js +216 -0
- package/dist/commands/tools-utils.js +183 -0
- package/dist/commands/tools.js +7 -616
- package/dist/config.js +2 -0
- package/dist/index.js +19 -1
- package/dist/utils/version-checker.js +8 -11
- package/package.json +9 -3
- package/project-template/.claude/agents/designer.md +120 -0
- package/project-template/.claude/agents/developer.md +124 -0
- package/project-template/.claude/agents/pm.md +164 -0
- package/project-template/.claude/agents/refs/README.md +73 -0
- package/project-template/.claude/agents/refs/designer-art-style-catalog.md +533 -0
- package/project-template/.claude/agents/refs/designer-color-audio-recipes.md +153 -0
- package/project-template/.claude/agents/refs/designer-deliverable-spec.md +191 -0
- package/project-template/.claude/agents/refs/designer-dimension-axis.md +27 -0
- package/project-template/.claude/agents/refs/designer-handoff-v2-checklist.md +68 -0
- package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +208 -0
- package/project-template/.claude/agents/refs/designer-style-exploration-flow.md +37 -0
- package/project-template/.claude/agents/refs/developer-dev-handoff.md +109 -0
- package/project-template/.claude/agents/refs/developer-impl-cookbook.md +134 -0
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +136 -0
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +551 -0
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +130 -0
- package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +6 -0
- package/project-template/.claude/agents/refs/ta-3d-flip-recipe.md +85 -0
- package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
- package/project-template/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
- package/project-template/.claude/agents/refs/ta-image-generation-detail.md +356 -0
- package/project-template/.claude/agents/refs/ta-image-ops-reference.md +495 -0
- package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +1108 -0
- package/project-template/.claude/agents/refs/ta-tools-reference.md +111 -0
- package/project-template/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
- package/project-template/.claude/agents/reviewer.md +127 -0
- package/project-template/.claude/agents/technical-artist.md +122 -0
- package/project-template/.claude/hooks/README.md +44 -0
- package/project-template/.claude/hooks/validate-atom-plan.mjs +224 -0
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +343 -0
- package/project-template/.claude/settings.json +36 -0
- package/project-template/.claude/settings.local.json +4 -0
- package/project-template/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
- package/project-template/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
- package/project-template/.claude/skills/playcraft-asset-state-sheet/SKILL.md +141 -0
- package/project-template/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
- package/project-template/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
- package/project-template/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +279 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +235 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
- package/project-template/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
- package/project-template/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
- package/project-template/.claude/skills/playcraft-masking/SKILL.md +373 -0
- package/project-template/.claude/skills/playcraft-research/SKILL.md +212 -0
- package/project-template/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
- package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
- package/project-template/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
- package/project-template/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
- package/project-template/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
- package/project-template/.claude/skills/playcraft-workflow/SKILL.md +485 -0
- 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/hooks.json +17 -0
- package/project-template/.cursor/rules/playcraft-orchestrator.mdc +137 -0
- package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +18 -0
- package/project-template/CLAUDE.md +280 -0
- package/project-template/assets/audio/bgm/.gitkeep +0 -0
- package/project-template/assets/audio/sfx/.gitkeep +0 -0
- package/project-template/assets/bundles/.gitkeep +0 -0
- package/project-template/assets/images/bg/.gitkeep +0 -0
- package/project-template/assets/images/reference/.gitkeep +0 -0
- package/project-template/assets/images/storyboard/.gitkeep +0 -0
- package/project-template/assets/images/tiles/.gitkeep +0 -0
- package/project-template/assets/images/ui/.gitkeep +0 -0
- package/project-template/assets/images/vfx/.gitkeep +0 -0
- package/project-template/assets/models/.gitkeep +0 -0
- package/project-template/docs/team/agent-conduct.md +121 -0
- package/project-template/docs/team/agent-runtime-matrix.md +62 -0
- package/project-template/docs/team/atom-plan-format.md +105 -0
- package/project-template/docs/team/collaboration.md +297 -0
- package/project-template/docs/team/core-model.md +50 -0
- package/project-template/docs/team/platform-capabilities.md +15 -0
- package/project-template/docs/team/workflow-changelog.md +65 -0
- package/project-template/docs/team/workflow-consistency-checklist.md +140 -0
- package/project-template/game/config/.gitkeep +0 -0
- package/project-template/game/gameplay/.gitkeep +0 -0
- package/project-template/game/scenes/.gitkeep +0 -0
- package/project-template/logs/.gitkeep +0 -0
- package/project-template/ta-workspace/logs/.gitkeep +0 -0
- package/project-template/ta-workspace/scripts/.gitkeep +0 -0
- package/project-template/ta-workspace/tmp/.gitkeep +0 -0
- package/project-template/templates/atom-plan.template.json +26 -0
- package/project-template/templates/atom-plan.template.md +108 -0
- package/project-template/templates/design-brief.template.md +195 -0
- package/project-template/templates/design-lens-checklist.reference.md +117 -0
- package/project-template/templates/design-methodology.md +99 -0
- package/project-template/templates/designer-log.template.md +114 -0
- package/project-template/templates/developer-log.template.md +134 -0
- package/project-template/templates/five-axis-framework.md +186 -0
- package/project-template/templates/intent-clarifications.template.md +58 -0
- package/project-template/templates/layout-spec.template.md +146 -0
- package/project-template/templates/project-state.template.md +237 -0
- package/project-template/templates/review-report.template.md +91 -0
- package/project-template/templates/style-exploration.template.md +93 -0
- package/project-template/templates/ta-log.template.md +343 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# TA Tools Reference
|
|
2
|
+
|
|
3
|
+
> Read by Technical Artist before starting any pipeline work. Contains full command reference for all TA tools.
|
|
4
|
+
|
|
5
|
+
## AI Generation
|
|
6
|
+
|
|
7
|
+
| Command | Purpose | Key Params |
|
|
8
|
+
| ----------------------------------- | ----------------------------------- | ---------------------------------------------------------------------- |
|
|
9
|
+
| `playcraft tools generate-image` | Generate image with style reference | `--prompt`, `--output`, `--reference-image` (up to 8), `--image-model` |
|
|
10
|
+
| `playcraft tools list-image-models` | List available models | `--json` |
|
|
11
|
+
| `playcraft tools search-image` | Search reference images | `--query`, `--count`, `--json` |
|
|
12
|
+
| `playcraft tools research` | Research style/technical params | `--query`, `--focus visual\|code`, `--json` |
|
|
13
|
+
|
|
14
|
+
## 3D Model Pipeline
|
|
15
|
+
|
|
16
|
+
| Command | Purpose | Key Params |
|
|
17
|
+
| -------------------------------- | ----------------------------------------- | ------------------------------------------------------ |
|
|
18
|
+
| `playcraft tools generate-3d` | AI text-to-3D / image-to-3D (HunyuanTo3D) | `--prompt`, `--input`, `--output model.glb`, `--model` |
|
|
19
|
+
| `playcraft tools list-3d-models` | List available 3D generation configs | `--json` |
|
|
20
|
+
| `playcraft 3d list-models` | List bundled white model primitives | — |
|
|
21
|
+
| `playcraft 3d info <model>` | Show vertex/face/UV details | `--json` |
|
|
22
|
+
| `playcraft 3d apply-texture` | Apply image texture to white model | `--model`, `--texture`, `--output`, `--color` |
|
|
23
|
+
| `playcraft 3d convert` | Convert GLB ↔ GLTF | `--input`, `--output` |
|
|
24
|
+
| `playcraft 3d optimize` | Compress GLB (texture resize, dedup) | `--input`, `--output`, `--texture-size 512` |
|
|
25
|
+
|
|
26
|
+
## Sprite Sheet Pipeline
|
|
27
|
+
|
|
28
|
+
| Command | Purpose | Key Params |
|
|
29
|
+
| ------------------------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `playcraft image sprite-split` | Split sprite sheet into frames | `--input`, `--output-dir`, `--auto-detect` OR `--rows --columns --frame-width --frame-height` |
|
|
31
|
+
| `playcraft image sprite-sheet` | Merge frames into sprite sheet | `--inputs`, `--output`, `--columns`, `--cell-width`, `--cell-height`, `--padding` |
|
|
32
|
+
| `playcraft image animate` | Generate animation sprite sheet | `--input`, `--preset spin\|bounce\|pulse\|shake\|float\|blink\|swing\|wobble\|flip`, `--frames 8`, `--output` |
|
|
33
|
+
| `playcraft image list-vfx` | List bundled VFX sprite presets | `--json` |
|
|
34
|
+
| `playcraft image use-vfx` | Copy VFX preset to project | `--preset explosion_small\|sparkle\|confetti\|starburst\|smoke\|glow\|impact_ring\|coin_collect`, `--output`, `--tint`, `--scale` |
|
|
35
|
+
|
|
36
|
+
## Concept Art Extraction (SAM3 Segmentation)
|
|
37
|
+
|
|
38
|
+
> **Use this BEFORE AI generation** — extracting from confirmed concept art is faster and more style-consistent.
|
|
39
|
+
|
|
40
|
+
| Command | Purpose | Key Params |
|
|
41
|
+
| ------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `playcraft image segment` | SAM3 semantic segmentation: text prompt → mask + RGBA cutout | `--input`, `--text "<description>"`, `--extract-rgba` (transparent cutout), `--output-dir`, `--prompts '[...]'` (batch) |
|
|
43
|
+
|
|
44
|
+
**Workflow**:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Single element extraction
|
|
48
|
+
playcraft image segment \
|
|
49
|
+
--input assets/images/concept/option_a.jpg \
|
|
50
|
+
--text "playing card spade ace" \
|
|
51
|
+
--extract-rgba \
|
|
52
|
+
--output-dir ta-workspace/tmp/
|
|
53
|
+
|
|
54
|
+
# Batch extraction from same concept art
|
|
55
|
+
playcraft image segment \
|
|
56
|
+
--input assets/images/concept/option_a.jpg \
|
|
57
|
+
--prompts '[{"text":"score display"},{"text":"timer icon"},{"text":"combo banner"}]' \
|
|
58
|
+
--extract-rgba \
|
|
59
|
+
--output-dir ta-workspace/tmp/ui-seg/
|
|
60
|
+
|
|
61
|
+
# Then: resize extracted elements to assetSpec dimensions
|
|
62
|
+
playcraft image resize --input ta-workspace/tmp/card_extracted.png \
|
|
63
|
+
--output assets/images/tiles/card_spade_A.png \
|
|
64
|
+
--width 140 --height 196
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Notes**:
|
|
68
|
+
|
|
69
|
+
- Cold start ≈ 15s; subsequent calls fast
|
|
70
|
+
- If extracted quality is insufficient → fall back to AI generation with the concept art as `--reference-image`
|
|
71
|
+
- `--extract-rgba` produces transparent PNG directly (no separate `remove-background` needed)
|
|
72
|
+
|
|
73
|
+
## Image Processing
|
|
74
|
+
|
|
75
|
+
| Category | Commands |
|
|
76
|
+
| ------------ | ---------------------------------------------------------- |
|
|
77
|
+
| Geometry | `resize` / `crop` / `rotate` / `flip` / `pad` / `trim` |
|
|
78
|
+
| Format | `convert` (png/jpg/webp/avif) |
|
|
79
|
+
| Filters | `grayscale` / `blur` / `tint` / `negate` / `pixelate` |
|
|
80
|
+
| Composite | `overlay` (layer images) |
|
|
81
|
+
| Background | `remove-background` (floodfill or --method ai) |
|
|
82
|
+
| Segmentation | `segment` (SAM3, text-prompt extraction from scene images) |
|
|
83
|
+
| Info | `info` (dimensions, format, size) |
|
|
84
|
+
|
|
85
|
+
## Smart Segmentation (SAM3)
|
|
86
|
+
|
|
87
|
+
| Command | Purpose | Key Params |
|
|
88
|
+
| ------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
89
|
+
| `playcraft image segment` | AI semantic segmentation (SAM3), produces mask + rgba | `--input`, `--text` OR `--boxes`, `--output-dir`, `--threshold`, `--no-rgba` |
|
|
90
|
+
|
|
91
|
+
> For full guide (text prompt / box mode / threshold tuning / mask compositing workflows), **invoke the `playcraft-masking` skill**.
|
|
92
|
+
|
|
93
|
+
## Batch Processing
|
|
94
|
+
|
|
95
|
+
| Command | Purpose | Key Params |
|
|
96
|
+
| -------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
97
|
+
| `playcraft image batch` | Declarative multi-step batch on a directory | `--input-dir`, `--output-dir`, `--steps`, `--parallel N`, `--skip-existing` |
|
|
98
|
+
| `playcraft image pipeline` | YAML/JSON config pipeline with optional sprite-sheet assembly | `--config <yaml/json>`, `--dry-run` |
|
|
99
|
+
|
|
100
|
+
> For decision tree (Node.js script vs batch vs pipeline), step syntax, and known limitations, **invoke the `playcraft-batch-pipeline` skill**.
|
|
101
|
+
|
|
102
|
+
## Audio Processing
|
|
103
|
+
|
|
104
|
+
| Command | Purpose |
|
|
105
|
+
| -------------------------- | ---------------------- |
|
|
106
|
+
| `playcraft audio compress` | Reduce file size |
|
|
107
|
+
| `playcraft audio trim` | Cut to target duration |
|
|
108
|
+
| `playcraft audio loop` | Make seamless loop |
|
|
109
|
+
| `playcraft audio fade` | Add fade in/out |
|
|
110
|
+
| `playcraft audio convert` | Change format |
|
|
111
|
+
| `playcraft audio info` | Check metadata |
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
> 本文件是 VFX/动画预设的完整目录与配方参考。选型决策见 `playcraft-vfx-animation` skill。
|
|
2
|
+
|
|
3
|
+
# VFX/动画预设完整目录与配方
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. VFX 预设完整详解(8 个)
|
|
8
|
+
|
|
9
|
+
| 预设名 | 帧数 | 列数 | 体积 | 适用游戏事件 | 典型颜色 |
|
|
10
|
+
| ----------------- | ---- | ---- | ----- | ------------------------------ | ----------------- |
|
|
11
|
+
| `explosion_small` | 8 | 4 | ~30KB | 消除、方块击破、碰撞 | 橙红黄渐变 |
|
|
12
|
+
| `sparkle` | 6 | 3 | ~15KB | 得分、道具收集、奖励获得 | 金黄/白色闪光 |
|
|
13
|
+
| `confetti` | 12 | 4 | ~25KB | 关卡完成、大胜利、解锁 | 多彩纸片 |
|
|
14
|
+
| `starburst` | 8 | 4 | ~20KB | 奖励显示、连击触发、特殊技能 | 金色放射 |
|
|
15
|
+
| `smoke` | 8 | 4 | ~20KB | 元素消失、角色冲刺、撞击后尘 | 白/灰烟雾 |
|
|
16
|
+
| `glow` | 6 | 3 | ~10KB | 元素高亮、被选中状态、增益效果 | 发光环(可 tint) |
|
|
17
|
+
| `impact_ring` | 6 | 3 | ~15KB | 物体落地、受击反馈、点击反馈 | 白色扩散环 |
|
|
18
|
+
| `coin_collect` | 8 | 4 | ~20KB | 金币拾取、货币奖励 | 金黄闪光 |
|
|
19
|
+
|
|
20
|
+
### explosion_small — 小型爆炸
|
|
21
|
+
|
|
22
|
+
- **动画感**:中心爆发 -> 碎片扩散 -> 消散,8 帧循环
|
|
23
|
+
- **最佳用途**:Match-3 消除时的元素爆炸效果;方块游戏砖块击破
|
|
24
|
+
- **Tint 建议**:橙红系(默认),蓝紫系适合冰系技能
|
|
25
|
+
- **Scale 建议**:1.0-1.5(不宜过大,否则遮挡游戏元素)
|
|
26
|
+
- **典型错误**:scale 设太大导致爆炸遮挡相邻元素;冰系场景忘记 tint 蓝色
|
|
27
|
+
|
|
28
|
+
### sparkle — 闪光迸发
|
|
29
|
+
|
|
30
|
+
- **动画感**:多点闪光粒子从中心向外迸发,6 帧,轻盈感强
|
|
31
|
+
- **最佳用途**:得分反馈;道具拾取;星星闪烁;金币落地
|
|
32
|
+
- **Tint 建议**:金黄(默认得分);白色(魔法);粉色(爱心类游戏)
|
|
33
|
+
- **Scale 建议**:0.8-1.2
|
|
34
|
+
- **典型错误**:与 coin_collect 混淆——sparkle 更通用,coin_collect 专为货币设计
|
|
35
|
+
|
|
36
|
+
### confetti — 彩色纸雨
|
|
37
|
+
|
|
38
|
+
- **动画感**:多色纸片从上方飘落,12 帧,庆祝感最强
|
|
39
|
+
- **最佳用途**:关卡完成;解锁成就;首次胜利
|
|
40
|
+
- **Tint 建议**:不建议 tint(彩色是其核心特征)
|
|
41
|
+
- **Scale 建议**:1.5-2.0(大范围覆盖效果更好)
|
|
42
|
+
- **典型错误**:对 confetti 使用 tint 导致失去多彩感;scale 太小失去庆祝氛围
|
|
43
|
+
|
|
44
|
+
### starburst — 星形放射
|
|
45
|
+
|
|
46
|
+
- **动画感**:多条射线从中心向四周放射,8 帧,视觉冲击强
|
|
47
|
+
- **最佳用途**:大奖励显示;连击触发;技能激活;关键道具出现
|
|
48
|
+
- **Tint 建议**:金色(奖励);蓝色(技能);紫色(稀有物品)
|
|
49
|
+
- **Scale 建议**:1.0-2.0
|
|
50
|
+
- **典型错误**:同时使用 starburst + explosion_small 导致视觉混乱
|
|
51
|
+
|
|
52
|
+
### smoke — 烟雾消散
|
|
53
|
+
|
|
54
|
+
- **动画感**:烟雾团从中心扩散渐渐透明,8 帧,柔和感
|
|
55
|
+
- **最佳用途**:元素消失动画;角色冲刺残影;爆炸后尘烟
|
|
56
|
+
- **Tint 建议**:白/浅灰(轻盈);黑/深灰(爆炸尘埃);浅蓝(冰系)
|
|
57
|
+
- **Scale 建议**:1.0-1.8
|
|
58
|
+
- **典型错误**:浅色背景上用白色 smoke 导致不可见
|
|
59
|
+
|
|
60
|
+
### glow — 光晕脉冲
|
|
61
|
+
|
|
62
|
+
- **动画感**:光环从小变大再消散,6 帧,循环感强(可用于持续状态)
|
|
63
|
+
- **最佳用途**:选中状态持续高亮;增益道具激活;关键元素引导注意力
|
|
64
|
+
- **Tint 建议**:与元素主色一致(如选中蓝色元素 -> 蓝色 glow)
|
|
65
|
+
- **Scale 建议**:1.0-1.5(需与元素大小匹配)
|
|
66
|
+
- **典型错误**:glow 颜色与元素颜色不匹配导致视觉割裂
|
|
67
|
+
|
|
68
|
+
### impact_ring — 撞击扩散环
|
|
69
|
+
|
|
70
|
+
- **动画感**:圆环从小快速向外扩散,6 帧,物理感强
|
|
71
|
+
- **最佳用途**:物体落地冲击;玩家点击反馈;受击瞬间
|
|
72
|
+
- **Tint 建议**:白色(轻);橙色(重击);红色(伤害)
|
|
73
|
+
- **Scale 建议**:1.0-2.0(落地冲击可用较大 scale)
|
|
74
|
+
- **典型错误**:用于持续性效果——impact_ring 是瞬时的,持续高亮应用 glow
|
|
75
|
+
|
|
76
|
+
### coin_collect — 金币拾取闪光
|
|
77
|
+
|
|
78
|
+
- **动画感**:金色闪光发散再消失,8 帧,专为金币/货币设计
|
|
79
|
+
- **最佳用途**:金币/宝石/星星拾取;积分获得
|
|
80
|
+
- **Tint 建议**:金黄(默认);青色(蓝宝石类);粉色(粉色主题游戏)
|
|
81
|
+
- **Scale 建议**:0.8-1.2(与金币元素大小匹配)
|
|
82
|
+
- **典型错误**:非货币场景误用 coin_collect——通用收集反馈应用 sparkle
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 2. Animate 预设完整详解(8 种 + flip)
|
|
87
|
+
|
|
88
|
+
| 预设名 | 帧数默认 | 动画感 | 适用素材 |
|
|
89
|
+
| -------- | -------- | ----------------------------- | -------------------------- |
|
|
90
|
+
| `bounce` | 8 | 竖直正弦平移,上下弹跳 | 角色、可收集道具、悬浮物品 |
|
|
91
|
+
| `float` | 8 | 上下轻柔漂浮 + 轻微旋转 | 道具、宝箱、魔法效果 |
|
|
92
|
+
| `pulse` | 8 | 缩放振荡,放大缩小循环 | 按钮、高亮元素、增益图标 |
|
|
93
|
+
| `spin` | 8 | X 轴缩放振荡模拟 Y 轴旋转 | 金币、奖章、圆形道具 |
|
|
94
|
+
| `shake` | 8 | 随机小幅 XY 偏移 | 受击反馈、警告、注意力引导 |
|
|
95
|
+
| `blink` | 8 | 不透明度振荡,显隐循环 | 光标、提示符、倒计时警告 |
|
|
96
|
+
| `swing` | 8 | 绕顶部中心摆动(钟摆) | 悬挂物体、灯笼、吊饰 |
|
|
97
|
+
| `wobble` | 8 | 左右交替小幅旋转 | 果冻感物体、软体角色、气泡 |
|
|
98
|
+
| `flip` | — | 双面翻转(需正面+背面两张图) | 卡牌翻转、麻将牌、双面道具 |
|
|
99
|
+
|
|
100
|
+
### bounce — 弹跳
|
|
101
|
+
|
|
102
|
+
- **动画感**:元素沿 Y 轴做正弦曲线上下移动,最自然的"活着"感
|
|
103
|
+
- **最佳用途**:主角色等待动画;可收集道具提示玩家注意;悬浮的星星/金币
|
|
104
|
+
- **参数建议**:`--frames 8`(流畅);`--columns 4`
|
|
105
|
+
- **典型错误**:对需要"轻柔飘逸感"的魔法元素用 bounce——应该用 float
|
|
106
|
+
|
|
107
|
+
### float — 轻柔漂浮
|
|
108
|
+
|
|
109
|
+
- **动画感**:比 bounce 更轻柔,幅度更小,加入轻微旋转(约 +-3 度),有"飘在空中"的感觉
|
|
110
|
+
- **最佳用途**:魔法道具;宝箱;云朵;任何需要"神秘漂浮感"的元素
|
|
111
|
+
- **参数建议**:`--frames 8-12`;`--columns 4`
|
|
112
|
+
- **典型错误**:对需要明显运动感的可收集道具用 float——幅度太小玩家可能注意不到
|
|
113
|
+
|
|
114
|
+
### pulse — 缩放振荡
|
|
115
|
+
|
|
116
|
+
- **动画感**:元素周期性放大(约 120%)再缩回,引导视觉注意力最有效
|
|
117
|
+
- **最佳用途**:CTA 按钮引导点击;教程高亮元素;增益道具图标
|
|
118
|
+
- **参数建议**:`--frames 6`(快速)或 `--frames 12`(缓慢呼吸感)
|
|
119
|
+
- **典型错误**:对游戏主体元素用 pulse——持续缩放让玩家头晕,pulse 只用于 UI 引导
|
|
120
|
+
|
|
121
|
+
### spin — 旋转
|
|
122
|
+
|
|
123
|
+
- **动画感**:通过 X 轴缩放模拟 Y 轴旋转,类似金币翻转的平面动画
|
|
124
|
+
- **最佳用途**:金币、奖章、圆形徽章;任何圆形/对称元素
|
|
125
|
+
- **参数建议**:`--frames 8`;注意:此预设不是真 3D 旋转,而是 2D 压缩模拟
|
|
126
|
+
- **典型错误**:对非对称/非圆形元素用 spin——会暴露 2D 压缩的破绽
|
|
127
|
+
|
|
128
|
+
### shake — 颤抖
|
|
129
|
+
|
|
130
|
+
- **动画感**:随机小幅位移,制造紧张/警告感
|
|
131
|
+
- **最佳用途**:受击反馈;错误操作提示;血量危险警告;注意力强制引导
|
|
132
|
+
- **参数建议**:`--frames 8-12`(更多帧 = 抖动时间更长)
|
|
133
|
+
- **典型错误**:用 shake 做 idle 动画——持续颤抖让玩家焦虑,idle 应用 bounce/float
|
|
134
|
+
|
|
135
|
+
### blink — 闪烁
|
|
136
|
+
|
|
137
|
+
- **动画感**:元素交替显示/隐藏,最简单的"请注意我"动画
|
|
138
|
+
- **最佳用途**:教程光标;限时提示符;倒计时最后几秒;"还有一步"引导
|
|
139
|
+
- **参数建议**:`--frames 4-6`(闪烁频率适中)
|
|
140
|
+
- **典型错误**:blink 帧数太多(>8)导致闪烁太慢、失去紧迫感
|
|
141
|
+
|
|
142
|
+
### swing — 摆动
|
|
143
|
+
|
|
144
|
+
- **动画感**:以元素顶部中心为轴心,像钟摆一样左右摆动
|
|
145
|
+
- **最佳用途**:悬挂的灯笼、指示牌、吊饰;任何"挂着"的元素
|
|
146
|
+
- **参数建议**:`--frames 12-16`(较多帧让摆动更平滑)
|
|
147
|
+
- **典型错误**:对地面物体用 swing——违反物理直觉,地面物体应用 wobble
|
|
148
|
+
|
|
149
|
+
### wobble — 抖动(果冻感)
|
|
150
|
+
|
|
151
|
+
- **动画感**:左右交替轻微旋转(约 +-5-10 度),有弹性感
|
|
152
|
+
- **最佳用途**:果冻、泡泡、软体角色、气球;任何"软弹弹"的可爱元素
|
|
153
|
+
- **参数建议**:`--frames 8-12`;`--columns 4`
|
|
154
|
+
- **典型错误**:对刚性物体(金属、石头)用 wobble——弹性感与材质矛盾
|
|
155
|
+
|
|
156
|
+
### flip — 双面翻转
|
|
157
|
+
|
|
158
|
+
- **动画感**:正面 -> 过渡 -> 背面的完整翻转动画,需要两张图
|
|
159
|
+
- **最佳用途**:卡牌翻转;麻将牌正反面;双面道具;谜题揭示
|
|
160
|
+
- **特殊要求**:必须同时提供 `--input`(正面图)和 `--back`(背面图)
|
|
161
|
+
- **参数建议**:详见 `ta-3d-flip-recipe.md`
|
|
162
|
+
- **典型错误**:忘记提供 --back 参数;正反面尺寸不一致
|
|
163
|
+
|
|
164
|
+
**flip CLI 示例**:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
playcraft image animate \
|
|
168
|
+
--input assets/images/cards/card_front.png \
|
|
169
|
+
--back assets/images/cards/card_back.png \
|
|
170
|
+
--preset flip \
|
|
171
|
+
--output assets/images/cards/card_flip.png
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 3. 游戏类型组合配方
|
|
177
|
+
|
|
178
|
+
### Match-3 消除游戏套餐
|
|
179
|
+
|
|
180
|
+
| 元素 | 推荐 VFX | 推荐 animate | 备注 |
|
|
181
|
+
| ------------------ | ------------------------ | ------------ | ---------------- |
|
|
182
|
+
| 消除爆炸 | `explosion_small` | — | tint 按元素颜色 |
|
|
183
|
+
| 得分反馈 | `sparkle` | — | 每次消除后触发 |
|
|
184
|
+
| 关卡完成 | `confetti` + `starburst` | — | 双 VFX 叠加 |
|
|
185
|
+
| 可移动元素(等待) | — | `bounce` | 待操作的关键元素 |
|
|
186
|
+
| 特殊道具 | `glow` | `pulse` | 高亮 + 引导点击 |
|
|
187
|
+
| 连击 | `starburst` | — | 大 scale=1.5 |
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Match-3 标准消除特效
|
|
191
|
+
playcraft image use-vfx --preset explosion_small --tint "#FF6B35" --output assets/images/vfx/tile_break.png
|
|
192
|
+
playcraft image use-vfx --preset sparkle --output assets/images/vfx/score_sparkle.png
|
|
193
|
+
playcraft image animate --input assets/images/tiles/special_bomb.png --preset pulse --frames 8 --output assets/images/tiles/special_bomb_anim.png
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### 跑酷 / 平台跳跃套餐
|
|
197
|
+
|
|
198
|
+
| 元素 | 推荐 VFX | 推荐 animate | 备注 |
|
|
199
|
+
| -------------- | -------------------------- | ------------ | ------------- |
|
|
200
|
+
| 道具收集 | `coin_collect` / `sparkle` | — | 根据道具类型 |
|
|
201
|
+
| 冲刺残影 | `smoke` | — | tint 深灰或黑 |
|
|
202
|
+
| 落地冲击 | `impact_ring` | — | scale=1.5 |
|
|
203
|
+
| 跑动中角色等待 | — | `bounce` | 开始前的角色 |
|
|
204
|
+
| CTA 按钮 | — | `pulse` | 引导安装 |
|
|
205
|
+
| 金币 | — | `spin` | 圆形金币旋转 |
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
playcraft image use-vfx --preset smoke --tint "#666666" --output assets/images/vfx/dash_smoke.png
|
|
209
|
+
playcraft image use-vfx --preset impact_ring --scale 1.5 --output assets/images/vfx/land_impact.png
|
|
210
|
+
playcraft image animate --input assets/images/ui/coins.png --preset spin --frames 8 --output assets/images/ui/coins_spin.png
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### 卡牌 / 麻将套餐
|
|
214
|
+
|
|
215
|
+
| 元素 | 推荐 VFX | 推荐 animate | 备注 |
|
|
216
|
+
| ------------ | ------------------------ | ------------ | ----------------------- |
|
|
217
|
+
| 卡牌翻转 | — | `flip` | 见 ta-3d-flip-recipe.md |
|
|
218
|
+
| 胜利展示 | `confetti` + `starburst` | — | — |
|
|
219
|
+
| 选中卡牌 | `glow` | — | tint 与牌背色匹配 |
|
|
220
|
+
| 特殊牌效果 | `sparkle` | — | — |
|
|
221
|
+
| 等待中的牌组 | — | `wobble` | 轻柔抖动 |
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
playcraft image use-vfx --preset glow --tint "#FFD700" --output assets/images/vfx/card_select_glow.png
|
|
225
|
+
playcraft image animate --input assets/images/cards/hand_pile.png --preset wobble --frames 8 --output assets/images/cards/hand_pile_wobble.png
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 休闲益智 / 泡泡射击套餐
|
|
229
|
+
|
|
230
|
+
| 元素 | 推荐 VFX | 推荐 animate | 备注 |
|
|
231
|
+
| ---------- | ----------------------------- | ------------ | ------------ |
|
|
232
|
+
| 泡泡消除 | `explosion_small` + `sparkle` | — | 双 VFX |
|
|
233
|
+
| 浮动的泡泡 | — | `float` | 轻柔感 |
|
|
234
|
+
| 瞄准指示 | — | `blink` | 提示玩家操作 |
|
|
235
|
+
| 星星收集 | `coin_collect` | `spin` | — |
|
|
236
|
+
| 过关庆祝 | `confetti` | — | — |
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 4. 自定义动画帧数决策指南
|
|
241
|
+
|
|
242
|
+
> 本节适用于不使用 animate 内置预设的场景——从独立帧手动合成精灵图(`playcraft image sprite-sheet`),或 AI 批量生成序列帧(`playcraft-sprite-generation` Skill)时。
|
|
243
|
+
|
|
244
|
+
### 4.1 各动画类型的帧数基准
|
|
245
|
+
|
|
246
|
+
| 动画类型 | 建议帧数 | 建议 FPS | 关键注意点 |
|
|
247
|
+
| ------------- | -------- | -------------- | -------------------------------------------------------- |
|
|
248
|
+
| Idle(待机) | 2-4 帧 | 6-8 FPS | 极简为主;2 帧(呼吸缩放)足以表达"活着" |
|
|
249
|
+
| Walk(行走) | 4-8 帧 | 8-12 FPS | 32x32 以下用 4 帧;64x64 以上用 6-8 帧 |
|
|
250
|
+
| Run(奔跑) | 6-8 帧 | 10-12 FPS | 用更高 FPS 而非更多帧;8 帧 @12FPS 比 16 帧 @6FPS 更流畅 |
|
|
251
|
+
| Jump(跳跃) | 3-5 帧 | 可变 | 上升 1 帧 + 顶点 1 帧 + 下降 1 帧已足够 |
|
|
252
|
+
| 攻击/打击 | 3-6 帧 | 可变(见 4.2) | 帧时长分配才是关键 |
|
|
253
|
+
| 消除/爆炸特效 | 4-8 帧 | 12-15 FPS | 多于 8 帧视觉改善边际递减 |
|
|
254
|
+
| UI 元素动画 | 2-4 帧 | — | 强烈建议用 CSS animation 替代(0KB 开销) |
|
|
255
|
+
| 卡牌/翻转 | 16 帧 | 24 FPS | 用 `playcraft-3d-flip-sprite` Skill |
|
|
256
|
+
|
|
257
|
+
**体积估算公式**:
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
精灵图体积 = 每帧宽 x 每帧高 x 帧数 x 4 bytes (RGBA) x 0.3 (PNG 压缩率)
|
|
261
|
+
示例:128x128 x 8帧 = 512KB 原始 -> ~50KB PNG
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### 4.2 非均匀帧时长(比增加帧数更有效)
|
|
265
|
+
|
|
266
|
+
可玩广告 5MB 预算紧张,不要用增加帧数追求流畅感——用非均匀帧时长创造冲击力,效果更好且不增加体积。
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
攻击动画(5 帧)的帧时长分配示例:
|
|
270
|
+
帧 1(蓄力开始): 80ms <- 快速进入
|
|
271
|
+
帧 2(蓄力末): 80ms
|
|
272
|
+
帧 3(打击瞬间): 40ms <- 最短,创造冲击感
|
|
273
|
+
帧 4(打击后): 180ms <- hold 住打击帧,让玩家"看见"命中
|
|
274
|
+
帧 5(恢复): 120ms
|
|
275
|
+
|
|
276
|
+
共 5 帧 500ms,比均匀的 5 帧 @10FPS 感知效果强 3-5 倍
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
在代码层实现非均匀帧时长(Developer 负责,TA 需在 ta-log 中注明建议):
|
|
280
|
+
|
|
281
|
+
```javascript
|
|
282
|
+
// 告诉 Developer 的帧时长数组(写入 ta-log.md)
|
|
283
|
+
// const ATTACK_FRAME_DURATIONS = [80, 80, 40, 180, 120]; // ms per frame
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### 4.3 何时用精灵图,何时改用其他方案
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
需要动画效果?
|
|
290
|
+
|
|
|
291
|
+
+-- 简单变换(位移/缩放/透明度/旋转)?
|
|
292
|
+
| -> CSS animation / CSS transition(Developer 实现,0KB 开销,GPU 合成)
|
|
293
|
+
|
|
|
294
|
+
+-- 矢量图标动画(CTA 脉冲/教程手势)?
|
|
295
|
+
| -> Lottie JSON(~30KB,矢量,跨分辨率)
|
|
296
|
+
|
|
|
297
|
+
+-- VFX 特效(爆炸/闪光/纸雨)?
|
|
298
|
+
| -> playcraft image use-vfx(内置预设,最快最省)
|
|
299
|
+
|
|
|
300
|
+
+-- 内置预设(bounce/spin/pulse 等)满足需求?
|
|
301
|
+
| -> playcraft image animate --preset <name>
|
|
302
|
+
|
|
|
303
|
+
+-- 3D 翻转(卡牌/麻将/双面道具)?
|
|
304
|
+
| -> playcraft-3d-flip-sprite Skill(16 帧软光栅渲染)
|
|
305
|
+
|
|
|
306
|
+
+-- 以上都不满足(复杂序列帧、角色行走/攻击)?
|
|
307
|
+
-> 精灵图(AI 批量生成帧 -> sprite-sheet 合并)
|
|
308
|
+
参考:playcraft-sprite-generation Skill
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## 5. VFX 体积预算参考
|
|
314
|
+
|
|
315
|
+
| 游戏复杂度 | 建议 VFX 总体积上限 | 配置策略 |
|
|
316
|
+
| ------------------ | ------------------- | ----------------------------- |
|
|
317
|
+
| 简单(1-2 种 VFX) | <= 60KB | `sparkle` + `coin_collect` |
|
|
318
|
+
| 中等(3-4 种) | <= 100KB | 加 `explosion_small` + `glow` |
|
|
319
|
+
| 丰富(5+ 种) | <= 150KB | 全套,注意总文件大小预算 |
|
|
320
|
+
|
|
321
|
+
> TA 在选择 VFX 组合时,需结合 layout-spec.md 中的总体积预算(通常 <= 2-3MB 给所有素材)。VFX 精灵图应优先使用小体积预设,大型 VFX(confetti 25KB)控制在 1-2 个。
|
|
322
|
+
|
|
323
|
+
### 5MB 预算中的动画体积分配建议
|
|
324
|
+
|
|
325
|
+
| 资产类别 | 建议体积上限 | 备注 |
|
|
326
|
+
| ------------------ | ------------ | --------------------------- |
|
|
327
|
+
| 核心游戏元素精灵图 | 1.5-2 MB | 包含所有 tile/角色/道具 |
|
|
328
|
+
| VFX 精灵图 | <= 150 KB | 用内置预设控制 |
|
|
329
|
+
| UI 动画(Lottie) | <= 100 KB | CTA 脉冲、教程手势 |
|
|
330
|
+
| 背景/场景图 | <= 500 KB | WebP 格式优先 |
|
|
331
|
+
| 音频 | <= 300 KB | BGM + 关键 SFX |
|
|
332
|
+
| 代码 + 框架 | <= 800 KB | 按引擎 playcraft build 优化 |
|
|
333
|
+
|
|
334
|
+
> Base64 编码注意:单 HTML 格式(IronSource / AppLovin / Snapchat)所有资源 Base64 内联后体积增加 ~33%。即 5MB 限制的单 HTML,实际可用原始资产 <= 3.75MB。Google Ads ZIP 格式无此限制,5MB 全部可用。
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 6. CLI 参数完整速查
|
|
339
|
+
|
|
340
|
+
### playcraft image use-vfx 完整参数
|
|
341
|
+
|
|
342
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
343
|
+
| ---------- | ---------- | -------------------- | ------------------------ |
|
|
344
|
+
| `--preset` | string | 必填 | VFX 预设名 |
|
|
345
|
+
| `--output` | string | 必填 | 输出精灵表路径(.png) |
|
|
346
|
+
| `--tint` | hex string | 无(使用预设默认色) | 颜色叠加,格式 `#RRGGBB` |
|
|
347
|
+
| `--scale` | number | `1.0` | 整体缩放倍数(0.5-3.0) |
|
|
348
|
+
|
|
349
|
+
### playcraft image animate 完整参数
|
|
350
|
+
|
|
351
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
352
|
+
| ---------------- | ------ | -------- | ----------------------------------- |
|
|
353
|
+
| `--input` | string | 必填 | 输入图片路径(素材原图) |
|
|
354
|
+
| `--output` | string | 必填 | 输出精灵表路径(.png) |
|
|
355
|
+
| `--preset` | string | `bounce` | 动画预设名 |
|
|
356
|
+
| `--frames` | number | `8` | 总帧数,范围 2-64 |
|
|
357
|
+
| `--columns` | number | `4` | 精灵表列数(行数 = frames/columns) |
|
|
358
|
+
| `--back` | string | 无 | flip 专用:背面图片路径 |
|
|
359
|
+
| `--list-presets` | flag | — | 打印所有预设说明后退出 |
|
|
360
|
+
|
|
361
|
+
### playcraft image list-vfx 参数
|
|
362
|
+
|
|
363
|
+
| 参数 | 说明 |
|
|
364
|
+
| -------- | ---------------------------------------------- |
|
|
365
|
+
| `--json` | 以 JSON 格式输出预设列表(含帧数、体积等字段) |
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Reviewer: design_check (Gate pre-check) + ui_diff (MC screenshots) + load_check (no errors) — playwright-cli; no build."
|
|
3
|
+
allowedTools:
|
|
4
|
+
- "Read"
|
|
5
|
+
- "Write"
|
|
6
|
+
- "Grep"
|
|
7
|
+
- "Glob"
|
|
8
|
+
- "Skill"
|
|
9
|
+
- "Bash(ls:*)"
|
|
10
|
+
- "Bash(cat:*)"
|
|
11
|
+
- "Bash(find:*)"
|
|
12
|
+
- "Bash(du:*)"
|
|
13
|
+
- "Bash(wc:*)"
|
|
14
|
+
- "Bash(grep:*)"
|
|
15
|
+
- "Bash(npm run dev*)"
|
|
16
|
+
- "Bash(playcraft image info:*)"
|
|
17
|
+
- "Bash(playcraft audio info:*)"
|
|
18
|
+
- "Bash(playwright-cli:*)"
|
|
19
|
+
- "Bash(npx playwright-cli:*)"
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
> **First Step**: Read `docs/project-state.md` → **`## Agent handoff`** → **## Runtime** → branch; read `refs/` only when Runtime says so. STOP: [STOP sync checklist](../../docs/team/collaboration.md#stop-sync-checklist).
|
|
23
|
+
|
|
24
|
+
# Reviewer — Playable Ads Convergence Review Agent
|
|
25
|
+
|
|
26
|
+
## Agent Conduct
|
|
27
|
+
|
|
28
|
+
> Full: [docs/team/agent-conduct.md](../../docs/team/agent-conduct.md). **On invoke, follow ## Runtime**; audit-only; orchestrator owns all `stage` transitions.
|
|
29
|
+
|
|
30
|
+
## Runtime (on invoke)
|
|
31
|
+
|
|
32
|
+
1. Read `docs/project-state.md` → parse `## Agent handoff` YAML + orchestrator-specified **review mode**.
|
|
33
|
+
2. If `subagent_stop: true` and `subagent: reviewer` and `waiting_for: orchestrator` → **Already STOPPED — waiting for orchestrator**.
|
|
34
|
+
3. Branch (mode from orchestrator invoke message or `next_orchestrator_action`):
|
|
35
|
+
|
|
36
|
+
| Mode | Preconditions | This round | On STOP (pass) | On STOP (fail) |
|
|
37
|
+
| ------------------ | ----------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| **`design_check`** | Gate #1 or #2b materials ready | Soft checklist on docs / MC / ASR — **no subjective quality judgment** | `next_orchestrator_action: "Run Gate #1"` or `"Run Gate #2b"` | Route to PM/Designer with missing items; `next_orchestrator_action: "Re-invoke @pm"` or `"Re-invoke @designer"` |
|
|
39
|
+
| **`ui_diff`** | `devStatus: ui_ready`, devUrl valid | **`playwright-cli`** screenshots vs MC panels; UI Diff Report | `uiReviewStatus: passed` → `next_orchestrator_action: "Set stage=gameplay_pass, invoke @developer"` | `uiReworkRound` +1 → `next_orchestrator_action: "Set stage=ui_rework, invoke routed agents per review-report"` |
|
|
40
|
+
| **`load_check`** | `devStatus: ready`, devUrl valid | **`playwright-cli`** open devUrl + console — no gameplay walkthrough | `loadCheck: passed` → `next_orchestrator_action: "Run Gate #3 with devUrl"` | Route Developer → `next_orchestrator_action: "Re-invoke @developer for load_check fixes"` |
|
|
41
|
+
|
|
42
|
+
4. Append `--- PLAYCRAFT_STOP ---` (`role: reviewer`).
|
|
43
|
+
|
|
44
|
+
**UI rework limit:** max **5** `uiReworkRound`. At round 5 with fail → note in report; handoff `Set stage=gameplay_pass` or escalate per orchestrator policy.
|
|
45
|
+
|
|
46
|
+
## Mission
|
|
47
|
+
|
|
48
|
+
> Team mission: see [CLAUDE.md](../../CLAUDE.md#mission). Stage 链路与上下游: [CLAUDE.md § Stage Model](../../CLAUDE.md#stage-model).
|
|
49
|
+
|
|
50
|
+
## Goals
|
|
51
|
+
|
|
52
|
+
**Three convergence modes (orchestrator picks one per invoke):**
|
|
53
|
+
|
|
54
|
+
| Mode | Weight | Pass condition |
|
|
55
|
+
| ---------------- | ------- | -------------------------------------------------- |
|
|
56
|
+
| **design_check** | Light | Soft checklist all pass (obvious defects only) |
|
|
57
|
+
| **ui_diff** | Heavy | Screenshots vs MC — no critical/major visual diffs |
|
|
58
|
+
| **load_check** | Minimal | Page loads ≤10s; console has no Error-level logs |
|
|
59
|
+
|
|
60
|
+
**Non-goals:** production fixes; subjective design critique in `design_check`; AI gameplay walkthrough; six-dimension scoring.
|
|
61
|
+
|
|
62
|
+
You are an **independent QA** — audit lens only; **no production participation**.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Core Skills
|
|
67
|
+
|
|
68
|
+
Reviewer 浏览器验证依赖 **`playwright-cli`**。**`ui_diff` / `load_check` 前必须先读 Skill:**
|
|
69
|
+
|
|
70
|
+
| Skill | Path | When |
|
|
71
|
+
| -------------------- | ----------------------------------------------------------------------------- | ----------------------- |
|
|
72
|
+
| **`playwright-cli`** | [`.claude/skills/playwright-cli/SKILL.md`](../skills/playwright-cli/SKILL.md) | `ui_diff`, `load_check` |
|
|
73
|
+
|
|
74
|
+
**典型流程(9:16 手机视口):**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
playwright-cli open <devUrl>
|
|
78
|
+
playwright-cli resize 390 844
|
|
79
|
+
playwright-cli screenshot --filename=logs/review-<scene>.png
|
|
80
|
+
playwright-cli console
|
|
81
|
+
playwright-cli close
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`design_check` 不需要浏览器。MC 比例验证用 `playcraft image info`。
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Review flow (summary)
|
|
89
|
+
|
|
90
|
+
**Primary L2:** [`refs/reviewer-convergence-eval.md`](refs/reviewer-convergence-eval.md) — checklists + `ui_diff` / `load_check` procedures.
|
|
91
|
+
|
|
92
|
+
| Mode | Steps |
|
|
93
|
+
| ---------------- | ------------------------------------------------------------------ |
|
|
94
|
+
| **design_check** | Gate #1 or #2b checklist → pass/fail + routeTo |
|
|
95
|
+
| **ui_diff** | MC paths → devUrl screenshots per scene → compare → UI Diff Report |
|
|
96
|
+
| **load_check** | devUrl load + console → one screenshot → pass/fail |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## File Access
|
|
101
|
+
|
|
102
|
+
**Read:** `docs/project-state.md`, `design-brief.md`, `layout-spec.md`, `atom-plan.json`, `atom-plan.md`, `style-exploration.md`, `logs/designer-log.md`, `logs/ta-log.md`, `logs/developer-log.md`, `assets/images/reference/`, `game/` (code audit only).
|
|
103
|
+
|
|
104
|
+
**Write:** `logs/review-report.md`; `docs/project-state.md` (checkpoint: `uiReviewStatus`, `uiReworkRound`, `loadCheck`, handoff only).
|
|
105
|
+
|
|
106
|
+
## Tools
|
|
107
|
+
|
|
108
|
+
**Browser (core):** **`playwright-cli`** — `open` / `resize` / `screenshot` / `console` / `close`. See [Core Skills](#core-skills).
|
|
109
|
+
|
|
110
|
+
**Dev server:** `npm run dev` if devUrl unreachable.
|
|
111
|
+
|
|
112
|
+
**Asset audit:** `playcraft image info` (MC ratio check in `design_check`).
|
|
113
|
+
|
|
114
|
+
## Output
|
|
115
|
+
|
|
116
|
+
Use `templates/review-report.template.md` — fill the section matching review mode (`design_check` / `ui_diff` / `load_check`).
|
|
117
|
+
|
|
118
|
+
Afterward update handoff per **Runtime**. **Never** write mainline `stage`.
|
|
119
|
+
|
|
120
|
+
## Important Rules
|
|
121
|
+
|
|
122
|
+
1. **Never modify production files** — only `logs/review-report.md` and `docs/project-state.md` checkpoint.
|
|
123
|
+
2. **`design_check` is soft** — block missing docs / wrong MC ratio / empty assetMapping; do not fail for aesthetics.
|
|
124
|
+
3. **`ui_diff` uses playwright-cli** — save screenshots under `logs/`; each diff needs severity + `routeTo: developer | ta | designer`.
|
|
125
|
+
4. **`load_check` is not gameplay QA** — only load + console errors; gameplay = user at Gate #3.
|
|
126
|
+
5. **`uiReworkRound` max 5** — increment on `ui_diff` fail; minor issues log only, do not block pass.
|
|
127
|
+
6. **Orchestrator owns stage** — you set handoff `next_orchestrator_action` only.
|