@playcraft/cli 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/commands/tools-generation.js +2 -4
  2. package/dist/commands/tools-utils.js +19 -0
  3. package/dist/utils/version-checker.js +8 -11
  4. package/package.json +3 -3
  5. package/project-template/.claude/agents/designer.md +12 -8
  6. package/project-template/.claude/agents/developer.md +53 -62
  7. package/project-template/.claude/agents/refs/README.md +21 -15
  8. package/project-template/.claude/agents/refs/designer-deliverable-spec.md +24 -0
  9. package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
  10. package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
  11. package/project-template/.claude/agents/refs/pm-workflow-detail.md +6 -0
  12. package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +130 -0
  13. package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +4 -284
  14. package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +27 -6
  15. package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +433 -24
  16. package/project-template/.claude/agents/reviewer.md +62 -38
  17. package/project-template/.claude/agents/technical-artist.md +36 -25
  18. package/project-template/.claude/hooks/README.md +9 -1
  19. package/project-template/.claude/hooks/validate-workflow-stop.mjs +86 -1
  20. package/project-template/.claude/settings.json +4 -0
  21. package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +65 -15
  22. package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +26 -7
  23. package/project-template/.claude/skills/playcraft-workflow/SKILL.md +104 -15
  24. package/project-template/.claude/skills/playwright-cli/SKILL.md +390 -0
  25. package/project-template/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
  26. package/project-template/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
  27. package/project-template/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
  28. package/project-template/.claude/skills/playwright-cli/references/running-code.md +240 -0
  29. package/project-template/.claude/skills/playwright-cli/references/session-management.md +226 -0
  30. package/project-template/.claude/skills/playwright-cli/references/spec-driven-testing.md +312 -0
  31. package/project-template/.claude/skills/playwright-cli/references/storage-state.md +275 -0
  32. package/project-template/.claude/skills/playwright-cli/references/test-generation.md +138 -0
  33. package/project-template/.claude/skills/playwright-cli/references/tracing.md +142 -0
  34. package/project-template/.claude/skills/playwright-cli/references/video-recording.md +157 -0
  35. package/project-template/.cursor/rules/playcraft-orchestrator.mdc +74 -24
  36. package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +1 -1
  37. package/project-template/CLAUDE.md +99 -59
  38. package/project-template/docs/team/agent-conduct.md +42 -26
  39. package/project-template/docs/team/atom-plan-format.md +33 -2
  40. package/project-template/docs/team/collaboration.md +57 -48
  41. package/project-template/docs/team/workflow-changelog.md +28 -14
  42. package/project-template/docs/team/workflow-consistency-checklist.md +12 -0
  43. package/project-template/templates/atom-plan.template.md +35 -3
  44. package/project-template/templates/designer-log.template.md +16 -0
  45. package/project-template/templates/developer-log.template.md +95 -101
  46. package/project-template/templates/layout-spec.template.md +14 -0
  47. package/project-template/templates/project-state.template.md +51 -33
  48. package/project-template/templates/review-report.template.md +76 -151
  49. package/project-template/templates/ta-log.template.md +138 -0
@@ -1,286 +1,6 @@
1
- # Reviewer: Six-Dimension Evaluation & Scoring
1
+ # Reviewer: Six-Dimension Evaluation (deprecated)
2
2
 
3
- > **Read before scoring and for the full audit loop.** Contains: Dev walkthrough; **Steps 0–0b + Phases 1–5** (DAG, layout, TA log, psychology, technical checks, six dimensions, DAG revisions); **scoring + veto**; **Rework mechanism** (rounds, severity, routing).
3
+ > **Superseded by [`reviewer-convergence-eval.md`](./reviewer-convergence-eval.md)** in `convergence-v1`.
4
+ > Do not use six-dimension scoring or final `review`/`rework` stages.
4
5
 
