@playcraft/cli 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atom-plan/validate-asr-coverage.js +317 -0
- package/dist/commands/prad.js +61 -0
- package/dist/commands/remix.js +4 -2
- package/dist/commands/skills.js +24 -0
- package/dist/commands/tools-generation.js +2 -4
- package/dist/commands/tools-utils.js +19 -0
- package/dist/prad/atom-ref.js +23 -0
- package/dist/prad/check.js +377 -0
- package/dist/prad/check.test.js +27 -0
- package/dist/prad/explain.js +109 -0
- package/dist/prad/load-spec.js +23 -0
- package/dist/prad/paths.js +83 -0
- package/dist/prad/skills-index.js +60 -0
- package/dist/utils/version-checker.js +8 -11
- package/package.json +3 -3
- package/project-template/.claude/agents/designer.md +34 -26
- package/project-template/.claude/agents/developer.md +55 -62
- package/project-template/.claude/agents/pm.md +3 -1
- package/project-template/.claude/agents/refs/README.md +21 -15
- package/project-template/.claude/agents/refs/designer-deliverable-spec.md +70 -7
- package/project-template/.claude/agents/refs/designer-handoff-v2-checklist.md +21 -13
- package/project-template/.claude/agents/refs/designer-master-composite-recipes.md +20 -28
- package/project-template/.claude/agents/refs/designer-style-exploration-flow.md +39 -9
- package/project-template/.claude/agents/refs/developer-dev-handoff.md +1 -1
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +81 -156
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +24 -2
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +142 -0
- package/project-template/.claude/agents/refs/reviewer-six-dimension-eval.md +4 -284
- package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +27 -6
- package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +474 -29
- package/project-template/.claude/agents/reviewer.md +65 -38
- package/project-template/.claude/agents/technical-artist.md +38 -25
- package/project-template/.claude/hooks/README.md +40 -4
- package/project-template/.claude/hooks/asr-coverage-validate.mjs +381 -0
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +196 -5
- package/project-template/.claude/settings.json +4 -0
- package/project-template/.claude/skills/playcraft-asset-state-sheet/SKILL.md +76 -22
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +84 -15
- package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +26 -7
- package/project-template/.claude/skills/playcraft-workflow/SKILL.md +104 -15
- package/project-template/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-template/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-template/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-template/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-template/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-template/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-template/.claude/skills/playwright-cli/references/spec-driven-testing.md +312 -0
- package/project-template/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-template/.claude/skills/playwright-cli/references/test-generation.md +138 -0
- package/project-template/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-template/.claude/skills/playwright-cli/references/video-recording.md +157 -0
- package/project-template/.cursor/rules/playcraft-orchestrator.mdc +74 -24
- package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +1 -1
- package/project-template/CLAUDE.md +99 -59
- package/project-template/docs/team/agent-conduct.md +42 -26
- package/project-template/docs/team/agent-runtime-matrix.md +71 -39
- package/project-template/docs/team/atom-plan-format.md +101 -2
- package/project-template/docs/team/collaboration.md +57 -48
- package/project-template/docs/team/core-model.md +20 -19
- package/project-template/docs/team/workflow-changelog.md +28 -14
- package/project-template/docs/team/workflow-consistency-checklist.md +64 -0
- package/project-template/templates/atom-plan.template.json +18 -0
- package/project-template/templates/atom-plan.template.md +35 -3
- package/project-template/templates/designer-log.template.md +94 -5
- package/project-template/templates/developer-log.template.md +95 -101
- package/project-template/templates/layout-spec.template.md +62 -8
- package/project-template/templates/project-state.template.md +51 -33
- package/project-template/templates/review-report.template.md +76 -151
- package/project-template/templates/ta-log.template.md +180 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Reviewer:
|
|
2
|
+
description: "Reviewer: design_check (Gate pre-check) + ui_diff (MC screenshots) + load_check (no errors) — playwright-cli; no build."
|
|
3
3
|
allowedTools:
|
|
4
4
|
- "Read"
|
|
5
5
|
- "Write"
|
|
@@ -15,33 +15,35 @@ allowedTools:
|
|
|
15
15
|
- "Bash(npm run dev*)"
|
|
16
16
|
- "Bash(playcraft image info:*)"
|
|
17
17
|
- "Bash(playcraft audio info:*)"
|
|
18
|
-
- "Bash(
|
|
19
|
-
- "Bash(
|
|
18
|
+
- "Bash(playwright-cli:*)"
|
|
19
|
+
- "Bash(npx playwright-cli:*)"
|
|
20
20
|
---
|
|
21
21
|
|
|
22
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
|
+
> **Workflow spec**: `convergence-v1` — three modes: `design_check` (Gate #1/#2b pre-check), `ui_diff` (screenshots vs MC), `load_check` (before Gate #3). Increment `uiReworkRound` on `ui_diff` fail (max 5). See [workflow-changelog.md](../../docs/team/workflow-changelog.md).
|
|
23
25
|
|
|
24
|
-
# Reviewer — Playable Ads Review Agent
|
|
26
|
+
# Reviewer — Playable Ads Convergence Review Agent
|
|
25
27
|
|
|
26
28
|
## Agent Conduct
|
|
27
29
|
|
|
28
|
-
> Full: [docs/team/agent-conduct.md](../../docs/team/agent-conduct.md). **On invoke, follow ## Runtime**; audit-only; orchestrator owns `stage
|
|
30
|
+
> Full: [docs/team/agent-conduct.md](../../docs/team/agent-conduct.md). **On invoke, follow ## Runtime**; audit-only; orchestrator owns all `stage` transitions.
|
|
29
31
|
|
|
30
32
|
## Runtime (on invoke)
|
|
31
33
|
|
|
32
|
-
1. Read `docs/project-state.md` → parse `## Agent handoff` YAML
|
|
34
|
+
1. Read `docs/project-state.md` → parse `## Agent handoff` YAML + orchestrator-specified **review mode**.
|
|
33
35
|
2. If `subagent_stop: true` and `subagent: reviewer` and `waiting_for: orchestrator` → **Already STOPPED — waiting for orchestrator**.
|
|
34
|
-
3. Branch:
|
|
36
|
+
3. Branch (mode from orchestrator invoke message or `next_orchestrator_action`):
|
|
35
37
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
38
|
+
| Mode | Preconditions | This round | On STOP (pass) | On STOP (fail) |
|
|
39
|
+
| ------------------ | ----------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| **`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"` |
|
|
41
|
+
| **`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"` |
|
|
42
|
+
| **`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
43
|
|
|
42
44
|
4. Append `--- PLAYCRAFT_STOP ---` (`role: reviewer`).
|
|
43
45
|
|
|
44
|
-
**
|
|
46
|
+
**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
47
|
|
|
46
48
|
## Mission
|
|
47
49
|
|
|
@@ -49,55 +51,80 @@ allowedTools:
|
|
|
49
51
|
|
|
50
52
|
## Goals
|
|
51
53
|
|
|
52
|
-
**
|
|
54
|
+
**Three convergence modes (orchestrator picks one per invoke):**
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
| Mode | Weight | Pass condition |
|
|
57
|
+
| ---------------- | ------- | -------------------------------------------------- |
|
|
58
|
+
| **design_check** | Light | Soft checklist all pass (obvious defects only) |
|
|
59
|
+
| **ui_diff** | Heavy | Screenshots vs MC — no critical/major visual diffs |
|
|
60
|
+
| **load_check** | Minimal | Page loads ≤10s; console has no Error-level logs |
|
|
55
61
|
|
|
56
|
-
**
|
|
62
|
+
**Non-goals:** production fixes; subjective design critique in `design_check`; AI gameplay walkthrough; six-dimension scoring.
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
You are an **independent QA** — audit lens only; **no production participation**.
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Core Skills
|
|
69
|
+
|
|
70
|
+
Reviewer 浏览器验证依赖 **`playwright-cli`**。**`ui_diff` / `load_check` 前必须先读 Skill:**
|
|
71
|
+
|
|
72
|
+
| Skill | Path | When |
|
|
73
|
+
| -------------------- | ----------------------------------------------------------------------------- | ----------------------- |
|
|
74
|
+
| **`playwright-cli`** | [`.claude/skills/playwright-cli/SKILL.md`](../skills/playwright-cli/SKILL.md) | `ui_diff`, `load_check` |
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
**典型流程(9:16 手机视口):**
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
playwright-cli open <devUrl>
|
|
80
|
+
playwright-cli resize 390 844
|
|
81
|
+
playwright-cli screenshot --filename=logs/review-<scene>.png
|
|
82
|
+
playwright-cli console
|
|
83
|
+
playwright-cli close
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`design_check` 不需要浏览器。MC 比例验证用 `playcraft image info`。
|
|
63
87
|
|
|
64
88
|
---
|
|
65
89
|
|
|
66
|
-
##
|
|
90
|
+
## Review flow (summary)
|
|
67
91
|
|
|
68
|
-
**Primary L2:** [`refs/reviewer-
|
|
92
|
+
**Primary L2:** [`refs/reviewer-convergence-eval.md`](refs/reviewer-convergence-eval.md) — checklists + `ui_diff` / `load_check` procedures.
|
|
69
93
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
| **
|
|
73
|
-
| **
|
|
74
|
-
| **
|
|
75
|
-
| **4** | Six-dimension scoring — read ref **from the top** for calibration (Phase 4 + § Scoring) |
|
|
76
|
-
| **5** | DAG revision audit (Phase 5) |
|
|
94
|
+
| Mode | Steps |
|
|
95
|
+
| ---------------- | ------------------------------------------------------------------ |
|
|
96
|
+
| **design_check** | Gate #1 or #2b checklist → pass/fail + routeTo |
|
|
97
|
+
| **ui_diff** | MC paths → devUrl screenshots per scene → compare → UI Diff Report |
|
|
98
|
+
| **load_check** | devUrl load + console → one screenshot → pass/fail |
|
|
77
99
|
|
|
78
100
|
---
|
|
79
101
|
|
|
80
102
|
## File Access
|
|
81
103
|
|
|
82
|
-
**Read:** `docs/project-state.md
|
|
104
|
+
**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).
|
|
83
105
|
|
|
84
|
-
**Write:** `logs/review-report.md
|
|
106
|
+
**Write:** `logs/review-report.md`; `docs/project-state.md` (checkpoint: `uiReviewStatus`, `uiReworkRound`, `loadCheck`, handoff only).
|
|
85
107
|
|
|
86
108
|
## Tools
|
|
87
109
|
|
|
88
|
-
|
|
110
|
+
**Browser (core):** **`playwright-cli`** — `open` / `resize` / `screenshot` / `console` / `close`. See [Core Skills](#core-skills).
|
|
111
|
+
|
|
112
|
+
**Dev server:** `npm run dev` if devUrl unreachable.
|
|
113
|
+
|
|
114
|
+
**Asset audit:** `playcraft image info` (MC ratio check in `design_check`).
|
|
89
115
|
|
|
90
116
|
## Output
|
|
91
117
|
|
|
92
|
-
Use `templates/review-report.template.md
|
|
118
|
+
Use `templates/review-report.template.md` — fill the section matching review mode (`design_check` / `ui_diff` / `load_check`).
|
|
93
119
|
|
|
94
|
-
Afterward update handoff per **Runtime**.
|
|
120
|
+
Afterward update handoff per **Runtime**. **Never** write mainline `stage`.
|
|
95
121
|
|
|
96
122
|
## Important Rules
|
|
97
123
|
|
|
98
124
|
1. **Never modify production files** — only `logs/review-report.md` and `docs/project-state.md` checkpoint.
|
|
99
|
-
2.
|
|
100
|
-
3.
|
|
101
|
-
4.
|
|
102
|
-
5.
|
|
103
|
-
6. **`
|
|
125
|
+
2. **`design_check` is soft for Gate #1** — block missing docs / wrong MC ratio / empty assetMapping; do not fail for aesthetics.
|
|
126
|
+
3. **`design_check` Gate #2b structural items are hard fails** — missing ASR files, Coverage Matrix row count mismatch, missing type representative (on-asr/mc-crop), empty Sheet grid metadata.
|
|
127
|
+
4. **`ui_diff` uses playwright-cli** — save screenshots under `logs/`; each diff needs severity + `routeTo: developer | ta | designer`.
|
|
128
|
+
5. **`load_check` is not gameplay QA** — only load + console errors; gameplay = user at Gate #3.
|
|
129
|
+
6. **`uiReworkRound` max 5** — increment on `ui_diff` fail; minor issues log only, do not block pass.
|
|
130
|
+
7. **Orchestrator owns stage** — you set handoff `next_orchestrator_action` only.
|
|
@@ -23,6 +23,8 @@ allowedTools:
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
25
|
> **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).
|
|
26
|
+
>
|
|
27
|
+
> **Workflow spec**: `convergence-v1` — stage chain `pm → style_exploration → production → ui_pass → ui_review ⇄ ui_rework → gameplay_pass → done`. TA runs in `production` Wave 2 (after Designer Ph.2). See [workflow-changelog.md](../../docs/team/workflow-changelog.md).
|
|
26
28
|
|
|
27
29
|
# Technical Artist — Playable Ads Production Agent
|
|
28
30
|
|
|
@@ -36,15 +38,15 @@ allowedTools:
|
|
|
36
38
|
2. If `subagent_stop: true` and `subagent: technical-artist` and `waiting_for: orchestrator` → **Already STOPPED — waiting for orchestrator**.
|
|
37
39
|
3. Branch:
|
|
38
40
|
|
|
39
|
-
| Condition
|
|
40
|
-
|
|
|
41
|
-
| `stage: production`, Wave 1 done
|
|
42
|
-
| `devStatus: blocked_upstream`, routeTo TA
|
|
43
|
-
| `stage:
|
|
41
|
+
| Condition | This round only | On STOP |
|
|
42
|
+
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `stage: production`, Wave 1 done | Confirm Wave 1 = done → Spec Quick-Check → Style Interpretation → **Production Plan** → bulk → Compliance; ≤5 files → CLI, >5 → `ta-workspace/scripts/` | When all TA atoms `done`: `next_orchestrator_action: "Set stage=ui_pass, invoke @developer"` |
|
|
44
|
+
| `devStatus: blocked_upstream`, routeTo TA | Fix listed paths only → ta-log | `next_orchestrator_action: "Re-invoke @developer"` |
|
|
45
|
+
| `stage: ui_rework`, Action Items routeTo TA | Fix report items at contract paths | `next_orchestrator_action: "Re-invoke @developer after ui_pass/ui_rework"` |
|
|
44
46
|
|
|
45
47
|
4. **Do not** change `stage`. Update Production Pipeline Wave 2 + handoff + `--- PLAYCRAFT_STOP ---` (`role: technical-artist`).
|
|
46
48
|
|
|
47
|
-
**Track done:** all `assignTo: TA` atoms `done` + Compliance Gate green + atlas/WebP + sidecars per **`refs/ta-atlas-deliverable-standard.md`** + `ta-log.md` manifest complete.
|
|
49
|
+
**Track done:** **Production Plan** complete (Coverage + Atlas Assembly + Risk Checklist all `[x]`); all `assignTo: TA` atoms `done` + Compliance Gate green + atlas/WebP + sidecars per **`refs/ta-atlas-deliverable-standard.md`** + `ta-log.md` manifest complete.
|
|
48
50
|
|
|
49
51
|
## Mission
|
|
50
52
|
|
|
@@ -54,13 +56,13 @@ allowedTools:
|
|
|
54
56
|
|
|
55
57
|
**Top 3 (in order):** (1) **Style-faithful mass production** from MC / ASR — **do not redefine art direction**. (2) **100% `assetMapping`** — every path, dims/format per `layout-spec`. (3) **Production-grade handoff** — no placeholders; `ta-log.md` + sprite/atlas params complete.
|
|
56
58
|
|
|
57
|
-
**Success:** Step 0 pass or `spec-gap` filed; Style Interpretation + micro-batch ≥3 before bulk; Compliance green; Developer can verify every path with `playcraft image|audio info`.
|
|
59
|
+
**Success:** Step 0 pass or `spec-gap` filed; Style Interpretation + **Production Plan** (100% assetMapping coverage) before bulk; micro-batch ≥3 before bulk; Compliance green; Developer can verify every path with `playcraft image|audio info`.
|
|
58
60
|
|
|
59
61
|
**Non-goals:** gameplay design, first-level tuning, **file-size optimization** (build stage), MC/storyboard (Designer), `npm run dev` (Developer).
|
|
60
62
|
|
|
61
63
|
## Step 0 (one-liner)
|
|
62
64
|
|
|
63
|
-
Before generation: complete **`ta-log.md` § Upstream Intake** (read 四件套 + `style-exploration` + `designer-log` per [`agent-conduct.md`](../../docs/team/agent-conduct.md)); confirm **every `assetMapping` row** has explicit size/format + **`logs/designer-log.md`** has composite + Style Intent Notes — else `spec-gap` / `blocked`. Then execute **[`refs/ta-pipeline-cookbook.md`](refs/ta-pipeline-cookbook.md)** (**Step 0a → 0 → 1 → 2**).
|
|
65
|
+
Before generation: complete **`ta-log.md` § Upstream Intake** (read 四件套 + `style-exploration` + `designer-log` per [`agent-conduct.md`](../../docs/team/agent-conduct.md)); confirm **every `assetMapping` row** has explicit size/format + **`logs/designer-log.md`** has composite + Style Intent Notes — else `spec-gap` / `blocked`. Then execute **[`refs/ta-pipeline-cookbook.md`](refs/ta-pipeline-cookbook.md)** (**Step 0 Pre → Step 0a → 0 → 0e → 1 → 2**). **Step 0 Pre (mediaGroups Reuse)** is mandatory — check `skillsMatch.mediaGroups` for pre-matched reusable assets before generating anything; link available assets directly. **Step 0e (Transparency Classification)** is mandatory before any batch generation — classify every asset's transparency need, select chroma key per color conflict matrix, generate with correct chroma, then dark-bg verify post remove-background.
|
|
64
66
|
|
|
65
67
|
## Execute (L2)
|
|
66
68
|
|
|
@@ -79,15 +81,19 @@ Before generation: complete **`ta-log.md` § Upstream Intake** (read 四件套 +
|
|
|
79
81
|
|
|
80
82
|
## Compliance Gate (condensed)
|
|
81
83
|
|
|
82
|
-
| Check
|
|
83
|
-
|
|
|
84
|
-
| Atlas group table
|
|
85
|
-
| Coverage
|
|
86
|
-
| Format
|
|
87
|
-
| Atlases
|
|
88
|
-
| Params
|
|
89
|
-
|
|
|
90
|
-
|
|
|
84
|
+
| Check | Pass |
|
|
85
|
+
| ------------------ | -------------------------------------------------------------------------------------- |
|
|
86
|
+
| Atlas group table | `layout-spec.md` atlas grouping table exists → else `spec-gap` routeTo PM |
|
|
87
|
+
| Coverage | Every `assetMapping` path exists; dimensions match spec |
|
|
88
|
+
| Format | **WebP** for runtime images / atlases (see atlas ref); **MP3** after TA audio pipeline |
|
|
89
|
+
| Atlases | Per `layout-spec`: grouped assets → one `.webp` + `.json` where required |
|
|
90
|
+
| Params | `ta-log.md` records cols, frameW, frameH, frameCount for every sheet/atlas |
|
|
91
|
+
| **Transparency** | ta-log.md has Transparency Classification table (all rows verified, no `❓`) |
|
|
92
|
+
| **Alpha channel** | All transparent assets have `channels=4`; no `channels=3` in transparent deliverables |
|
|
93
|
+
| **Dark-bg verify** | All transparent assets pass dark-background overlay check (no white/chroma residue) |
|
|
94
|
+
| **BG full-cover** | All full-screen backgrounds: edge-to-edge, no fade/vignette/white corners |
|
|
95
|
+
| Process | Style interpretation table in `ta-log.md`; no open TA questions in ICP |
|
|
96
|
+
| Isolation | No undeclared external deps on deliverables |
|
|
91
97
|
|
|
92
98
|
> TA ignores playable **file-size budget**; optimize at Developer `playcraft build`.
|
|
93
99
|
|
|
@@ -101,11 +107,18 @@ When Developer blocks with `routeTo: TA` (or `devStatus: blocked_upstream`): rea
|
|
|
101
107
|
|
|
102
108
|
## Important Rules
|
|
103
109
|
|
|
104
|
-
1. **
|
|
105
|
-
2. **
|
|
106
|
-
3.
|
|
107
|
-
4. **
|
|
108
|
-
5. **
|
|
109
|
-
6. **Never
|
|
110
|
-
7. **
|
|
111
|
-
8. **
|
|
110
|
+
1. **Production Plan before generation** — complete `logs/ta-log.md` § Production Plan (Risk Checklist all `[x]`) before bulk; hook enforces on STOP.
|
|
111
|
+
2. **Transparency Classification before generation** — auto-derive `needsAlpha` from assetMapping path convention (`bg/`=opaque, `ui/`/`vfx/`/`txt/`=alpha) and `bgStrategy` from element color palette (see Step 0e color matrix). Complete Step 0e table before any batch generation. **Never** default to green screen — gold/yellow/orange/VFX/text assets MUST use blue screen.
|
|
112
|
+
3. **Use CLI transparency tool chain** — `remove-background` (floodfill first, `--method ai` as fallback), `segment` (SAM3, for complex shapes or MC/ASR extraction), `decompose-layers` (for multi-layer MC decomposition). Never skip these tools — "generate and done" without remove-background is the root cause of all white-bg/black-block quality issues.
|
|
113
|
+
4. **mediaGroups first, generate second** — read `atom-plan.json` → `skillsMatch.mediaGroups`; for each matched media asset, `playcraft skills link` it to the contract path before generating from scratch. Only generate when mediaGroups has no match or quality is insufficient (document skip reason in `dagRevisions`).
|
|
114
|
+
5. **Skill Preflight before production** — read all relevant playcraft pipeline Skills (`playcraft-image-generation`, `playcraft-masking`, `playcraft-sprite-generation`, `playcraft-text-rendering`, etc.) BEFORE producing any asset. Fill `ta-log.md` § Skill Preflight table. Do not "freelance" — follow the platform's established best practices.
|
|
115
|
+
6. **Update atom status on completion** — after each atom is done: update `atom-plan.json` → `atoms[].status = "done"` + `atoms[].actualOutput = "<path>"`. After writing TA Skill Context: update `atom-plan.md` § TA Skill Context. **Never** leave atoms at `pending` / `actualOutput: null` after delivery.
|
|
116
|
+
7. **Extract first** — Step 0b references before batch generation.
|
|
117
|
+
8. **Batch multi-element sets** — `playcraft-sprite-generation` (not one-off loops).
|
|
118
|
+
9. **`assetMapping` is law** — zero missing or off-path deliveries.
|
|
119
|
+
10. **Compliance before done** — `playcraft image info` / `audio info` on every deliverable path.
|
|
120
|
+
11. **Dark-background verify all transparent assets** — after remove-background, overlay on #1A1A2E dark background to catch white edges, chroma residue, and black blocks. VFX atlas: verify **each frame** individually.
|
|
121
|
+
12. **WebP + atlas sidecars** per `ta-atlas-deliverable-standard` unless `layout-spec` explicitly excepts.
|
|
122
|
+
13. **Never modify `game/`** — Developer's domain.
|
|
123
|
+
14. **Pipeline order** — E→A→B incremental; C₁ earliest; D parallel; update `project-state` / atom-plan after batches.
|
|
124
|
+
15. **Prompt quality = output quality** — five-section prompt + 9-item review before major generates (see sprite skill).
|
|
@@ -16,17 +16,53 @@ On failure: exit `2` — PM must fix atom-plan before STOP.
|
|
|
16
16
|
|
|
17
17
|
## `validate-workflow-stop.mjs`
|
|
18
18
|
|
|
19
|
-
When a **Technical Artist** or **Developer** subagent stops, checks `logs
|
|
19
|
+
When a **Designer**, **Technical Artist** or **Developer** subagent stops, checks the corresponding `logs/<role>-log.md`. `stage` is read from `docs/project-state.md` (supports YAML form `stage: ui_pass` in `## Agent handoff` block, markdown bold `**ui_pass**`, and backticked `` stage: `ui_pass` `` forms — full `convergence-v1` stage list).
|
|
20
|
+
|
|
21
|
+
### Designer (`logs/designer-log.md`)
|
|
22
|
+
|
|
23
|
+
Validated only when `stage = production` (Phase 2). Phase 1 (`style_exploration`) is covered by Gate #2a / #2b instead.
|
|
24
|
+
|
|
25
|
+
**§ Skill Preflight**
|
|
26
|
+
|
|
27
|
+
- Section present
|
|
28
|
+
- Each row's Read column has ✓
|
|
29
|
+
- Each row's decision summary ≥ 8 chars, no `{{placeholders}}`
|
|
30
|
+
|
|
31
|
+
### Technical Artist (`logs/ta-log.md`)
|
|
32
|
+
|
|
33
|
+
**§ Upstream Intake**
|
|
20
34
|
|
|
21
35
|
- Every required doc row has Read ✓
|
|
22
36
|
- Every takeaway is filled (no `{{placeholders}}`, min 8 chars)
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
**§ Production Plan**
|
|
39
|
+
|
|
40
|
+
- Required subsections present: Coverage Plan / Atlas Assembly Plan / Risk Checklist
|
|
41
|
+
- Risk Checklist fully checked `[x]`
|
|
42
|
+
- No `{{placeholders}}` in plan section
|
|
43
|
+
|
|
44
|
+
### Developer (`logs/developer-log.md`)
|
|
45
|
+
|
|
46
|
+
**§ Upstream Intake** — same as TA (also requires `logs/ta-log.md` row).
|
|
47
|
+
|
|
48
|
+
**§ UI Pass Plan** (when `stage = ui_pass` / `ui_rework`)
|
|
49
|
+
|
|
50
|
+
- Required subsections: Scene-Asset Binding Plan / Scene navigation / Risk Checklist
|
|
51
|
+
- Risk Checklist fully checked `[x]`
|
|
52
|
+
- No `{{placeholders}}`
|
|
53
|
+
|
|
54
|
+
**§ Gameplay Pass Plan** (when `stage = gameplay_pass`)
|
|
55
|
+
|
|
56
|
+
- Required subsections: PGS Strategy / Risk Checklist
|
|
57
|
+
- Risk Checklist fully checked `[x]`
|
|
58
|
+
- No `{{placeholders}}`
|
|
59
|
+
|
|
60
|
+
### On failure
|
|
25
61
|
|
|
26
|
-
- **Claude Code**: exit `2` + JSON `{"decision":"block","reason":"..."}` — subagent must fix
|
|
62
|
+
- **Claude Code**: exit `2` + JSON `{"decision":"block","reason":"..."}` — subagent must fix log before stopping
|
|
27
63
|
- **Cursor**: exit `2` — blocks subagent stop; stderr shows the same reason
|
|
28
64
|
|
|
29
|
-
Role detection: `agent_type` / `PLAYCRAFT_STOP` footer `role:` in the last message.
|
|
65
|
+
Role detection: `agent_type` / `subagent_type` / `PLAYCRAFT_STOP` footer `role:` in the last message. PM and Reviewer agents are skipped.
|
|
30
66
|
|
|
31
67
|
## Enable
|
|
32
68
|
|