@playcraft/cli 0.1.49-beta → 0.1.51

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 (395) hide show
  1. package/README.md +3 -62
  2. package/dist/agent/local-backend.js +1 -1
  3. package/dist/cli-root-help.js +0 -2
  4. package/dist/commands/build-all.js +19 -5
  5. package/dist/commands/build.js +28 -15
  6. package/dist/commands/create.js +33 -26
  7. package/dist/commands/image.js +6 -2
  8. package/dist/commands/login.js +42 -84
  9. package/dist/commands/skills.js +0 -4
  10. package/dist/commands/tools-3d.js +0 -11
  11. package/dist/commands/tools-generation.js +137 -69
  12. package/dist/commands/tools-image-context.js +29 -0
  13. package/dist/commands/tools-utils.js +12 -0
  14. package/dist/commands/tools.js +2 -2
  15. package/dist/config.js +4 -59
  16. package/dist/index.js +3 -40
  17. package/dist/remix/clone.js +0 -2
  18. package/dist/remix/init-template.js +0 -2
  19. package/dist/remix/pull.js +0 -2
  20. package/dist/remix/push.js +1 -21
  21. package/dist/utils/agent-api-client.js +30 -210
  22. package/dist/utils/image-asset-context.js +228 -0
  23. package/dist/utils/playcraft-http-client.js +4 -6
  24. package/package.json +5 -15
  25. package/project-template/.claude/agents/refs/ta-image-generation-detail.md +67 -123
  26. package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +135 -63
  27. package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +42 -33
  28. package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +18 -20
  29. package/project-template/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +6 -7
  30. package/project-template/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +39 -39
  31. package/project-templates/phaser/.claude/agents/refs/ta-image-generation-detail.md +59 -59
  32. package/project-templates/phaser/.claude/skills/playcraft-image-generation/SKILL.md +135 -63
  33. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +42 -33
  34. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +18 -20
  35. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +6 -7
  36. package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +39 -39
  37. package/project-templates/threejs/.claude/agents/refs/ta-image-generation-detail.md +59 -59
  38. package/project-templates/threejs/.claude/skills/playcraft-image-generation/SKILL.md +135 -63
  39. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +42 -33
  40. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +18 -20
  41. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +6 -7
  42. package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +39 -39
  43. package/SKILLS_REGISTRY.md +0 -149
  44. package/dist/auth/account-activation.js +0 -157
  45. package/dist/auth/messages.js +0 -30
  46. package/dist/commands/build-temp.js +0 -26
  47. package/dist/commands/platform-skills.generated.js +0 -19
  48. package/dist/commands/playable.js +0 -53
  49. package/dist/commands/tools-batch.js +0 -113
  50. package/dist/commands/video.js +0 -122
  51. package/dist/commands/workspace-runtime.js +0 -54
  52. package/dist/commands/workspace.js +0 -40
  53. package/dist/project-skills/builtin-import.js +0 -225
  54. package/dist/project-skills/commands.js +0 -77
  55. package/dist/project-skills/lifecycle.js +0 -28
  56. package/dist/project-skills/local-run.js +0 -112
  57. package/dist/project-skills/local-store.js +0 -221
  58. package/dist/project-skills/messages.js +0 -80
  59. package/dist/project-skills/reconcile.js +0 -62
  60. package/dist/project-skills/remote-cache.js +0 -51
  61. package/dist/project-skills/validation.js +0 -19
  62. package/dist/recording/messages.js +0 -40
  63. package/dist/recording/project-digest.js +0 -85
  64. package/dist/recording/recorder.js +0 -293
  65. package/dist/recording/scenario.js +0 -50
  66. package/dist/skill-registry/client.js +0 -345
  67. package/dist/skill-registry/commands.js +0 -180
  68. package/dist/skill-registry/evaluation-client.js +0 -156
  69. package/dist/skill-registry/evaluation-commands.js +0 -174
  70. package/dist/skill-registry/messages.js +0 -177
  71. package/dist/skill-registry/package.js +0 -275
  72. package/dist/skill-registry/platform-package.js +0 -100
  73. package/dist/utils/environment-endpoints.js +0 -17
  74. package/dist/utils/error-diagnostics.js +0 -20
  75. package/dist/utils/tool-operation-journal.js +0 -124
  76. package/dist/utils/video-evidence-git.js +0 -81
  77. package/dist/video-replication/client.js +0 -234
  78. package/dist/video-replication/comparison-evidence.js +0 -149
  79. package/dist/video-replication/comparison-files.js +0 -57
  80. package/dist/video-replication/comparison-log.js +0 -72
  81. package/dist/video-replication/comparison-messages.js +0 -104
  82. package/dist/video-replication/comparison-output.js +0 -63
  83. package/dist/video-replication/comparison-preflight.js +0 -66
  84. package/dist/video-replication/comparison.js +0 -230
  85. package/dist/video-replication/diagnostics.js +0 -41
  86. package/dist/video-replication/evidence.js +0 -165
  87. package/dist/video-replication/media.js +0 -112
  88. package/dist/video-replication/messages.js +0 -97
  89. package/dist/workspace/messages.js +0 -67
  90. package/dist/workspace/transfer-client.js +0 -233
  91. package/dist/workspace/transfer-errors.js +0 -48
  92. package/dist/workspace-runtime/batch/content-changes.js +0 -30
  93. package/dist/workspace-runtime/batch/control.js +0 -86
  94. package/dist/workspace-runtime/batch/deliver.js +0 -173
  95. package/dist/workspace-runtime/batch/freeze.js +0 -101
  96. package/dist/workspace-runtime/batch/generate.js +0 -249
  97. package/dist/workspace-runtime/batch/git.js +0 -40
  98. package/dist/workspace-runtime/batch/occupancy.js +0 -8
  99. package/dist/workspace-runtime/batch/policy.js +0 -70
  100. package/dist/workspace-runtime/batch/prepare.js +0 -317
  101. package/dist/workspace-runtime/batch/processes.js +0 -72
  102. package/dist/workspace-runtime/batch/records.js +0 -113
  103. package/dist/workspace-runtime/batch/routes.js +0 -61
  104. package/dist/workspace-runtime/batch/source-candidate.js +0 -86
  105. package/dist/workspace-runtime/batch/source-capture.js +0 -146
  106. package/dist/workspace-runtime/batch/source-failure.js +0 -43
  107. package/dist/workspace-runtime/batch/source-publish.js +0 -130
  108. package/dist/workspace-runtime/codex/app-server.js +0 -1065
  109. package/dist/workspace-runtime/codex/compact.js +0 -46
  110. package/dist/workspace-runtime/codex/config-toml.js +0 -107
  111. package/dist/workspace-runtime/codex/delivery-tools.js +0 -144
  112. package/dist/workspace-runtime/codex/jsonrpc-stdio.js +0 -145
  113. package/dist/workspace-runtime/codex/launcher-client.js +0 -177
  114. package/dist/workspace-runtime/codex/loopback.js +0 -146
  115. package/dist/workspace-runtime/codex/mcp-config.js +0 -39
  116. package/dist/workspace-runtime/codex/model-broker.js +0 -263
  117. package/dist/workspace-runtime/codex/native-adapter.js +0 -9
  118. package/dist/workspace-runtime/codex/permissions.js +0 -79
  119. package/dist/workspace-runtime/codex/thread-image.js +0 -38
  120. package/dist/workspace-runtime/codex/tool-response.js +0 -10
  121. package/dist/workspace-runtime/codex/ui-instructions.js +0 -4
  122. package/dist/workspace-runtime/codex/ui-tools.js +0 -203
  123. package/dist/workspace-runtime/codex/work-mode.js +0 -15
  124. package/dist/workspace-runtime/main.js +0 -10
  125. package/dist/workspace-runtime/persistence/journal.js +0 -365
  126. package/dist/workspace-runtime/persistence/native-subagents.js +0 -162
  127. package/dist/workspace-runtime/persistence/sqlite-client.js +0 -77
  128. package/dist/workspace-runtime/persistence/sqlite-worker.js +0 -1161
  129. package/dist/workspace-runtime/persistence/stopped-execution.js +0 -77
  130. package/dist/workspace-runtime/previews/diagnostics.js +0 -44
  131. package/dist/workspace-runtime/previews/output.js +0 -36
  132. package/dist/workspace-runtime/previews/publish.js +0 -274
  133. package/dist/workspace-runtime/previews/single-file.js +0 -43
  134. package/dist/workspace-runtime/processes/managed-writes.js +0 -69
  135. package/dist/workspace-runtime/serve.js +0 -343
  136. package/dist/workspace-runtime/server/accept-operation.js +0 -61
  137. package/dist/workspace-runtime/server/auth.js +0 -21
  138. package/dist/workspace-runtime/server/connectivity.js +0 -209
  139. package/dist/workspace-runtime/server/desktop-host.js +0 -429
  140. package/dist/workspace-runtime/server/desktop-preview-config.js +0 -81
  141. package/dist/workspace-runtime/server/desktop-preview-service.js +0 -157
  142. package/dist/workspace-runtime/server/desktop-preview-static.js +0 -53
  143. package/dist/workspace-runtime/server/desktop-preview.js +0 -189
  144. package/dist/workspace-runtime/server/dispatch.js +0 -1393
  145. package/dist/workspace-runtime/server/endpoints.js +0 -21
  146. package/dist/workspace-runtime/server/execution-group.js +0 -90
  147. package/dist/workspace-runtime/server/http.js +0 -1316
  148. package/dist/workspace-runtime/server/lock.js +0 -53
  149. package/dist/workspace-runtime/server/operation-record.js +0 -33
  150. package/dist/workspace-runtime/server/rfb-watch-gate.js +0 -168
  151. package/dist/workspace-runtime/server/session-restore.js +0 -84
  152. package/dist/workspace-runtime/server/source-uploader.js +0 -138
  153. package/dist/workspace-runtime/server/submit-operation.js +0 -41
  154. package/dist/workspace-runtime/server/terminal-host.js +0 -366
  155. package/dist/workspace-runtime/server/types.js +0 -1
  156. package/dist/workspace-runtime/server/workspace-transfer.js +0 -168
  157. package/dist/workspace-runtime/verify-artifact.js +0 -59
  158. package/dist/workspace-runtime/workspaces/append-only-log.js +0 -62
  159. package/dist/workspace-runtime/workspaces/archive.js +0 -207
  160. package/dist/workspace-runtime/workspaces/artifact-events.js +0 -55
  161. package/dist/workspace-runtime/workspaces/artifact-files.js +0 -199
  162. package/dist/workspace-runtime/workspaces/artifact-receipts.js +0 -89
  163. package/dist/workspace-runtime/workspaces/artifacts.js +0 -282
  164. package/dist/workspace-runtime/workspaces/asset-library-import.js +0 -366
  165. package/dist/workspace-runtime/workspaces/attachment-content.js +0 -73
  166. package/dist/workspace-runtime/workspaces/attachments.js +0 -185
  167. package/dist/workspace-runtime/workspaces/batch-commit.js +0 -142
  168. package/dist/workspace-runtime/workspaces/binary-content.js +0 -65
  169. package/dist/workspace-runtime/workspaces/binary-write.js +0 -112
  170. package/dist/workspace-runtime/workspaces/cli-context.js +0 -23
  171. package/dist/workspace-runtime/workspaces/cli-credentials.js +0 -115
  172. package/dist/workspace-runtime/workspaces/composer-context.js +0 -147
  173. package/dist/workspace-runtime/workspaces/context-error.js +0 -2
  174. package/dist/workspace-runtime/workspaces/delivery-build.js +0 -331
  175. package/dist/workspace-runtime/workspaces/delivery-store.js +0 -168
  176. package/dist/workspace-runtime/workspaces/delivery.js +0 -64
  177. package/dist/workspace-runtime/workspaces/dependencies.js +0 -279
  178. package/dist/workspace-runtime/workspaces/developer-command.js +0 -98
  179. package/dist/workspace-runtime/workspaces/directories.js +0 -132
  180. package/dist/workspace-runtime/workspaces/directory-access.js +0 -37
  181. package/dist/workspace-runtime/workspaces/directory-attachments.js +0 -245
  182. package/dist/workspace-runtime/workspaces/directory-create.js +0 -57
  183. package/dist/workspace-runtime/workspaces/directory-maintenance.js +0 -111
  184. package/dist/workspace-runtime/workspaces/directory-stats.js +0 -49
  185. package/dist/workspace-runtime/workspaces/disk-snapshot.js +0 -31
  186. package/dist/workspace-runtime/workspaces/empty-template.js +0 -42
  187. package/dist/workspace-runtime/workspaces/file-content.js +0 -48
  188. package/dist/workspace-runtime/workspaces/files-search.js +0 -116
  189. package/dist/workspace-runtime/workspaces/files.js +0 -150
  190. package/dist/workspace-runtime/workspaces/git-credential-broker.js +0 -312
  191. package/dist/workspace-runtime/workspaces/git-credential-helper.js +0 -68
  192. package/dist/workspace-runtime/workspaces/git-direct-store.js +0 -155
  193. package/dist/workspace-runtime/workspaces/git.js +0 -670
  194. package/dist/workspace-runtime/workspaces/instructions.js +0 -56
  195. package/dist/workspace-runtime/workspaces/json5-edit.js +0 -170
  196. package/dist/workspace-runtime/workspaces/library-attachments.js +0 -268
  197. package/dist/workspace-runtime/workspaces/operation-log.js +0 -23
  198. package/dist/workspace-runtime/workspaces/optional-platform-skills.js +0 -14
  199. package/dist/workspace-runtime/workspaces/parameters.js +0 -272
  200. package/dist/workspace-runtime/workspaces/prepare.js +0 -278
  201. package/dist/workspace-runtime/workspaces/registry.js +0 -251
  202. package/dist/workspace-runtime/workspaces/remix-references.js +0 -301
  203. package/dist/workspace-runtime/workspaces/revisions.js +0 -31
  204. package/dist/workspace-runtime/workspaces/session-image.js +0 -104
  205. package/dist/workspace-runtime/workspaces/shared-git.js +0 -40
  206. package/dist/workspace-runtime/workspaces/skill-artifact-loader.js +0 -95
  207. package/dist/workspace-runtime/workspaces/skills.js +0 -191
  208. package/dist/workspace-runtime/workspaces/transfer-quota.js +0 -69
  209. package/dist/workspace-runtime/workspaces/transfer.js +0 -471
  210. package/dist/workspace-runtime/workspaces/turn-changes.js +0 -75
  211. package/dist/workspace-runtime/workspaces/video-attachments.js +0 -49
  212. package/project-template/.claude/skills/playcraft-replica-validation/SKILL.md +0 -25
  213. package/project-template/.claude/skills/playcraft-replica-validation/references/contracts.md +0 -79
  214. package/project-template/.claude/skills/playcraft-video-understanding/SKILL.md +0 -29
  215. package/project-template/.claude/skills/playcraft-video-understanding/references/contracts.md +0 -37
  216. package/project-template-v2/.claude/agents/artist.md +0 -82
  217. package/project-template-v2/.claude/agents/developer.md +0 -153
  218. package/project-template-v2/.claude/agents/game-designer.md +0 -264
  219. package/project-template-v2/.claude/agents/refs/artist-art-style-catalog.md +0 -533
  220. package/project-template-v2/.claude/agents/refs/artist-color-audio-recipes.md +0 -153
  221. package/project-template-v2/.claude/agents/refs/artist-dimension-axis.md +0 -27
  222. package/project-template-v2/.claude/agents/refs/artist-master-composite-recipes.md +0 -208
  223. package/project-template-v2/.claude/agents/refs/atom-skill-library.md +0 -81
  224. package/project-template-v2/.claude/agents/refs/developer-impl-cookbook.md +0 -432
  225. package/project-template-v2/.claude/agents/refs/framework-5-component-filter.md +0 -252
  226. package/project-template-v2/.claude/agents/refs/framework-game-feel-juice.md +0 -266
  227. package/project-template-v2/.claude/agents/refs/framework-mda.md +0 -147
  228. package/project-template-v2/.claude/agents/refs/game-designer-gameplay-sufficiency.md +0 -123
  229. package/project-template-v2/.claude/agents/refs/ta-3d-flip-recipe.md +0 -88
  230. package/project-template-v2/.claude/agents/refs/ta-atlas-deliverable-standard.md +0 -67
  231. package/project-template-v2/.claude/agents/refs/ta-batch-pipeline-recipes.md +0 -120
  232. package/project-template-v2/.claude/agents/refs/ta-image-generation-detail.md +0 -300
  233. package/project-template-v2/.claude/agents/refs/ta-image-ops-reference.md +0 -495
  234. package/project-template-v2/.claude/agents/refs/ta-pipeline-cookbook.md +0 -1141
  235. package/project-template-v2/.claude/agents/refs/ta-tools-reference.md +0 -111
  236. package/project-template-v2/.claude/agents/refs/ta-vfx-preset-catalog.md +0 -365
  237. package/project-template-v2/.claude/agents/refs/threejs-cannon-pitfalls.md +0 -412
  238. package/project-template-v2/.claude/agents/reviewer.md +0 -75
  239. package/project-template-v2/.claude/agents/technical-artist.md +0 -86
  240. package/project-template-v2/.claude/hooks/snapshot-milestone.mjs +0 -243
  241. package/project-template-v2/.claude/hooks/user-prompt.mjs +0 -133
  242. package/project-template-v2/.claude/settings.json +0 -33
  243. package/project-template-v2/.claude/skills/brainstorming/SKILL.md +0 -161
  244. package/project-template-v2/.claude/skills/brainstorming/scripts/frame-template.html +0 -270
  245. package/project-template-v2/.claude/skills/brainstorming/scripts/helper.js +0 -177
  246. package/project-template-v2/.claude/skills/brainstorming/scripts/server.cjs +0 -354
  247. package/project-template-v2/.claude/skills/brainstorming/scripts/start-server.sh +0 -148
  248. package/project-template-v2/.claude/skills/brainstorming/scripts/stop-server.sh +0 -56
  249. package/project-template-v2/.claude/skills/brainstorming/scripts/wait-for-selection.sh +0 -62
  250. package/project-template-v2/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  251. package/project-template-v2/.claude/skills/brainstorming/visual-companion.md +0 -309
  252. package/project-template-v2/.claude/skills/playcraft-ad-psychology/SKILL.md +0 -182
  253. package/project-template-v2/.claude/skills/playcraft-art-style-guide/SKILL.md +0 -123
  254. package/project-template-v2/.claude/skills/playcraft-asset-state-sheet/SKILL.md +0 -205
  255. package/project-template-v2/.claude/skills/playcraft-audio-generation/SKILL.md +0 -280
  256. package/project-template-v2/.claude/skills/playcraft-batch-pipeline/SKILL.md +0 -184
  257. package/project-template-v2/.claude/skills/playcraft-build-optimizer/SKILL.md +0 -306
  258. package/project-template-v2/.claude/skills/playcraft-image-generation/SKILL.md +0 -298
  259. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +0 -123
  260. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +0 -254
  261. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +0 -324
  262. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +0 -97
  263. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +0 -118
  264. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +0 -137
  265. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +0 -397
  266. package/project-template-v2/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +0 -296
  267. package/project-template-v2/.claude/skills/playcraft-image-ops/SKILL.md +0 -122
  268. package/project-template-v2/.claude/skills/playcraft-image-processing/SKILL.md +0 -219
  269. package/project-template-v2/.claude/skills/playcraft-masking/SKILL.md +0 -373
  270. package/project-template-v2/.claude/skills/playcraft-playable-optimization/SKILL.md +0 -161
  271. package/project-template-v2/.claude/skills/playcraft-research/SKILL.md +0 -215
  272. package/project-template-v2/.claude/skills/playcraft-skill-recommender/SKILL.md +0 -382
  273. package/project-template-v2/.claude/skills/playcraft-sprite-generation/SKILL.md +0 -423
  274. package/project-template-v2/.claude/skills/playcraft-sprite-remix/SKILL.md +0 -158
  275. package/project-template-v2/.claude/skills/playcraft-sprite-sheet/SKILL.md +0 -100
  276. package/project-template-v2/.claude/skills/playcraft-storyboard/SKILL.md +0 -167
  277. package/project-template-v2/.claude/skills/playcraft-style-qa/SKILL.md +0 -270
  278. package/project-template-v2/.claude/skills/playcraft-text-rendering/SKILL.md +0 -236
  279. package/project-template-v2/.claude/skills/playcraft-vfx-animation/SKILL.md +0 -130
  280. package/project-template-v2/.claude/skills/playwright-cli/SKILL.md +0 -390
  281. package/project-template-v2/.claude/skills/playwright-cli/references/element-attributes.md +0 -23
  282. package/project-template-v2/.claude/skills/playwright-cli/references/playwright-tests.md +0 -39
  283. package/project-template-v2/.claude/skills/playwright-cli/references/request-mocking.md +0 -87
  284. package/project-template-v2/.claude/skills/playwright-cli/references/running-code.md +0 -240
  285. package/project-template-v2/.claude/skills/playwright-cli/references/session-management.md +0 -226
  286. package/project-template-v2/.claude/skills/playwright-cli/references/spec-driven-testing.md +0 -308
  287. package/project-template-v2/.claude/skills/playwright-cli/references/storage-state.md +0 -275
  288. package/project-template-v2/.claude/skills/playwright-cli/references/test-generation.md +0 -134
  289. package/project-template-v2/.claude/skills/playwright-cli/references/tracing.md +0 -142
  290. package/project-template-v2/.claude/skills/playwright-cli/references/video-recording.md +0 -153
  291. package/project-template-v2/.claude/skills/session-analyzer/SKILL.md +0 -386
  292. package/project-template-v2/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +0 -182
  293. package/project-template-v2/.claude/skills/session-analyzer/scripts/find-turns.mjs +0 -72
  294. package/project-template-v2/.claude/skills/session-analyzer/scripts/heavy-output.mjs +0 -121
  295. package/project-template-v2/.claude/skills/session-analyzer/scripts/resolve-session.mjs +0 -102
  296. package/project-template-v2/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +0 -127
  297. package/project-template-v2/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +0 -106
  298. package/project-template-v2/.claude/skills/session-analyzer/scripts/time-gaps.mjs +0 -128
  299. package/project-template-v2/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +0 -67
  300. package/project-template-v2/.claude/snapshot.mjs +0 -263
  301. package/project-template-v2/.playcraft/skills.lock.json +0 -152
  302. package/project-template-v2/CLAUDE.md +0 -146
  303. package/project-template-v2/assets/audio/bgm/.gitkeep +0 -0
  304. package/project-template-v2/assets/audio/sfx/.gitkeep +0 -0
  305. package/project-template-v2/assets/bundles/.gitkeep +0 -0
  306. package/project-template-v2/assets/images/bg/.gitkeep +0 -0
  307. package/project-template-v2/assets/images/reference/.gitkeep +0 -0
  308. package/project-template-v2/assets/images/storyboard/.gitkeep +0 -0
  309. package/project-template-v2/assets/images/tiles/.gitkeep +0 -0
  310. package/project-template-v2/assets/images/ui/.gitkeep +0 -0
  311. package/project-template-v2/assets/images/vfx/.gitkeep +0 -0
  312. package/project-template-v2/assets/models/.gitkeep +0 -0
  313. package/project-template-v2/docs/harness/iteration-1/context-flow.md +0 -254
  314. package/project-template-v2/docs/harness/iteration-1/generate-flow.md +0 -91
  315. package/project-template-v2/docs/harness/iteration-1/ideate-flow.md +0 -214
  316. package/project-template-v2/docs/harness/iteration-1/optimize-flow.md +0 -75
  317. package/project-template-v2/docs/harness/iteration-1/wrapup-flow.md +0 -63
  318. package/project-template-v2/docs/harness/iteration-2/context-flow.md +0 -223
  319. package/project-template-v2/docs/harness/iteration-2/generate-flow.md +0 -129
  320. package/project-template-v2/docs/harness/iteration-2/ideate-flow.md +0 -267
  321. package/project-template-v2/docs/harness/iteration-2/optimize-flow.md +0 -164
  322. package/project-template-v2/docs/harness/iteration-2/wrapup-flow.md +0 -115
  323. package/project-template-v2/docs/harness/orchestrator-flow.md +0 -364
  324. package/project-template-v2/docs/project-state.json +0 -60
  325. package/project-template-v2/docs/project-state.md +0 -72
  326. package/project-template-v2/docs/standards/README.md +0 -225
  327. package/project-template-v2/docs/standards/agent-behavior-standards.md +0 -174
  328. package/project-template-v2/docs/standards/artifacts/design-brief.md +0 -19
  329. package/project-template-v2/docs/standards/artifacts/design.md +0 -22
  330. package/project-template-v2/docs/standards/artifacts/game-code.md +0 -41
  331. package/project-template-v2/docs/standards/artifacts/todo-list.md +0 -41
  332. package/project-template-v2/docs/standards/iter1-agent-behavior-standards.md +0 -343
  333. package/project-template-v2/game/index.ts +0 -18
  334. package/project-template-v2/globals.d.ts +0 -51
  335. package/project-template-v2/index.css +0 -34
  336. package/project-template-v2/index.html +0 -18
  337. package/project-template-v2/main.ts +0 -9
  338. package/project-template-v2/package.json +0 -46
  339. package/project-template-v2/skills/_shared/scripts/dispatch-clear.mjs +0 -31
  340. package/project-template-v2/skills/_shared/scripts/dispatch-set.mjs +0 -86
  341. package/project-template-v2/skills/_shared/scripts/dod-check.mjs +0 -153
  342. package/project-template-v2/skills/_shared/scripts/handoff-append.mjs +0 -70
  343. package/project-template-v2/skills/_shared/scripts/lib/validator-artifacts.mjs +0 -91
  344. package/project-template-v2/skills/_shared/scripts/pipeline/dod-config.mjs +0 -131
  345. package/project-template-v2/skills/_shared/scripts/pipeline/index.mjs +0 -80
  346. package/project-template-v2/skills/_shared/scripts/pipeline/iteration-1-core.mjs +0 -90
  347. package/project-template-v2/skills/_shared/scripts/pipeline/iteration-2-wrap.mjs +0 -93
  348. package/project-template-v2/skills/_shared/scripts/pipeline/iteration-3-visual.mjs +0 -23
  349. package/project-template-v2/skills/_shared/scripts/render-project-state.mjs +0 -230
  350. package/project-template-v2/skills/_shared/scripts/state-advance-stage.mjs +0 -58
  351. package/project-template-v2/skills/_shared/scripts/state-get.mjs +0 -339
  352. package/project-template-v2/skills/_shared/scripts/state-handoff.mjs +0 -39
  353. package/project-template-v2/skills/_shared/scripts/state-set.mjs +0 -94
  354. package/project-template-v2/skills/_shared/scripts/state-store.mjs +0 -783
  355. package/project-template-v2/skills/_shared/scripts/todo-add.mjs +0 -88
  356. package/project-template-v2/skills/_shared/scripts/todo-get.mjs +0 -130
  357. package/project-template-v2/skills/_shared/scripts/todo-remove.mjs +0 -33
  358. package/project-template-v2/skills/_shared/scripts/todo-set.mjs +0 -47
  359. package/project-template-v2/skills/_shared/scripts/verify-asset-code-sync.mjs +0 -268
  360. package/project-template-v2/skills/_shared/scripts/verify-env.mjs +0 -285
  361. package/project-template-v2/skills/_shared/scripts/verify-placeholders.mjs +0 -161
  362. package/project-template-v2/skills/playable-autoplay/SKILL.md +0 -176
  363. package/project-template-v2/skills/playable-autoplay/agents/openai.yaml +0 -4
  364. package/project-template-v2/skills/playable-debug/SKILL.md +0 -116
  365. package/project-template-v2/skills/playable-debug/agents/openai.yaml +0 -4
  366. package/project-template-v2/skills/playable-debug/references/debug-config.md +0 -40
  367. package/project-template-v2/skills/playable-record/SKILL.md +0 -140
  368. package/project-template-v2/skills/playable-record/scripts/lib/dev-server.mjs +0 -104
  369. package/project-template-v2/skills/playable-record/scripts/lib/record-audio-bridge.js +0 -141
  370. package/project-template-v2/skills/playable-record/scripts/record-playable.mjs +0 -425
  371. package/project-template-v2/skills/playable-record/scripts/verify-contract.mjs +0 -261
  372. package/project-template-v2/skills/playable-record/scripts/verify-firstwin.mjs +0 -398
  373. package/project-template-v2/skills/playable-record/scripts/verify-fusion.mjs +0 -322
  374. package/project-template-v2/skills/playable-record/scripts/verify-lifecycle.mjs +0 -105
  375. package/project-template-v2/skills/playable-record/scripts/verify-vlm-video.mjs +0 -230
  376. package/project-template-v2/skills/playable-validate/SKILL.md +0 -61
  377. package/project-template-v2/skills/playable-validate/validation-rules.md +0 -14
  378. package/project-template-v2/skills/playable-verify-ui/SKILL.md +0 -63
  379. package/project-template-v2/skills/playable-verify-ui/scripts/lib/__init__.py +0 -1
  380. package/project-template-v2/skills/playable-verify-ui/scripts/lib/config_expr.js +0 -218
  381. package/project-template-v2/skills/playable-verify-ui/scripts/lib/node_utils.js +0 -51
  382. package/project-template-v2/skills/playable-verify-ui/scripts/lib/profile_loader.py +0 -59
  383. package/project-template-v2/skills/playable-verify-ui/scripts/lib/report.py +0 -106
  384. package/project-template-v2/skills/playable-verify-ui/scripts/lib/runtime_contract.js +0 -116
  385. package/project-template-v2/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +0 -59
  386. package/project-template-v2/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +0 -64
  387. package/project-template-v2/skills/playable-verify-ui/scripts/verify_runtime_contract.js +0 -58
  388. package/project-template-v2/skills/playable-verify-ui/scripts/verify_text_overlap.py +0 -333
  389. package/project-template-v2/ta-workspace/scripts/.gitkeep +0 -0
  390. package/project-template-v2/tsconfig.json +0 -20
  391. package/project-template-v2/vite.config.ts +0 -27
  392. package/project-templates/batch-locks/phaser.yaml +0 -922
  393. package/project-templates/batch-locks/threejs.yaml +0 -978
  394. package/project-templates/empty/AGENTS.md +0 -41
  395. package/project-templates/empty/gitignore +0 -33