5
- **Developer alignment**: Style Consistency + Intent Fidelity → **Dev UI match**; Experience Flow + Difficulty Balance → **Dev gameplay match**; technical checks + veto items → runtime in Dev. **Dev walkthrough pass optional.** Build is not required for review pass.
6
-
7
- ---
8
-
9
- ## Dev walkthrough (before six-dimension scoring)
10
-
11
- Perform in browser at **devUrl** from `project-state.md` (start with `npm run dev` if down).
12
-
13
- ### UI match (maps to Style Consistency + Intent Fidelity)
14
-
15
- | Check | Compare against |
16
- | --------------------------- | --------------------------------------------------------------- |
17
- | Layout / zones / hierarchy | `layout-spec.md` |
18
- | Color, mood, MC fidelity | `style-exploration.md`, Gate #2 MC (concept panel + storyboard) |
19
- | Per-stage visual intent | Storyboard panels 2–5 in style-exploration |
20
- | Text-as-image, sprites, VFX | Live Dev vs approved design |
21
-
22
- ### Gameplay match (maps to Experience Flow + Difficulty Balance)
23
-
24
- | Check | Compare against |
25
- | ------------------------------------- | ---------------------------------- |
26
- | Hook → Tutorial → Gameplay → End Card | `design-brief.md` experience flow |
27
- | First level guaranteed success | PGS / atom-plan (**veto** if fail) |
28
- | Near-Win, difficulty, CTA timing | design-brief + Dev playthrough |
29
-
30
- Record pass/fail summary in `project-state.reviewerDevNotes` and `reviewerDevCheck`.
31
-
32
- ---
33
-
34
- ## Phase 4: Six-Dimension Experience Evaluation
35
-
36
- Simulate the player walking through Hook → Tutorial → Gameplay → End Card:
37
-
38
- ### 1. Experience Flow (experienceFlow)
39
-
40
- | Checkpoint | Criteria |
41
- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
42
- | Hook (0-3s) | Immediate visual/interactive hook? Attention captured in 3s? Does it match the Hook frame in `style-exploration.md` storyboard? |
43
- | Tutorial (3-10s) | Clear? Player understands core mechanic in 2-3 steps? Does it align with the Tutorial storyboard frame intent (low-pressure, guide elements visible)? |
44
- | Gameplay (10-25s) | Smooth loop? Good pacing? No dead ends? Is Near-Win designed as specified in design-brief — with a visible solution? |
45
- | End Card (25-30s) | Natural CTA transition? Button visible and clickable? Does it create sequel feeling (not closure) as designed in EndCard storyboard frame? |
46
- | Total duration | Fits within 15-30 seconds? |
47
- | Storyboard fidelity | Does the final playable match the emotional arc and visual composition described in the Experience Flow Design section of `style-exploration.md`? |
48
-
49
- ### 2. Creative Appeal (creativeAppeal)
50
-
51
- | Checkpoint | Criteria |
52
- | -------------------- | ------------------------------------------------- |
53
- | Hook strength | Does opening visual stop the user from scrolling? |
54
- | Freshness | Differentiated or template-feeling? |
55
- | Emotional connection | Curiosity/excitement/satisfaction triggered? |
56
- | Memorability | What sticks after playing? |
57
-
58
- ### 3. Style Consistency (styleConsistency)
59
-
60
- | Checkpoint | Criteria |
61
- | ------------------- | ------------------------------------------------------------------------------------------------ |
62
- | Concept fidelity | Do final assets match the approved **concept panel** (Panel 1) from style-exploration.md? |
63
- | Storyboard fidelity | Do Hook/Tutorial/Gameplay/EndCard stages visually match storyboard panels 2–5? |
64
- | Visual internal | Background, characters, UI belong to same style? Colors unified? |
65
- | Audio internal | BGM and SFX harmonious? |
66
- | Cross-media | Visual style and audio atmosphere match? Does audio-emotion rhythm match Experience Flow Design? |
67
- | Gameplay-style | Gameplay pacing matches visual/audio rhythm? |
68
-
69
- ### 4. Intent Fidelity (intentFidelity)
70
-
71
- | Checkpoint | Criteria |
72
- | --------------- | --------------------------------------------------- |
73
- | Gameplay type | Actual gameplay matches design-brief selection? |
74
- | Visual style | Matches intentTags? |
75
- | Experience flow | Follows design-brief experienceFlow? |
76
- | Level config | Matches levelConfig (number of levels, difficulty)? |
77
- | Atom coverage | Every atom in plan is implemented? |
78
-
79
- ### 5. Difficulty Balance (difficultyBalance)
80
-
81
- | Checkpoint | Criteria |
82
- | ------------------- | ------------------------------------------------------------ |
83
- | First level success | **GUARANTEED?** (veto item — automatic fail if not) |
84
- | Difficulty curve | Progressive? No sudden spikes? |
85
- | Frustration control | Failure gives positive feedback ("try again" not "give up")? |
86
- | Completability | Can finish within time limit? |
87
-
88
- ### 6. Intent Transmission (intentTransmission)
89
-
90
- **Check `docs/intent-clarifications.md`:**
91
-
92
- - Any unresolved Open Questions? (deduct 1 point per unresolved question)
93
- - Any Agent received >3 questions? (intent transmission fault)
94
-
95
- **Check `logs/ta-log.md`:**
96
-
97
- - Style Interpretation table exists?
98
- - Any low-confidence items without corresponding clarifications?
99
- - Micro-Batch Validation scores all >= 3?
100
-
101
- **Check `logs/developer-log.md`:**
102
-
103
- - Experience Flow → Code Mapping exists?
104
- - All scenes have storyboard frame references?
105
- - Code visual implementation matches storyboard intent?
106
-
107
- **Scoring calibration (1–5):**
108
-
109
- - 5: Zero open clarifications, TA self-check all pass, Developer mapping complete
110
- - 4: 1–2 resolved clarifications, no quality impact
111
- - 3: Unresolved clarifications exist, or TA has low-confidence items
112
- - 2: Multiple unresolved clarifications, or Developer missing visual mapping
113
- - 1: Severe intent transmission failure, downstream agents made major wrong assumptions
114
-
115
- ---
116
-
117
- ## Scoring
118
-
119
- Each dimension: 1–5 points. **Maximum total: 30** (6 × 5).
120
-
121
- | Score | Meaning | Calibration Example |
122
- | ----- | ------------------------------------------------------ | ----------------------------------------------- |
123
- | 5 | Excellent — exceeds expectations, ready to ship | Polished feel, strong hook, perfect consistency |
124
- | 4 | Good — meets standard, minor tweaks then ship | Solid execution, one small inconsistency |
125
- | 3 | Acceptable — basically works, needs improvement | Functional but generic |
126
- | 2 | Below standard — obvious problems, partial redo needed | Major style clash or broken flow |
127
- | 1 | Seriously deficient — directional error, full redo | Wrong gameplay, broken entry, no CTA |
128
-
129
- **Total ≥ 24**: Pass — proceed to Gate #3 (orchestrator)
130
- **Total 18–23**: Conditional pass — fix issues then re-review
131
- **Total < 18**: Fail — route back to responsible agent(s)
132
-
133
- **VETO ITEMS (automatic fail regardless of score):**
134
-
135
- - First level does NOT guarantee success
136
- - Zero CTA implementation
137
- - External network requests present
138
- - Entry file (index.html) missing
139
-
140
- ---
141
-
142
- ## Full review process (L2)
143
-
144
- > Invoked from `agents/reviewer.md` — execute in order before final verdict.
145
-
146
- ### Step 0: Dev preview (mandatory)
147
-
148
- 1. Read `docs/project-state.md` → **Dev Preview**: `devUrl`, `devStatus`.
149
- 2. If `devStatus` ≠ `ready` → **fail fast** (route Developer; do not score experience).
150
- 3. If Dev server not reachable → run `npm run dev`, refresh `devUrl` in project-state.
151
- 4. Open **devUrl** in browser; complete **UI match** + **gameplay match** (checklists in § Dev walkthrough above).
152
- 5. Record summary in `project-state.md`: `reviewerDevCheck` (`passed` / `failed`), `reviewerDevNotes`.
153
-
154
- **Do not** require `playcraft build`. **Do not** ask the user to run terminal commands.
155
-
156
- ### Step 0b: Validator Skill Discovery
157
-
158
- ```bash
159
- playcraft skills list --category validator --json
160
- playcraft skills match --intent "validator,balance,quality" --json
161
- ```
162
-
163
- For matched Validator Skills: read the SKILL.md, apply its checklist, record results in `review-report.md` per its format.
164
-
165
- ### Phase 1: DAG Completeness Audit
166
-
167
- For each atom in `docs/atom-plan.md`:
168
-
169
- - `done` → verify `actualOutput` file exists on disk
170
- - `skipped` → verify reason is documented
171
- - `blocked` → verify blocker is documented
172
-
173
- ### Phase 2: Layout Spec Compliance
174
-
175
- **Layout Spec is the shared contract. Verify ALL THREE production agents comply.**
176
-
177
- | Check | Route Issue To |
178
- | -------------------------------------------------------- | ------------------------------------- |
179
- | Asset sizes match `assetSpec` | TA (completions) / Designer (samples) |
180
- | Filenames match `assetMapping` | TA (completions) / Designer (samples) |
181
- | All assetMapping entries have files | **TA** (compliance gate) |
182
- | Sprite sheet JSON paired with every atlas / sheet | **TA** |
183
- | Element IDs in code match `colorPalette.tileColors[].id` | Developer |
184
- | Zone coordinates in scene match `zones[].rect` | Developer |
185
- | Every asset is used; every code reference has a file | TA + Developer |
186
-
187
- ### Phase 2.5: TA Compliance Report Audit
188
-
189
- Read `logs/ta-log.md` and verify: log exists and complete, Asset Coverage table fully filled and all PASS, Spec Compliance Summary passes, Compliance Verdict is PASS. (Note: file size is NOT a TA compliance concern — size optimization happens at build time.)
190
-
191
- ### Phase 2.6: Ad Psychology Audit
192
-
193
- > **Invoke the `playcraft-ad-psychology` skill** and use its four psychological hooks, 60-30-10 color rule, and CTA specs as evaluation criteria for Creative Appeal and Experience Flow dimensions.
194
-
195
- Key checks against ad-psychology principles:
196
-
197
- - Hook frame uses highest contrast + dynamic composition (Curiosity Gap)?
198
- - Tutorial uses simplified layout + warm tone + large gesture icons (Instant Gratification)?
199
- - Gameplay shows Near-Win state, NOT victory state (Progress Illusion)?
200
- - EndCard shows unresolved reward + prominent CTA, NOT satisfaction (FOMO)?
201
- - CTA button color is the ONLY accent color in the scene (60-30-10 rule)?
202
- - CTA touch target ≥ 48×48 px, contrast ratio ≥ 4.5:1?
203
-
204
- ### Phase 3: Automated Technical Checks
205
-
206
- > **Invoke the `playcraft-build-optimizer` skill** for the compliance verification checklist (file size limits, external request detection, CTA API implementation, audio autoplay rules) and platform-specific requirements.
207
-
208
- ```bash
209
- # Total project size
210
- du -sh .
211
-
212
- # Asset samples (adjust globs to project)
213
- playcraft image info assets/images/bg/*.webp
214
- playcraft image info assets/images/tiles/*.webp
215
- playcraft audio info --input assets/audio/bgm/*.mp3
216
- playcraft audio info --input assets/audio/sfx/*.mp3
217
-
218
- # Entry file exists
219
- ls game/index.html
220
-
221
- # Check for external requests
222
- grep -r "http://" game/ || echo "No http:// found"
223
- grep -r "https://" game/ || echo "No https:// found"
224
- grep -r "fetch(" game/ || echo "No fetch() found"
225
-
226
- # CTA implementation
227
- grep -r "onCTAClick\|mraid\|FbPlayableAd\|ExitApi" game/
228
- ```
229
-
230
- ### Phase 4: Six-Dimension Experience Evaluation
231
-
232
- > **Before starting Phase 4, read from the top of this document** (all six dimensions including Intent Transmission + scoring thresholds).
233
-
234
- Six dimensions: **Experience Flow** / **Creative Appeal** / **Style Consistency** / **Intent Fidelity** / **Difficulty Balance** / **Intent Transmission** — each scored 1–5. **Total ≥ 24/30 = pass**; 18–23 conditional; &lt; 18 fail.
235
-
236
- **Veto items (automatic fail)**: first level not guaranteed success / no CTA / external requests / missing index.html.
237
-
238
- ### Phase 5: DAG Revision Audit
239
-
240
- For each entry in DAG Revisions: is the modification reasonable? properly documented? did it deviate from original intent?
241
-
242
- ---
243
-
244
- ## Rework mechanism
245
-
246
- ### Rework rules
247
-
248
- | Rule | Detail |
249
- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
250
- | **Failure budget** | `rework_round` in `{0, 1}` → allow rework (+1 on fail). `rework_round == 2` on fail → **forced Gate #3** (3rd review failure; user decides) |
251
- | **Parallel fixes** | If multiple agents have issues, route to all in parallel |
252
- | **Incremental** | Fix only the problem parts, not redo everything |
253
- | **No re-gating** | Rework goes directly back to Reviewer, no Gate #1/#2 re-approval |
254
-
255
- ### Severity levels
256
-
257
- | Severity | Definition | Handling |
258
- | ---------- | ------------------------------------- | ---------------------------- |
259
- | `critical` | Non-functional / white screen / crash | Must fix, cannot skip |
260
- | `major` | Noticeable experience defect but runs | Rework fix, max 1 round |
261
- | `minor` | Aesthetic suggestion / tweak | Log but do not block Gate #3 |
262
-
263
- ### Feedback routing
264
-
265
- | Issue Type | Route To |
266
- | ---------------------------------------------- | -------------------- |
267
- | Direction / experience flow issues | PM |
268
- | Creative sample quality | Designer |
269
- | Asset completeness / compliance / sprite sheet | **Technical Artist** |
270
- | Gameplay logic bug / parameter imbalance | Developer |
271
- | Dev runtime / integration technical issue | Developer |
272
-
273
- ### Rework flow
274
-
275
- ```
276
- Issues found → review-report.md with severity + target + specific fix instructions
277
-
278
- ├──→ Routed agents fix in parallel (incremental)
279
-
280
- └──→ Developer Ph.2 fixes + Dev re-check
281
-
282
- └──→ Reviewer re-checks
283
-
284
- ┌────┴────┐
285
- Pass Fail → round 2 or forced Gate #3
286
- ```
6
+ See `agents/reviewer.md` for the three modes: `design_check`, `ui_diff`, `load_check`.
@@ -30,14 +30,35 @@
30
30
  3. Validate sidecar JSON: frame count = element count in group; grid params in `ta-log.md`.
