@playcraft/cli 0.0.44 → 0.0.46

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 (984) hide show
  1. package/dist/atom-tree/build-skeleton.js +180 -0
  2. package/dist/atom-tree/fusion-hints.js +86 -0
  3. package/dist/atom-tree/selection.js +402 -0
  4. package/dist/commands/build-all.js +33 -5
  5. package/dist/commands/build.js +7 -1
  6. package/dist/commands/create.js +774 -50
  7. package/dist/commands/image.js +11 -0
  8. package/dist/commands/prad.js +61 -0
  9. package/dist/commands/remix.js +20 -0
  10. package/dist/commands/skills.js +961 -185
  11. package/dist/commands/tools-detect.js +56 -0
  12. package/dist/commands/tools-generation.js +21 -0
  13. package/dist/commands/tools-video-review.js +100 -0
  14. package/dist/commands/tools.js +4 -0
  15. package/dist/index.js +2 -0
  16. package/dist/prad/atom-ref.js +23 -0
  17. package/dist/prad/check.js +377 -0
  18. package/dist/prad/check.test.js +49 -0
  19. package/dist/prad/explain.js +109 -0
  20. package/dist/prad/load-spec.js +23 -0
  21. package/dist/prad/paths.js +83 -0
  22. package/dist/prad/skills-index.js +60 -0
  23. package/dist/remix/init-template.js +80 -0
  24. package/dist/scaffold/compose.js +211 -0
  25. package/engine-packs/phaser/game/adapters/phaser.ts +52 -0
  26. package/engine-packs/phaser/game/config/game-config.ts +46 -0
  27. package/engine-packs/phaser/game/contract/publish.ts +141 -0
  28. package/engine-packs/phaser/game/contract/types.ts +34 -0
  29. package/engine-packs/phaser/game/index.ts +81 -0
  30. package/engine-packs/phaser/game/runtime-contract.ts +28 -0
  31. package/engine-packs/phaser/manifest.json +1 -0
  32. package/engine-packs/phaser/package.deps.json +1 -0
  33. package/engine-packs/threejs/game/config/.gitkeep +0 -0
  34. package/engine-packs/threejs/game/config/game-config.ts +46 -0
  35. package/engine-packs/threejs/game/contract/publish.ts +141 -0
  36. package/engine-packs/threejs/game/contract/types.ts +34 -0
  37. package/engine-packs/threejs/game/gameplay/.gitkeep +0 -0
  38. package/engine-packs/threejs/game/index.ts +76 -0
  39. package/engine-packs/threejs/game/runtime-contract.ts +15 -0
  40. package/engine-packs/threejs/game/scenes/.gitkeep +0 -0
  41. package/engine-packs/threejs/manifest.json +1 -0
  42. package/engine-packs/threejs/package.deps.json +8 -0
  43. package/package.json +17 -3
  44. package/project-template/.claude/agents/artist.md +101 -0
  45. package/project-template/.claude/agents/developer.md +90 -93
  46. package/project-template/.claude/agents/game-designer.md +192 -0
  47. package/project-template/.claude/agents/refs/README.md +57 -51
  48. package/project-template/.claude/agents/refs/{designer-color-audio-recipes.md → artist-color-audio-recipes.md} +2 -2
  49. package/project-template/.claude/agents/refs/{designer-deliverable-spec.md → artist-deliverable-spec.md} +57 -57
  50. package/project-template/.claude/agents/refs/{designer-dimension-axis.md → artist-dimension-axis.md} +5 -5
  51. package/project-template/.claude/agents/refs/{designer-handoff-v2-checklist.md → artist-handoff-v2-checklist.md} +15 -15
  52. package/project-template/.claude/agents/refs/artist-legacy-fallback.md +14 -0
  53. package/project-template/.claude/agents/refs/{designer-master-composite-recipes.md → artist-master-composite-recipes.md} +3 -3
  54. package/project-template/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
  55. package/project-template/.claude/agents/refs/developer-dev-handoff.md +83 -40
  56. package/project-template/.claude/agents/refs/developer-impl-cookbook.md +365 -67
  57. package/project-template/.claude/agents/refs/developer-legacy-fallback.md +15 -0
  58. package/project-template/.claude/agents/refs/developer-phase1-flow.md +131 -85
  59. package/project-template/.claude/agents/refs/framework-5-component-filter.md +252 -0
  60. package/project-template/.claude/agents/refs/framework-game-feel-juice.md +266 -0
  61. package/project-template/.claude/agents/refs/framework-mda.md +147 -0
  62. package/project-template/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
  63. package/project-template/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
  64. package/project-template/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
  65. package/project-template/.claude/agents/refs/implementation-plan-guide.md +316 -0
  66. package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +247 -33
  67. package/project-template/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
  68. package/project-template/.claude/agents/refs/skill-selector-guide.md +465 -0
  69. package/project-template/.claude/agents/refs/skill-value-layers.md +145 -0
  70. package/project-template/.claude/agents/refs/storyboard-generation-guide.md +110 -0
  71. package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +4 -4
  72. package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +101 -104
  73. package/project-template/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
  74. package/project-template/.claude/agents/reviewer.md +81 -95
  75. package/project-template/.claude/agents/technical-artist.md +71 -95
  76. package/project-template/.claude/hooks/README.md +83 -35
  77. package/project-template/.claude/hooks/asr-coverage-validate.mjs +19 -19
  78. package/project-template/.claude/hooks/block-developer-preflight.mjs +185 -0
  79. package/project-template/.claude/hooks/block-ring1-tasklist.mjs +95 -0
  80. package/project-template/.claude/hooks/gate-dispatcher.mjs +78 -0
  81. package/project-template/.claude/hooks/gate-runner.mjs +557 -0
  82. package/project-template/.claude/hooks/gate.mjs +170 -0
  83. package/project-template/.claude/hooks/snapshot-milestone.mjs +246 -0
  84. package/project-template/.claude/hooks/user-prompt.mjs +193 -0
  85. package/project-template/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
  86. package/project-template/.claude/hooks/validate-workflow-stop.mjs +1535 -95
  87. package/project-template/.claude/settings.json +54 -9
  88. package/project-template/.claude/skills/brainstorming/SKILL.md +161 -0
  89. package/project-template/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
  90. package/project-template/.claude/skills/brainstorming/scripts/helper.js +177 -0
  91. package/project-template/.claude/skills/brainstorming/scripts/server.cjs +354 -0
  92. package/project-template/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
  93. package/project-template/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
  94. package/project-template/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
  95. package/project-template/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  96. package/project-template/.claude/skills/brainstorming/visual-companion.md +309 -0
  97. package/project-template/.claude/skills/playcraft-ad-psychology/SKILL.md +3 -3
  98. package/project-template/.claude/skills/playcraft-art-style-guide/SKILL.md +3 -3
  99. package/project-template/.claude/skills/playcraft-asset-state-sheet/SKILL.md +35 -25
  100. package/project-template/.claude/skills/playcraft-audio-generation/SKILL.md +15 -15
  101. package/project-template/.claude/skills/playcraft-build-optimizer/SKILL.md +5 -5
  102. package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +5 -5
  103. package/project-template/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +5 -5
  104. package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +116 -27
  105. package/project-template/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +1 -1
  106. package/project-template/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
  107. package/project-template/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
  108. package/project-template/.claude/skills/playcraft-research/SKILL.md +24 -21
  109. package/project-template/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
  110. package/project-template/.claude/skills/playcraft-sprite-generation/SKILL.md +48 -48
  111. package/project-template/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
  112. package/project-template/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
  113. package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +4 -4
  114. package/project-template/.claude/skills/playcraft-style-qa/SKILL.md +45 -45
  115. package/project-template/.claude/skills/playcraft-text-rendering/SKILL.md +27 -27
  116. package/project-template/.claude/skills/session-analyzer/SKILL.md +386 -0
  117. package/project-template/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
  118. package/project-template/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
  119. package/project-template/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
  120. package/project-template/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
  121. package/project-template/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
  122. package/project-template/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
  123. package/project-template/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
  124. package/project-template/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
  125. package/project-template/.claude/snapshot.mjs +350 -0
  126. package/project-template/.codebuddy/settings.json +53 -0
  127. package/project-template/.cursor/hooks.json +1 -1
  128. package/project-template/.cursor/rules/playcraft-orchestrator.mdc +91 -86
  129. package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +16 -5
  130. package/project-template/CHANGELOG.md +105 -0
  131. package/project-template/CLAUDE.md +58 -254
  132. package/project-template/docs/DESIGN.md +65 -0
  133. package/project-template/docs/intent-clarifications.md +58 -0
  134. package/project-template/docs/pipeline-overview.md +69 -0
  135. package/project-template/docs/project-state.md +211 -0
  136. package/project-template/docs/team/agent-conduct.md +51 -105
  137. package/project-template/docs/team/agent-runtime-matrix.md +60 -74
  138. package/project-template/docs/team/atom-tree-format.md +169 -0
  139. package/project-template/docs/team/collaboration.md +319 -225
  140. package/project-template/docs/team/core-model.md +80 -46
  141. package/project-template/docs/team/game-designer-migration-todo.md +8 -0
  142. package/project-template/docs/team/harness-legacy-deprecation.md +23 -0
  143. package/project-template/docs/team/platform-capabilities.md +16 -13
  144. package/project-template/docs/team/workflow-changelog.md +95 -23
  145. package/project-template/docs/team/workflow-consistency-checklist.md +93 -45
  146. package/project-template/focus-lab/.gitkeep +0 -0
  147. package/project-template/game/.playcraft-scaffold-pending +0 -0
  148. package/project-template/game/index.ts +18 -0
  149. package/project-template/globals.d.ts +51 -0
  150. package/project-template/index.css +34 -0
  151. package/project-template/index.html +18 -0
  152. package/project-template/main.ts +9 -0
  153. package/project-template/package.json +79 -0
  154. package/project-template/skills/README.md +52 -0
  155. package/project-template/skills/_shared/agent-prep.md +136 -0
  156. package/project-template/skills/_shared/requirements.txt +1 -0
  157. package/project-template/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
  158. package/project-template/skills/_shared/scripts/context-budget.mjs +215 -0
  159. package/project-template/skills/_shared/scripts/create-playable.mjs +140 -0
  160. package/project-template/skills/_shared/scripts/dev-start.mjs +151 -0
  161. package/project-template/skills/_shared/scripts/disclosure-config.mjs +480 -0
  162. package/project-template/skills/_shared/scripts/ensure-project.mjs +532 -0
  163. package/project-template/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
  164. package/project-template/skills/_shared/scripts/gen-placeholder.py +244 -0
  165. package/project-template/skills/_shared/scripts/harness-smoke.mjs +257 -0
  166. package/project-template/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
  167. package/project-template/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
  168. package/project-template/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
  169. package/project-template/skills/_shared/scripts/placeholder_lib.py +993 -0
  170. package/project-template/skills/_shared/scripts/render-project-state.mjs +278 -0
  171. package/project-template/skills/_shared/scripts/ring-config.mjs +252 -0
  172. package/project-template/skills/_shared/scripts/skills-check.mjs +176 -0
  173. package/project-template/skills/_shared/scripts/slice-set.mjs +77 -0
  174. package/project-template/skills/_shared/scripts/state-advance-ring.mjs +63 -0
  175. package/project-template/skills/_shared/scripts/state-get.mjs +215 -0
  176. package/project-template/skills/_shared/scripts/state-handoff.mjs +120 -0
  177. package/project-template/skills/_shared/scripts/state-set.mjs +113 -0
  178. package/project-template/skills/_shared/scripts/state-store.mjs +893 -0
  179. package/project-template/skills/_shared/scripts/sync-template-skills.mjs +112 -0
  180. package/project-template/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
  181. package/project-template/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
  182. package/project-template/skills/_shared/scripts/verify-env.mjs +285 -0
  183. package/project-template/skills/_shared/scripts/verify-placeholders.mjs +161 -0
  184. package/project-template/skills/_shared/scripts/workflow-doctor.mjs +348 -0
  185. package/project-template/skills/playable-animate/SKILL.md +52 -0
  186. package/project-template/skills/playable-animate/agents/openai.yaml +4 -0
  187. package/project-template/skills/playable-animate/references/board-refresh.md +30 -0
  188. package/project-template/skills/playable-animate/references/diagnosis-checklist.md +25 -0
  189. package/project-template/skills/playable-animate/references/entrance-sequencing.md +33 -0
  190. package/project-template/skills/playable-animate/references/interaction-timing.md +23 -0
  191. package/project-template/skills/playable-art/SKILL.md +203 -0
  192. package/project-template/skills/playable-art/agents/openai.yaml +4 -0
  193. package/project-template/skills/playable-art/references/alpha-postprocess.md +46 -0
  194. package/project-template/skills/playable-art/references/cta-art-spec.md +59 -0
  195. package/project-template/skills/playable-art/references/layout-proportions.md +30 -0
  196. package/project-template/skills/playable-art/references/prompt-patterns.md +83 -0
  197. package/project-template/skills/playable-art/references/reference-comparison.md +30 -0
  198. package/project-template/skills/playable-art/references/sheet-import-v2.md +91 -0
  199. package/project-template/skills/playable-art/scripts/build-atlas.py +332 -0
  200. package/project-template/skills/playable-art/scripts/chroma-key.py +50 -0
  201. package/project-template/skills/playable-art/scripts/extract-alpha-split.py +65 -0
  202. package/project-template/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
  203. package/project-template/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
  204. package/project-template/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
  205. package/project-template/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
  206. package/project-template/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
  207. package/project-template/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
  208. package/project-template/skills/playable-art/scripts/placeholder_common.py +98 -0
  209. package/project-template/skills/playable-art/scripts/remove-bg.py +91 -0
  210. package/project-template/skills/playable-art/scripts/review-processed-assets.py +468 -0
  211. package/project-template/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
  212. package/project-template/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
  213. package/project-template/skills/playable-debug/SKILL.md +116 -0
  214. package/project-template/skills/playable-debug/agents/openai.yaml +4 -0
  215. package/project-template/skills/playable-debug/references/debug-config.md +40 -0
  216. package/project-template/skills/playable-focus/SKILL.md +148 -0
  217. package/project-template/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
  218. package/project-template/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
  219. package/project-template/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
  220. package/project-template/skills/playable-focus/scripts/playground.mjs +390 -0
  221. package/project-template/skills/playable-focus/templates/focus-lab/frame.html +39 -0
  222. package/project-template/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
  223. package/project-template/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
  224. package/project-template/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
  225. package/project-template/skills/playable-focus/templates/focus-lab/model.html +16 -0
  226. package/project-template/skills/playable-focus/templates/focus-lab/particle.html +38 -0
  227. package/project-template/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
  228. package/project-template/skills/playable-focus/templates/playground/registry.template.json +55 -0
  229. package/project-template/skills/playable-focus/templates/playground/vfx-catalog.template.json +280 -0
  230. package/project-template/skills/playable-fx-decompose/SKILL.md +212 -0
  231. package/project-template/skills/playable-fx-decompose/examples.md +89 -0
  232. package/project-template/skills/playable-fx-decompose/reference.md +201 -0
  233. package/project-template/skills/playable-fx-decompose/requirements.txt +2 -0
  234. package/project-template/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
  235. package/project-template/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
  236. package/project-template/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
  237. package/project-template/skills/playable-fx-peak/SKILL.md +237 -0
  238. package/project-template/skills/playable-fx-peak/requirements.txt +2 -0
  239. package/project-template/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
  240. package/project-template/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
  241. package/project-template/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
  242. package/project-template/skills/playable-placeholder/SKILL.md +239 -0
  243. package/project-template/skills/playable-record/SKILL.md +166 -0
  244. package/project-template/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
  245. package/project-template/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
  246. package/project-template/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
  247. package/project-template/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
  248. package/project-template/skills/playable-record/scripts/record-playable.mjs +583 -0
  249. package/project-template/skills/playable-record/scripts/verify-build.mjs +185 -0
  250. package/project-template/skills/playable-record/scripts/verify-contract.mjs +261 -0
  251. package/project-template/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
  252. package/project-template/skills/playable-record/scripts/verify-fusion.mjs +320 -0
  253. package/project-template/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
  254. package/project-template/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
  255. package/project-template/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
  256. package/project-template/skills/playable-record/scripts/verify-slice.mjs +142 -0
  257. package/project-template/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
  258. package/project-template/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
  259. package/project-template/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
  260. package/project-template/skills/playable-validate/SKILL.md +260 -0
  261. package/project-template/skills/playable-validate/references/checklist-detail.md +36 -0
  262. package/project-template/skills/playable-validate/references/single-html-bundle.md +76 -0
  263. package/project-template/skills/playable-validate/validation-rules.md +200 -0
  264. package/project-template/skills/playable-verify-ui/SKILL.md +295 -0
  265. package/project-template/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
  266. package/project-template/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
  267. package/project-template/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
  268. package/project-template/skills/playable-verify-ui/reference.md +165 -0
  269. package/project-template/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
  270. package/project-template/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
  271. package/project-template/skills/playable-verify-ui/requirements.txt +7 -0
  272. package/project-template/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
  273. package/project-template/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
  274. package/project-template/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
  275. package/project-template/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
  276. package/project-template/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
  277. package/project-template/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
  278. package/project-template/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
  279. package/project-template/skills/playable-verify-ui/scripts/lib/report.py +106 -0
  280. package/project-template/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
  281. package/project-template/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
  282. package/project-template/skills/playable-verify-ui/scripts/run_all.py +265 -0
  283. package/project-template/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
  284. package/project-template/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
  285. package/project-template/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
  286. package/project-template/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
  287. package/project-template/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
  288. package/project-template/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
  289. package/project-template/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
  290. package/project-template/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
  291. package/project-template/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
  292. package/project-template/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
  293. package/project-template/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
  294. package/project-template/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
  295. package/project-template/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
  296. package/project-template/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
  297. package/project-template/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
  298. package/project-template/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
  299. package/project-template/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
  300. package/project-template/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
  301. package/project-template/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
  302. package/project-template/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
  303. package/project-template/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
  304. package/project-template/templates/{designer-log.template.md → artist-log.template.md} +26 -31
  305. package/project-template/templates/atom-tree.template.json +133 -0
  306. package/project-template/templates/design-brief.template.md +59 -162
  307. package/project-template/templates/design-lens-checklist.reference.md +14 -14
  308. package/project-template/templates/design-methodology.md +25 -25
  309. package/project-template/templates/design.template.md +50 -0
  310. package/project-template/templates/developer-log.template.md +187 -63
  311. package/project-template/templates/five-axis-framework.md +89 -44
  312. package/project-template/templates/gen-placeholder-audio.template.mjs +63 -0
  313. package/project-template/templates/gen-placeholders.template.mjs +81 -0
  314. package/project-template/templates/intent-clarifications.template.md +7 -7
  315. package/project-template/templates/layout-spec.template.md +32 -20
  316. package/project-template/templates/plan.template.md +80 -0
  317. package/project-template/templates/project-state.template.md +90 -191
  318. package/project-template/templates/review-report.template.md +208 -24
  319. package/project-template/templates/style-exploration.template.md +8 -8
  320. package/project-template/templates/ta-log.template.md +58 -35
  321. package/project-template/tsconfig.json +20 -0
  322. package/project-template/vite.config.ts +27 -0
  323. package/project-templates/phaser/.claude/agents/artist.md +101 -0
  324. package/project-templates/phaser/.claude/agents/developer.md +123 -0
  325. package/project-templates/phaser/.claude/agents/game-designer.md +192 -0
  326. package/project-templates/phaser/.claude/agents/refs/README.md +77 -0
  327. package/project-templates/phaser/.claude/agents/refs/artist-art-style-catalog.md +533 -0
  328. package/project-templates/phaser/.claude/agents/refs/artist-color-audio-recipes.md +153 -0
  329. package/project-templates/phaser/.claude/agents/refs/artist-deliverable-spec.md +230 -0
  330. package/project-templates/phaser/.claude/agents/refs/artist-dimension-axis.md +27 -0
  331. package/project-templates/phaser/.claude/agents/refs/artist-handoff-v2-checklist.md +76 -0
  332. package/project-templates/phaser/.claude/agents/refs/artist-legacy-fallback.md +14 -0
  333. package/project-templates/phaser/.claude/agents/refs/artist-master-composite-recipes.md +208 -0
  334. package/project-templates/phaser/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
  335. package/project-templates/phaser/.claude/agents/refs/developer-dev-handoff.md +152 -0
  336. package/project-templates/phaser/.claude/agents/refs/developer-impl-cookbook.md +432 -0
  337. package/project-templates/phaser/.claude/agents/refs/developer-legacy-fallback.md +15 -0
  338. package/project-templates/phaser/.claude/agents/refs/developer-phase1-flow.md +404 -0
  339. package/project-templates/phaser/.claude/agents/refs/framework-5-component-filter.md +252 -0
  340. package/project-templates/phaser/.claude/agents/refs/framework-game-feel-juice.md +266 -0
  341. package/project-templates/phaser/.claude/agents/refs/framework-mda.md +147 -0
  342. package/project-templates/phaser/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
  343. package/project-templates/phaser/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
  344. package/project-templates/phaser/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
  345. package/project-templates/phaser/.claude/agents/refs/implementation-plan-guide.md +309 -0
  346. package/project-templates/phaser/.claude/agents/refs/reviewer-convergence-eval.md +350 -0
  347. package/project-templates/phaser/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
  348. package/project-templates/phaser/.claude/agents/refs/reviewer-six-dimension-eval.md +6 -0
  349. package/project-templates/phaser/.claude/agents/refs/skill-selector-guide.md +465 -0
  350. package/project-templates/phaser/.claude/agents/refs/skill-value-layers.md +145 -0
  351. package/project-templates/phaser/.claude/agents/refs/storyboard-generation-guide.md +110 -0
  352. package/project-templates/phaser/.claude/agents/refs/ta-3d-flip-recipe.md +88 -0
  353. package/project-templates/phaser/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
  354. package/project-templates/phaser/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
  355. package/project-templates/phaser/.claude/agents/refs/ta-image-generation-detail.md +300 -0
  356. package/project-templates/phaser/.claude/agents/refs/ta-image-ops-reference.md +495 -0
  357. package/project-templates/phaser/.claude/agents/refs/ta-pipeline-cookbook.md +1141 -0
  358. package/project-templates/phaser/.claude/agents/refs/ta-tools-reference.md +111 -0
  359. package/project-templates/phaser/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
  360. package/project-templates/phaser/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
  361. package/project-templates/phaser/.claude/agents/reviewer.md +116 -0
  362. package/project-templates/phaser/.claude/agents/technical-artist.md +100 -0
  363. package/project-templates/phaser/.claude/hooks/README.md +120 -0
  364. package/project-templates/phaser/.claude/hooks/asr-coverage-validate.mjs +381 -0
  365. package/project-templates/phaser/.claude/hooks/block-developer-preflight.mjs +185 -0
  366. package/project-templates/phaser/.claude/hooks/block-ring1-tasklist.mjs +95 -0
  367. package/project-templates/phaser/.claude/hooks/gate-dispatcher.mjs +78 -0
  368. package/project-templates/phaser/.claude/hooks/gate-runner.mjs +557 -0
  369. package/project-templates/phaser/.claude/hooks/gate.mjs +171 -0
  370. package/project-templates/phaser/.claude/hooks/snapshot-milestone.mjs +247 -0
  371. package/project-templates/phaser/.claude/hooks/user-prompt.mjs +194 -0
  372. package/project-templates/phaser/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
  373. package/project-templates/phaser/.claude/hooks/validate-workflow-stop.mjs +1889 -0
  374. package/project-templates/phaser/.claude/settings.json +81 -0
  375. package/project-templates/phaser/.claude/skills/brainstorming/SKILL.md +161 -0
  376. package/project-templates/phaser/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
  377. package/project-templates/phaser/.claude/skills/brainstorming/scripts/helper.js +177 -0
  378. package/project-templates/phaser/.claude/skills/brainstorming/scripts/server.cjs +354 -0
  379. package/project-templates/phaser/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
  380. package/project-templates/phaser/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
  381. package/project-templates/phaser/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
  382. package/project-templates/phaser/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  383. package/project-templates/phaser/.claude/skills/brainstorming/visual-companion.md +309 -0
  384. package/project-templates/phaser/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
  385. package/project-templates/phaser/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
  386. package/project-templates/phaser/.claude/skills/playcraft-asset-state-sheet/SKILL.md +205 -0
  387. package/project-templates/phaser/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
  388. package/project-templates/phaser/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
  389. package/project-templates/phaser/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
  390. package/project-templates/phaser/.claude/skills/playcraft-image-generation/SKILL.md +298 -0
  391. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
  392. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
  393. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +324 -0
  394. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
  395. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
  396. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
  397. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
  398. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
  399. package/project-templates/phaser/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
  400. package/project-templates/phaser/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
  401. package/project-templates/phaser/.claude/skills/playcraft-masking/SKILL.md +373 -0
  402. package/project-templates/phaser/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
  403. package/project-templates/phaser/.claude/skills/playcraft-research/SKILL.md +215 -0
  404. package/project-templates/phaser/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
  405. package/project-templates/phaser/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
  406. package/project-templates/phaser/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
  407. package/project-templates/phaser/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
  408. package/project-templates/phaser/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
  409. package/project-templates/phaser/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
  410. package/project-templates/phaser/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
  411. package/project-templates/phaser/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
  412. package/project-templates/phaser/.claude/skills/playwright-cli/SKILL.md +390 -0
  413. package/project-templates/phaser/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
  414. package/project-templates/phaser/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
  415. package/project-templates/phaser/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
  416. package/project-templates/phaser/.claude/skills/playwright-cli/references/running-code.md +240 -0
  417. package/project-templates/phaser/.claude/skills/playwright-cli/references/session-management.md +226 -0
  418. package/project-templates/phaser/.claude/skills/playwright-cli/references/spec-driven-testing.md +308 -0
  419. package/project-templates/phaser/.claude/skills/playwright-cli/references/storage-state.md +275 -0
  420. package/project-templates/phaser/.claude/skills/playwright-cli/references/test-generation.md +134 -0
  421. package/project-templates/phaser/.claude/skills/playwright-cli/references/tracing.md +142 -0
  422. package/project-templates/phaser/.claude/skills/playwright-cli/references/video-recording.md +153 -0
  423. package/project-templates/phaser/.claude/skills/session-analyzer/SKILL.md +386 -0
  424. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
  425. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
  426. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
  427. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
  428. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
  429. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
  430. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
  431. package/project-templates/phaser/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
  432. package/project-templates/phaser/.claude/snapshot.mjs +257 -0
  433. package/project-templates/phaser/.cursor/hooks.json +17 -0
  434. package/project-templates/phaser/.cursor/rules/playcraft-orchestrator.mdc +142 -0
  435. package/project-templates/phaser/.cursor/rules/playcraft-subagent-boundary.mdc +29 -0
  436. package/project-templates/phaser/.playcraft-engine +1 -0
  437. package/project-templates/phaser/CHANGELOG.md +105 -0
  438. package/project-templates/phaser/CLAUDE.md +84 -0
  439. package/project-templates/phaser/assets/audio/bgm/.gitkeep +0 -0
  440. package/project-templates/phaser/assets/audio/sfx/.gitkeep +0 -0
  441. package/project-templates/phaser/assets/bundles/.gitkeep +0 -0
  442. package/project-templates/phaser/assets/images/bg/.gitkeep +0 -0
  443. package/project-templates/phaser/assets/images/reference/.gitkeep +0 -0
  444. package/project-templates/phaser/assets/images/storyboard/.gitkeep +0 -0
  445. package/project-templates/phaser/assets/images/tiles/.gitkeep +0 -0
  446. package/project-templates/phaser/assets/images/ui/.gitkeep +0 -0
  447. package/project-templates/phaser/assets/images/vfx/.gitkeep +0 -0
  448. package/project-templates/phaser/assets/models/.gitkeep +0 -0
  449. package/project-templates/phaser/docs/DESIGN.md +65 -0
  450. package/project-templates/phaser/docs/intent-clarifications.md +58 -0
  451. package/project-templates/phaser/docs/pipeline-overview.md +69 -0
  452. package/project-templates/phaser/docs/project-state.md +211 -0
  453. package/project-templates/phaser/docs/scaffold-manifest.md +10 -0
  454. package/project-templates/phaser/docs/team/agent-conduct.md +67 -0
  455. package/project-templates/phaser/docs/team/agent-runtime-matrix.md +80 -0
  456. package/project-templates/phaser/docs/team/atom-tree-format.md +114 -0
  457. package/project-templates/phaser/docs/team/collaboration.md +391 -0
  458. package/project-templates/phaser/docs/team/core-model.md +85 -0
  459. package/project-templates/phaser/docs/team/game-designer-migration-todo.md +8 -0
  460. package/project-templates/phaser/docs/team/harness-legacy-deprecation.md +23 -0
  461. package/project-templates/phaser/docs/team/platform-capabilities.md +18 -0
  462. package/project-templates/phaser/docs/team/workflow-changelog.md +137 -0
  463. package/project-templates/phaser/docs/team/workflow-consistency-checklist.md +240 -0
  464. package/project-templates/phaser/focus-lab/.gitkeep +0 -0
  465. package/project-templates/phaser/game/adapters/phaser.ts +52 -0
  466. package/project-templates/phaser/game/config/.gitkeep +0 -0
  467. package/project-templates/phaser/game/config/game-config.ts +46 -0
  468. package/project-templates/phaser/game/contract/publish.ts +141 -0
  469. package/project-templates/phaser/game/contract/types.ts +34 -0
  470. package/project-templates/phaser/game/gameplay/.gitkeep +0 -0
  471. package/project-templates/phaser/game/index.ts +81 -0
  472. package/project-templates/phaser/game/runtime-contract.ts +28 -0
  473. package/project-templates/phaser/game/scenes/.gitkeep +0 -0
  474. package/project-templates/phaser/globals.d.ts +51 -0
  475. package/project-templates/phaser/index.css +34 -0
  476. package/project-templates/phaser/index.html +18 -0
  477. package/project-templates/phaser/main.ts +9 -0
  478. package/project-templates/phaser/package.json +79 -0
  479. package/project-templates/phaser/skills/README.md +52 -0
  480. package/project-templates/phaser/skills/_shared/agent-prep.md +136 -0
  481. package/project-templates/phaser/skills/_shared/requirements.txt +1 -0
  482. package/project-templates/phaser/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
  483. package/project-templates/phaser/skills/_shared/scripts/context-budget.mjs +215 -0
  484. package/project-templates/phaser/skills/_shared/scripts/create-playable.mjs +140 -0
  485. package/project-templates/phaser/skills/_shared/scripts/dev-start.mjs +151 -0
  486. package/project-templates/phaser/skills/_shared/scripts/disclosure-config.mjs +480 -0
  487. package/project-templates/phaser/skills/_shared/scripts/ensure-project.mjs +532 -0
  488. package/project-templates/phaser/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
  489. package/project-templates/phaser/skills/_shared/scripts/gen-placeholder.py +244 -0
  490. package/project-templates/phaser/skills/_shared/scripts/harness-smoke.mjs +257 -0
  491. package/project-templates/phaser/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
  492. package/project-templates/phaser/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
  493. package/project-templates/phaser/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
  494. package/project-templates/phaser/skills/_shared/scripts/placeholder_lib.py +993 -0
  495. package/project-templates/phaser/skills/_shared/scripts/render-project-state.mjs +278 -0
  496. package/project-templates/phaser/skills/_shared/scripts/ring-config.mjs +252 -0
  497. package/project-templates/phaser/skills/_shared/scripts/skills-check.mjs +176 -0
  498. package/project-templates/phaser/skills/_shared/scripts/slice-set.mjs +77 -0
  499. package/project-templates/phaser/skills/_shared/scripts/state-advance-ring.mjs +63 -0
  500. package/project-templates/phaser/skills/_shared/scripts/state-get.mjs +215 -0
  501. package/project-templates/phaser/skills/_shared/scripts/state-handoff.mjs +120 -0
  502. package/project-templates/phaser/skills/_shared/scripts/state-set.mjs +113 -0
  503. package/project-templates/phaser/skills/_shared/scripts/state-store.mjs +893 -0
  504. package/project-templates/phaser/skills/_shared/scripts/sync-template-skills.mjs +112 -0
  505. package/project-templates/phaser/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
  506. package/project-templates/phaser/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
  507. package/project-templates/phaser/skills/_shared/scripts/verify-env.mjs +285 -0
  508. package/project-templates/phaser/skills/_shared/scripts/verify-placeholders.mjs +161 -0
  509. package/project-templates/phaser/skills/_shared/scripts/workflow-doctor.mjs +348 -0
  510. package/project-templates/phaser/skills/playable-animate/SKILL.md +52 -0
  511. package/project-templates/phaser/skills/playable-animate/agents/openai.yaml +4 -0
  512. package/project-templates/phaser/skills/playable-animate/references/board-refresh.md +30 -0
  513. package/project-templates/phaser/skills/playable-animate/references/diagnosis-checklist.md +25 -0
  514. package/project-templates/phaser/skills/playable-animate/references/entrance-sequencing.md +33 -0
  515. package/project-templates/phaser/skills/playable-animate/references/interaction-timing.md +23 -0
  516. package/project-templates/phaser/skills/playable-art/SKILL.md +203 -0
  517. package/project-templates/phaser/skills/playable-art/agents/openai.yaml +4 -0
  518. package/project-templates/phaser/skills/playable-art/references/alpha-postprocess.md +46 -0
  519. package/project-templates/phaser/skills/playable-art/references/cta-art-spec.md +59 -0
  520. package/project-templates/phaser/skills/playable-art/references/layout-proportions.md +30 -0
  521. package/project-templates/phaser/skills/playable-art/references/prompt-patterns.md +83 -0
  522. package/project-templates/phaser/skills/playable-art/references/reference-comparison.md +30 -0
  523. package/project-templates/phaser/skills/playable-art/references/sheet-import-v2.md +91 -0
  524. package/project-templates/phaser/skills/playable-art/scripts/build-atlas.py +332 -0
  525. package/project-templates/phaser/skills/playable-art/scripts/chroma-key.py +50 -0
  526. package/project-templates/phaser/skills/playable-art/scripts/extract-alpha-split.py +65 -0
  527. package/project-templates/phaser/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
  528. package/project-templates/phaser/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
  529. package/project-templates/phaser/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
  530. package/project-templates/phaser/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
  531. package/project-templates/phaser/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
  532. package/project-templates/phaser/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
  533. package/project-templates/phaser/skills/playable-art/scripts/placeholder_common.py +98 -0
  534. package/project-templates/phaser/skills/playable-art/scripts/remove-bg.py +91 -0
  535. package/project-templates/phaser/skills/playable-art/scripts/review-processed-assets.py +468 -0
  536. package/project-templates/phaser/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
  537. package/project-templates/phaser/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
  538. package/project-templates/phaser/skills/playable-debug/SKILL.md +116 -0
  539. package/project-templates/phaser/skills/playable-debug/agents/openai.yaml +4 -0
  540. package/project-templates/phaser/skills/playable-debug/references/debug-config.md +40 -0
  541. package/project-templates/phaser/skills/playable-focus/SKILL.md +148 -0
  542. package/project-templates/phaser/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
  543. package/project-templates/phaser/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
  544. package/project-templates/phaser/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
  545. package/project-templates/phaser/skills/playable-focus/scripts/playground.mjs +390 -0
  546. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/frame.html +39 -0
  547. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
  548. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
  549. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
  550. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/model.html +16 -0
  551. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/particle.html +38 -0
  552. package/project-templates/phaser/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
  553. package/project-templates/phaser/skills/playable-fx-decompose/SKILL.md +212 -0
  554. package/project-templates/phaser/skills/playable-fx-decompose/examples.md +89 -0
  555. package/project-templates/phaser/skills/playable-fx-decompose/reference.md +201 -0
  556. package/project-templates/phaser/skills/playable-fx-decompose/requirements.txt +2 -0
  557. package/project-templates/phaser/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
  558. package/project-templates/phaser/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
  559. package/project-templates/phaser/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
  560. package/project-templates/phaser/skills/playable-fx-peak/SKILL.md +237 -0
  561. package/project-templates/phaser/skills/playable-fx-peak/requirements.txt +2 -0
  562. package/project-templates/phaser/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
  563. package/project-templates/phaser/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
  564. package/project-templates/phaser/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
  565. package/project-templates/phaser/skills/playable-placeholder/SKILL.md +239 -0
  566. package/project-templates/phaser/skills/playable-record/SKILL.md +166 -0
  567. package/project-templates/phaser/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
  568. package/project-templates/phaser/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
  569. package/project-templates/phaser/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
  570. package/project-templates/phaser/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
  571. package/project-templates/phaser/skills/playable-record/scripts/record-playable.mjs +583 -0
  572. package/project-templates/phaser/skills/playable-record/scripts/verify-build.mjs +185 -0
  573. package/project-templates/phaser/skills/playable-record/scripts/verify-contract.mjs +261 -0
  574. package/project-templates/phaser/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
  575. package/project-templates/phaser/skills/playable-record/scripts/verify-fusion.mjs +320 -0
  576. package/project-templates/phaser/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
  577. package/project-templates/phaser/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
  578. package/project-templates/phaser/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
  579. package/project-templates/phaser/skills/playable-record/scripts/verify-slice.mjs +142 -0
  580. package/project-templates/phaser/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
  581. package/project-templates/phaser/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
  582. package/project-templates/phaser/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
  583. package/project-templates/phaser/skills/playable-validate/SKILL.md +260 -0
  584. package/project-templates/phaser/skills/playable-validate/references/checklist-detail.md +36 -0
  585. package/project-templates/phaser/skills/playable-validate/references/single-html-bundle.md +76 -0
  586. package/project-templates/phaser/skills/playable-validate/validation-rules.md +200 -0
  587. package/project-templates/phaser/skills/playable-verify-ui/SKILL.md +295 -0
  588. package/project-templates/phaser/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
  589. package/project-templates/phaser/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
  590. package/project-templates/phaser/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
  591. package/project-templates/phaser/skills/playable-verify-ui/reference.md +165 -0
  592. package/project-templates/phaser/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
  593. package/project-templates/phaser/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
  594. package/project-templates/phaser/skills/playable-verify-ui/requirements.txt +7 -0
  595. package/project-templates/phaser/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
  596. package/project-templates/phaser/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
  597. package/project-templates/phaser/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
  598. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
  599. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
  600. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
  601. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
  602. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/report.py +106 -0
  603. package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
  604. package/project-templates/phaser/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
  605. package/project-templates/phaser/skills/playable-verify-ui/scripts/run_all.py +265 -0
  606. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
  607. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
  608. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
  609. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
  610. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
  611. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
  612. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
  613. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
  614. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
  615. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
  616. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
  617. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
  618. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
  619. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
  620. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
  621. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
  622. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
  623. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
  624. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
  625. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
  626. package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
  627. package/project-templates/phaser/ta-workspace/scripts/.gitkeep +0 -0
  628. package/project-templates/phaser/templates/artist-log.template.md +182 -0
  629. package/project-templates/phaser/templates/atom-tree.template.json +133 -0
  630. package/project-templates/phaser/templates/design-brief.template.md +92 -0
  631. package/project-templates/phaser/templates/design-lens-checklist.reference.md +117 -0
  632. package/project-templates/phaser/templates/design-methodology.md +99 -0
  633. package/project-templates/phaser/templates/design.template.md +50 -0
  634. package/project-templates/phaser/templates/developer-log.template.md +258 -0
  635. package/project-templates/phaser/templates/five-axis-framework.md +194 -0
  636. package/project-templates/phaser/templates/gen-placeholder-audio.template.mjs +63 -0
  637. package/project-templates/phaser/templates/gen-placeholders.template.mjs +81 -0
  638. package/project-templates/phaser/templates/intent-clarifications.template.md +58 -0
  639. package/project-templates/phaser/templates/layout-spec.template.md +198 -0
  640. package/project-templates/phaser/templates/plan.template.md +80 -0
  641. package/project-templates/phaser/templates/project-state.template.md +136 -0
  642. package/project-templates/phaser/templates/review-report.template.md +275 -0
  643. package/project-templates/phaser/templates/style-exploration.template.md +93 -0
  644. package/project-templates/phaser/templates/ta-log.template.md +394 -0
  645. package/project-templates/phaser/tsconfig.json +20 -0
  646. package/project-templates/phaser/vite.config.ts +27 -0
  647. package/project-templates/threejs/.claude/agents/artist.md +101 -0
  648. package/project-templates/threejs/.claude/agents/developer.md +123 -0
  649. package/project-templates/threejs/.claude/agents/game-designer.md +192 -0
  650. package/project-templates/threejs/.claude/agents/refs/README.md +77 -0
  651. package/project-templates/threejs/.claude/agents/refs/artist-art-style-catalog.md +533 -0
  652. package/project-templates/threejs/.claude/agents/refs/artist-color-audio-recipes.md +153 -0
  653. package/project-templates/threejs/.claude/agents/refs/artist-deliverable-spec.md +230 -0
  654. package/project-templates/threejs/.claude/agents/refs/artist-dimension-axis.md +27 -0
  655. package/project-templates/threejs/.claude/agents/refs/artist-handoff-v2-checklist.md +76 -0
  656. package/project-templates/threejs/.claude/agents/refs/artist-legacy-fallback.md +14 -0
  657. package/project-templates/threejs/.claude/agents/refs/artist-master-composite-recipes.md +208 -0
  658. package/project-templates/threejs/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
  659. package/project-templates/threejs/.claude/agents/refs/developer-dev-handoff.md +152 -0
  660. package/project-templates/threejs/.claude/agents/refs/developer-impl-cookbook.md +432 -0
  661. package/project-templates/threejs/.claude/agents/refs/developer-legacy-fallback.md +15 -0
  662. package/project-templates/threejs/.claude/agents/refs/developer-phase1-flow.md +404 -0
  663. package/project-templates/threejs/.claude/agents/refs/framework-5-component-filter.md +252 -0
  664. package/project-templates/threejs/.claude/agents/refs/framework-game-feel-juice.md +266 -0
  665. package/project-templates/threejs/.claude/agents/refs/framework-mda.md +147 -0
  666. package/project-templates/threejs/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
  667. package/project-templates/threejs/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
  668. package/project-templates/threejs/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
  669. package/project-templates/threejs/.claude/agents/refs/implementation-plan-guide.md +309 -0
  670. package/project-templates/threejs/.claude/agents/refs/reviewer-convergence-eval.md +350 -0
  671. package/project-templates/threejs/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
  672. package/project-templates/threejs/.claude/agents/refs/reviewer-six-dimension-eval.md +6 -0
  673. package/project-templates/threejs/.claude/agents/refs/skill-selector-guide.md +465 -0
  674. package/project-templates/threejs/.claude/agents/refs/skill-value-layers.md +145 -0
  675. package/project-templates/threejs/.claude/agents/refs/storyboard-generation-guide.md +110 -0
  676. package/project-templates/threejs/.claude/agents/refs/ta-3d-flip-recipe.md +88 -0
  677. package/project-templates/threejs/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
  678. package/project-templates/threejs/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
  679. package/project-templates/threejs/.claude/agents/refs/ta-image-generation-detail.md +300 -0
  680. package/project-templates/threejs/.claude/agents/refs/ta-image-ops-reference.md +495 -0
  681. package/project-templates/threejs/.claude/agents/refs/ta-pipeline-cookbook.md +1141 -0
  682. package/project-templates/threejs/.claude/agents/refs/ta-tools-reference.md +111 -0
  683. package/project-templates/threejs/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
  684. package/project-templates/threejs/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
  685. package/project-templates/threejs/.claude/agents/reviewer.md +116 -0
  686. package/project-templates/threejs/.claude/agents/technical-artist.md +100 -0
  687. package/project-templates/threejs/.claude/hooks/README.md +120 -0
  688. package/project-templates/threejs/.claude/hooks/asr-coverage-validate.mjs +381 -0
  689. package/project-templates/threejs/.claude/hooks/block-developer-preflight.mjs +185 -0
  690. package/project-templates/threejs/.claude/hooks/block-ring1-tasklist.mjs +95 -0
  691. package/project-templates/threejs/.claude/hooks/gate-dispatcher.mjs +78 -0
  692. package/project-templates/threejs/.claude/hooks/gate-runner.mjs +557 -0
  693. package/project-templates/threejs/.claude/hooks/gate.mjs +171 -0
  694. package/project-templates/threejs/.claude/hooks/snapshot-milestone.mjs +247 -0
  695. package/project-templates/threejs/.claude/hooks/user-prompt.mjs +194 -0
  696. package/project-templates/threejs/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
  697. package/project-templates/threejs/.claude/hooks/validate-workflow-stop.mjs +1889 -0
  698. package/project-templates/threejs/.claude/settings.json +81 -0
  699. package/project-templates/threejs/.claude/skills/brainstorming/SKILL.md +161 -0
  700. package/project-templates/threejs/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
  701. package/project-templates/threejs/.claude/skills/brainstorming/scripts/helper.js +177 -0
  702. package/project-templates/threejs/.claude/skills/brainstorming/scripts/server.cjs +354 -0
  703. package/project-templates/threejs/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
  704. package/project-templates/threejs/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
  705. package/project-templates/threejs/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
  706. package/project-templates/threejs/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  707. package/project-templates/threejs/.claude/skills/brainstorming/visual-companion.md +309 -0
  708. package/project-templates/threejs/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
  709. package/project-templates/threejs/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
  710. package/project-templates/threejs/.claude/skills/playcraft-asset-state-sheet/SKILL.md +205 -0
  711. package/project-templates/threejs/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
  712. package/project-templates/threejs/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
  713. package/project-templates/threejs/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
  714. package/project-templates/threejs/.claude/skills/playcraft-image-generation/SKILL.md +298 -0
  715. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
  716. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
  717. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +324 -0
  718. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
  719. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
  720. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
  721. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
  722. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
  723. package/project-templates/threejs/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
  724. package/project-templates/threejs/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
  725. package/project-templates/threejs/.claude/skills/playcraft-masking/SKILL.md +373 -0
  726. package/project-templates/threejs/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
  727. package/project-templates/threejs/.claude/skills/playcraft-research/SKILL.md +215 -0
  728. package/project-templates/threejs/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
  729. package/project-templates/threejs/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
  730. package/project-templates/threejs/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
  731. package/project-templates/threejs/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
  732. package/project-templates/threejs/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
  733. package/project-templates/threejs/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
  734. package/project-templates/threejs/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
  735. package/project-templates/threejs/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
  736. package/project-templates/threejs/.claude/skills/playwright-cli/SKILL.md +390 -0
  737. package/project-templates/threejs/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
  738. package/project-templates/threejs/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
  739. package/project-templates/threejs/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
  740. package/project-templates/threejs/.claude/skills/playwright-cli/references/running-code.md +240 -0
  741. package/project-templates/threejs/.claude/skills/playwright-cli/references/session-management.md +226 -0
  742. package/project-templates/threejs/.claude/skills/playwright-cli/references/spec-driven-testing.md +308 -0
  743. package/project-templates/threejs/.claude/skills/playwright-cli/references/storage-state.md +275 -0
  744. package/project-templates/threejs/.claude/skills/playwright-cli/references/test-generation.md +134 -0
  745. package/project-templates/threejs/.claude/skills/playwright-cli/references/tracing.md +142 -0
  746. package/project-templates/threejs/.claude/skills/playwright-cli/references/video-recording.md +153 -0
  747. package/project-templates/threejs/.claude/skills/session-analyzer/SKILL.md +386 -0
  748. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
  749. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
  750. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
  751. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
  752. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
  753. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
  754. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
  755. package/project-templates/threejs/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
  756. package/project-templates/threejs/.claude/snapshot.mjs +257 -0
  757. package/project-templates/threejs/.cursor/hooks.json +17 -0
  758. package/project-templates/threejs/.cursor/rules/playcraft-orchestrator.mdc +142 -0
  759. package/project-templates/threejs/.cursor/rules/playcraft-subagent-boundary.mdc +29 -0
  760. package/project-templates/threejs/.playcraft-engine +1 -0
  761. package/project-templates/threejs/CHANGELOG.md +105 -0
  762. package/project-templates/threejs/CLAUDE.md +84 -0
  763. package/project-templates/threejs/assets/audio/bgm/.gitkeep +0 -0
  764. package/project-templates/threejs/assets/audio/sfx/.gitkeep +0 -0
  765. package/project-templates/threejs/assets/bundles/.gitkeep +0 -0
  766. package/project-templates/threejs/assets/images/bg/.gitkeep +0 -0
  767. package/project-templates/threejs/assets/images/reference/.gitkeep +0 -0
  768. package/project-templates/threejs/assets/images/storyboard/.gitkeep +0 -0
  769. package/project-templates/threejs/assets/images/tiles/.gitkeep +0 -0
  770. package/project-templates/threejs/assets/images/ui/.gitkeep +0 -0
  771. package/project-templates/threejs/assets/images/vfx/.gitkeep +0 -0
  772. package/project-templates/threejs/assets/models/.gitkeep +0 -0
  773. package/project-templates/threejs/docs/DESIGN.md +65 -0
  774. package/project-templates/threejs/docs/intent-clarifications.md +58 -0
  775. package/project-templates/threejs/docs/pipeline-overview.md +69 -0
  776. package/project-templates/threejs/docs/project-state.md +211 -0
  777. package/project-templates/threejs/docs/scaffold-manifest.md +10 -0
  778. package/project-templates/threejs/docs/team/agent-conduct.md +67 -0
  779. package/project-templates/threejs/docs/team/agent-runtime-matrix.md +80 -0
  780. package/project-templates/threejs/docs/team/atom-tree-format.md +114 -0
  781. package/project-templates/threejs/docs/team/collaboration.md +391 -0
  782. package/project-templates/threejs/docs/team/core-model.md +85 -0
  783. package/project-templates/threejs/docs/team/game-designer-migration-todo.md +8 -0
  784. package/project-templates/threejs/docs/team/harness-legacy-deprecation.md +23 -0
  785. package/project-templates/threejs/docs/team/platform-capabilities.md +18 -0
  786. package/project-templates/threejs/docs/team/workflow-changelog.md +137 -0
  787. package/project-templates/threejs/docs/team/workflow-consistency-checklist.md +240 -0
  788. package/project-templates/threejs/focus-lab/.gitkeep +0 -0
  789. package/project-templates/threejs/game/config/.gitkeep +0 -0
  790. package/project-templates/threejs/game/config/game-config.ts +46 -0
  791. package/project-templates/threejs/game/contract/publish.ts +141 -0
  792. package/project-templates/threejs/game/contract/types.ts +34 -0
  793. package/project-templates/threejs/game/gameplay/.gitkeep +0 -0
  794. package/project-templates/threejs/game/index.ts +76 -0
  795. package/project-templates/threejs/game/runtime-contract.ts +15 -0
  796. package/project-templates/threejs/game/scenes/.gitkeep +0 -0
  797. package/project-templates/threejs/globals.d.ts +51 -0
  798. package/project-templates/threejs/index.css +34 -0
  799. package/project-templates/threejs/index.html +18 -0
  800. package/project-templates/threejs/main.ts +9 -0
  801. package/project-templates/threejs/package.json +79 -0
  802. package/project-templates/threejs/skills/README.md +52 -0
  803. package/project-templates/threejs/skills/_shared/agent-prep.md +136 -0
  804. package/project-templates/threejs/skills/_shared/requirements.txt +1 -0
  805. package/project-templates/threejs/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
  806. package/project-templates/threejs/skills/_shared/scripts/context-budget.mjs +215 -0
  807. package/project-templates/threejs/skills/_shared/scripts/create-playable.mjs +140 -0
  808. package/project-templates/threejs/skills/_shared/scripts/dev-start.mjs +151 -0
  809. package/project-templates/threejs/skills/_shared/scripts/disclosure-config.mjs +480 -0
  810. package/project-templates/threejs/skills/_shared/scripts/ensure-project.mjs +532 -0
  811. package/project-templates/threejs/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
  812. package/project-templates/threejs/skills/_shared/scripts/gen-placeholder.py +244 -0
  813. package/project-templates/threejs/skills/_shared/scripts/harness-smoke.mjs +257 -0
  814. package/project-templates/threejs/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
  815. package/project-templates/threejs/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
  816. package/project-templates/threejs/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
  817. package/project-templates/threejs/skills/_shared/scripts/placeholder_lib.py +993 -0
  818. package/project-templates/threejs/skills/_shared/scripts/render-project-state.mjs +278 -0
  819. package/project-templates/threejs/skills/_shared/scripts/ring-config.mjs +252 -0
  820. package/project-templates/threejs/skills/_shared/scripts/skills-check.mjs +176 -0
  821. package/project-templates/threejs/skills/_shared/scripts/slice-set.mjs +77 -0
  822. package/project-templates/threejs/skills/_shared/scripts/state-advance-ring.mjs +63 -0
  823. package/project-templates/threejs/skills/_shared/scripts/state-get.mjs +215 -0
  824. package/project-templates/threejs/skills/_shared/scripts/state-handoff.mjs +120 -0
  825. package/project-templates/threejs/skills/_shared/scripts/state-set.mjs +113 -0
  826. package/project-templates/threejs/skills/_shared/scripts/state-store.mjs +893 -0
  827. package/project-templates/threejs/skills/_shared/scripts/sync-template-skills.mjs +112 -0
  828. package/project-templates/threejs/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
  829. package/project-templates/threejs/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
  830. package/project-templates/threejs/skills/_shared/scripts/verify-env.mjs +285 -0
  831. package/project-templates/threejs/skills/_shared/scripts/verify-placeholders.mjs +161 -0
  832. package/project-templates/threejs/skills/_shared/scripts/workflow-doctor.mjs +348 -0
  833. package/project-templates/threejs/skills/playable-animate/SKILL.md +52 -0
  834. package/project-templates/threejs/skills/playable-animate/agents/openai.yaml +4 -0
  835. package/project-templates/threejs/skills/playable-animate/references/board-refresh.md +30 -0
  836. package/project-templates/threejs/skills/playable-animate/references/diagnosis-checklist.md +25 -0
  837. package/project-templates/threejs/skills/playable-animate/references/entrance-sequencing.md +33 -0
  838. package/project-templates/threejs/skills/playable-animate/references/interaction-timing.md +23 -0
  839. package/project-templates/threejs/skills/playable-art/SKILL.md +203 -0
  840. package/project-templates/threejs/skills/playable-art/agents/openai.yaml +4 -0
  841. package/project-templates/threejs/skills/playable-art/references/alpha-postprocess.md +46 -0
  842. package/project-templates/threejs/skills/playable-art/references/cta-art-spec.md +59 -0
  843. package/project-templates/threejs/skills/playable-art/references/layout-proportions.md +30 -0
  844. package/project-templates/threejs/skills/playable-art/references/prompt-patterns.md +83 -0
  845. package/project-templates/threejs/skills/playable-art/references/reference-comparison.md +30 -0
  846. package/project-templates/threejs/skills/playable-art/references/sheet-import-v2.md +91 -0
  847. package/project-templates/threejs/skills/playable-art/scripts/build-atlas.py +332 -0
  848. package/project-templates/threejs/skills/playable-art/scripts/chroma-key.py +50 -0
  849. package/project-templates/threejs/skills/playable-art/scripts/extract-alpha-split.py +65 -0
  850. package/project-templates/threejs/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
  851. package/project-templates/threejs/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
  852. package/project-templates/threejs/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
  853. package/project-templates/threejs/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
  854. package/project-templates/threejs/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
  855. package/project-templates/threejs/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
  856. package/project-templates/threejs/skills/playable-art/scripts/placeholder_common.py +98 -0
  857. package/project-templates/threejs/skills/playable-art/scripts/remove-bg.py +91 -0
  858. package/project-templates/threejs/skills/playable-art/scripts/review-processed-assets.py +468 -0
  859. package/project-templates/threejs/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
  860. package/project-templates/threejs/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
  861. package/project-templates/threejs/skills/playable-debug/SKILL.md +116 -0
  862. package/project-templates/threejs/skills/playable-debug/agents/openai.yaml +4 -0
  863. package/project-templates/threejs/skills/playable-debug/references/debug-config.md +40 -0
  864. package/project-templates/threejs/skills/playable-focus/SKILL.md +148 -0
  865. package/project-templates/threejs/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
  866. package/project-templates/threejs/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
  867. package/project-templates/threejs/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
  868. package/project-templates/threejs/skills/playable-focus/scripts/playground.mjs +390 -0
  869. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/frame.html +39 -0
  870. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
  871. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
  872. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
  873. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/model.html +16 -0
  874. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/particle.html +38 -0
  875. package/project-templates/threejs/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
  876. package/project-templates/threejs/skills/playable-fx-decompose/SKILL.md +212 -0
  877. package/project-templates/threejs/skills/playable-fx-decompose/examples.md +89 -0
  878. package/project-templates/threejs/skills/playable-fx-decompose/reference.md +201 -0
  879. package/project-templates/threejs/skills/playable-fx-decompose/requirements.txt +2 -0
  880. package/project-templates/threejs/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
  881. package/project-templates/threejs/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
  882. package/project-templates/threejs/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
  883. package/project-templates/threejs/skills/playable-fx-peak/SKILL.md +237 -0
  884. package/project-templates/threejs/skills/playable-fx-peak/requirements.txt +2 -0
  885. package/project-templates/threejs/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
  886. package/project-templates/threejs/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
  887. package/project-templates/threejs/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
  888. package/project-templates/threejs/skills/playable-placeholder/SKILL.md +239 -0
  889. package/project-templates/threejs/skills/playable-record/SKILL.md +166 -0
  890. package/project-templates/threejs/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
  891. package/project-templates/threejs/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
  892. package/project-templates/threejs/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
  893. package/project-templates/threejs/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
  894. package/project-templates/threejs/skills/playable-record/scripts/record-playable.mjs +583 -0
  895. package/project-templates/threejs/skills/playable-record/scripts/verify-build.mjs +185 -0
  896. package/project-templates/threejs/skills/playable-record/scripts/verify-contract.mjs +261 -0
  897. package/project-templates/threejs/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
  898. package/project-templates/threejs/skills/playable-record/scripts/verify-fusion.mjs +320 -0
  899. package/project-templates/threejs/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
  900. package/project-templates/threejs/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
  901. package/project-templates/threejs/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
  902. package/project-templates/threejs/skills/playable-record/scripts/verify-slice.mjs +142 -0
  903. package/project-templates/threejs/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
  904. package/project-templates/threejs/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
  905. package/project-templates/threejs/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
  906. package/project-templates/threejs/skills/playable-validate/SKILL.md +260 -0
  907. package/project-templates/threejs/skills/playable-validate/references/checklist-detail.md +36 -0
  908. package/project-templates/threejs/skills/playable-validate/references/single-html-bundle.md +76 -0
  909. package/project-templates/threejs/skills/playable-validate/validation-rules.md +200 -0
  910. package/project-templates/threejs/skills/playable-verify-ui/SKILL.md +295 -0
  911. package/project-templates/threejs/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
  912. package/project-templates/threejs/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
  913. package/project-templates/threejs/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
  914. package/project-templates/threejs/skills/playable-verify-ui/reference.md +165 -0
  915. package/project-templates/threejs/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
  916. package/project-templates/threejs/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
  917. package/project-templates/threejs/skills/playable-verify-ui/requirements.txt +7 -0
  918. package/project-templates/threejs/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
  919. package/project-templates/threejs/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
  920. package/project-templates/threejs/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
  921. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
  922. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
  923. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
  924. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
  925. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/report.py +106 -0
  926. package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
  927. package/project-templates/threejs/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
  928. package/project-templates/threejs/skills/playable-verify-ui/scripts/run_all.py +265 -0
  929. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
  930. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
  931. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
  932. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
  933. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
  934. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
  935. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
  936. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
  937. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
  938. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
  939. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
  940. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
  941. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
  942. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
  943. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
  944. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
  945. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
  946. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
  947. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
  948. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
  949. package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
  950. package/project-templates/threejs/ta-workspace/scripts/.gitkeep +0 -0
  951. package/project-templates/threejs/templates/artist-log.template.md +182 -0
  952. package/project-templates/threejs/templates/atom-tree.template.json +133 -0
  953. package/project-templates/threejs/templates/design-brief.template.md +92 -0
  954. package/project-templates/threejs/templates/design-lens-checklist.reference.md +117 -0
  955. package/project-templates/threejs/templates/design-methodology.md +99 -0
  956. package/project-templates/threejs/templates/design.template.md +50 -0
  957. package/project-templates/threejs/templates/developer-log.template.md +258 -0
  958. package/project-templates/threejs/templates/five-axis-framework.md +194 -0
  959. package/project-templates/threejs/templates/gen-placeholder-audio.template.mjs +63 -0
  960. package/project-templates/threejs/templates/gen-placeholders.template.mjs +81 -0
  961. package/project-templates/threejs/templates/intent-clarifications.template.md +58 -0
  962. package/project-templates/threejs/templates/layout-spec.template.md +198 -0
  963. package/project-templates/threejs/templates/plan.template.md +80 -0
  964. package/project-templates/threejs/templates/project-state.template.md +136 -0
  965. package/project-templates/threejs/templates/review-report.template.md +275 -0
  966. package/project-templates/threejs/templates/style-exploration.template.md +93 -0
  967. package/project-templates/threejs/templates/ta-log.template.md +394 -0
  968. package/project-templates/threejs/tsconfig.json +20 -0
  969. package/project-templates/threejs/vite.config.ts +27 -0
  970. package/dist/atom-plan/validate-atom-plan.js +0 -298
  971. package/project-template/.claude/agents/designer.md +0 -124
  972. package/project-template/.claude/agents/pm.md +0 -166
  973. package/project-template/.claude/agents/refs/designer-style-exploration-flow.md +0 -67
  974. package/project-template/.claude/agents/refs/pm-workflow-detail.md +0 -567
  975. package/project-template/.claude/hooks/validate-atom-plan.mjs +0 -224
  976. package/project-template/.claude/skills/playcraft-workflow/SKILL.md +0 -485
  977. package/project-template/docs/team/atom-plan-format.md +0 -173
  978. package/project-template/templates/atom-plan.template.json +0 -44
  979. package/project-template/templates/atom-plan.template.md +0 -108
  980. /package/dist/{atom-plan → asr}/validate-asr-coverage.js +0 -0
  981. /package/{project-template → engine-packs/phaser}/game/config/.gitkeep +0 -0
  982. /package/{project-template → engine-packs/phaser}/game/gameplay/.gitkeep +0 -0
  983. /package/{project-template → engine-packs/phaser}/game/scenes/.gitkeep +0 -0
  984. /package/project-template/.claude/agents/refs/{designer-art-style-catalog.md → artist-art-style-catalog.md} +0 -0