@@ -1,215 +0,0 @@
1
- ---
2
- name: playcraft-research
3
- description: PlayCraft 网络研究协议。当本地 Skill 库不足以覆盖需求时触发——包括遇到陌生玩法机制、不熟悉的美术风格、特定音频类型、算法实现参考、需要图片参考等场景。使用 playcraft tools research / fetch-url / search-image 命令(统一鉴权,无需配置额外 key)直接搜索网络,将研究成果融入活 DAG。
4
- triggers: 本地skill不够,没有现成skill,找不到参考,不了解这个风格,不熟悉这个玩法,陌生机制,需要调研,搜索参考,互联网搜索,研究,需要图片参考,找参考图,视觉参考
5
- ---
6
-
7
- # PlayCraft 网络研究协议
8
-
9
- ## 可用工具(统一鉴权,无需额外配置)
10
-
11
- 使用 PlayCraft CLI 提供的三个搜索工具:
12
-
13
- ```bash
14
- # 文本研究 — Gemini + Google Search grounding,返回综合答案 + 引用来源
15
- playcraft tools research --query "<问题>" [--focus <领域>] [--json]
16
-
17
- # 读取 URL — Gemini 理解指定页面内容,返回结构化摘要
18
- playcraft tools fetch-url --url "<URL>" [--query "<具体问题>"] [--json]
19
-
20
- # 图片搜索 — Unsplash / Pexels 高质量图库,返回可直接用于 --reference-image 的 URL
21
- playcraft tools search-image --query "<关键词(建议英文)>" [--source unsplash|pexels|auto] [--count 6] [--orientation landscape|portrait|square] [--json]
22
- ```
23
-
24
- `--focus` 参数(research 命令):`gameplay` | `visual` | `audio` | `code` | `compliance`
25
-
26
- ---
27
-
28
- ## 何时使用网络研究
29
-
30
- **先本地,再网络**。网络研究是本地 Skill 发现的补充,不是替代。
31
-
32
- | 场景 | 应做什么 |
33
- | ------------------------------------------- | ------------------------------------------------------------- |
34
- | `playcraft skills match` 完整匹配 | 直接用,无需研究 |
35
- | 部分匹配,缺少细节 | 用本地 Skill,补充网络研究缺失部分 |
36
- | 完全无匹配 | **触发 `research` 文本研究** |
37
- | 遇到陌生专业名词 | **触发 `research` 文本研究** |
38
- | 需要最新数据(2024+ 最佳实践) | **触发 `research` 文本研究** |
39
- | 需要视觉参考图(Phase 1 概念图 / 风格探索) | **触发 `search-image` 图片搜索** |
40
- | 生成后不满意,想用参考图引导风格 | **触发 `search-image` → 结果 URL 直接传 `--reference-image`** |
41
-
42
- ---
43
-
44
- ## 各角色研究标准流程
45
-
46
- ### Game Designer — 玩法机制调研
47
-
48
- ```bash
49
- # 理解陌生的玩法类型
50
- playcraft tools research \
51
- --query "match-3 mobile game level design best practices difficulty curve" \
52
- --focus gameplay --json
53
-
54
- # 了解可玩广告设计原则
55
- playcraft tools research \
56
- --query "playable ad game mechanics player retention 15 seconds hook" \
57
- --focus gameplay --json
58
-
59
- # 读取具体设计文章
60
- playcraft tools fetch-url \
61
- --url "https://www.gamedeveloper.com/design/..." \
62
- --query "what are the key level design parameters"
63
- ```
64
-
65
- ### Artist — 视觉/音频风格调研
66
-
67
- ```bash
68
- # 搜索艺术风格生成参数
69
- playcraft tools research \
70
- --query "pixel art 8-bit game sprite limited color palette generation prompt keywords" \
71
- --focus visual --json
72
-
73
- # 读取调色板数据库
74
- playcraft tools fetch-url \
75
- --url "https://lospec.com/palette-list/..." \
76
- --query "what are the exact hex colors and style characteristics"
77
-
78
- # 搜索音频风格
79
- playcraft tools research \
80
- --query "chiptune BGM game music BPM range instruments characteristics" \
81
- --focus audio --json
82
-
83
- # ── 图片搜索(新增)─────────────────────────────────────────────────────────
84
-
85
- # 搜索视觉参考图(用于 Phase 1 风格探索)
86
- playcraft tools search-image \
87
- --query "pixel art 8-bit forest game background" \
88
- --source pexels --orientation portrait --json
89
-
90
- # 搜索元素参考图(用于指导具体 asset 生成)
91
- playcraft tools search-image \
92
- --query "cute cartoon fruit character icon game UI" \
93
- --count 4 --json
94
-
95
- # 将搜索结果 URL 直接用作参考图(无需先下载)
96
- playcraft tools generate-image \
97
- --prompt "pixel art forest background, 8-bit style, limited color palette" \
98
- --reference-image "https://images.unsplash.com/photo-xxxxx" \
99
- --output assets/images/bg/background.png \
100
- --aspect-ratio 9:16
101
- ```
102
-
103
- > **关键提示**:`search-image` 返回的 `downloadUrl` 字段可直接传给 `--reference-image`,CLI 会自动下载,无需手动保存。`--json` 模式返回结构化列表,方便批量选用。
104
-
105
- ### Developer — 算法/技术实现调研
106
-
107
- ```bash
108
- # 搜索具体实现
109
- playcraft tools research \
110
- --query "A* pathfinding javascript tile map Phaser 3 implementation performance" \
111
- --focus code --json
112
-
113
- # 读取官方文档
114
- playcraft tools fetch-url \
115
- --url "https://phaser.io/docs/3.60.0/Phaser.Physics.html" \
116
- --query "how does StaticGroup work with tilemap collision"
117
-
118
- # 搜索性能优化
119
- playcraft tools research \
120
- --query "Phaser 3 60fps mobile performance sprite batch rendering optimization" \
121
- --focus code --json
122
- ```
123
-
124
- ### Reviewer — 质量标准调研
125
-
126
- ```bash
127
- # 平台合规要求
128
- playcraft tools research \
129
- --query "Google Ads playable ad HTML5 policy requirements file size 2026" \
130
- --focus compliance --json
131
-
132
- # 读取最新政策文档
133
- playcraft tools fetch-url \
134
- --url "https://support.google.com/google-ads/answer/..." \
135
- --query "what are the technical requirements for playable ads"
136
-
137
- # 性能基准
138
- playcraft tools research \
139
- --query "web game 60fps performance budget mobile device HTML5 2025" \
140
- --focus compliance --json
141
- ```
142
-
143
- ---
144
-
145
- ## 研究结果融入活 DAG
146
-
147
- 研究结果**必须写入 `atom-tree.md`**,否则其他 Agent 无法从中受益。
148
-
149
- ### 写入格式
150
-
151
- ```markdown
152
- <!-- 写入 atom-tree.md 的 `Execution Context` 或 `Revision Notes` -->
153
-
154
- ### {{atom_id}} — {{slot_name}}
155
-
156
- - **本地 Skill**:无匹配(playcraft skills match 返回 0 结果)
157
- - **文本研究结论**(若执行了 research / fetch-url):
158
- - 命令:`playcraft tools research --query "..." --focus visual --json`
159
- - 核心发现:{{1-3 句话,具体且可操作}}
160
- - 关键参数:{{数值、关键词、具体配置}}
161
- - 引用来源:{{URL}}
162
- - **图片参考**(若执行了 search-image):
163
- - 命令:`playcraft tools search-image --query "..." --json`
164
- - 选用图片:{{description}} — {{downloadUrl}}
165
- - 使用方式:作为 `--reference-image` 传入生成命令
166
- - **实现/生成决策**:{{基于研究的具体方案}}
167
- - **候选新 Skill**:`{{建议名称}}.{{bundleType}}` — {{为什么值得沉淀}}
168
- ```
169
-
170
- ### 示例:Artist 研究波普艺术 + 搜图参考
171
-
172
- ```markdown
173
- ### bg_atom — 背景图层
174
-
175
- - 本地 Skill:无匹配
176
- - 文本研究结论:
177
- - 命令:`playcraft tools research --query "pop art game sprite color palette" --focus visual --json`
178
- - 核心发现:波普艺术使用 4-6 色高饱和调色板,粗黑轮廓线,网点图案填充
179
- - 关键参数:饱和度 >80%,互补色对比,轮廓线 3-5px
180
- - 引用来源:lospec.com/palette-list/pop-art
181
- - 图片参考:
182
- - 命令:`playcraft tools search-image --query "pop art colorful bold graphic background" --source unsplash --json`
183
- - 选用图片:Bold geometric pop art composition — https://images.unsplash.com/photo-xxxxx
184
- - 使用方式:`--reference-image "https://images.unsplash.com/photo-xxxxx"`
185
- - 生成决策:
186
- - prompt: "pop art style, bold black outlines, halftone dots, vivid colors, {{element}}"
187
- - style: "vibrant, graphic, flat colors, 1960s comic style"
188
- - reference: 上方 Unsplash URL(CLI 自动下载)
189
- - 候选新 Skill:`pop_art_sprite.aiimage`
190
- ```
191
-
192
- ---
193
-
194
- ## "候选新 Skill" 贡献循环
195
-
196
- 每次网络研究形成可复用方案,在 `atom-tree.md` 的 **Revision Notes** 标注:
197
-
198
- ```markdown
199
- ### Revision N — {{Agent}} (propose-skill)
200
-
201
- - **atomId**: {{atom_id}}
202
- - **reason**: 本地无 Skill,通过网络研究形成可复用方案
203
- - **change**: 建议创建:`{{skill_name}}.{{bundleType}}` — {{描述}},来源:{{URL}}
204
- ```
205
-
206
- ---
207
-
208
- ## 研究质量检查
209
-
210
- | 检查项 | 要求 |
211
- | -------------------------- | --------------------------------------------------------------------- |
212
- | **来源可信度** | 优先官方文档、行业权威;引用来源来自 `--json` 输出的 `citations` 字段 |
213
- | **信息时效** | 优先 2024-2026 年内容(在 query 中加年份可提高准确性) |
214
- | **可操作性** | 结论必须直接用于生成参数或代码,不能泛泛而谈 |
215
- | **与 StyleDirection 一致** | 视觉研究须与 design-brief 的 StyleDirection 对齐 |
@@ -1,382 +0,0 @@
1
- ---
2
- name: playcraft-skill-recommender
3
- description: 构建项目前的 Skill 推荐与脚手架工具。在开始任何新游戏项目前必须先调用,根据引擎(threejs/phaser)和意图关键词,自动推荐完整的代码 skill 集合(含引擎层/布局层/输入层/渲染层/动画层/玩法层)和媒体资产(背景图/BGM/SFX/UI 面板),并生成可直接执行的 scaffold 命令。
4
- triggers: 构建新游戏项目, 选择 skill, 查找可用组件, 3D项目搭建, Three.js项目, Phaser项目
5
- compatibility: agent,opencode
6
- ---
7
-
8
- # playcraft-skill-recommender
9
-
10
- ## 作用
11
-
12
- 解决 Agent 遗漏已有 skill 的根本问题:**在构建任何项目之前,先运行此命令,获取完整推荐清单,再动手写代码。**
13
-
14
- ---
15
-
16
- ## 按场景选择命令
17
-
18
- | 你的场景 | 推荐命令 | 说明 |
19
- | --------------------------- | -------------------- | --------------------------------------- |
20
- | 开始新项目,需要完整推荐 | `match` | 按引擎+意图输出依赖树+媒体候选 |
21
- | 探索库里有什么玩法/能力 | `gettags` → `filter` | 先看有哪些 tag,再按 tag 筛选 |
22
- | 知道需要什么类型的组件 | `filter` | 按 tags/keywords/category 精确查找 |
23
- | 想深入了解某个 skill | `read` | 输出完整 SKILL.md |
24
- | 了解 skill 包含哪些文件资产 | `inspect` | 文件清单 + 用途描述(含图集格式) |
25
- | 生成 Atom 引入中间文件 | `init-atom-tree` | 运行 match 并写入 `docs/atom-tree.json` |
26
- | 选择 atom | `select-atom` | 追加 `meta.selectedAtoms` 并补齐硬依赖 |
27
- | 将 skill 文件落地到项目 | `scaffold` | 复制 ref/ 文件到项目目录 |
28
- | 让 Agent/IDE 持续感知 skill | `link` | 在 .claude/skills/ 创建符号链接 |
29
-
30
- ---
31
-
32
- ## 命令详解
33
-
34
- ### 1. `match` — 推荐完整 skill 集合(新项目首选)
35
-
36
- ```bash
37
- # 自动推断引擎
38
- playcraft skills match --intent "<关键词,逗号分隔>" --json
39
-
40
- # 指定引擎
41
- playcraft skills match --engine <threejs|phaser> --intent "<关键词>" --json
42
- ```
43
-
44
- **适用时机**:你已经知道要做什么类型的游戏,需要一次性获取完整的技术栈推荐。
45
-
46
- **输出结构**:
47
-
48
- - 代码 skill(按层排序:引擎层 → 布局层 → 场景层 → 输入层 → 渲染层 → 动画层 → 玩法层 → UI层)
49
- - 媒体资产候选(按 bindingRole 分组:背景图、BGM、SFX、面板等,每组多个候选任选其一)
50
- - Scaffold 快捷命令(可直接复制执行)
51
-
52
- **示例**:
53
-
54
- ```bash
55
- # 三消游戏
56
- playcraft skills match --intent "match3,grid,tile,eliminate" --json
57
-
58
- # 麻将收集消除
59
- playcraft skills match --intent "mahjong,tile,match,stacking,puzzle" --json
60
-
61
- # Three.js 3D 棋盘
62
- playcraft skills match --engine threejs --intent "board,3d,path,animation" --json
63
- ```
64
-
65
- ---
66
-
67
- ### 2. `gettags` — 发现库里有哪些标签
68
-
69
- ```bash
70
- # 看 gameplay 类 skill 有哪些 tag
71
- playcraft skills gettags --category gameplay --json
72
-
73
- # 看所有 tag
74
- playcraft skills gettags --json
75
- ```
76
-
77
- **适用时机**:你不确定库里有什么,想先了解标签空间,再决定怎么筛选。
78
-
79
- **输出**:去重排序的 tag 列表。
80
-
81
- **典型用法**(启发阶段):
82
-
83
- ```bash
84
- # Step 1: 看 gameplay 下有什么玩法标签
85
- playcraft skills gettags --category gameplay --json
86
- # → ["billiards","casual","core","eliminate","grid","match3","physics","puzzle","stacking",...]
87
-
88
- # Step 2: 发现 "billiards" 标签,筛选相关 skill
89
- playcraft skills filter --category gameplay --tags billiards --json
90
- ```
91
-
92
- ---
93
-
94
- ### 3. `getkeywords` — 发现库里有哪些关键词
95
-
96
- ```bash
97
- playcraft skills getkeywords --category gameplay --json
98
- playcraft skills getkeywords --json
99
- ```
100
-
101
- **适用时机**:当 tag 维度找不到想要的内容时,keywords 覆盖同义词、中文词、行为动词等补充检索维度。
102
-
103
- ---
104
-
105
- ### 4. `filter` — 多维度精确筛选
106
-
107
- ```bash
108
- playcraft skills filter --tags "<tag1,tag2>" [--keywords "<kw1,kw2>"] [--category "<cat>"] [--role "<role>"] [--and] [--json]
109
- ```
110
-
111
- **参数说明**:
112
-
113
- | 参数 | 作用 | 默认行为 |
114
- | ------------ | ----------------------------------------------------------- | ------------------ |
115
- | `--tags` | 按 manifest.tags 匹配 | OR(命中任一即可) |
116
- | `--keywords` | 按 manifest.keywords 匹配 | OR |
117
- | `--category` | 按 manifest.category 过滤(逗号分隔多选) | OR |
118
- | `--role` | 按 manifest.bindingRoles 匹配(逗号分隔) | OR |
119
- | `--and` | 维度内改为 AND(必须同时命中所有) | 不加则 OR |
120
- | `--json` | 输出详细 JSON(含 label, tags, bindingRoles, gameplayType) | 无则文本格式 |
121
-
122
- **维度间关系**:跨维度始终是 AND — 即 `--tags match3 --category gameplay` 要求同时满足 tag 含 match3 且 category 是 gameplay。
123
-
124
- **`--json` 输出格式**:
125
-
126
- ```json
127
- [
128
- {
129
- "atomId": "match3_core.aigameplay",
130
- "category": "gameplay",
131
- "bundleType": "aigameplay",
132
- "mode": "fixed",
133
- "label": { "zh": "三消核心玩法", "en": "Match-3 core gameplay" },
134
- "tags": ["gameplay", "match3", "casual", "grid", "eliminate", "core"],
135
- "bindingRoles": ["gameplayRule"],
136
- "gameplayType": "match3"
137
- }
138
- ]
139
- ```
140
-
141
- **示例**:
142
-
143
- ```bash
144
- # 找所有 gameplay 类的 puzzle 相关 skill
145
- playcraft skills filter --category gameplay --tags puzzle --json
146
-
147
- # 找同时有 phaser 和 animation 标签的 skill
148
- playcraft skills filter --tags "phaser,animation" --and --json
149
-
150
- # 找 match3 相关的所有东西(跨 category)
151
- playcraft skills filter --tags match3 --json
152
-
153
- # 找含 "台球" 关键词的 skill(中文搜索)
154
- playcraft skills filter --keywords "台球" --json
155
-
156
- # 找所有 UI 组件
157
- playcraft skills filter --category ui --json
158
-
159
- # 按 role 查找:谁能扮演 "背景音乐" 角色
160
- playcraft skills filter --role bgMusic --json
161
-
162
- # 按 role 查找:谁能扮演 "贴图集" 角色
163
- playcraft skills filter --role tileTextureSet --json
164
-
165
- # 组合:找 gameplay 中声明了 gameplayRule 角色的 skill
166
- playcraft skills filter --category gameplay --role gameplayRule --json
167
- ```
168
-
169
- ---
170
-
171
- ### 4.1 理解 Role(bindingRole)
172
-
173
- **Role 是什么**:每个 skill 可以声明它能扮演的"语义角色"(`manifest.bindingRoles`)。Role 回答的是"这个 skill 在依赖图中能填什么槽位"。
174
-
175
- **典型场景**:`match` 推荐结果中的 `mediaGroups` 按 role 分组展示候选。当你想替换某个候选或查看同 role 下还有哪些选择时,用 `filter --role` 查询。
176
-
177
- **常见 role 举例**:
178
-
179
- | role | 含义 | 典型 provider |
180
- | ---------------------- | --------------- | ------------------------------------------------ |
181
- | `bgMusic` | 背景音乐 | `calm_piano`, `cheerful_ukulele`, `bg_music` |
182
- | `tileTextureSet` | 牌面/瓦片贴图集 | `candy_tile`, `fruit_tile`, `tile-sheets-normal` |
183
- | `backgroundTexture` | 场景背景图 | `forest`, `castle`, `game-backgrounds` |
184
- | `gameplayRule` | 玩法规则实现 | `match3_core`, `car_parking`, `eight_ball_pool` |
185
- | `successFeedbackPanel` | 胜利面板 | `win_result_panel` |
186
- | `failFeedbackPanel` | 失败面板 | `lose_result_panel` |
187
-
188
- **操作流程(role 替换)**:
189
-
190
- ```
191
- ① match --json → 看到 mediaGroups 中某个 role 的候选
192
- ② 对候选不满意 → filter --role <role> --json → 查看该 role 的所有 provider
193
- ③ read <想用的 atomId> → 确认适合
194
- ④ 通过 `select-atom` 将选中的 atomId 写入 atom-tree.json 的 `meta.selectedAtoms` shortlist
195
- ```
196
-
197
- ---
198
-
199
- ### 5. `read` — 深读某个 skill 的完整文档
200
-
201
- ```bash
202
- playcraft skills read "<atomId>"
203
- ```
204
-
205
- **适用时机**:已经确定要用某个 skill,需要了解其 API、配置项、集成方式。
206
-
207
- **示例**:
208
-
209
- ```bash
210
- playcraft skills read "match3_core.aigameplay"
211
- playcraft skills read "tile-slot-storage-phaser"
212
- playcraft skills read "countdown-ui-phaser"
213
- ```
214
-
215
- ---
216
-
217
- ### 5.1 `inspect` — 查看 skill 的文件资产清单
218
-
219
- ```bash
220
- playcraft skills inspect "<atomId>" # 人读格式
221
- playcraft skills inspect "<atomId>" --json # JSON 格式
222
- ```
223
-
224
- **适用时机**:`read` 之前想先快速确认这个 skill 包了什么文件、图片资产的格式和使用方式,而不必读完整个 SKILL.md。尤其对包含图集、spritesheet、多文件资产的 skill 有用。
225
-
226
- **输出两个区块**:
227
-
228
- - **Scaffold 文件**:`scaffold` 命令会复制的路径列表(dest → source → mode)
229
- - **Files 列表**:skill 内所有登记文件的路径 + 用途说明(含图集裁切方式、运行时使用注意等)
230
-
231
- **示例**:
232
-
233
- ```bash
234
- # 了解台球场景 skill 包含哪些图集和资产
235
- playcraft skills inspect billiards-shot-scene-phaser
236
-
237
- # 了解 Phaser 引擎骨架包含哪些文件
238
- playcraft skills inspect phaser.aicomponent --json
239
- ```
240
-
241
- ---
242
-
243
- ### 6. `scaffold` — 将 ref 文件复制到项目
244
-
245
- ```bash
246
- playcraft skills scaffold \
247
- --engine <threejs|phaser> \
248
- --atoms <atomId1,atomId2,...> \
249
- --out ./src \
250
- [--dry-run] [--force]
251
- ```
252
-
253
- **scaffold 语义**:scaffold 不是临时代码草稿。文件一旦落地,就成为当前项目 runtime 的实现基座。后续 developer 应优先 `adopt-scaffold` / `configure-scaffold` / `extend-scaffold`,只有在任务卡的 `scaffoldValue` 与实际代码不匹配时才 `use-as-reference` 或 `reject-for-slice`,并在 handoff 记录原因。不要一边保留 scaffold 文件,一边静默重写同一能力。
254
-
255
- **命令输出**:
256
-
257
- - `--dry-run` 与实际执行都会打印每个文件的 `source → dest`,例如 `ref/BoardLayout.ts → game/scenes/GameUI/BoardLayout.ts`。
258
- - 如果 atom 有硬依赖,会打印 `[import-link] [当前 atom] 依赖 atom -> skill 目录`,用于提醒后续还要读依赖 skill。
259
- - 实际执行会生成或更新 `docs/scaffold-manifest.md`,记录本次 scaffold 的 atom 与落地文件。
260
-
261
- **developer 摄入规则**:
262
-
263
- - 开始实现时,如果 `docs/scaffold-manifest.md` 存在或在 dispatch `requiredContext` 中,先读它,再读对应 `.claude/skills/<atomId>/SKILL.md`、关键 `ref/` 源码和已落地文件。
264
- - `docs/scaffold-manifest.md` 当前主要记录 atom 和目标文件;若需要确认来源文件、mode 或依赖,使用 context 阶段留下的任务卡 `sourceOfTruth`,或回看 `playcraft skills inspect <atomId>` / scaffold 输出。
265
- - scaffold 后继续编码前,必须重新读取落地文件。落地文件是当前项目现实,`ref/` 是来源真相,二者都不能被未读重写。
266
-
267
- ---
268
-
269
- ### 7. `init-atom-tree` / `select-atom` — 维护 Atom 引入中间文件
270
-
271
- ```bash
272
- # 先由推荐器运行 match,生成 docs/atom-tree.json 的 meta.skillsMatch 快照
273
- playcraft skills init-atom-tree --intent "<genre,core-action,feedback>" --engine <phaser|threejs>
274
-
275
- # 从 meta.skillsMatch.items 里选择要进入本项目的 atom,逗号分隔可批量
276
- playcraft skills select-atom --id "<atomId1,atomId2>"
277
-
278
- # 校验选择集合,然后把 selectedAtoms link 到 .claude/skills/
279
- playcraft skills validate-atom-tree-selection
280
- playcraft skills link --from-atom-tree --prune
281
-
282
- # 可选:生成人读指南 docs/atom-tree.md
283
- playcraft skills gen-atom-tree-md
284
- ```
285
-
286
- **适用时机**:context 阶段需要把 design 结果和 Skill 推荐固化成 Atom 引入链路时。atom-tree 是中间产物,用于完成 atom 的选择、link、模板初始化和 scaffold,不承载任务计划、执行日志或 handoff 状态。
287
-
288
- **输出结构**:
289
-
290
- - `docs/atom-tree.json`:Atom 引入中间文件,包含 `meta.engineDecision`、`meta.skillsMatch`、`meta.selectedAtoms`;应由本命令族维护,避免手写完整 JSON (JavaScript Object Notation, JavaScript 对象表示法)。
291
- - `docs/atom-tree.md`:可选人读 companion,由 `gen-atom-tree-md` 生成,只用于辅助阅读,不作为第二份真源。
292
-
293
- `meta.skillsMatch` 由 `init-atom-tree` 写入;`meta.selectedAtoms` 由 `select-atom` 写入,是 `link --from-atom-tree` 和 `remix init-template --from-atom-tree` 的输入。
294
-
295
- ---
296
-
297
- ### 8. `link` — 创建符号链接(IDE 感知)
298
-
299
- ```bash
300
- playcraft skills link --atoms <atomId1,atomId2,...> [--prune]
301
- playcraft skills link --from-atom-tree --prune
302
- ```
303
-
304
- **输出位置**:
305
-
306
- - 每个 selected atom 会链接到项目内 `.claude/skills/<atomId>/`。
307
- - 链接清单写入 `.claude/skills/.playcraft-dag-links.json`。
308
- - 下游 developer 应优先读取项目内 `.claude/skills/<atomId>/SKILL.md` 与 `.claude/skills/<atomId>/ref/...`;`playcraft skills read/inspect` 只作为链接缺失时的兜底。
309
-
310
- ---
311
-
312
- ## 推荐算法说明
313
-
314
- ### 代码 skill 匹配
315
-
316
- 打分规则(满足任意条件累加,阈值 >= 8 进入推荐):
317
-
318
- | 信号 | 分值 | 说明 |
319
- | ----------------------------- | ----- | ---------------------- |
320
- | `engineVariants[engine]` 存在 | +15 | 有该引擎的专属变体文件 |
321
- | `renderBackend` 包含该引擎 | +15 | 声明支持该引擎 |
322
- | `tags` 包含引擎名 | +8 | 标签匹配 |
323
- | 每个 intent 标签命中 `tags` | +3/个 | 意图相关 |
324
- | `imports` 中依赖该引擎 skill | +5 | 直接依赖链 |
325
-
326
- 依赖图遍历时,优先使用 `engineVariants[engine].imports`(引擎-aware),避免把其他引擎的依赖拉进来。
327
-
328
- ### 媒体资产匹配
329
-
330
- 媒体 skill(`.aiimage` / `.aiaudio` / `.aiconfig`)通过 `bindingRoles` 分组:
331
-
332
- - 有 `bindingRoles` 的 skill → 按 role 分组,同 role 多个 = 候选项(任选其一)
333
- - 无 `bindingRoles` 但有 `background` tag → 归入"背景图"候选组
334
- - 无 `bindingRoles` 但有 `bgm` tag → 归入"背景音乐"备选
335
-
336
- ---
337
-
338
- ## 工作流指南
339
-
340
- ### 流程 A:新项目(从零开始)
341
-
342
- ```
343
- ① match → ② inspect 各个 skill(了解包含哪些文件) → ③ read 各个 skill(深读 API) → ④ 在 todo 写 scaffoldValue / sourceOfTruth → ⑤ scaffold → ⑥ developer 读 scaffold-manifest 和落地文件后编码
344
- ```
345
-
346
- ### 流程 B:启发探索(不确定做什么)
347
-
348
- ```
349
- ① gettags --category gameplay → 了解有哪些玩法类型
350
- ② filter --category gameplay --tags <感兴趣的> --json → 看相关 skill 列表
351
- ③ read <某个 aigameplay skill> → 深入了解规则和变体
352
- ④ 决定方向后 → match --intent <确定的关键词> → 获取完整推荐
353
- ```
354
-
355
- ### 流程 C:中途查找(开发中需要某个能力)
356
-
357
- ```
358
- ① filter --tags <能力关键词> --json → 找到候选
359
- ② inspect <atomId> → 快速确认文件资产
360
- ③ read <atomId> → 确认 API 和用法
361
- ④ 判断 scaffoldValue 是否服务当前 slice → ⑤ scaffold/link → 落地 → ⑥ 读 scaffold-manifest 和落地文件后集成
362
- ```
363
-
364
- ---
365
-
366
- ## Skill 目录发现优先级
367
-
368
- 1. `--skills-dir <path>` 参数
369
- 2. `AGENT_SKILLS_PATHS` 环境变量(逗号分隔)
370
- 3. `<cwd>/node_modules/@playcraft/skills/playcraft-skills`(项目安装的 skills 包)
371
- 4. `<CLI包>/../../../skills/playcraft-skills`(monorepo 开发时自动发现)
372
-
373
- ---
374
-
375
- ## Agent 禁止事项
376
-
377
- - ❌ 未运行 `skills match` 就开始写引擎/布局/输入/渲染代码
378
- - ❌ 手动猜测 skill 名称(如只搜到 `phaser.aicomponent` 就开始,忽略 `grid_board_layout`)
379
- - ❌ 对已有 ref 文件重新实现相同功能
380
- - ❌ 使用 `filter` 找到 skill 后不 `read` 就直接引用(先了解 API 再使用)
381
- - ❌ scaffold 含图集/多帧资产的 skill 前不 `inspect`(会误解图集格式和裁切方式)
382
- - ❌ scaffold 后不读 `docs/scaffold-manifest.md` 和落地文件,直接另写一套同能力实现