31
31
  4. Audio: Designer MP3 → `playcraft audio compress/trim/loop/fade` → output **MP3**; verify with `playcraft audio info`.
32
32
 
33
+ ## Transparency requirements
34
+
35
+ | Asset category | Alpha required | Chroma key strategy | Post-verify |
36
+ | ----------------------------- | -------------- | ---------------------------------------------------- | ----------------------------------------- |
37
+ | UI overlay (icons, text, HUD) | ✅ channels=4 | Per color conflict matrix (see ta-pipeline-cookbook) | Dark-bg overlay verify (no white/residue) |
38
+ | VFX atlas (glow, particles) | ✅ channels=4 | Blue screen #0000FF (VFX常含金/橙色) | Per-frame dark-bg verify |
39
+ | Game element atlas (tiles) | ✅ channels=4 | Per color conflict matrix | Dark-bg overlay verify |
40
+ | Card/board piece (rect body) | ❌ opaque OK | N/A (white bg is part of the asset) | N/A |
41
+ | Full-screen background | ❌ opaque OK | N/A | Edge-to-edge full-coverage check |
42
+ | Digit strip | ✅ channels=4 | Blue screen #0000FF (digits often gold/white) | Dark-bg overlay verify |
43
+
44
+ **Color conflict matrix** — choose chroma key color to avoid edge residue:
45
+
46
+ - Gold/yellow/orange/green assets → **blue screen #0000FF** (never green)
47
+ - Blue/purple assets → **green screen #00FF00** (never blue)
48
+ - Multi-color/rainbow → **magenta #FF00FF** (last resort)
49
+ - All others → green screen #00FF00 (default)
50
+
33
51
  ## Compliance (TA)