@@ -0,0 +1,257 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * snapshot.mjs — Archive current project state + all AI sessions into a zip
4
+ *
5
+ * Usage:
6
+ * node snapshot.mjs # snapshot cwd project
7
+ * node snapshot.mjs <project-path> # snapshot a specific project (absolute or relative)
8
+ * node snapshot.mjs --project <path> # same as above, explicit flag
9
+ * node snapshot.mjs --out <dir> # custom output directory (default: where you run the command)
10
+ * node snapshot.mjs --name <label> # custom label appended to zip name
11
+ *
12
+ * What gets archived:
13
+ * project/ — all project files (excludes node_modules, dist, .git, ta-workspace/logs, ta-workspace/tmp)
14
+ * sessions/ — all JSONL session files (main + subagents) from all three stores
15
+ * (Claude Code / Claude Internal / CodeBuddy) matching the project path
16
+ *
17
+ * Output: {projectName}_{label_}YYYYMMDD_HHmmss.zip in --out dir
18
+ */
19
+
20
+ import { execSync, spawnSync } from 'child_process';
21
+ import { existsSync, readdirSync, statSync, lstatSync, realpathSync, mkdirSync, writeFileSync, rmSync, cpSync } from 'fs';
22
+ import { join, basename, resolve } from 'path';
23
+ import { homedir, tmpdir } from 'os';
24
+
25
+ // ── helpers ──────────────────────────────────────────────────────────────────
26
+
27
+ function parseArgs() {
28
+ const args = process.argv.slice(2);
29
+ const opts = { project: null, out: null, name: null };
30
+ for (let i = 0; i < args.length; i++) {
31
+ if (args[i] === '--project' && args[i + 1]) opts.project = args[++i];
32
+ else if (args[i] === '--out' && args[i + 1]) opts.out = args[++i];
33
+ else if (args[i] === '--name' && args[i + 1]) opts.name = args[++i];
34
+ // first positional arg (not a flag) is treated as project path
35
+ else if (!args[i].startsWith('--') && !opts.project) opts.project = args[i];
36
+ }
37
+ return opts;
38
+ }
39
+
40
+ function timestamp() {
41
+ const d = new Date();
42
+ const pad = n => String(n).padStart(2, '0');
43
+ return `${pad(d.getMonth() + 1)}${pad(d.getDate())}${pad(d.getHours())}${pad(d.getMinutes())}`;
44
+ }
45
+
46
+ /** Copy a directory tree, skipping excluded patterns.
47
+ * Symlinks are followed (resolved to real path) so the archive contains actual content. */
48
+ function copyDir(src, dest, excludes = []) {
49
+ if (!existsSync(src)) return;
50
+ mkdirSync(dest, { recursive: true });
51
+ for (const entry of readdirSync(src)) {
52
+ if (excludes.some(ex => entry === ex || entry.startsWith(ex))) continue;
53
+ const srcPath = join(src, entry);
54
+ const destPath = join(dest, entry);
55
+ let stat;
56
+ try {
57
+ stat = lstatSync(srcPath);
58
+ } catch {
59
+ continue; // can't stat, skip
60
+ }
61
+ if (stat.isSymbolicLink()) {
62
+ // Resolve the symlink to its real target and copy that
63
+ let realSrc;
64
+ try {
65
+ realSrc = realpathSync(srcPath);
66
+ } catch {
67
+ console.warn(` ⚠ Skipping dangling symlink: ${srcPath}`);
68
+ continue;
69
+ }
70
+ let realStat;
71
+ try {
72
+ realStat = statSync(realSrc);
73
+ } catch {
74
+ console.warn(` ⚠ Skipping unresolvable symlink: ${srcPath} → ${realSrc}`);
75
+ continue;
76
+ }
77
+ if (realStat.isDirectory()) {
78
+ copyDir(realSrc, destPath, excludes);
79
+ } else {
80
+ cpSync(realSrc, destPath);
81
+ }
82
+ } else if (stat.isDirectory()) {
83
+ copyDir(srcPath, destPath, excludes);
84
+ } else {
85
+ cpSync(srcPath, destPath);
86
+ }
87
+ }
88
+ }
89
+
90
+ /** Find all session files for a project across all three stores */
91
+ function findSessions(projectCwd) {
92
+ const home = homedir();
93
+ const stores = [
94
+ { name: 'claude-code', path: join(home, '.claude', 'projects') },
95
+ { name: 'claude-internal', path: join(home, '.claude-internal', 'projects') },
96
+ { name: 'codebuddy', path: join(home, '.codebuddy', 'projects') },
97
+ ];
98
+
99
+ // Convert project path to the slug format used by Claude (replace path separators with --)
100
+ // e.g. D:\project\foo → D--project-foo (Claude Code style)
101
+ const normalizedCwd = resolve(projectCwd).replace(/\\/g, '/');
102
+ // Build multiple candidate slugs to match different encoding styles
103
+ const slugVariants = [
104
+ normalizedCwd.replace(/[:/]/g, '-').replace(/\//g, '-'), // D--project-foo
105
+ normalizedCwd.replace(/\\/g, '-').replace(/:/g, '-'),
106
+ // Also try just the last two path segments as a loose keyword
107
+ ];
108
+ const projectName = basename(normalizedCwd);
109
+
110
+ const found = [];
111
+
112
+ for (const store of stores) {
113
+ if (!existsSync(store.path)) continue;
114
+ let projects;
115
+ try { projects = readdirSync(store.path); } catch { continue; }
116
+
117
+ for (const proj of projects) {
118
+ // Match by: slug contains project name, or slug loosely matches cwd
119
+ const projLower = proj.toLowerCase();
120
+ const matches =
121
+ projLower.includes(projectName.toLowerCase()) ||
122
+ slugVariants.some(s => projLower.includes(s.toLowerCase().slice(-30)));
123
+
124
+ if (!matches) continue;
125
+
126
+ const projPath = join(store.path, proj);
127
+ let stat;
128
+ try { stat = statSync(projPath); } catch { continue; }
129
+ if (!stat.isDirectory()) continue;
130
+
131
+ // Collect all session JSONL files
132
+ let files;
133
+ try { files = readdirSync(projPath).filter(f => f.endsWith('.jsonl')); } catch { continue; }
134
+
135
+ for (const f of files) {
136
+ const sessionId = f.replace('.jsonl', '');
137
+ const sessionFile = join(projPath, f);
138
+ const subagentsDir = join(projPath, sessionId, 'subagents');
139
+ found.push({
140
+ store: store.name,
141
+ project: proj,
142
+ sessionId,
143
+ sessionFile,
144
+ subagentsDir: existsSync(subagentsDir) ? subagentsDir : null,
145
+ });
146
+ }
147
+ }
148
+ }
149
+
150
+ return found;
151
+ }
152
+
153
+ /** Create zip using PowerShell on Windows, zip command on Unix */
154
+ function createZip(sourceDir, zipPath) {
155
+ const isWin = process.platform === 'win32';
156
+ if (isWin) {
157
+ const ps = `Compress-Archive -Path "${sourceDir}\\*" -DestinationPath "${zipPath}" -Force`;
158
+ const result = spawnSync('powershell', ['-NoProfile', '-Command', ps], { encoding: 'utf8' });
159
+ if (result.status !== 0) throw new Error(`PowerShell zip failed:\n${result.stderr}`);
160
+ } else {
161
+ const result = spawnSync('zip', ['-r', zipPath, '.'], { cwd: sourceDir, encoding: 'utf8' });
162
+ if (result.status !== 0) throw new Error(`zip failed:\n${result.stderr}`);
163
+ }
164
+ }
165
+
166
+ // ── main ─────────────────────────────────────────────────────────────────────
167
+
168
+ const opts = parseArgs();
169
+ // Project dir: explicit --project / positional arg (resolved relative to cwd), or cwd itself
170
+ const executionCwd = process.cwd(); // where the user ran the command
171
+ const projectDir = opts.project ? resolve(executionCwd, opts.project) : executionCwd;
172
+ const projectName = basename(projectDir);
173
+ const ts = timestamp();
174
+ const label = opts.name ? `_${opts.name}` : '';
175
+ const zipName = `${projectName}${label}_${ts}.zip`;
176
+ // Output dir defaults to where the command was executed (not the project dir)
177
+ const outDir = opts.out ? resolve(executionCwd, opts.out) : executionCwd;
178
+ const zipPath = join(outDir, zipName);
179
+
180
+ // Staging directory in system temp
181
+ const stageDir = join(tmpdir(), `playcraft-snapshot-${ts}`);
182
+ const projectStage = join(stageDir, 'project');
183
+ const sessionsStage = join(stageDir, 'sessions');
184
+
185
+ console.log(`\n📦 Snapshotting project: ${projectName}`);
186
+ console.log(` Source: ${projectDir}`);
187
+ console.log(` Output: ${zipPath}\n`);
188
+
189
+ // 1. Copy project files (exclude heavy/generated dirs)
190
+ const PROJECT_EXCLUDES = [
191
+ 'node_modules',
192
+ 'dist',
193
+ '.git',
194
+ 'ta-workspace', // logs/tmp inside are gitignored anyway; skip whole dir to keep zip small
195
+ ];
196
+
197
+ console.log('📁 Copying project files...');
198
+ copyDir(projectDir, projectStage, PROJECT_EXCLUDES);
199
+ console.log(` ✓ Project files copied`);
200
+
201
+ // 2. Find and copy sessions
202
+ console.log('\n🗂 Finding sessions...');
203
+ const sessions = findSessions(projectDir);
204
+
205
+ if (sessions.length === 0) {
206
+ console.log(' ⚠ No sessions found for this project path');
207
+ } else {
208
+ console.log(` Found ${sessions.length} session(s):`);
209
+ for (const s of sessions) {
210
+ const sessionDest = join(sessionsStage, s.store, s.project, `${s.sessionId}.jsonl`);
211
+ mkdirSync(join(sessionsStage, s.store, s.project), { recursive: true });
212
+ cpSync(s.sessionFile, sessionDest);
213
+
214
+ let subCount = 0;
215
+ if (s.subagentsDir) {
216
+ const subDest = join(sessionsStage, s.store, s.project, s.sessionId, 'subagents');
217
+ mkdirSync(subDest, { recursive: true });
218
+ const subFiles = readdirSync(s.subagentsDir).filter(f => f.endsWith('.jsonl'));
219
+ for (const sf of subFiles) {
220
+ cpSync(join(s.subagentsDir, sf), join(subDest, sf));
221
+ subCount++;
222
+ }
223
+ }
224
+
225
+ const sizeMB = (statSync(s.sessionFile).size / 1024 / 1024).toFixed(2);
226
+ console.log(` ✓ [${s.store}] ${s.sessionId.slice(0, 8)}… (${sizeMB}MB, ${subCount} subagents)`);
227
+ }
228
+ }
229
+
230
+ // 3. Write a manifest
231
+ const manifest = {
232
+ createdAt: new Date().toISOString(),
233
+ projectName,
234
+ projectPath: projectDir,
235
+ label: opts.name || null,
236
+ sessionCount: sessions.length,
237
+ sessions: sessions.map(s => ({
238
+ store: s.store,
239
+ project: s.project,
240
+ sessionId: s.sessionId,
241
+ hasSubagents: !!s.subagentsDir,
242
+ })),
243
+ };
244
+ writeFileSync(join(stageDir, 'manifest.json'), JSON.stringify(manifest, null, 2));
245
+
246
+ // 4. Create zip
247
+ console.log('\n🗜 Creating zip...');
248
+ mkdirSync(outDir, { recursive: true });
249
+ createZip(stageDir, zipPath);
250
+
251
+ // 5. Cleanup staging
252
+ rmSync(stageDir, { recursive: true, force: true });
253
+
254
+ const zipSizeMB = (statSync(zipPath).size / 1024 / 1024).toFixed(2);
255
+ console.log(`\n✅ Snapshot complete!`);
256
+ console.log(` ${zipName} (${zipSizeMB} MB)`);
257
+ console.log(` Path: ${zipPath}\n`);
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "subagentStop": [
5
+ {
6
+ "command": "node .claude/hooks/validate-atom-tree-selection.mjs",
7
+ "timeout": 30,
8
+ "failClosed": false
9
+ },
10
+ {
11
+ "command": "node .claude/hooks/validate-workflow-stop.mjs",
12
+ "timeout": 30,
13
+ "failClosed": false
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,142 @@
1
+ ---
2
+ description: PlayCraft playable ad orchestrator — growth rings, ring gates, sub-agent spawn only
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # PlayCraft Orchestrator
7
+
8
+ You are the **orchestrator** for a PlayCraft playable ad project. Do not role-play Game Designer, Artist, TA, Developer, and Reviewer in one session when `@agent` invoke is available.
9
+
10
+ ## Slice-axis dispatch (primary when `dispatchPacket` exists)
11
+
12
+ When `npm run state:get -- --json dispatchPacket currentAction recommendedNextAction dispatchMode` returns **`dispatchPacket` non-null** (`dispatchMode: true`):
13
+
14
+ 1. **Dispatch unit** = `role + doWhat + flow + sliceId` — not ring loop names.
15
+ 2. Trust **`currentAction` / `recommendedNextAction`** from `state:get` — they are slice-first (no "Ring N build/verify" wording).
16
+ 3. Invoke subagent with **dispatchPacket scope only** + role refs; never say "Ring 1 build" or ask the subagent to self-identify Ring / Gate / Loop.
17
+ 4. After STOP: validate **`sliceState`** + STOP hook (`verify:slice`, `slice:set`) — not ring handoff documents as authority.
18
+ 5. **Ring** = outer budget, boundary, convergence, and user Ring Gate only — not the subagent's daily dispatch axis.
19
+
20
+ When **`dispatchPacket` is null** (`dispatchMode: false`): use the growth-ring handoff matrix below (legacy fallback until slice queue is seeded).
21
+
22
+ ## Growth-ring model (growth-rings-v1)
23
+
24
+ Four iterations (growth rings), each with inner loops: `clarify → build → verify → Ring Gate`.
25
+
26
+ 1. Run `npm run workflow:doctor` every turn
27
+ 2. Run `npm run state:get` → `iteration`, `loop`, `ringGate`, `ringDoD`, `archivedRings` (state source is `docs/project-state.json`; the md is a generated read-only view — never hand-edit it, write via `npm run state:set` / `npm run ring:gate`)
28
+ 3. Before Ring Gate: `npm run ring:gate -- --iteration N` must pass
29
+ 4. On Ring Gate pass: archive ring in `archivedRings`, advance `iteration`, reset `loop: clarify`
30
+
31
+ ## Invoke `@developer`
32
+
33
+ Developer owns every ring's **`build` loop**. Also re-enters during ring 4 **UI rework** (post-`ui_diff` fixes).
34
+
35
+ **`build` loop** (any iteration):
36
+
37
+ 1. In the **first message** to `@developer`, pass the current goal, critical constraints, upstream state, and ring depth (ring 1 = minimal docs; ring 2+ = full intake).
38
+ 2. **Ring 1 build gate**: before invoking `@developer` for `iteration: 1` + `loop: build`, ensure `playcraft remix init-template --from-atom-tree` has run (`.playcraft-engine` matches `meta.engineDecision.adapter`) and `npm run verify:contract` passes. `workflow:doctor` blocks ring 1 build if the marker is missing or mismatched.
39
+ 2. Developer owns read / load / placeholder / implementation / integration per role card and `refs/developer-phase1-flow.md`.
40
+ 3. STOP: truthful `devStatus` + `devUrl` + `devBlockers` → ring 1: handoff `npm run ring:gate -- --iteration 1`; ring 2+: handoff `Invoke @reviewer gameplay_conformance`.
41
+
42
+ **Ring 4 UI rework** (after Reviewer `ui_diff` fail):
43
+
44
+ 1. Invoke `@developer` (or `@ta` / `@artist` per `routeTo`) for UI Diff Action Items only.
45
+ 2. STOP after fixes: handoff `Invoke @reviewer ui_diff`.
46
+
47
+ ## Dispatching Principle: WHAT + Skill Refs, not HOW
48
+
49
+ **Orchestrator 不是全知全能的指挥官。** Sub-agents 有完整的 `.claude/agents/<role>.md` + `refs/` + Skills 体系。
50
+
51
+ **调度时只传递:**
52
+ 1. **目标**:当前环要完成的 atoms / review mode
53
+ 2. **关键约束/提醒**:如 `mediaGroups` 中有可复用资产
54
+ 3. **上游依赖状态**:哪些 Wave 已完成
55
+
56
+ **禁止调度时:**
57
+ - 写出详细生产步骤(agent 自己读 refs/ 和 Skills)
58
+ - 越俎代庖选择 prompt/model/工具(agent 按 Skill Preflight 决定)
59
+ - 跳过 agent 自身的 Step 0 流程
60
+
61
+ ## Post-STOP 验证(必须,在阶段转换前)
62
+
63
+ Sub-agent STOP 返回后,orchestrator **必须验证** 再转 loop/iteration:
64
+
65
+ | 验证项 | 方法 | 失败处理 |
66
+ | --- | --- | --- |
67
+ | 当前 loop 所需交付包完整 | 检查 `next_orchestrator_action` 依赖的核心文件/状态已存在 | 要求补全 |
68
+ | 必要日志证据存在 | intake / preflight / review / reusable-media 证据可追踪 | 要求补全 |
69
+ | 状态字段自洽 | `devStatus: ready` 时 `devUrl` 已存在、`devBlockers` 无未解释阻塞 | 拒绝转 loop |
70
+ | Ring DoD(verify 后) | `npm run ring:gate -- --iteration N` exit 0 | 路由回 owning agent |
71
+
72
+ ## Before every decision
73
+
74
+ 1. Run `npm run workflow:doctor`. New projects from `playcraft create` are already initialized.
75
+ 2. If doctor reports missing workflow files, run `npm run ensure:project -- --no-install`, then run doctor again.
76
+ 3. If doctor still reports `BLOCKED`, fix workflow state before invoking any sub-agent.
77
+ 4. Run `npm run state:get` → read **handoff** + **`dispatchPacket` / `dispatchMode` / `sliceState`** + Ring DoD + Production Pipeline waves (do not open the generated md).
78
+ 5. If `dispatchMode: true` → invoke **only** per `recommendedNextAction` / `dispatchPacket`; do not re-dispatch by ring loop name.
79
+ 6. If `waiting_for: user_gate` and `subagent_stop: true` and `ringGateCanAskUser: yes` → **Ring Gate only** — do **not** invoke sub-agents.
80
+ 7. If `subagent_stop: true` and `waiting_for: orchestrator` → execute **only** `next_orchestrator_action` (includes `npm run ring:gate` after Reviewer verify STOP when no active slice).
81
+ 8. Follow `CLAUDE.md` Orchestration Protocol and `docs/team/collaboration.md` § Ring Gate Protocol, § Agent Handoff.
82
+ 9. Before invoke: reset handoff (`subagent_stop: false`, `waiting_for: none`, `subagent: <target>`).
83
+
84
+ ## Ring Gate (only you ask the user)
85
+
86
+ One Ring Gate per iteration replaces the old six waterfall gates.
87
+
88
+ | When | Preconditions | Action |
89
+ | ---- | ------------- | ------ |
90
+ | Ring N Gate | ring 1: Developer STOP + self-gate scripts pass + `ring:gate` pass; ring 2+: Reviewer verify STOP + `devStatus: ready` + `ring:gate` pass | Show **devUrl with `?debug=1`** via `AskUserQuestion` (debug=1 reveals the one-click clear button) — user never runs `npm run dev` |
91
+ | Ring N pass | User accepts | Archive ring in `archivedRings`, `iteration+1` (or `done` after ring 4), `loop: clarify`, `ringGate: pending` |
92
+ | Ring N fail (ring:gate) | Script exit 2 | Route to `ringGateRouteTo` agent — do **not** ask user |
93
+
94
+ Sub-agents **must not** use `AskUserQuestion` or advance `iteration` / `loop`. See `docs/team/agent-conduct.md`.
95
+
96
+ ## Workflow STOP hooks (Claude Code + Cursor)
97
+
98
+ After **Artist**, **Technical Artist**, **Developer**, **Reviewer**, or **Game Designer** subagent STOP, `.claude/hooks/validate-workflow-stop.mjs` runs automatically:
99
+
100
+ - **Claude Code**: `.claude/settings.json` → `SubagentStop`
101
+ - **Cursor**: `.cursor/hooks.json` → `subagentStop`
102
+
103
+ If hook validation fails, the subagent **cannot stop** until required log evidence exists. Do **not** invoke the next role until handoff shows a successful STOP.
104
+
105
+ **Ring 4 serial spawn:** `@artist` Wave 1 → `@technical-artist` Wave 2 → `@developer` integration → `@reviewer ui_diff`. Never spawn TA before Artist Wave 1 `done`.
106
+
107
+ ## Iteration sync on handoff
108
+
109
+ When executing `next_orchestrator_action`, **also** update `iteration` / `loop` / `ringGate` / `ringDoD`:
110
+
111
+ | Action substring | Must write |
112
+ | ---- | ---- |
113
+ | `Invoke @game-designer` (clarify) | `loop: clarify`, keep `iteration` |
114
+ | `Invoke @developer` (build) | `loop: build`, keep `iteration` |
115
+ | `Invoke @reviewer` (verify) | `loop: verify` |
116
+ | `npm run ring:gate` | Stay `loop: verify`; update `ringDoD`; if pass → `waiting_for: user_gate`, `next_orchestrator_action: Run Ring Gate AskUserQuestion` |
117
+ | `Run Ring Gate AskUserQuestion` | After user pass: archive ring, `iteration+1`, `loop: clarify`, `ringGate: pending` |
118
+ | Ring 4 Gate pass | Project complete — all rings archived, user accepted devUrl |
119
+
120
+ ## Handoff × iteration × loop matrix
121
+
122
+ > **Superseded when `dispatchMode: true`:** use `dispatchPacket` + `recommendedNextAction` instead of this table.
123
+
124
+ | iteration | loop | Typical `next_orchestrator_action` |
125
+ | --------- | ---- | ---------------------------------- |
126
+ | 1 | clarify | Invoke `@game-designer` — engine root + core loop spec |
127
+ | 1 | build | Invoke `@developer` — engine boot + placeholder core gameplay |
128
+ | 1 | verify | Developer self-gate → `npm run ring:gate -- --iteration 1` → Ring Gate (no `@reviewer`) |
129
+ | 2 | clarify | `@game-designer` — periphery atoms (HUD / flow) |
130
+ | 2 | build | `@developer` — enrich periphery |
131
+ | 2 | verify | `@reviewer` → `ring:gate --iteration 2` → Ring Gate |
132
+ | 3 | clarify/build/verify | Add hook/CTA + `@artist` style direction |
133
+ | 4 | build | `@artist` Wave 1 → `@technical-artist` Wave 2 → `@developer` integration |
134
+ | 4 | verify | `@reviewer ui_diff` → `ring:gate --iteration 4` → Ring Gate → done |
135
+
136
+ ## Iteration shortcuts
137
+
138
+ - Ring 1 clarify needs only `design-brief` + `DESIGN.md` + growing `atom-tree.json` — not layout-spec / implementation-plan
139
+ - Asset Contract (`assetMapping`) locks **only after ring 4** (`assetMappingLocked: true`)
140
+ - UI fail during ring 4 verify → invoke routed agents → `@reviewer ui_diff` again (`uiReworkRound` max 5)
141
+ - Optional optimization: `@reviewer playable_validate` before final ring 4 Ring Gate
142
+ - `done` = user accepts devUrl at ring 4 Ring Gate; **not** `playcraft build`
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: PlayCraft sub-agent file boundaries — no user gates, STOP protocol
3
+ globs: .claude/agents/**,docs/**,logs/**,assets/**,game/**
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Sub-Agent Boundary
8
+
9
+ When editing project outputs as a **sub-agent** (Game Designer / Artist / TA / Developer / Reviewer):
10
+
11
+ ## Slice dispatch (dispatchPacket is authority)
12
+
13
+ When orchestrator passes a **dispatchPacket** (see your agent §0):
14
+
15
+ - Execute **only** `role + doWhat + flow + sliceId` — do not infer Ring / Gate / Loop from `iteration` / `loop` or read full pipeline docs to guess work.
16
+ - Do **not** self-identify "Ring N build/verify" or advance workflow cursors yourself.
17
+ - On STOP: run your slice verifier + `slice:set`; STOP hook validates **slice state**, not ring ceremony documents.
18
+
19
+ When **no** active slice: follow legacy ring loop refs from orchestrator assignment.
20
+
21
+ - **Do not** `AskUserQuestion` for Ring Gate choices, Ring Gate confirmations, or final approvals.
22
+ - **Exception**: `Game Designer` may use `AskUserQuestion` during `loop: clarify` for gameplay brainstorm and clarification.
23
+ - On verify-loop completion: update `## Agent handoff` YAML (`ringGate: pending`, `waiting_for: orchestrator`, `next_orchestrator_action` with `npm run ring:gate`) + Progress Checkpoint → **STOP** (see `## Runtime` in your agent file).
24
+ - If `subagent_stop: true` for your role → do not duplicate work; wait for orchestrator.
25
+ - Read `docs/team/agent-conduct.md` and your `.claude/agents/<role>.md` § Runtime + § Agent Conduct.
26
+ - **Do not** change `iteration` or `loop` — use `next_orchestrator_action` in handoff.
27
+ - R/W matrix: `docs/team/collaboration.md`.
28
+
29
+ Artist: ring 3+ produces ASR + style direction; read `selectedMcOption` when set. TA: ring 4 build only, after Production Pipeline Wave 1 `done`. Developer: every ring's `build` loop; ring 4 UI rework for `ui_diff` fixes; complete `developer-log.md` § Skill Preflight before `game/` edits; ring 1 assumes orchestrator already ran `init-template` + `verify:contract`; `devStatus: ready` when done; never with open `devBlockers`.
@@ -0,0 +1 @@
1
+ threejs
@@ -0,0 +1,105 @@
1
+ # PlayCraft Project Template Changelog
2
+
3
+ This file tracks the playable-ad project template version. It is separate from `docs/team/workflow-changelog.md`, which tracks only workflow spec versions.
4
+
5
+ ## Unreleased
6
+
7
+ ### Changed (Ring 1 workflow speed — option C)
8
+
9
+ - **Engine-neutral base dependencies** — base `project-template/package.json` no longer carries a default Phaser dependency; engine packs inject `phaser` or `three` during `init-template`.
10
+ - **Three.js engine pack lifecycle** — `startGame()` now returns a harness-compatible handle with `destroy()`, cancels its render loop, disposes the renderer, removes the canvas, and clears `window.__playable` on resize/restart. The pack also injects `@types/three` for TypeScript projects.
11
+ - **`verify:firstwin`** — headless script replaces Reviewer manual playwright for ring 1 `firstLevelWin` DoD; `firstLevelWin` moved from `REVIEW_VERIFIERS` to `SCRIPT_VERIFIERS` and now reports phase path / elapsed time / final state.
12
+ - **`verify:lifecycle`** — new lightweight Ring 1 gate requires `HOOK → autoPlay → ENDCARD` without MP4 (MPEG-4 Part 14,数字多媒体容器格式) transcoding.
13
+ - **Ring 1 DoD slimmed but hardened** — `oneClickEndcard` (`record:mp4`) deferred to ring 2; ring 1 = `contract` + `lifecycle` + `firstLevelWin`.
14
+ - **Ring 1 verify path** — Developer self-gates with `verify:contract` + `verify:lifecycle` + `verify:firstwin` then routes orchestrator to `ring:gate` (no `@reviewer` invoke on ring 1).
15
+ - **`npm run typecheck`** added; Golden Rule forbids `npx tsc`.
16
+ - **`record-playable.mjs`** — fixed Playwright multi-arg `waitForFunction` / `evaluate` calls (L455, L565).
17
+ - **Reviewer Check C** — batch via single `playwright-cli run-code` instead of atomic CLI steps.
18
+ - **Developer ring 1** — module-split guidance (≤350 lines/file); slim intake table in `developer-phase1-flow.md`.
19
+
20
+ ## 0.3.2-alpha.0 - 2026-06-15
21
+
22
+ ### Fixed
23
+
24
+ - **`init-template` no longer blindly deletes `game/`** — refuses overwrite when `game/` contains user implementation unless `--force`, or the tree is empty / scaffold-pending / still marked by `docs/scaffold-manifest.md` from a prior init-template apply.
25
+ - **`playcraft create` is engine-neutral** — base template ships placeholder `game/` (`.playcraft-scaffold-pending`) without `.playcraft-engine`, so `init-template --from-atom-tree` works for both phaser and threejs without `--force`.
26
+
27
+ ## 0.3.1-alpha.0 - 2026-06-15
28
+
29
+ ### Added
30
+
31
+ - **Engine-neutral scaffold**: `playcraft remix init-template` (`--engine`, `--from-atom-tree`, `--bake`, `--all-engines`) composes `project-template` ⊕ `engine-packs/{phaser,threejs}` into `game/`, `.playcraft-engine`, and `docs/scaffold-manifest.md`.
32
+ - Three.js engine-pack minimal stub with the same `window.__playable` contract as Phaser.
33
+ - `docs/team/harness-legacy-deprecation.md` — timeline for retiring legacy `MainScene._onDebugAutoPlay()` harness path (target 2026-Q3).
34
+
35
+ ### Changed
36
+
37
+ - **Ring 1 agent chain** documented across `CLAUDE.md`, `core-model.md`, `collaboration.md`, orchestrator rules, and role cards: `init-atom-tree` → `init-template` → `verify:contract` → Developer build (init-atom-tree no longer silently overwrites `game/`).
38
+ - `workflow-doctor` blocks when `.playcraft-engine` disagrees with `meta.engineDecision.adapter`, or when ring 1 `loop: build` starts without the engine marker.
39
+ - Harness skills (`playable-record`, `playable-debug`, `playcraft-playable-optimization`) updated to **`window.__playable`** as pass standard; legacy scene hooks warn only.
40
+ - `verify:contract` `evaluateContract()` returns legacy warnings when only Phaser scene hooks are present.
41
+
42
+ ### Unreleased (prior batch, still in flight)
43
+
44
+ ### Changed
45
+
46
+ - **BREAKING**: Replaced waterfall `convergence-v1` workflow with **`growth-rings-v1`** — four growth rings climbing the atom-tree from engine root upward, each with inner loops `clarify → build → verify → Ring Gate`.
47
+ - Replaced `stage` + six gates (`#1`, `#2a`, `#exec`, `#dev`, `#2b`, `#3`) with `iteration` (1..4) + `loop` + `ringGate` + `ringDoD` + `archivedRings` in `## Agent handoff` YAML.
48
+ - Rewrote `gate-runner.mjs` as objective ring-gate runner (`npm run ring:gate -- --iteration N`) — spawns `verify:contract`, `record:mp4`, `verify:ui`, etc.
49
+ - Rewrote `workflow-doctor.mjs` for iteration/loop parsing + non-regression invariant.
50
+ - Updated `validate-workflow-stop.mjs` for iteration-aware required docs (ring 1 minimal: design-brief + DESIGN only).
51
+ - `ensure:project` no longer scaffolds pre-development design docs at bootstrap (layout-spec, atom-tree, etc. created on demand in rings 2+).
52
+ - Bumped `playcraftTemplateVersion` to `0.3.0-alpha.0`.
53
+
54
+ - Aligned `collaboration.md`, orchestrator/subagent cursor rules, role cards, and `pipeline-overview.md` to growth-rings (removed waterfall stage/gate dead references and fixed anchor links).
55
+ - `validate-workflow-stop.mjs` `validatePlan` now keys off `loop` (`build`) instead of legacy `stage` (`development`).
56
+ - Added objective ring 4 verifiers: `verify:visual` (histogram score vs ASR reference) and `verify:atom-conformance` (atom-tree + assetMapping on-disk).
57
+ - `workflow-doctor.mjs` supports `--strict` / `--enforce` (promotes warnings to errors for CI) and `strict: 'stop'` (illegal transitions only — used by `validate-workflow-stop` hook).
58
+
59
+ ### Added
60
+
61
+ - `skills/_shared/scripts/ring-config.mjs` — shared ring DoD configuration for gate-runner and workflow-doctor.
62
+ - `ring:gate` npm script.
63
+ - `## Ring DoD Fields` section in `review-report.template.md`.
64
+ - Made `game/config/game-config.ts` the single source of truth for layout/runtime config. `verify:ui` now loads the TypeScript config directly via esbuild (legacy `.js` still supported), so verification can no longer pass against stale, drifted config values. Removed the separate `game-config.js` stub.
65
+ - Extended `globFiles` in the verify-ui toolkit to support `**/*.ts` / `**/*.tsx` glob patterns (previously only `**/*.js`), so layout antipattern scans actually cover TypeScript sources.
66
+ - Made the `## Agent handoff` YAML block in `templates/project-state.template.md` the single machine-readable source of truth for workflow state.
67
+
68
+ ### Added
69
+
70
+ - Added `verify:env`, an environment pre-flight (`skills/_shared/scripts/verify-env.mjs`): checks Node >= 20, `python3` (required for `verify:ui`), and Playwright's Chromium (optional, for `record:mp4`). Exits non-zero when a required tool is missing so the toolchain fails loudly. `ensure:project` now runs the env pre-flight and surfaces a missing `python3` as a `BLOCKING:` warning instead of letting it fail silently downstream. Declared `engines.node >= 20` in `package.json`.
71
+ - Added `skills:check` (`skills/_shared/scripts/skills-check.mjs`): governs the `.claude/skills` platform-skill static copies that shadow `@playcraft/skills` (image/audio/sprite generation), flagging content drift so a deliberate fork does not silently rot. Advisory by default, `--strict` exits non-zero on drift. Documented `sync-template-skills.mjs` in `skills/README.md` as the single authoritative sync source for the local `skills/` set.
72
+ - Made `ensure-project.mjs` `standardScripts` the single source of truth for managed npm scripts and added a consistency test asserting `package.json` matches it (prevents dual-write drift). Guarded `ensure-project.mjs`'s top-level `main()` behind an `isMain` check so it can be imported by tests without self-executing.
73
+ - Added `harness:smoke`, the harness's own offline-first regression self-test: checks the runtime contract and single-source game-config load, with an opt-in `--full` that also runs the static `verify:ui` suite. Wired into `package.json` and `ensure:project` standard scripts.
74
+ - Added `context:budget` (`skills/_shared/scripts/context-budget.mjs`): measures each agent role's always-loaded base context (L1 card + shared contract docs) in estimated tokens and audits the on-demand refs/skills pool, warning on per-role and per-file budget overruns so the layered "card = ownership, refs on demand" design keeps paying off. Honors optional `tokenCost:` / `readWhen:` frontmatter overrides. Wired into `package.json` and `ensure:project` standard scripts.
75
+ - Added an explicit, typed Playable ⇄ Harness runtime contract (`game/runtime-contract.ts`): `registerPlayable`, `bindPlayableScene`, and an in-dev `assertPlayableSceneContract`. The stub now wires its recorder/debug hooks through it instead of loose `(this as any)` assignments.
76
+ - Updated the runtime contract boundary: new projects expose recorder/debug hooks through `window.__playable`; `window.__game` remains only as a legacy Phaser engine handle. This prevents harness methods from shadowing Phaser internals such as `Game.start()`.
77
+ - Added `verify_runtime_contract.js` (comment-aware, identifier-boundary static scan) to the verify-ui layout suite; it fails fast when `game/` drops a hook the recording/debug harness depends on, instead of letting `record:mp4` time out.
78
+ - Added `verify:contract`, the live (dynamic) half of the runtime-contract check (`skills/playable-record/scripts/verify-contract.mjs`): it boots the game in headless Chromium and asserts within seconds that `window.__playable.autoPlay()`, `window.__playable.getState()`, and the `ENDCARD` phase are wired at runtime, with legacy `window.__game` scene hooks still supported — turning a 30s silent recorder timeout into a clear, fast failure. The validation rule (`evaluateContract`) is pure and unit-tested, and is reused by `record:mp4` to assert the contract on the already-loaded page before capture (no extra browser launch). Also surfaced as `harness:smoke --live`.
79
+ - Added a feature-detected runtime-contract gate to the Developer `SubagentStop` validator: a Developer cannot STOP while the harness contract is broken (skipped silently when the harness scanner is absent).
80
+ - Added `workflow:doctor`, a read-only orchestration consistency check for stage, Gate, and handoff state.
81
+ - Wired `playcraft create` to run `ensure-project --no-install` before initial Git commit so new projects start with workflow docs and logs initialized.
82
+ - Wired `workflow:doctor` into orchestrator startup instructions for Claude Code and Cursor.
83
+ - Added CLI tests for `workflow:doctor` initial-state, invalid-stage, and missing-state diagnostics.
84
+ - Clarified that `playcraft create` is the canonical bootstrap path; `ensure:project` remains an idempotent repair path for legacy or incomplete projects.
85
+
86
+ ## 0.2.0-alpha.0 - 2026-06-15
87
+
88
+ ### Added
89
+
90
+ - Added `playcraftTemplateVersion` in `package.json` as the machine-readable template version.
91
+ - Added this root `CHANGELOG.md` as the human-readable template release history.
92
+ - Added a template version row to `templates/project-state.template.md` so generated projects can record which project-template version they started from.
93
+ - Added first-run workflow bootstrap in `ensure:project`: missing `docs/` and `logs/` workflow files are created from templates without overwriting agent work.
94
+ - Added clean JSON (JavaScript Object Notation, JavaScript 对象表示法) mode for `ensure:project --json` by silencing nested bootstrap output.
95
+ - Added template copy filtering for runtime artifacts such as `node_modules`, `recordings`, `validate`, `playground`, generated profiles, and lockfiles.
96
+ - Expanded SubagentStop validation coverage to Artist, Developer Lead, Developer, and Technical Artist.
97
+ - Updated atom-tree validation to accept current schemaVersion 3 string-array atoms while keeping schemaVersion 1 compatibility.
98
+
99
+ ## 0.1.0 - 2026-06-12
100
+
101
+ ### Baseline
102
+
103
+ - Initial Vite + Phaser playable template.
104
+ - Included Claude Code agent-team instructions, role cards, hooks, workflow docs, and local playable skills.
105
+ - Included validation, recording, playground, art import, atlas, and frame tooling npm (Node Package Manager, Node 包管理器) scripts.
@@ -0,0 +1,84 @@
1
+ # PlayCraft Playable Ads Project
2
+
3
+ ## L0 Quickstart
4
+
5
+ You are building a playable ad: a self-contained HTML5 mini-game. Daily work is driven by a **slice queue** (`dispatchPacket`); **growth rings** are the outer budget, convergence boundary, and user Ring Gate.
6
+
7
+ Start every turn with the smallest possible context:
8
+
9
+ ```bash
10
+ npm run workflow:doctor
11
+ npm run state:get
12
+ ```
13
+
14
+ `state:get` tells you the current `iteration`, `loop`, `currentAction`, `next_orchestrator_action`, `contextPacket`, current required files, allowed tasks, forbidden tasks, current verifiers, and next commands. **Use `state:get` as your handoff summary — never open or hand-edit `docs/project-state.md`.** Read `contextPacket` first, then only the files `state:get` lists as required. Pull deeper docs only when the current action names them.
15
+
16
+ > **State is programmatic.** `docs/project-state.json` is the machine source of truth, including `handoffContext` shared working memory; `docs/project-state.md` is a GENERATED, read-only view re-rendered after every write. **Read state with `npm run state:get`; write state with `npm run state:set` (or `npm run ring:gate` / STOP hooks).** Do not edit the markdown by hand — your edits will be overwritten on the next write, and the tables you need always exist because the renderer emits them.
17
+
18
+ ## Non-Negotiables
19
+
20
+ - First level must guarantee player success.
21
+ - Runtime must start at `HOOK`.
22
+ - `autoPlay()` must progress from player-reachable actions to `ENDCARD`; do not fake victory by directly setting `ENDCARD`, repainting the whole board into a win, or calling a win screen directly.
23
+ - For Ring 1, do not create internal Task lists (`TaskCreate` / `TaskUpdate` / …). **You are the orchestrator** — dispatch role subagents via `Task` / `@game-designer` / temporary ref-flow atom-selection subagent / `@developer`; do **not** role-play Designer, atom selector, or Developer inline in one session.
24
+ - Use project scripts only: `npm run ...` or repository-provided `playcraft ...`; never use `npx`.
25
+ - Typecheck with `npm run typecheck`.
26
+ - Harness pass standard is `window.__playable`; legacy `window.__game` scene hooks are migration-only.
27
+ - User Ring Gate is orchestrator-only.
28
+ - Follow `state:get` output, not remembered Ring instructions.
29
+
30
+ ## Slice-axis dispatch (primary — orchestrator)
31
+
32
+ When `npm run state:get -- --json dispatchPacket dispatchMode recommendedNextAction` returns **`dispatchMode: true`**:
33
+
34
+ 1. **Dispatch unit** = `role + doWhat + flow + sliceId` from `dispatchPacket` — not ring loop names.
35
+ 2. Invoke subagents with **packet scope only**; never say "Ring 1 build" or ask them to self-identify Ring / Gate / Loop.
36
+ 3. After STOP: trust **`sliceState`** + STOP hook (`verify:slice` / `verify:slice-artist` / `verify:slice-ta`, then `slice:set`) — not handoff markdown as authority.
37
+ 4. **`ring:gate`** still runs for objective DoD and user Ring Gate; it aggregates slice queue terminal state but does **not** replace per-slice verify on STOP.
38
+
39
+ When **`dispatchPacket` is null** (`dispatchMode: false`): use the legacy growth-ring path below until Designer seeds `sliceState`.
40
+
41
+ ## Current Workflow
42
+
43
+ 1. Read state with `npm run state:get` (never open the generated `docs/project-state.md`).
44
+ 2. If `dispatchMode: true` → follow `recommendedNextAction` / `dispatchPacket`; else follow `next_orchestrator_action`.
45
+ 3. Keep work inside the current slice (dispatch mode) or current ring (legacy).
46
+ 4. After a sub-agent stops, run verifiers from `state:get` (per-slice verify before ring gate when slices are active).
47
+ 5. When `ring:gate` says `canAskUser: yes`, the orchestrator asks the user to accept the dev URL.
48
+
49
+ ## Ring 1 Dispatch Path (legacy growth-rings — orchestrator)
50
+
51
+ When `state:get` reports `iteration: 1`, **stay orchestrator** — invoke role subagents; do not inline their work.
52
+
53
+ | `loop` | Orchestrator does |
54
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
55
+ | `clarify` | **Invoke `@game-designer`** — ring 1 clarify (single concise `docs/DESIGN.md`). Do not write `DESIGN.md` yourself. |
56
+ | (after GD STOP) | **Spawn a temporary ref-flow atom-selection subagent** — create the minimal ring 1 atom-tree package: engine decision, compact gameplay trunk, selected atoms, and ring 1 verifier metadata. Do not make main orchestrator select atoms inline. |
57
+ | (after selector STOP) | Run scaffold gate: `validate-atom-tree-selection` → `init-template --from-atom-tree` → `npm install` → `npm run verify:contract` → `npm run verify:lifecycle`. Set `loop: build`, then **Invoke `@developer`**. |
58
+ | `build` | **Invoke `@developer`** — ring 1 build only the smallest verifiable playable spine (placeholder art, one player-reachable action loop, `window.__playable`). Developer self-gates with `verify:contract` + `verify:lifecycle` + `verify:firstwin` + `verify:placeholders` on STOP. |
59
+ | `verify` | Run `npm run ring:gate -- --iteration 1` (no `@reviewer` in ring 1). |
60
+
61
+ Follow `next_orchestrator_action` from handoff when `subagent_stop: true`. See `docs/team/collaboration.md` § Ring 1 engine scaffold.
62
+
63
+ ## Deeper References
64
+
65
+ Use these only when the current action needs them:
66
+
67
+ | Need | Read |
68
+ | ---------------------------------------------- | ----------------------------------------- |
69
+ | Full collaboration and Ring Gate protocol | `docs/team/collaboration.md` |
70
+ | Role conduct and MUST/NEVER rules | `docs/team/agent-conduct.md` |
71
+ | Runtime model and `window.__playable` boundary | `docs/team/core-model.md` |
72
+ | Post-stop verification matrix | `docs/team/agent-runtime-matrix.md` |
73
+ | Atom-tree schema and Skill selection | `docs/team/atom-tree-format.md` |
74
+ | Legacy harness migration | `docs/team/harness-legacy-deprecation.md` |
75
+
76
+ ## Directory Map
77
+
78
+ ```text
79
+ docs/ project-state, DESIGN, ring-specific specs
80
+ game/ runtime implementation
81
+ logs/ developer/reviewer/artist/TA logs
82
+ assets/ placeholder and production media
83
+ skills/ local verifier, record, art, and workflow scripts
84
+ ```