@playcraft/cli 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/tools-generation.js +2 -4
- package/dist/commands/tools-utils.js +19 -0
- package/dist/utils/version-checker.js +8 -11
- package/package.json +3 -3
- package/project-template/.claude/agents/designer.md +12 -8
- package/project-template/.claude/agents/developer.md +53 -62
- package/project-template/.claude/agents/refs/README.md +21 -15
- package/project-template/.claude/agents/refs/designer-deliverable-spec.md +24 -0
- package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +6 -0
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +130 -0
- package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +4 -284
- package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +27 -6
- package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +433 -24
- package/project-template/.claude/agents/reviewer.md +62 -38
- package/project-template/.claude/agents/technical-artist.md +36 -25
- package/project-template/.claude/hooks/README.md +9 -1
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +86 -1
- package/project-template/.claude/settings.json +4 -0
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +65 -15
- package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +26 -7
- package/project-template/.claude/skills/playcraft-workflow/SKILL.md +104 -15
- package/project-template/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-template/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-template/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-template/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-template/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-template/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-template/.claude/skills/playwright-cli/references/spec-driven-testing.md +312 -0
- package/project-template/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-template/.claude/skills/playwright-cli/references/test-generation.md +138 -0
- package/project-template/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-template/.claude/skills/playwright-cli/references/video-recording.md +157 -0
- package/project-template/.cursor/rules/playcraft-orchestrator.mdc +74 -24
- package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +1 -1
- package/project-template/CLAUDE.md +99 -59
- package/project-template/docs/team/agent-conduct.md +42 -26
- package/project-template/docs/team/atom-plan-format.md +33 -2
- package/project-template/docs/team/collaboration.md +57 -48
- package/project-template/docs/team/workflow-changelog.md +28 -14
- package/project-template/docs/team/workflow-consistency-checklist.md +12 -0
- package/project-template/templates/atom-plan.template.md +35 -3
- package/project-template/templates/designer-log.template.md +16 -0
- package/project-template/templates/developer-log.template.md +95 -101
- package/project-template/templates/layout-spec.template.md +14 -0
- package/project-template/templates/project-state.template.md +51 -33
- package/project-template/templates/review-report.template.md +76 -151
- package/project-template/templates/ta-log.template.md +138 -0
|
@@ -12,13 +12,20 @@ Canonical terms used across `CLAUDE.md`, agent L1 files, and `refs/`. Prefer the
|
|
|
12
12
|
| **Designer Phase 1 / Phase 2** | — | Ph.1 = MC + ASR + Handoff Pack; Ph.2 = audio + digit + VisualAtom status (v2) |
|
|
13
13
|
| **ASR Coverage Matrix** | — | `designer-log` table: every contract id → ASR slot; Gate #2b mandatory |
|
|
14
14
|
| **Palette Locked** | — | MC-sampled hex in `designer-log`; delta vs `layout-spec` |
|
|
15
|
-
| **production-serial-v1** | workflow spec version (
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
15
|
+
| **production-serial-v1** | workflow spec version (superseded) | See `workflow-changelog.md`; serial production waves within `production` stage |
|
|
16
|
+
| **convergence-v1** | workflow spec version (current) | Three convergence loops: design_check → ui_diff → load_check + Gate #3 user |
|
|
17
|
+
| **design_check** | Reviewer mode | Soft checklist before Gate #1 / #2b — completeness only, not subjective quality |
|
|
18
|
+
| **ui_diff** | Reviewer mode | Browser screenshots vs MC panels; routes ui_rework (max 5 rounds) |
|
|
19
|
+
| **load_check** | Reviewer mode | Page loads + no console errors before Gate #3; no gameplay walkthrough |
|
|
20
|
+
| **ui_ready** | devStatus value | UI shell complete; gameplay rules not yet implemented |
|
|
21
|
+
| **designer-handoff-v2** | visual handoff spec | MC + ASR + Handoff Pack; bundled in convergence-v1 |
|
|
22
|
+
| **Production Pipeline** | serial waves in `project-state` | Wave 1 Designer Ph.2 → Wave 2 TA; Developer in `ui_pass` |
|
|
23
|
+
| **Developer ui_pass** | — | UI shell + scene switch + simple states; no core gameplay rules |
|
|
24
|
+
| **Developer gameplay_pass** | — | Core gameplay on verified UI; PGS + first level success |
|
|
19
25
|
| **Four-doc discipline** | 四件套写作纪律 | PM/Designer: contracts only in four docs; narrative in style-exploration + designer-log; TA/Dev intake: agent-conduct + log templates |
|
|
20
26
|
| **TA Step 0 / 1 / 2** | (not "Phase") | **TA cookbook only**: Step 0 = Skill Discovery; Step 1 = Asset Completion; Step 2 = Technical Pipeline — TA runs all three in one `production` invoke |
|
|
21
|
-
| **reworkRound** | `handoff.rework_round`
|
|
27
|
+
| **reworkRound** | `handoff.rework_round` (legacy) | Superseded by **`uiReworkRound`** for UI convergence (0–5) |
|
|
28
|
+
| **uiReworkRound** | `handoff.ui_rework_round` | Counts **ui_diff failures** (0 → 5 max); at 5 → orchestrator decision |
|
|
22
29
|
| **ICP** | Intent Clarification Protocol | Async agent Q&A in `docs/intent-clarifications.md`; orchestrator does not interrupt user |
|
|
23
30
|
| **MC** | Master Composite | Five 9:16 panels in one image: concept panel + Hook / Onboarding / End Card / CTA storyboards |
|
|
24
31
|
| **ASR** | Asset State Reference Sheet | 资产状态参考精灵图板:UI 组件状态板 + 元素状态板;Gate #2a 后产出;供 TA crop 量产(非 runtime atlas) |
|
|
@@ -37,12 +44,12 @@ When instructions conflict: **Goals § Core responsibilities** wins over workflo
|
|
|
37
44
|
|
|
38
45
|
Only the **Orchestrator** (main session) may use `AskUserQuestion` toward the user. Sub-agents prepare materials, update `project-state`, then **STOP**.
|
|
39
46
|
|
|
40
|
-
| Gate | Sub-agent deliverable | STOP signal (`project-state`) | Orchestrator action
|
|
41
|
-
| ------- | ---------------------------------------------------------------- | ----------------------------- |
|
|
42
|
-
| **#1** | PM: four design docs ready for review | `gates.#1 = pending` | `AskUserQuestion` → on pass: `gates.#1 = passed`, `stage: style_exploration`, invoke `@designer` |
|
|
43
|
-
| **#2a** | Designer: MC options A/B[/C] + partial `style-exploration.md` | `gates.#2a = pending` | `AskUserQuestion` pick option → set `selectedMcOption` → resume `@designer`
|
|
44
|
-
| **#2b** | Designer: ASR 双板 + complete `style-exploration` + designer-log | `gates.#2b = pending` | `AskUserQuestion` confirm MC+ASR → `gates.#2b = passed`, `stage: production`, invoke `@designer` Ph.2 only |
|
|
45
|
-
| **#3** | Reviewer pass + `devStatus: ready`
|
|
47
|
+
| Gate | Sub-agent deliverable | STOP signal (`project-state`) | Orchestrator action |
|
|
48
|
+
| ------- | ---------------------------------------------------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| **#1** | PM: four design docs ready for review | `gates.#1 = pending` | Invoke `@reviewer design_check` → pass → `AskUserQuestion` → on pass: `gates.#1 = passed`, `stage: style_exploration`, invoke `@designer` |
|
|
50
|
+
| **#2a** | Designer: MC options A/B[/C] + partial `style-exploration.md` | `gates.#2a = pending` | `AskUserQuestion` pick option → set `selectedMcOption` → resume `@designer` (no Reviewer pre-check) |
|
|
51
|
+
| **#2b** | Designer: ASR 双板 + complete `style-exploration` + designer-log | `gates.#2b = pending` | Invoke `@reviewer design_check` → pass → `AskUserQuestion` confirm MC+ASR → `gates.#2b = passed`, `stage: production`, invoke `@designer` Ph.2 only |
|
|
52
|
+
| **#3** | Reviewer `load_check` pass + `devStatus: ready` | `gates.#3 = pending` | Show **devUrl** → user accept → `stage: done` (gameplay judged by user) |
|
|
46
53
|
|
|
47
54
|
Sub-agent pattern: **write artifacts → update `## Agent handoff` + gates → STOP (no user questions).**
|
|
48
55
|
|
|
@@ -50,16 +57,16 @@ Sub-agent pattern: **write artifacts → update `## Agent handoff` + gates → S
|
|
|
50
57
|
|
|
51
58
|
Machine-readable runtime block in `docs/project-state.md` (YAML fence under `## Agent handoff`). Sub-agents and orchestrator use it as the **single source** for STOP / resume / next step.
|
|
52
59
|
|
|
53
|
-
| Field | Writer
|
|
54
|
-
| -------------------------- |
|
|
55
|
-
| `subagent` | Sub-agent on STOP
|
|
56
|
-
| `subagent_stop` | Sub-agent on STOP
|
|
57
|
-
| `waiting_for` | Both
|
|
58
|
-
| `gate_pending` | Sub-agent when gate pending
|
|
59
|
-
| `next_orchestrator_action` | Sub-agent on STOP (**required**)
|
|
60
|
-
| `last_completed_by` | Sub-agent on STOP
|
|
61
|
-
| `rework_round` | Reviewer on fail / orchestrator
|
|
62
|
-
| `block_reason` | Optional
|
|
60
|
+
| Field | Writer | Meaning |
|
|
61
|
+
| -------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
62
|
+
| `subagent` | Sub-agent on STOP | Role that just finished (`pm`, `designer`, `technical-artist`, `developer`, `reviewer`, `none`) |
|
|
63
|
+
| `subagent_stop` | Sub-agent on STOP | `true` = do not continue work until orchestrator acts |
|
|
64
|
+
| `waiting_for` | Both | `user_gate` = orchestrator must run Gate; `orchestrator` = wait for invoke; `none` = active work |
|
|
65
|
+
| `gate_pending` | Sub-agent when gate pending | `"1"` \| `"2a"` \| `"2b"` \| `"3"` \| `null` — sync with Gates table |
|
|
66
|
+
| `next_orchestrator_action` | Sub-agent on STOP (**required**) | One sentence: the **only** legal next step for orchestrator |
|
|
67
|
+
| `last_completed_by` | Sub-agent on STOP | Same as `subagent` or action label |
|
|
68
|
+
| `rework_round` | Reviewer on ui_diff fail / orchestrator | Keep in sync with `uiReworkRound` in Gate resume fields (legacy alias) |
|
|
69
|
+
| `block_reason` | Optional | Why pipeline cannot advance |
|
|
63
70
|
|
|
64
71
|
**Orchestrator loop:** read handoff → if `gate_pending` + `user_gate` → Gate only → else if `subagent_stop` → execute `next_orchestrator_action` → reset handoff before invoke.
|
|
65
72
|
|
|
@@ -73,6 +80,7 @@ On every sub-agent STOP, update **in order** (see [agent-conduct.md § Invoke pr
|
|
|
73
80
|
2. **`## Agent handoff`** — all fields; `subagent_stop: true`; `next_orchestrator_action` required.
|
|
74
81
|
3. **Progress Checkpoint** — one row (stage, agent, action, outcome).
|
|
75
82
|
4. **Production Pipeline** — when `stage: production`, set this role's wave row to `done` + notes when wave complete.
|
|
83
|
+
5. **Plan convergence (TA / Developer only)** — before STOP, ensure `logs/ta-log.md` § **Production Plan** or `logs/developer-log.md` § **UI Pass Plan** / **Gameplay Pass Plan** is complete (Risk Checklist all `[x]`, no `{{placeholders}}`). Hook `validate-workflow-stop.mjs` enforces on subagent stop.
|
|
76
84
|
|
|
77
85
|
Example (update only your row when track complete):
|
|
78
86
|
|
|
@@ -85,24 +93,25 @@ Checkpoint is a **human log** for context — **not** the routing source (handof
|
|
|
85
93
|
|
|
86
94
|
## Stage field ownership
|
|
87
95
|
|
|
88
|
-
| Field / transition
|
|
89
|
-
|
|
|
90
|
-
| `gates.#N = pending`
|
|
91
|
-
| `gates.#N = passed`
|
|
92
|
-
| Mainline `stage` (`pm` → `style_exploration` → `production` → `
|
|
93
|
-
| `selectedMcOption`
|
|
94
|
-
| `devStatus`, `devUrl`, `devBlockers`
|
|
95
|
-
| `
|
|
96
|
-
| `reworkRound` | Reviewer on fail (+1); orchestrator may read for Gate #3 forced path |
|
|
96
|
+
| Field / transition | Writer |
|
|
97
|
+
| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
98
|
+
| `gates.#N = pending` | Sub-agent before STOP |
|
|
99
|
+
| `gates.#N = passed` | **Orchestrator** after user confirms Gate |
|
|
100
|
+
| Mainline `stage` (`pm` → `style_exploration` → `production` → `ui_pass` → `ui_review` → `ui_rework` → `gameplay_pass` → `done`) | **Orchestrator only** |
|
|
101
|
+
| `selectedMcOption` | Orchestrator after Gate #2a |
|
|
102
|
+
| `devStatus`, `devUrl`, `devBlockers` | Developer |
|
|
103
|
+
| `uiReviewStatus`, `uiReworkRound`, `loadCheck` | Reviewer |
|
|
97
104
|
|
|
98
105
|
Sub-agents **MUST NOT** set mainline `stage`. They request orchestrator via `next_orchestrator_action` (e.g. `Invoke @reviewer`).
|
|
99
106
|
|
|
100
|
-
##
|
|
107
|
+
## UI rework sequence (orchestrator-owned)
|
|
101
108
|
|
|
102
|
-
1. **Reviewer** —
|
|
103
|
-
2. **Orchestrator** — Set `stage:
|
|
104
|
-
3. **Developer** (
|
|
105
|
-
4. **Orchestrator** — Invoke `@reviewer` again; on pass →
|
|
109
|
+
1. **Reviewer** (`ui_diff`) — screenshots vs MC panels → fail: UI Diff Report in `review-report.md`, `uiReworkRound` +1, handoff `next_orchestrator_action: "Set stage=ui_rework, invoke routed agents per review-report"` → STOP (**no** `stage: ui_rework` in reviewer write).
|
|
110
|
+
2. **Orchestrator** — Set `stage: ui_rework`, invoke `@developer` / `@technical-artist` / `@designer` per Action Items (`routeTo`).
|
|
111
|
+
3. **Developer** (primary) — Fix UI issues → `devStatus: ui_ready` → handoff `Invoke @reviewer ui_diff` → STOP.
|
|
112
|
+
4. **Orchestrator** — Invoke `@reviewer ui_diff` again; on pass (or `uiReworkRound == 5`) → `stage: gameplay_pass`.
|
|
113
|
+
|
|
114
|
+
Max **5** UI rework rounds. Gameplay has no AI rework loop — only `load_check` before Gate #3.
|
|
106
115
|
|
|
107
116
|
## Master Composite — five panels
|
|
108
117
|
|
|
@@ -116,19 +125,19 @@ Sub-agents **MUST NOT** set mainline `stage`. They request orchestrator via `nex
|
|
|
116
125
|
| Phase | User | Agents |
|
|
117
126
|
| -------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
118
127
|
| **A — Choose** | **Orchestrator only** — `AskUserQuestion` for Gate #1, #2a, #2b | Sub-agents STOP when gate materials ready; no mass production until Gate #2b passed |
|
|
119
|
-
| **B — Produce** | Not interrupted for terminal commands | Serial: Designer Ph.2 → TA → Developer (`
|
|
120
|
-
| **C — Dev delivery** | **Gate #3 only**: open **devUrl** from orchestrator | Developer
|
|
128
|
+
| **B — Produce** | Not interrupted for terminal commands | Serial: Designer Ph.2 → TA → Developer (`ui_pass` → `gameplay_pass`) |
|
|
129
|
+
| **C — Dev delivery** | **Gate #3 only**: open **devUrl** from orchestrator | Developer UI+gameplay → Reviewer `load_check` → user accepts gameplay in browser |
|
|
121
130
|
|
|
122
131
|
**User never runs `npm run dev`.** Delivery endpoint = Dev URL acceptance (`done`), not `playcraft build`.
|
|
123
132
|
|
|
124
133
|
## Agent responsibility matrix (priority order)
|
|
125
134
|
|
|
126
|
-
| # | PM | Designer | Technical Artist
|
|
127
|
-
| -------- | --------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
128
|
-
| **1** | Define experience + gameplay (`design-brief`, flow) | Lock visual + narrative — **MC = UI spec for Developer** | Style-faithful mass production from MC/ASR
|
|
129
|
-
| **2** | Zero-ambiguity contracts (`layout-spec`, `atom-plan`) | Handoff Pack: ASR Coverage Matrix, Palette Locked, Motion Notes | 100% `assetMapping` at spec
|
|
130
|
-
| **3** | Gates + ICP; **spec-gap** vs **asset rework** arbitration | Audio + digit strip; **respond to Developer visual/audio rework** | Production-grade assets; **respond
|
|
131
|
-
| **Last** | — | — | —
|
|
135
|
+
| # | PM | Designer | Technical Artist | Developer | Reviewer |
|
|
136
|
+
| -------- | --------------------------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------ |
|
|
137
|
+
| **1** | Define experience + gameplay (`design-brief`, flow) | Lock visual + narrative — **MC = UI spec for Developer** | Style-faithful mass production from MC/ASR | **UI shell** (`ui_pass`: layout + scene switch) | `design_check` before Gates; `ui_diff` vs MC |
|
|
138
|
+
| **2** | Zero-ambiguity contracts (`layout-spec`, `atom-plan`) | Handoff Pack: ASR Coverage Matrix, Palette Locked, Motion Notes | 100% `assetMapping` at spec (path check only) | **Gameplay** (`gameplay_pass`: PGS, first level success) | `load_check` before Gate #3 |
|
|
139
|
+
| **3** | Gates + ICP; **spec-gap** vs **asset rework** arbitration | Audio + digit strip; **respond to Developer visual/audio rework** | Production-grade assets; **respond on `routeTo: ta` in ui_diff** | **Dev preview owner** (`npm run dev`, devUrl, upstream blockers) | Route UI issues in ui_diff; no gameplay AI audit |
|
|
140
|
+
| **Last** | — | — | — | `playcraft build` = **future**, not `done` | — |
|
|
132
141
|
|
|
133
142
|
Full detail: `.claude/agents/<role>.md` § Goals.
|
|
134
143
|
|
|
@@ -245,7 +254,7 @@ Full detail: `.claude/agents/<role>.md` § Goals.
|
|
|
245
254
|
- **Exceptions**: full-screen bg (single webp), digit strip (single webp), MC/ASR reference (non-runtime)
|
|
246
255
|
- **Designer** delivers MP3 audio + digit strip webp at contracted paths
|
|
247
256
|
- **TA** delivers runtime atlases + post-processed MP3 per [ta-atlas-deliverable-standard.md](../../.claude/agents/refs/ta-atlas-deliverable-standard.md)
|
|
248
|
-
- **Developer** (`
|
|
257
|
+
- **Developer** (`ui_pass` / `gameplay_pass`) binds `loadImage`/atlas+frame at contract paths with **real files** on disk, then integrates in Dev
|
|
249
258
|
- **Path / frame mismatch = integration failure** — TA Compliance + Reviewer check
|
|
250
259
|
- **No unilateral path changes** — PM + user-approved contract change only
|
|
251
260
|
|
|
@@ -265,10 +274,10 @@ Enforceable rules: [agent-conduct.md](agent-conduct.md) (§ PM / Designer / TA /
|
|
|
265
274
|
|
|
266
275
|
Within 30 seconds of each wave start, the active agent validates Layout Spec:
|
|
267
276
|
|
|
268
|
-
| Checker | When
|
|
269
|
-
| --------- |
|
|
270
|
-
| TA | Production Pipeline Wave 2 (TA entry)
|
|
271
|
-
| Developer | `
|
|
277
|
+
| Checker | When | Checks | On Gap |
|
|
278
|
+
| --------- | ---------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------- |
|
|
279
|
+
| TA | Production Pipeline Wave 2 (TA entry) | Every assetMapping entry has clear size/format specs | Write `spec-gap` to project-state.md, PM supplements within 5 min |
|
|
280
|
+
| Developer | `ui_pass` / `gameplay_pass` start (after TA Wave 2 `done`) | Every GameplayAtom reference exists in assetMapping | Same |
|
|
272
281
|
|
|
273
282
|
## DAG Modification Protocol
|
|
274
283
|
|
|
@@ -2,32 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Template workflow spec versions for `packages/cli/project-template`. New projects from `playcraft create` copy the current template; record the version in each project's `docs/project-state.md` § Workflow spec.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## convergence-v1 (current)
|
|
6
6
|
|
|
7
7
|
**Effective**: project-template default for new playable-ad projects.
|
|
8
8
|
|
|
9
9
|
### Summary
|
|
10
10
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
11
|
+
- **Three convergence loops**: (1) Reviewer `design_check` before Gate #1 / #2b; (2) `ui_pass` → `ui_review` ⇄ `ui_rework` (max 5 rounds) with `ui_diff` (browser screenshots vs MC); (3) `gameplay_pass` → Reviewer `load_check` → Gate #3 user gameplay acceptance.
|
|
12
|
+
- **Developer split**: `ui_pass` (UI shell + light logic, `devStatus: ui_ready`) then `gameplay_pass` (core gameplay, `devStatus: ready`).
|
|
13
|
+
- **Removed**: `integration`, `review`, `rework`, six-dimension final review, AI gameplay walkthrough.
|
|
14
|
+
- **Production orchestration** unchanged: after Gate #2b, **strict serial** — Designer Ph.2 → TA → Developer (`ui_pass`).
|
|
14
15
|
- Visual delivery unchanged from **designer-handoff-v2** (MC + ASR, Handoff Pack, Phase 2 audio/digit only).
|
|
15
|
-
- **
|
|
16
|
+
- **Reviewer tooling**: `playwright-cli` skill for browser automation (screenshot, console, resize).
|
|
17
|
+
|
|
18
|
+
### Stage chain
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
pm → style_exploration → production → ui_pass → ui_review ⇄ ui_rework → gameplay_pass → done
|
|
22
|
+
```
|
|
16
23
|
|
|
17
24
|
### Production waves (serial)
|
|
18
25
|
|
|
19
|
-
| Wave | Agent | Stage
|
|
20
|
-
| ---- | ---------------- |
|
|
21
|
-
| 1 | Designer | `production`
|
|
22
|
-
| 2 | Technical Artist | `production`
|
|
23
|
-
| 3 | Developer | `
|
|
26
|
+
| Wave | Agent | Stage | Orchestrator invoke |
|
|
27
|
+
| ---- | ---------------- | ------------ | --------------------------------------------------- |
|
|
28
|
+
| 1 | Designer | `production` | `@designer` Ph.2 only after Gate #2b |
|
|
29
|
+
| 2 | Technical Artist | `production` | `@technical-artist` after Wave 1 `done` |
|
|
30
|
+
| 3 | Developer | `ui_pass` | `@developer` after Wave 2 `done` + Compliance green |
|
|
24
31
|
|
|
25
32
|
### Trade-offs
|
|
26
33
|
|
|
27
|
-
| Benefit
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
34
|
+
| Benefit | Cost |
|
|
35
|
+
| ------------------------------------------------------------ | ------------------------------------------------- |
|
|
36
|
+
| UI convergence independently verifiable before gameplay | Extra Reviewer round + up to 5 UI rework cycles |
|
|
37
|
+
| Design defects caught before user Gates | Gate #1/#2b require extra Reviewer invoke |
|
|
38
|
+
| Gameplay quality left to human (Canvas opaque to automation) | No AI gameplay audit — user must judge at Gate #3 |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## production-serial-v1
|
|
43
|
+
|
|
44
|
+
**Superseded by** `convergence-v1` for orchestration; serial production waves below still apply within `production` stage.
|
|
31
45
|
|
|
32
46
|
---
|
|
33
47
|
|
|
@@ -121,6 +121,18 @@ Maintenance checklist after editing `packages/cli/project-template`. Run before
|
|
|
121
121
|
- [x] `CLAUDE.md` + `playcraft-orchestrator.mdc` + `collaboration.md` + `agent-conduct.md` + `agent-runtime-matrix.md` aligned
|
|
122
122
|
- [x] Vitest `production-serial-v1` cases pass
|
|
123
123
|
|
|
124
|
+
## Phase K — Plan convergence (TA + Developer)
|
|
125
|
+
|
|
126
|
+
- [x] `templates/ta-log.template.md`: § Production Plan (Coverage / Atlas / Pipeline Order / Risk)
|
|
127
|
+
- [x] `templates/developer-log.template.md`: § Implementation Plan (Architecture / Scene-Asset / PGS / Risk)
|
|
128
|
+
- [x] `validate-workflow-stop.mjs`: validates Plan section + Risk Checklist + no placeholders
|
|
129
|
+
- [x] `.claude/hooks/README.md`: documents Plan validation on STOP
|
|
130
|
+
- [x] `technical-artist.md` + `developer.md`: Runtime + Track done + Important Rules reference Plan
|
|
131
|
+
- [x] `ta-pipeline-cookbook.md` Step 0d + `developer-phase1-flow.md` Step 3b
|
|
132
|
+
- [x] `agent-conduct.md`: TA/Developer MUST/MUST NOT for Plan before production/code
|
|
133
|
+
- [x] `collaboration.md` § STOP sync checklist step 5 (Plan convergence)
|
|
134
|
+
- [x] Vitest `validate-workflow-stop.test.ts` covers `validatePlan`
|
|
135
|
+
|
|
124
136
|
## Automated
|
|
125
137
|
|
|
126
138
|
```bash
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
> **Living Document**: Designer / TA / Developer enrich **their** sections below without overwriting PM's JSON.
|
|
13
13
|
|
|
14
|
+
> **⚠️ Status Contract**: Every agent MUST update `atom-plan.json` → `atoms[].status` + `atoms[].actualOutput` upon completing each assigned atom. Atoms left at `pending` with `actualOutput: null` after delivery = workflow violation.
|
|
15
|
+
|
|
14
16
|
## JSON 主文件(PM Gate #1)
|
|
15
17
|
|
|
16
18
|
```bash
|
|
@@ -21,6 +23,16 @@ playcraft skills link --from-atom-plan --prune
|
|
|
21
23
|
|
|
22
24
|
- **Never** use `playcraft-*` in `skillRef`; values must come from `skillsMatch.items[].atomId` (or `null` + `dagRevisions` gap)
|
|
23
25
|
|
|
26
|
+
## mediaGroups — Pre-Matched Reusable Assets
|
|
27
|
+
|
|
28
|
+
> **`skillsMatch.mediaGroups`** lists assets from the skills library that match this project's needs. Downstream agents (Designer for audio, TA for images) **MUST check mediaGroups before generating from scratch**.
|
|
29
|
+
|
|
30
|
+
**Usage protocol:**
|
|
31
|
+
|
|
32
|
+
1. **Designer (audio)**: Read `mediaGroups` → any `.aiaudio` match? → `playcraft skills link --atom <atomId>` → post-process → mark `status: done`
|
|
33
|
+
2. **TA (visual)**: Read `mediaGroups` → any `.aiimage` / `.aisprite` match? → `playcraft skills link --atom <atomId>` → post-process (resize/convert/transparency) → mark `status: done`
|
|
34
|
+
3. **Skip only when**: quality/style/mood mismatch — document reason in `## DAG Revisions`
|
|
35
|
+
|
|
24
36
|
---
|
|
25
37
|
|
|
26
38
|
## Acceptance Criteria
|
|
@@ -40,7 +52,13 @@ Gate #1 — one line per atom in atoms[]; point elsewhere for details:
|
|
|
40
52
|
|
|
41
53
|
## Asset Skill Context
|
|
42
54
|
|
|
43
|
-
> **Designer fills** after Phase 1 Skill Discovery.
|
|
55
|
+
> **Designer fills** after Phase 1 Skill Discovery. **MUST NOT** leave empty after Phase 2 delivery.
|
|
56
|
+
|
|
57
|
+
<!-- Designer: for each assigned atom, record:
|
|
58
|
+
- Which Skills you read and applied (playcraft-audio-generation, playcraft-text-rendering, etc.)
|
|
59
|
+
- Whether a mediaGroup match was used or skipped (with reason)
|
|
60
|
+
- Key generation parameters (model, prompt strategy, reference images)
|
|
61
|
+
-->
|
|
44
62
|
|
|
45
63
|
(Pending Designer Phase 1)
|
|
46
64
|
|
|
@@ -48,7 +66,14 @@ Gate #1 — one line per atom in atoms[]; point elsewhere for details:
|
|
|
48
66
|
|
|
49
67
|
## TA Skill Context
|
|
50
68
|
|
|
51
|
-
> **Technical Artist fills** during production Wave 2.
|
|
69
|
+
> **Technical Artist fills** during production Wave 2. **MUST NOT** leave empty after delivery.
|
|
70
|
+
|
|
71
|
+
<!-- TA: for each assigned atom, record:
|
|
72
|
+
- Production approach (linked from mediaGroups / generated from scratch)
|
|
73
|
+
- Atom Skill recipe (if skillRef present): base prompt, model, variants
|
|
74
|
+
- Matched pipeline Skills: which playcraft-* skills were applied
|
|
75
|
+
- Pipeline decision: key choices made during production
|
|
76
|
+
-->
|
|
52
77
|
|
|
53
78
|
(Pending Technical Artist Phase 1)
|
|
54
79
|
|
|
@@ -56,7 +81,14 @@ Gate #1 — one line per atom in atoms[]; point elsewhere for details:
|
|
|
56
81
|
|
|
57
82
|
## Impl Skill Context
|
|
58
83
|
|
|
59
|
-
> **Developer fills** during integration Skill Preflight.
|
|
84
|
+
> **Developer fills** during integration Skill Preflight. **MUST NOT** leave empty after implementation.
|
|
85
|
+
|
|
86
|
+
<!-- Developer: for each assigned atom, record:
|
|
87
|
+
- Implementation approach (based on SKILL.md Recipe)
|
|
88
|
+
- Matched Skills: which .aigameplay / .aiconfig skills were scaffolded
|
|
89
|
+
- ref files used: PGS schemas, reducer templates, etc.
|
|
90
|
+
- Implementation decisions: deviations from Skill template + reason
|
|
91
|
+
-->
|
|
60
92
|
|
|
61
93
|
(Pending Developer Phase 1)
|
|
62
94
|
|
|
@@ -74,6 +74,22 @@ TA crop index + Phase 2 VisualAtom actualOutput: ASR:sheet:R#C#
|
|
|
74
74
|
|
|
75
75
|
**Delta vs layout-spec Color Palette**: {{match | PM update: one line}}
|
|
76
76
|
|
|
77
|
+
## Skill Preflight (Phase 2)
|
|
78
|
+
|
|
79
|
+
> **Mandatory before audio/digit production.** Read relevant Skills + check mediaGroups.
|
|
80
|
+
|
|
81
|
+
| Skill / Check | 已读 | 关键决策摘要 |
|
|
82
|
+
| -------------------------- | ---- | --------------------------------------------- |
|
|
83
|
+
| playcraft-audio-generation | ☐ | {{BGM mood, SFX prompt pattern, loop config}} |
|
|
84
|
+
| playcraft-text-rendering | ☐ | {{digit strip chroma strategy, font style}} |
|
|
85
|
+
| playcraft-image-generation | ☐ | {{background decision for digit strip}} |
|
|
86
|
+
| mediaGroups (.aiaudio) | ☐ | {{linked: X, skipped: Y, reason: Z}} |
|
|
87
|
+
|
|
88
|
+
<!--
|
|
89
|
+
MUST be filled before generating any audio or digit strip in Phase 2.
|
|
90
|
+
mediaGroups: list each .aiaudio match disposition (linked/skipped + reason).
|
|
91
|
+
-->
|
|
92
|
+
|
|
77
93
|
## Style Consistency Self-Check
|
|
78
94
|
|
|
79
95
|
- [ ] All visual assets share the same art style?
|
|
@@ -2,116 +2,119 @@
|
|
|
2
2
|
|
|
3
3
|
## Upstream Intake
|
|
4
4
|
|
|
5
|
-
> **Step 0 — mandatory before Spec Quick-Check or any `game/` edit.**
|
|
5
|
+
> **Step 0 — mandatory before Spec Quick-Check or any `game/` edit.**
|
|
6
|
+
|
|
7
|
+
| Doc | Read ✓ | One-line takeaway |
|
|
8
|
+
| --------------------------- | ------ | ----------------------------------------- |
|
|
9
|
+
| `docs/project-state.md` | ☐ | {{e.g. ui_pass, Wave 2 done}} |
|
|
10
|
+
| `docs/design-brief.md` | ☐ | {{e.g. flow scenes for navigation}} |
|
|
11
|
+
| `docs/layout-spec.md` | ☐ | {{e.g. zones, assetMapping, atlas paths}} |
|
|
12
|
+
| `docs/atom-plan.json` | ☐ | {{e.g. Developer atoms + skillRefs}} |
|
|
13
|
+
| `docs/atom-plan.md` | ☐ | Impl Skill Context + acceptance |
|
|
14
|
+
| `docs/style-exploration.md` | ☐ | {{e.g. MC panel layout per scene}} |
|
|
15
|
+
| `logs/designer-log.md` | ☐ | {{e.g. palette locked, motion notes}} |
|
|
16
|
+
| `logs/ta-log.md` | ☐ | {{e.g. compliance green, atlas params}} |
|
|
6
17
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
| `docs/atom-plan.json` | ☐ | {{e.g. 6 Developer atoms, skillRef memory_match}} |
|
|
13
|
-
| `docs/atom-plan.md` | ☐ | Impl Skill Context + acceptance criteria |
|
|
14
|
-
| `docs/style-exploration.md` | ☐ | {{e.g. MC panel1 UI layout, Hook frame contrast}} |
|
|
15
|
-
| `logs/designer-log.md` | ☐ | {{e.g. motion: slow-mo near-win}} |
|
|
16
|
-
| `logs/ta-log.md` | ☐ | {{e.g. Compliance green, tile atlas 8 frames}} |
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Skill Preflight
|
|
21
|
+
|
|
22
|
+
> **Before any `game/` edits (ui_pass).** See `refs/developer-phase1-flow.md` Step 3.
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
| skillRef | access | `ref/` files read (paths) | `scaffold` included |
|
|
25
|
+
| ------------ | --------------------- | ------------------------- | ------------------- |
|
|
26
|
+
| {{skillRef}} | linked / cli-fallback | {{paths}} | yes / no |
|
|
19
27
|
|
|
20
28
|
---
|
|
21
29
|
|
|
22
|
-
##
|
|
30
|
+
## UI Pass Plan
|
|
23
31
|
|
|
24
|
-
> **
|
|
32
|
+
> **ui_pass only — mandatory before UI implementation.** Hook enforces on STOP.
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
| ------------ | --------------------- | ----------------------------------------------- | ------------------- |
|
|
28
|
-
| {{skillRef}} | linked / cli-fallback | {{e.g. .claude/skills/.../ref/pgs-schema.json}} | yes / no |
|
|
34
|
+
### Architecture
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```
|
|
36
|
+
- **Engine**: {{engine}}
|
|
37
|
+
- **Entry**: `game/index.html`
|
|
38
|
+
- **Scene flow**: Hook → Tutorial → EndCard → CTA (navigation only in ui_pass)
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
Rules:
|
|
37
|
-
- One row per non-dash skillRef from atom-plan
|
|
38
|
-
- access: `linked` = read `.claude/skills/<skillRef>/`; `cli-fallback` = soft link missing, used `playcraft skills read` + Package Skills Root
|
|
39
|
-
- If skillRef = — for an atom, note "skills match" or playcraft-research in Impl Skill Context instead
|
|
40
|
-
- Do NOT mark GameplayAtom/ConfigAtom done in atom-plan until this table is filled
|
|
41
|
-
-->
|
|
40
|
+
### Scene-Asset Binding Plan
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
| Scene | Assets (assetMapping) | Atlas/Frame | On disk? |
|
|
43
|
+
| -------- | --------------------- | ----------- | -------- |
|
|
44
|
+
| hook | {{paths}} | {{json}} | {{y/n}} |
|
|
45
|
+
| tutorial | {{paths}} | {{json}} | {{y/n}} |
|
|
46
|
+
| endcard | {{paths}} | {{json}} | {{y/n}} |
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
- **Completed**: {{total_completed}}
|
|
47
|
-
- **Bindings resolved**: {{resolved}}/{{total_bindings}}
|
|
48
|
+
### Scene navigation (for Reviewer ui_diff)
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
| MC panel | Scene key | How to reach (URL param / button) |
|
|
51
|
+
| ---------- | ----------- | ---------------------------------- |
|
|
52
|
+
| Concept | {{initial}} | {{e.g. ?scene=main or default}} |
|
|
53
|
+
| Hook | hook | {{e.g. ?scene=hook}} |
|
|
54
|
+
| Onboarding | tutorial | {{e.g. button or ?scene=tutorial}} |
|
|
55
|
+
| EndCard | endcard | {{...}} |
|
|
56
|
+
| CTA | cta | {{...}} |
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
> Read `docs/style-exploration.md` concept mockup + storyboard composite image before implementing.
|
|
53
|
-
> The storyboard is a single composite image with 4 frames in a grid — study each frame's position.
|
|
54
|
-
|
|
55
|
-
| Storyboard Frame | Scene/State | Code Location | Visual Intent |
|
|
56
|
-
| ------------------------- | ---------------- | ------------------------- | ----------------------------- |
|
|
57
|
-
| Hook (0-3s) | `scene.hook` | `game/scenes/hook.ts` | {{visual_intent_description}} |
|
|
58
|
-
| Tutorial (3-10s) | `scene.tutorial` | `game/scenes/tutorial.ts` | {{visual_intent_description}} |
|
|
59
|
-
| Gameplay+NearWin (10-25s) | `scene.gameplay` | `game/scenes/gameplay.ts` | {{visual_intent_description}} |
|
|
60
|
-
| EndCard (25-30s) | `scene.endcard` | `game/scenes/endcard.ts` | {{visual_intent_description}} |
|
|
61
|
-
|
|
62
|
-
<!--
|
|
63
|
-
Rules:
|
|
64
|
-
- Every scene code file MUST have a top comment referencing the storyboard:
|
|
65
|
-
// Visual reference: assets/images/storyboard/storyboard_confirmed.png (frame: top-left=Hook)
|
|
66
|
-
- If storyboard frame visuals conflict with layout-spec zones coordinates:
|
|
67
|
-
→ storyboard takes precedence, ask PM in intent-clarifications.md
|
|
68
|
-
- Visual Intent column should capture the EMOTION and ATTENTION FLOW, not just mechanics
|
|
69
|
-
-->
|
|
58
|
+
### Risk Checklist (ui_pass)
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
- [ ] Every assetMapping path verified on disk
|
|
61
|
+
- [ ] Scene navigation documented for all 5 MC panels
|
|
62
|
+
- [ ] No core gameplay rules in ui_pass scope
|
|
63
|
+
- [ ] No external network dependencies
|
|
72
64
|
|
|
73
|
-
|
|
65
|
+
---
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- **Test results**: {{passed}}/{{total}} passed
|
|
79
|
-
- **Notes**: {{implementation_notes}}
|
|
67
|
+
## Gameplay Pass Plan
|
|
68
|
+
|
|
69
|
+
> **gameplay_pass only — mandatory before PGS / rules implementation.**
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
Repeat for each atom.
|
|
83
|
-
For GameplayAtom: include PGS path + test results
|
|
84
|
-
For ConfigAtom: include config path + parameter summary
|
|
85
|
-
-->
|
|
71
|
+
### PGS Strategy
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
- **Gameplay type**: {{from design-brief}}
|
|
74
|
+
- **Core rules**: {{from Skill recipe}}
|
|
75
|
+
- **First level guarantee**: {{how tutorial ensures win}}
|
|
76
|
+
- **State machine**: {{states and transitions}}
|
|
88
77
|
|
|
89
|
-
|
|
90
|
-
| ---------------------------- | ------------------ | ------------------- | -------------------------- |
|
|
91
|
-
| {{scene_path_or_config_key}} | {{source_atom_id}} | {{asset_file_path}} | {{bound/missing/mismatch}} |
|
|
78
|
+
### Risk Checklist (gameplay_pass)
|
|
92
79
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
80
|
+
- [ ] UI shell unchanged unless open UI Diff items
|
|
81
|
+
- [ ] testCases written before rule implementation
|
|
82
|
+
- [ ] First level guarantees player success
|
|
83
|
+
- [ ] CTA handler with platform fallbacks
|
|
84
|
+
- [ ] Zero external network requests
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Experience Flow → Code Mapping
|
|
98
89
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
90
|
+
| Storyboard Frame | Scene/State | Code Location | Visual Intent |
|
|
91
|
+
| ---------------- | ---------------- | ------------------------- | ------------- |
|
|
92
|
+
| Hook | `scene.hook` | `game/scenes/hook.ts` | {{intent}} |
|
|
93
|
+
| Tutorial | `scene.tutorial` | `game/scenes/tutorial.ts` | {{intent}} |
|
|
94
|
+
| Gameplay | `scene.gameplay` | `game/scenes/gameplay.ts` | {{intent}} |
|
|
95
|
+
| EndCard | `scene.endcard` | `game/scenes/endcard.ts` | {{intent}} |
|
|
96
|
+
|
|
97
|
+
---
|
|
104
98
|
|
|
105
99
|
## Dev self-check
|
|
106
100
|
|
|
107
|
-
|
|
101
|
+
### ui_pass completion
|
|
108
102
|
|
|
109
103
|
- **devUrl**: {{http://localhost:...}}
|
|
110
|
-
- **
|
|
104
|
+
- **devStatus**: ui_ready
|
|
111
105
|
- **UI vs MC + layout-spec**: {{pass/fail — notes}}
|
|
106
|
+
- **Scene navigation works**: {{yes/no}}
|
|
107
|
+
- **Ready for Reviewer ui_diff**: {{yes/no}}
|
|
108
|
+
|
|
109
|
+
### gameplay_pass completion
|
|
110
|
+
|
|
111
|
+
- **devUrl**: {{http://localhost:...}}
|
|
112
|
+
- **devStatus**: ready
|
|
112
113
|
- **Gameplay vs design-brief + PGS**: {{pass/fail — notes}}
|
|
113
|
-
- **Runtime** (
|
|
114
|
-
- **Ready for Reviewer**: {{yes/no}}
|
|
114
|
+
- **Runtime** (CTA, audio, state machine): {{pass/fail — notes}}
|
|
115
|
+
- **Ready for Reviewer load_check**: {{yes/no}}
|
|
116
|
+
|
|
117
|
+
---
|
|
115
118
|
|
|
116
119
|
## Upstream blockers
|
|
117
120
|
|
|
@@ -119,22 +122,13 @@ Status values:
|
|
|
119
122
|
| -------- | --------- | -------------- | ------------------ | --------------- |
|
|
120
123
|
| {{path}} | {{issue}} | {{acceptance}} | TA / Designer / PM | open / resolved |
|
|
121
124
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
- [ ] Element IDs match layout-spec `colorPalette.tileColors[].id`?
|
|
133
|
-
- [ ] All asset paths match layout-spec `assetMapping`?
|
|
134
|
-
- [ ] Zero external network requests (no fetch/XHR/external scripts)?
|
|
135
|
-
- [ ] CTA handler implemented with multi-platform fallback?
|
|
136
|
-
- [ ] `game/index.html` has viewport meta with user-scalable=no?
|
|
137
|
-
- [ ] All CSS/JS inline (no external resources)?
|
|
138
|
-
- [ ] First level guarantees player success?
|
|
139
|
-
|
|
140
|
-
> **Not required for integration complete**: `playcraft build` (future delivery path only).
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Per-Atom Delivery
|
|
128
|
+
|
|
129
|
+
### {{atom_id}} — {{slot_name}}
|
|
130
|
+
|
|
131
|
+
- **Status**: {{status}}
|
|
132
|
+
- **Phase**: ui_pass / gameplay_pass
|
|
133
|
+
- **Output path**: {{file_path}}
|
|
134
|
+
- **Notes**: {{notes}}
|