34
52
 
35
- | Check | Pass criteria |
36
- | -------------- | ----------------------------------------------------------------------------- |
37
- | Atlas coverage | Every runtime element resolves to atlas+frame or single webp path |
38
- | Sidecar | `.json` exists beside each multi-element atlas |
39
- | Format | WebP for images; MP3 for audio (unless layout-spec explicit exception) |
40
- | ta-log | One manifest row per atlas group: path, frames, cols/frameW/frameH/frameCount |
53
+ | Check | Pass criteria |
54
+ | --------------- | ------------------------------------------------------------------------------ |
55
+ | Atlas coverage | Every runtime element resolves to atlas+frame or single webp path |
56
+ | Sidecar | `.json` exists beside each multi-element atlas |
57
+ | Format | WebP for images; MP3 for audio (unless layout-spec explicit exception) |
58
+ | ta-log | One manifest row per atlas group: path, frames, cols/frameW/frameH/frameCount |
59
+ | **Alpha check** | All transparent assets have `channels=4` (verified via `playcraft image info`) |
60
+ | **Dark-bg OK** | All transparent assets pass dark-background (#1A1A2E) overlay — no residue |
61
+ | **BG coverage** | Full-screen backgrounds: edge-to-edge, no fade/vignette/white corners |
41
62
 
42
63
  ## Developer handoff
43
64