@playcraft/cli 0.0.44 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atom-tree/build-skeleton.js +180 -0
- package/dist/atom-tree/fusion-hints.js +86 -0
- package/dist/atom-tree/selection.js +402 -0
- package/dist/commands/build-all.js +33 -5
- package/dist/commands/build.js +7 -1
- package/dist/commands/create.js +774 -50
- package/dist/commands/image.js +11 -0
- package/dist/commands/prad.js +61 -0
- package/dist/commands/remix.js +20 -0
- package/dist/commands/skills.js +961 -185
- package/dist/commands/tools-detect.js +56 -0
- package/dist/commands/tools-generation.js +21 -0
- package/dist/commands/tools-video-review.js +100 -0
- package/dist/commands/tools.js +4 -0
- package/dist/index.js +2 -0
- package/dist/prad/atom-ref.js +23 -0
- package/dist/prad/check.js +377 -0
- package/dist/prad/check.test.js +49 -0
- package/dist/prad/explain.js +109 -0
- package/dist/prad/load-spec.js +23 -0
- package/dist/prad/paths.js +83 -0
- package/dist/prad/skills-index.js +60 -0
- package/dist/remix/init-template.js +80 -0
- package/dist/scaffold/compose.js +211 -0
- package/engine-packs/phaser/game/adapters/phaser.ts +52 -0
- package/engine-packs/phaser/game/config/game-config.ts +46 -0
- package/engine-packs/phaser/game/contract/publish.ts +141 -0
- package/engine-packs/phaser/game/contract/types.ts +34 -0
- package/engine-packs/phaser/game/index.ts +81 -0
- package/engine-packs/phaser/game/runtime-contract.ts +28 -0
- package/engine-packs/phaser/manifest.json +1 -0
- package/engine-packs/phaser/package.deps.json +1 -0
- package/engine-packs/threejs/game/config/.gitkeep +0 -0
- package/engine-packs/threejs/game/config/game-config.ts +46 -0
- package/engine-packs/threejs/game/contract/publish.ts +141 -0
- package/engine-packs/threejs/game/contract/types.ts +34 -0
- package/engine-packs/threejs/game/gameplay/.gitkeep +0 -0
- package/engine-packs/threejs/game/index.ts +76 -0
- package/engine-packs/threejs/game/runtime-contract.ts +15 -0
- package/engine-packs/threejs/game/scenes/.gitkeep +0 -0
- package/engine-packs/threejs/manifest.json +1 -0
- package/engine-packs/threejs/package.deps.json +8 -0
- package/package.json +18 -4
- package/project-template/.claude/agents/artist.md +101 -0
- package/project-template/.claude/agents/developer.md +90 -93
- package/project-template/.claude/agents/game-designer.md +192 -0
- package/project-template/.claude/agents/refs/README.md +57 -51
- package/project-template/.claude/agents/refs/{designer-color-audio-recipes.md → artist-color-audio-recipes.md} +2 -2
- package/project-template/.claude/agents/refs/{designer-deliverable-spec.md → artist-deliverable-spec.md} +57 -57
- package/project-template/.claude/agents/refs/{designer-dimension-axis.md → artist-dimension-axis.md} +5 -5
- package/project-template/.claude/agents/refs/{designer-handoff-v2-checklist.md → artist-handoff-v2-checklist.md} +15 -15
- package/project-template/.claude/agents/refs/artist-legacy-fallback.md +14 -0
- package/project-template/.claude/agents/refs/{designer-master-composite-recipes.md → artist-master-composite-recipes.md} +3 -3
- package/project-template/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
- package/project-template/.claude/agents/refs/developer-dev-handoff.md +83 -40
- package/project-template/.claude/agents/refs/developer-impl-cookbook.md +365 -67
- package/project-template/.claude/agents/refs/developer-legacy-fallback.md +15 -0
- package/project-template/.claude/agents/refs/developer-phase1-flow.md +131 -85
- package/project-template/.claude/agents/refs/framework-5-component-filter.md +252 -0
- package/project-template/.claude/agents/refs/framework-game-feel-juice.md +266 -0
- package/project-template/.claude/agents/refs/framework-mda.md +147 -0
- package/project-template/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
- package/project-template/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
- package/project-template/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
- package/project-template/.claude/agents/refs/implementation-plan-guide.md +316 -0
- package/project-template/.claude/agents/refs/reviewer-convergence-eval.md +247 -33
- package/project-template/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
- package/project-template/.claude/agents/refs/skill-selector-guide.md +465 -0
- package/project-template/.claude/agents/refs/skill-value-layers.md +145 -0
- package/project-template/.claude/agents/refs/storyboard-generation-guide.md +110 -0
- package/project-template/.claude/agents/refs/ta-atlas-deliverable-standard.md +4 -4
- package/project-template/.claude/agents/refs/ta-pipeline-cookbook.md +101 -104
- package/project-template/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
- package/project-template/.claude/agents/reviewer.md +81 -95
- package/project-template/.claude/agents/technical-artist.md +71 -95
- package/project-template/.claude/hooks/README.md +83 -35
- package/project-template/.claude/hooks/asr-coverage-validate.mjs +19 -19
- package/project-template/.claude/hooks/block-developer-preflight.mjs +185 -0
- package/project-template/.claude/hooks/block-ring1-tasklist.mjs +95 -0
- package/project-template/.claude/hooks/gate-dispatcher.mjs +78 -0
- package/project-template/.claude/hooks/gate-runner.mjs +557 -0
- package/project-template/.claude/hooks/gate.mjs +170 -0
- package/project-template/.claude/hooks/snapshot-milestone.mjs +246 -0
- package/project-template/.claude/hooks/user-prompt.mjs +193 -0
- package/project-template/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
- package/project-template/.claude/hooks/validate-workflow-stop.mjs +1535 -95
- package/project-template/.claude/settings.json +54 -9
- package/project-template/.claude/skills/brainstorming/SKILL.md +161 -0
- package/project-template/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
- package/project-template/.claude/skills/brainstorming/scripts/helper.js +177 -0
- package/project-template/.claude/skills/brainstorming/scripts/server.cjs +354 -0
- package/project-template/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
- package/project-template/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/project-template/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
- package/project-template/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/project-template/.claude/skills/brainstorming/visual-companion.md +309 -0
- package/project-template/.claude/skills/playcraft-ad-psychology/SKILL.md +3 -3
- package/project-template/.claude/skills/playcraft-art-style-guide/SKILL.md +3 -3
- package/project-template/.claude/skills/playcraft-asset-state-sheet/SKILL.md +35 -25
- package/project-template/.claude/skills/playcraft-audio-generation/SKILL.md +15 -15
- package/project-template/.claude/skills/playcraft-build-optimizer/SKILL.md +5 -5
- package/project-template/.claude/skills/playcraft-image-generation/SKILL.md +5 -5
- package/project-template/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +5 -5
- package/project-template/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +116 -27
- package/project-template/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +1 -1
- package/project-template/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
- package/project-template/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
- package/project-template/.claude/skills/playcraft-research/SKILL.md +24 -21
- package/project-template/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
- package/project-template/.claude/skills/playcraft-sprite-generation/SKILL.md +48 -48
- package/project-template/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
- package/project-template/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
- package/project-template/.claude/skills/playcraft-storyboard/SKILL.md +4 -4
- package/project-template/.claude/skills/playcraft-style-qa/SKILL.md +45 -45
- package/project-template/.claude/skills/playcraft-text-rendering/SKILL.md +27 -27
- package/project-template/.claude/skills/session-analyzer/SKILL.md +386 -0
- package/project-template/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
- package/project-template/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
- package/project-template/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
- package/project-template/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
- package/project-template/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
- package/project-template/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
- package/project-template/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
- package/project-template/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
- package/project-template/.claude/snapshot.mjs +350 -0
- package/project-template/.codebuddy/settings.json +53 -0
- package/project-template/.cursor/hooks.json +1 -1
- package/project-template/.cursor/rules/playcraft-orchestrator.mdc +91 -86
- package/project-template/.cursor/rules/playcraft-subagent-boundary.mdc +16 -5
- package/project-template/CHANGELOG.md +105 -0
- package/project-template/CLAUDE.md +58 -254
- package/project-template/docs/DESIGN.md +65 -0
- package/project-template/docs/intent-clarifications.md +58 -0
- package/project-template/docs/pipeline-overview.md +69 -0
- package/project-template/docs/project-state.md +211 -0
- package/project-template/docs/team/agent-conduct.md +51 -105
- package/project-template/docs/team/agent-runtime-matrix.md +60 -74
- package/project-template/docs/team/atom-tree-format.md +169 -0
- package/project-template/docs/team/collaboration.md +319 -225
- package/project-template/docs/team/core-model.md +80 -46
- package/project-template/docs/team/game-designer-migration-todo.md +8 -0
- package/project-template/docs/team/harness-legacy-deprecation.md +23 -0
- package/project-template/docs/team/platform-capabilities.md +16 -13
- package/project-template/docs/team/workflow-changelog.md +95 -23
- package/project-template/docs/team/workflow-consistency-checklist.md +93 -45
- package/project-template/focus-lab/.gitkeep +0 -0
- package/project-template/game/.playcraft-scaffold-pending +0 -0
- package/project-template/game/index.ts +18 -0
- package/project-template/globals.d.ts +51 -0
- package/project-template/index.css +34 -0
- package/project-template/index.html +18 -0
- package/project-template/main.ts +9 -0
- package/project-template/package.json +79 -0
- package/project-template/skills/README.md +52 -0
- package/project-template/skills/_shared/agent-prep.md +136 -0
- package/project-template/skills/_shared/requirements.txt +1 -0
- package/project-template/skills/_shared/scripts/__pycache__/placeholder_audio_lib.cpython-311.pyc +0 -0
- package/project-template/skills/_shared/scripts/__pycache__/placeholder_lib.cpython-311.pyc +0 -0
- package/project-template/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
- package/project-template/skills/_shared/scripts/context-budget.mjs +215 -0
- package/project-template/skills/_shared/scripts/create-playable.mjs +140 -0
- package/project-template/skills/_shared/scripts/dev-start.mjs +151 -0
- package/project-template/skills/_shared/scripts/disclosure-config.mjs +480 -0
- package/project-template/skills/_shared/scripts/ensure-project.mjs +532 -0
- package/project-template/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
- package/project-template/skills/_shared/scripts/gen-placeholder.py +244 -0
- package/project-template/skills/_shared/scripts/harness-smoke.mjs +257 -0
- package/project-template/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
- package/project-template/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
- package/project-template/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
- package/project-template/skills/_shared/scripts/placeholder_lib.py +993 -0
- package/project-template/skills/_shared/scripts/render-project-state.mjs +278 -0
- package/project-template/skills/_shared/scripts/ring-config.mjs +252 -0
- package/project-template/skills/_shared/scripts/skills-check.mjs +176 -0
- package/project-template/skills/_shared/scripts/slice-set.mjs +77 -0
- package/project-template/skills/_shared/scripts/state-advance-ring.mjs +63 -0
- package/project-template/skills/_shared/scripts/state-get.mjs +215 -0
- package/project-template/skills/_shared/scripts/state-handoff.mjs +120 -0
- package/project-template/skills/_shared/scripts/state-set.mjs +113 -0
- package/project-template/skills/_shared/scripts/state-store.mjs +893 -0
- package/project-template/skills/_shared/scripts/sync-template-skills.mjs +112 -0
- package/project-template/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
- package/project-template/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
- package/project-template/skills/_shared/scripts/verify-env.mjs +285 -0
- package/project-template/skills/_shared/scripts/verify-placeholders.mjs +161 -0
- package/project-template/skills/_shared/scripts/workflow-doctor.mjs +348 -0
- package/project-template/skills/playable-animate/SKILL.md +52 -0
- package/project-template/skills/playable-animate/agents/openai.yaml +4 -0
- package/project-template/skills/playable-animate/references/board-refresh.md +30 -0
- package/project-template/skills/playable-animate/references/diagnosis-checklist.md +25 -0
- package/project-template/skills/playable-animate/references/entrance-sequencing.md +33 -0
- package/project-template/skills/playable-animate/references/interaction-timing.md +23 -0
- package/project-template/skills/playable-art/SKILL.md +203 -0
- package/project-template/skills/playable-art/agents/openai.yaml +4 -0
- package/project-template/skills/playable-art/references/alpha-postprocess.md +46 -0
- package/project-template/skills/playable-art/references/cta-art-spec.md +59 -0
- package/project-template/skills/playable-art/references/layout-proportions.md +30 -0
- package/project-template/skills/playable-art/references/prompt-patterns.md +83 -0
- package/project-template/skills/playable-art/references/reference-comparison.md +30 -0
- package/project-template/skills/playable-art/references/sheet-import-v2.md +91 -0
- package/project-template/skills/playable-art/scripts/__pycache__/import-gpt-art-sheets-v2.cpython-311.pyc +0 -0
- package/project-template/skills/playable-art/scripts/__pycache__/import_gpt_art_pipeline.cpython-311.pyc +0 -0
- package/project-template/skills/playable-art/scripts/__pycache__/review-processed-assets.cpython-311.pyc +0 -0
- package/project-template/skills/playable-art/scripts/build-atlas.py +332 -0
- package/project-template/skills/playable-art/scripts/chroma-key.py +50 -0
- package/project-template/skills/playable-art/scripts/extract-alpha-split.py +65 -0
- package/project-template/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
- package/project-template/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
- package/project-template/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
- package/project-template/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
- package/project-template/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
- package/project-template/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
- package/project-template/skills/playable-art/scripts/placeholder_common.py +98 -0
- package/project-template/skills/playable-art/scripts/remove-bg.py +91 -0
- package/project-template/skills/playable-art/scripts/review-processed-assets.py +468 -0
- package/project-template/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
- package/project-template/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
- package/project-template/skills/playable-debug/SKILL.md +116 -0
- package/project-template/skills/playable-debug/agents/openai.yaml +4 -0
- package/project-template/skills/playable-debug/references/debug-config.md +40 -0
- package/project-template/skills/playable-focus/SKILL.md +148 -0
- package/project-template/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
- package/project-template/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
- package/project-template/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
- package/project-template/skills/playable-focus/scripts/playground.mjs +390 -0
- package/project-template/skills/playable-focus/templates/focus-lab/frame.html +39 -0
- package/project-template/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
- package/project-template/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
- package/project-template/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
- package/project-template/skills/playable-focus/templates/focus-lab/model.html +16 -0
- package/project-template/skills/playable-focus/templates/focus-lab/particle.html +38 -0
- package/project-template/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
- package/project-template/skills/playable-focus/templates/playground/registry.template.json +55 -0
- package/project-template/skills/playable-focus/templates/playground/vfx-catalog.template.json +280 -0
- package/project-template/skills/playable-fx-decompose/SKILL.md +212 -0
- package/project-template/skills/playable-fx-decompose/examples.md +89 -0
- package/project-template/skills/playable-fx-decompose/reference.md +201 -0
- package/project-template/skills/playable-fx-decompose/requirements.txt +2 -0
- package/project-template/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
- package/project-template/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
- package/project-template/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
- package/project-template/skills/playable-fx-peak/SKILL.md +237 -0
- package/project-template/skills/playable-fx-peak/requirements.txt +2 -0
- package/project-template/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
- package/project-template/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
- package/project-template/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
- package/project-template/skills/playable-placeholder/SKILL.md +239 -0
- package/project-template/skills/playable-record/SKILL.md +166 -0
- package/project-template/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
- package/project-template/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
- package/project-template/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
- package/project-template/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
- package/project-template/skills/playable-record/scripts/record-playable.mjs +583 -0
- package/project-template/skills/playable-record/scripts/verify-build.mjs +185 -0
- package/project-template/skills/playable-record/scripts/verify-contract.mjs +261 -0
- package/project-template/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
- package/project-template/skills/playable-record/scripts/verify-fusion.mjs +320 -0
- package/project-template/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
- package/project-template/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
- package/project-template/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
- package/project-template/skills/playable-record/scripts/verify-slice.mjs +142 -0
- package/project-template/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
- package/project-template/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
- package/project-template/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
- package/project-template/skills/playable-validate/SKILL.md +260 -0
- package/project-template/skills/playable-validate/references/checklist-detail.md +36 -0
- package/project-template/skills/playable-validate/references/single-html-bundle.md +76 -0
- package/project-template/skills/playable-validate/validation-rules.md +200 -0
- package/project-template/skills/playable-verify-ui/SKILL.md +295 -0
- package/project-template/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
- package/project-template/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
- package/project-template/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
- package/project-template/skills/playable-verify-ui/reference.md +165 -0
- package/project-template/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
- package/project-template/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
- package/project-template/skills/playable-verify-ui/requirements.txt +7 -0
- package/project-template/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
- package/project-template/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
- package/project-template/skills/playable-verify-ui/scripts/__pycache__/asset_manifest.cpython-311.pyc +0 -0
- package/project-template/skills/playable-verify-ui/scripts/__pycache__/verify_slice_plan.cpython-311.pyc +0 -0
- package/project-template/skills/playable-verify-ui/scripts/__pycache__/verify_vision_evidence.cpython-311.pyc +0 -0
- package/project-template/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/report.py +106 -0
- package/project-template/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
- package/project-template/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
- package/project-template/skills/playable-verify-ui/scripts/run_all.py +265 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
- package/project-template/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
- package/project-template/templates/{designer-log.template.md → artist-log.template.md} +26 -31
- package/project-template/templates/atom-tree.template.json +133 -0
- package/project-template/templates/design-brief.template.md +59 -162
- package/project-template/templates/design-lens-checklist.reference.md +14 -14
- package/project-template/templates/design-methodology.md +25 -25
- package/project-template/templates/design.template.md +50 -0
- package/project-template/templates/developer-log.template.md +187 -63
- package/project-template/templates/five-axis-framework.md +89 -44
- package/project-template/templates/gen-placeholder-audio.template.mjs +63 -0
- package/project-template/templates/gen-placeholders.template.mjs +81 -0
- package/project-template/templates/intent-clarifications.template.md +7 -7
- package/project-template/templates/layout-spec.template.md +32 -20
- package/project-template/templates/plan.template.md +80 -0
- package/project-template/templates/project-state.template.md +90 -191
- package/project-template/templates/review-report.template.md +208 -24
- package/project-template/templates/style-exploration.template.md +8 -8
- package/project-template/templates/ta-log.template.md +58 -35
- package/project-template/tsconfig.json +20 -0
- package/project-template/vite.config.ts +27 -0
- package/project-templates/phaser/.claude/agents/artist.md +101 -0
- package/project-templates/phaser/.claude/agents/developer.md +123 -0
- package/project-templates/phaser/.claude/agents/game-designer.md +192 -0
- package/project-templates/phaser/.claude/agents/refs/README.md +77 -0
- package/project-templates/phaser/.claude/agents/refs/artist-art-style-catalog.md +533 -0
- package/project-templates/phaser/.claude/agents/refs/artist-color-audio-recipes.md +153 -0
- package/project-templates/phaser/.claude/agents/refs/artist-deliverable-spec.md +230 -0
- package/project-templates/phaser/.claude/agents/refs/artist-dimension-axis.md +27 -0
- package/project-templates/phaser/.claude/agents/refs/artist-handoff-v2-checklist.md +76 -0
- package/project-templates/phaser/.claude/agents/refs/artist-legacy-fallback.md +14 -0
- package/project-templates/phaser/.claude/agents/refs/artist-master-composite-recipes.md +208 -0
- package/project-templates/phaser/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
- package/project-templates/phaser/.claude/agents/refs/developer-dev-handoff.md +152 -0
- package/project-templates/phaser/.claude/agents/refs/developer-impl-cookbook.md +432 -0
- package/project-templates/phaser/.claude/agents/refs/developer-legacy-fallback.md +15 -0
- package/project-templates/phaser/.claude/agents/refs/developer-phase1-flow.md +404 -0
- package/project-templates/phaser/.claude/agents/refs/framework-5-component-filter.md +252 -0
- package/project-templates/phaser/.claude/agents/refs/framework-game-feel-juice.md +266 -0
- package/project-templates/phaser/.claude/agents/refs/framework-mda.md +147 -0
- package/project-templates/phaser/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
- package/project-templates/phaser/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
- package/project-templates/phaser/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
- package/project-templates/phaser/.claude/agents/refs/implementation-plan-guide.md +309 -0
- package/project-templates/phaser/.claude/agents/refs/reviewer-convergence-eval.md +350 -0
- package/project-templates/phaser/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
- package/project-templates/phaser/.claude/agents/refs/reviewer-six-dimension-eval.md +6 -0
- package/project-templates/phaser/.claude/agents/refs/skill-selector-guide.md +465 -0
- package/project-templates/phaser/.claude/agents/refs/skill-value-layers.md +145 -0
- package/project-templates/phaser/.claude/agents/refs/storyboard-generation-guide.md +110 -0
- package/project-templates/phaser/.claude/agents/refs/ta-3d-flip-recipe.md +88 -0
- package/project-templates/phaser/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
- package/project-templates/phaser/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
- package/project-templates/phaser/.claude/agents/refs/ta-image-generation-detail.md +300 -0
- package/project-templates/phaser/.claude/agents/refs/ta-image-ops-reference.md +495 -0
- package/project-templates/phaser/.claude/agents/refs/ta-pipeline-cookbook.md +1141 -0
- package/project-templates/phaser/.claude/agents/refs/ta-tools-reference.md +111 -0
- package/project-templates/phaser/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
- package/project-templates/phaser/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
- package/project-templates/phaser/.claude/agents/reviewer.md +116 -0
- package/project-templates/phaser/.claude/agents/technical-artist.md +100 -0
- package/project-templates/phaser/.claude/hooks/README.md +120 -0
- package/project-templates/phaser/.claude/hooks/asr-coverage-validate.mjs +381 -0
- package/project-templates/phaser/.claude/hooks/block-developer-preflight.mjs +185 -0
- package/project-templates/phaser/.claude/hooks/block-ring1-tasklist.mjs +95 -0
- package/project-templates/phaser/.claude/hooks/gate-dispatcher.mjs +78 -0
- package/project-templates/phaser/.claude/hooks/gate-runner.mjs +557 -0
- package/project-templates/phaser/.claude/hooks/gate.mjs +171 -0
- package/project-templates/phaser/.claude/hooks/snapshot-milestone.mjs +247 -0
- package/project-templates/phaser/.claude/hooks/user-prompt.mjs +194 -0
- package/project-templates/phaser/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
- package/project-templates/phaser/.claude/hooks/validate-workflow-stop.mjs +1889 -0
- package/project-templates/phaser/.claude/settings.json +81 -0
- package/project-templates/phaser/.claude/skills/brainstorming/SKILL.md +161 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/helper.js +177 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/server.cjs +354 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/project-templates/phaser/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
- package/project-templates/phaser/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/project-templates/phaser/.claude/skills/brainstorming/visual-companion.md +309 -0
- package/project-templates/phaser/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
- package/project-templates/phaser/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
- package/project-templates/phaser/.claude/skills/playcraft-asset-state-sheet/SKILL.md +205 -0
- package/project-templates/phaser/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
- package/project-templates/phaser/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
- package/project-templates/phaser/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/SKILL.md +298 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +324 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
- package/project-templates/phaser/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
- package/project-templates/phaser/.claude/skills/playcraft-masking/SKILL.md +373 -0
- package/project-templates/phaser/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
- package/project-templates/phaser/.claude/skills/playcraft-research/SKILL.md +215 -0
- package/project-templates/phaser/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
- package/project-templates/phaser/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
- package/project-templates/phaser/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
- package/project-templates/phaser/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
- package/project-templates/phaser/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
- package/project-templates/phaser/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
- package/project-templates/phaser/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
- package/project-templates/phaser/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/spec-driven-testing.md +308 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/test-generation.md +134 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-templates/phaser/.claude/skills/playwright-cli/references/video-recording.md +153 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/SKILL.md +386 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
- package/project-templates/phaser/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
- package/project-templates/phaser/.claude/snapshot.mjs +257 -0
- package/project-templates/phaser/.cursor/hooks.json +17 -0
- package/project-templates/phaser/.cursor/rules/playcraft-orchestrator.mdc +142 -0
- package/project-templates/phaser/.cursor/rules/playcraft-subagent-boundary.mdc +29 -0
- package/project-templates/phaser/.playcraft-engine +1 -0
- package/project-templates/phaser/CHANGELOG.md +105 -0
- package/project-templates/phaser/CLAUDE.md +84 -0
- package/project-templates/phaser/assets/audio/bgm/.gitkeep +0 -0
- package/project-templates/phaser/assets/audio/sfx/.gitkeep +0 -0
- package/project-templates/phaser/assets/bundles/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/bg/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/reference/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/storyboard/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/tiles/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/ui/.gitkeep +0 -0
- package/project-templates/phaser/assets/images/vfx/.gitkeep +0 -0
- package/project-templates/phaser/assets/models/.gitkeep +0 -0
- package/project-templates/phaser/docs/DESIGN.md +65 -0
- package/project-templates/phaser/docs/intent-clarifications.md +58 -0
- package/project-templates/phaser/docs/pipeline-overview.md +69 -0
- package/project-templates/phaser/docs/project-state.md +211 -0
- package/project-templates/phaser/docs/scaffold-manifest.md +10 -0
- package/project-templates/phaser/docs/team/agent-conduct.md +67 -0
- package/project-templates/phaser/docs/team/agent-runtime-matrix.md +80 -0
- package/project-templates/phaser/docs/team/atom-tree-format.md +114 -0
- package/project-templates/phaser/docs/team/collaboration.md +391 -0
- package/project-templates/phaser/docs/team/core-model.md +85 -0
- package/project-templates/phaser/docs/team/game-designer-migration-todo.md +8 -0
- package/project-templates/phaser/docs/team/harness-legacy-deprecation.md +23 -0
- package/project-templates/phaser/docs/team/platform-capabilities.md +18 -0
- package/project-templates/phaser/docs/team/workflow-changelog.md +137 -0
- package/project-templates/phaser/docs/team/workflow-consistency-checklist.md +240 -0
- package/project-templates/phaser/focus-lab/.gitkeep +0 -0
- package/project-templates/phaser/game/adapters/phaser.ts +52 -0
- package/project-templates/phaser/game/config/.gitkeep +0 -0
- package/project-templates/phaser/game/config/game-config.ts +46 -0
- package/project-templates/phaser/game/contract/publish.ts +141 -0
- package/project-templates/phaser/game/contract/types.ts +34 -0
- package/project-templates/phaser/game/gameplay/.gitkeep +0 -0
- package/project-templates/phaser/game/index.ts +81 -0
- package/project-templates/phaser/game/runtime-contract.ts +28 -0
- package/project-templates/phaser/game/scenes/.gitkeep +0 -0
- package/project-templates/phaser/globals.d.ts +51 -0
- package/project-templates/phaser/index.css +34 -0
- package/project-templates/phaser/index.html +18 -0
- package/project-templates/phaser/main.ts +9 -0
- package/project-templates/phaser/package.json +79 -0
- package/project-templates/phaser/skills/README.md +52 -0
- package/project-templates/phaser/skills/_shared/agent-prep.md +136 -0
- package/project-templates/phaser/skills/_shared/requirements.txt +1 -0
- package/project-templates/phaser/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
- package/project-templates/phaser/skills/_shared/scripts/context-budget.mjs +215 -0
- package/project-templates/phaser/skills/_shared/scripts/create-playable.mjs +140 -0
- package/project-templates/phaser/skills/_shared/scripts/dev-start.mjs +151 -0
- package/project-templates/phaser/skills/_shared/scripts/disclosure-config.mjs +480 -0
- package/project-templates/phaser/skills/_shared/scripts/ensure-project.mjs +532 -0
- package/project-templates/phaser/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
- package/project-templates/phaser/skills/_shared/scripts/gen-placeholder.py +244 -0
- package/project-templates/phaser/skills/_shared/scripts/harness-smoke.mjs +257 -0
- package/project-templates/phaser/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
- package/project-templates/phaser/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
- package/project-templates/phaser/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
- package/project-templates/phaser/skills/_shared/scripts/placeholder_lib.py +993 -0
- package/project-templates/phaser/skills/_shared/scripts/render-project-state.mjs +278 -0
- package/project-templates/phaser/skills/_shared/scripts/ring-config.mjs +252 -0
- package/project-templates/phaser/skills/_shared/scripts/skills-check.mjs +176 -0
- package/project-templates/phaser/skills/_shared/scripts/slice-set.mjs +77 -0
- package/project-templates/phaser/skills/_shared/scripts/state-advance-ring.mjs +63 -0
- package/project-templates/phaser/skills/_shared/scripts/state-get.mjs +215 -0
- package/project-templates/phaser/skills/_shared/scripts/state-handoff.mjs +120 -0
- package/project-templates/phaser/skills/_shared/scripts/state-set.mjs +113 -0
- package/project-templates/phaser/skills/_shared/scripts/state-store.mjs +893 -0
- package/project-templates/phaser/skills/_shared/scripts/sync-template-skills.mjs +112 -0
- package/project-templates/phaser/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
- package/project-templates/phaser/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
- package/project-templates/phaser/skills/_shared/scripts/verify-env.mjs +285 -0
- package/project-templates/phaser/skills/_shared/scripts/verify-placeholders.mjs +161 -0
- package/project-templates/phaser/skills/_shared/scripts/workflow-doctor.mjs +348 -0
- package/project-templates/phaser/skills/playable-animate/SKILL.md +52 -0
- package/project-templates/phaser/skills/playable-animate/agents/openai.yaml +4 -0
- package/project-templates/phaser/skills/playable-animate/references/board-refresh.md +30 -0
- package/project-templates/phaser/skills/playable-animate/references/diagnosis-checklist.md +25 -0
- package/project-templates/phaser/skills/playable-animate/references/entrance-sequencing.md +33 -0
- package/project-templates/phaser/skills/playable-animate/references/interaction-timing.md +23 -0
- package/project-templates/phaser/skills/playable-art/SKILL.md +203 -0
- package/project-templates/phaser/skills/playable-art/agents/openai.yaml +4 -0
- package/project-templates/phaser/skills/playable-art/references/alpha-postprocess.md +46 -0
- package/project-templates/phaser/skills/playable-art/references/cta-art-spec.md +59 -0
- package/project-templates/phaser/skills/playable-art/references/layout-proportions.md +30 -0
- package/project-templates/phaser/skills/playable-art/references/prompt-patterns.md +83 -0
- package/project-templates/phaser/skills/playable-art/references/reference-comparison.md +30 -0
- package/project-templates/phaser/skills/playable-art/references/sheet-import-v2.md +91 -0
- package/project-templates/phaser/skills/playable-art/scripts/build-atlas.py +332 -0
- package/project-templates/phaser/skills/playable-art/scripts/chroma-key.py +50 -0
- package/project-templates/phaser/skills/playable-art/scripts/extract-alpha-split.py +65 -0
- package/project-templates/phaser/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
- package/project-templates/phaser/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
- package/project-templates/phaser/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
- package/project-templates/phaser/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
- package/project-templates/phaser/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
- package/project-templates/phaser/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
- package/project-templates/phaser/skills/playable-art/scripts/placeholder_common.py +98 -0
- package/project-templates/phaser/skills/playable-art/scripts/remove-bg.py +91 -0
- package/project-templates/phaser/skills/playable-art/scripts/review-processed-assets.py +468 -0
- package/project-templates/phaser/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
- package/project-templates/phaser/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
- package/project-templates/phaser/skills/playable-debug/SKILL.md +116 -0
- package/project-templates/phaser/skills/playable-debug/agents/openai.yaml +4 -0
- package/project-templates/phaser/skills/playable-debug/references/debug-config.md +40 -0
- package/project-templates/phaser/skills/playable-focus/SKILL.md +148 -0
- package/project-templates/phaser/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
- package/project-templates/phaser/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
- package/project-templates/phaser/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
- package/project-templates/phaser/skills/playable-focus/scripts/playground.mjs +390 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/frame.html +39 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/model.html +16 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/particle.html +38 -0
- package/project-templates/phaser/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
- package/project-templates/phaser/skills/playable-fx-decompose/SKILL.md +212 -0
- package/project-templates/phaser/skills/playable-fx-decompose/examples.md +89 -0
- package/project-templates/phaser/skills/playable-fx-decompose/reference.md +201 -0
- package/project-templates/phaser/skills/playable-fx-decompose/requirements.txt +2 -0
- package/project-templates/phaser/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
- package/project-templates/phaser/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
- package/project-templates/phaser/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
- package/project-templates/phaser/skills/playable-fx-peak/SKILL.md +237 -0
- package/project-templates/phaser/skills/playable-fx-peak/requirements.txt +2 -0
- package/project-templates/phaser/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
- package/project-templates/phaser/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
- package/project-templates/phaser/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
- package/project-templates/phaser/skills/playable-placeholder/SKILL.md +239 -0
- package/project-templates/phaser/skills/playable-record/SKILL.md +166 -0
- package/project-templates/phaser/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
- package/project-templates/phaser/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
- package/project-templates/phaser/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
- package/project-templates/phaser/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
- package/project-templates/phaser/skills/playable-record/scripts/record-playable.mjs +583 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-build.mjs +185 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-contract.mjs +261 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-fusion.mjs +320 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-slice.mjs +142 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
- package/project-templates/phaser/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
- package/project-templates/phaser/skills/playable-validate/SKILL.md +260 -0
- package/project-templates/phaser/skills/playable-validate/references/checklist-detail.md +36 -0
- package/project-templates/phaser/skills/playable-validate/references/single-html-bundle.md +76 -0
- package/project-templates/phaser/skills/playable-validate/validation-rules.md +200 -0
- package/project-templates/phaser/skills/playable-verify-ui/SKILL.md +295 -0
- package/project-templates/phaser/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
- package/project-templates/phaser/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
- package/project-templates/phaser/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
- package/project-templates/phaser/skills/playable-verify-ui/reference.md +165 -0
- package/project-templates/phaser/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
- package/project-templates/phaser/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
- package/project-templates/phaser/skills/playable-verify-ui/requirements.txt +7 -0
- package/project-templates/phaser/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
- package/project-templates/phaser/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/report.py +106 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/run_all.py +265 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
- package/project-templates/phaser/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
- package/project-templates/phaser/ta-workspace/scripts/.gitkeep +0 -0
- package/project-templates/phaser/templates/artist-log.template.md +182 -0
- package/project-templates/phaser/templates/atom-tree.template.json +133 -0
- package/project-templates/phaser/templates/design-brief.template.md +92 -0
- package/project-templates/phaser/templates/design-lens-checklist.reference.md +117 -0
- package/project-templates/phaser/templates/design-methodology.md +99 -0
- package/project-templates/phaser/templates/design.template.md +50 -0
- package/project-templates/phaser/templates/developer-log.template.md +258 -0
- package/project-templates/phaser/templates/five-axis-framework.md +194 -0
- package/project-templates/phaser/templates/gen-placeholder-audio.template.mjs +63 -0
- package/project-templates/phaser/templates/gen-placeholders.template.mjs +81 -0
- package/project-templates/phaser/templates/intent-clarifications.template.md +58 -0
- package/project-templates/phaser/templates/layout-spec.template.md +198 -0
- package/project-templates/phaser/templates/plan.template.md +80 -0
- package/project-templates/phaser/templates/project-state.template.md +136 -0
- package/project-templates/phaser/templates/review-report.template.md +275 -0
- package/project-templates/phaser/templates/style-exploration.template.md +93 -0
- package/project-templates/phaser/templates/ta-log.template.md +394 -0
- package/project-templates/phaser/tsconfig.json +20 -0
- package/project-templates/phaser/vite.config.ts +27 -0
- package/project-templates/threejs/.claude/agents/artist.md +101 -0
- package/project-templates/threejs/.claude/agents/developer.md +123 -0
- package/project-templates/threejs/.claude/agents/game-designer.md +192 -0
- package/project-templates/threejs/.claude/agents/refs/README.md +77 -0
- package/project-templates/threejs/.claude/agents/refs/artist-art-style-catalog.md +533 -0
- package/project-templates/threejs/.claude/agents/refs/artist-color-audio-recipes.md +153 -0
- package/project-templates/threejs/.claude/agents/refs/artist-deliverable-spec.md +230 -0
- package/project-templates/threejs/.claude/agents/refs/artist-dimension-axis.md +27 -0
- package/project-templates/threejs/.claude/agents/refs/artist-handoff-v2-checklist.md +76 -0
- package/project-templates/threejs/.claude/agents/refs/artist-legacy-fallback.md +14 -0
- package/project-templates/threejs/.claude/agents/refs/artist-master-composite-recipes.md +208 -0
- package/project-templates/threejs/.claude/agents/refs/artist-style-exploration-flow.md +55 -0
- package/project-templates/threejs/.claude/agents/refs/developer-dev-handoff.md +152 -0
- package/project-templates/threejs/.claude/agents/refs/developer-impl-cookbook.md +432 -0
- package/project-templates/threejs/.claude/agents/refs/developer-legacy-fallback.md +15 -0
- package/project-templates/threejs/.claude/agents/refs/developer-phase1-flow.md +404 -0
- package/project-templates/threejs/.claude/agents/refs/framework-5-component-filter.md +252 -0
- package/project-templates/threejs/.claude/agents/refs/framework-game-feel-juice.md +266 -0
- package/project-templates/threejs/.claude/agents/refs/framework-mda.md +147 -0
- package/project-templates/threejs/.claude/agents/refs/game-designer-gameplay-sufficiency.md +123 -0
- package/project-templates/threejs/.claude/agents/refs/game-designer-legacy-fallback.md +15 -0
- package/project-templates/threejs/.claude/agents/refs/game-designer-workflow-detail.md +69 -0
- package/project-templates/threejs/.claude/agents/refs/implementation-plan-guide.md +309 -0
- package/project-templates/threejs/.claude/agents/refs/reviewer-convergence-eval.md +350 -0
- package/project-templates/threejs/.claude/agents/refs/reviewer-legacy-fallback.md +14 -0
- package/project-templates/threejs/.claude/agents/refs/reviewer-six-dimension-eval.md +6 -0
- package/project-templates/threejs/.claude/agents/refs/skill-selector-guide.md +465 -0
- package/project-templates/threejs/.claude/agents/refs/skill-value-layers.md +145 -0
- package/project-templates/threejs/.claude/agents/refs/storyboard-generation-guide.md +110 -0
- package/project-templates/threejs/.claude/agents/refs/ta-3d-flip-recipe.md +88 -0
- package/project-templates/threejs/.claude/agents/refs/ta-atlas-deliverable-standard.md +67 -0
- package/project-templates/threejs/.claude/agents/refs/ta-batch-pipeline-recipes.md +120 -0
- package/project-templates/threejs/.claude/agents/refs/ta-image-generation-detail.md +300 -0
- package/project-templates/threejs/.claude/agents/refs/ta-image-ops-reference.md +495 -0
- package/project-templates/threejs/.claude/agents/refs/ta-pipeline-cookbook.md +1141 -0
- package/project-templates/threejs/.claude/agents/refs/ta-tools-reference.md +111 -0
- package/project-templates/threejs/.claude/agents/refs/ta-vfx-preset-catalog.md +365 -0
- package/project-templates/threejs/.claude/agents/refs/technical-artist-legacy-fallback.md +14 -0
- package/project-templates/threejs/.claude/agents/reviewer.md +116 -0
- package/project-templates/threejs/.claude/agents/technical-artist.md +100 -0
- package/project-templates/threejs/.claude/hooks/README.md +120 -0
- package/project-templates/threejs/.claude/hooks/asr-coverage-validate.mjs +381 -0
- package/project-templates/threejs/.claude/hooks/block-developer-preflight.mjs +185 -0
- package/project-templates/threejs/.claude/hooks/block-ring1-tasklist.mjs +95 -0
- package/project-templates/threejs/.claude/hooks/gate-dispatcher.mjs +78 -0
- package/project-templates/threejs/.claude/hooks/gate-runner.mjs +557 -0
- package/project-templates/threejs/.claude/hooks/gate.mjs +171 -0
- package/project-templates/threejs/.claude/hooks/snapshot-milestone.mjs +247 -0
- package/project-templates/threejs/.claude/hooks/user-prompt.mjs +194 -0
- package/project-templates/threejs/.claude/hooks/validate-atom-tree-selection.mjs +281 -0
- package/project-templates/threejs/.claude/hooks/validate-workflow-stop.mjs +1889 -0
- package/project-templates/threejs/.claude/settings.json +81 -0
- package/project-templates/threejs/.claude/skills/brainstorming/SKILL.md +161 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/frame-template.html +270 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/helper.js +177 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/server.cjs +354 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/start-server.sh +148 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/project-templates/threejs/.claude/skills/brainstorming/scripts/wait-for-selection.sh +62 -0
- package/project-templates/threejs/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/project-templates/threejs/.claude/skills/brainstorming/visual-companion.md +309 -0
- package/project-templates/threejs/.claude/skills/playcraft-ad-psychology/SKILL.md +182 -0
- package/project-templates/threejs/.claude/skills/playcraft-art-style-guide/SKILL.md +123 -0
- package/project-templates/threejs/.claude/skills/playcraft-asset-state-sheet/SKILL.md +205 -0
- package/project-templates/threejs/.claude/skills/playcraft-audio-generation/SKILL.md +280 -0
- package/project-templates/threejs/.claude/skills/playcraft-batch-pipeline/SKILL.md +184 -0
- package/project-templates/threejs/.claude/skills/playcraft-build-optimizer/SKILL.md +306 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/SKILL.md +298 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/build-sprite-sheet.template.mjs +123 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/compare-style.template.mjs +254 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch-sprite.template.mjs +324 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-batch.template.mjs +97 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/gen-edit-variants.template.mjs +118 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/process-batch.template.mjs +137 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/prompt-cookbook.md +397 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-generation/reference/validate-sprite-sheet.template.mjs +296 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-ops/SKILL.md +122 -0
- package/project-templates/threejs/.claude/skills/playcraft-image-processing/SKILL.md +219 -0
- package/project-templates/threejs/.claude/skills/playcraft-masking/SKILL.md +373 -0
- package/project-templates/threejs/.claude/skills/playcraft-playable-optimization/SKILL.md +161 -0
- package/project-templates/threejs/.claude/skills/playcraft-research/SKILL.md +215 -0
- package/project-templates/threejs/.claude/skills/playcraft-skill-recommender/SKILL.md +331 -0
- package/project-templates/threejs/.claude/skills/playcraft-sprite-generation/SKILL.md +423 -0
- package/project-templates/threejs/.claude/skills/playcraft-sprite-remix/SKILL.md +158 -0
- package/project-templates/threejs/.claude/skills/playcraft-sprite-sheet/SKILL.md +100 -0
- package/project-templates/threejs/.claude/skills/playcraft-storyboard/SKILL.md +167 -0
- package/project-templates/threejs/.claude/skills/playcraft-style-qa/SKILL.md +270 -0
- package/project-templates/threejs/.claude/skills/playcraft-text-rendering/SKILL.md +236 -0
- package/project-templates/threejs/.claude/skills/playcraft-vfx-animation/SKILL.md +130 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/SKILL.md +390 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/running-code.md +240 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/session-management.md +226 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/spec-driven-testing.md +308 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/test-generation.md +134 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/tracing.md +142 -0
- package/project-templates/threejs/.claude/skills/playwright-cli/references/video-recording.md +153 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/SKILL.md +386 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/execution-breakdown.mjs +182 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/find-turns.mjs +72 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/heavy-output.mjs +121 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/resolve-session.mjs +103 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/subagent-stats.mjs +127 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/subagent-tool-timeline.mjs +106 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/time-gaps.mjs +128 -0
- package/project-templates/threejs/.claude/skills/session-analyzer/scripts/turn-timeline.mjs +67 -0
- package/project-templates/threejs/.claude/snapshot.mjs +257 -0
- package/project-templates/threejs/.cursor/hooks.json +17 -0
- package/project-templates/threejs/.cursor/rules/playcraft-orchestrator.mdc +142 -0
- package/project-templates/threejs/.cursor/rules/playcraft-subagent-boundary.mdc +29 -0
- package/project-templates/threejs/.playcraft-engine +1 -0
- package/project-templates/threejs/CHANGELOG.md +105 -0
- package/project-templates/threejs/CLAUDE.md +84 -0
- package/project-templates/threejs/assets/audio/bgm/.gitkeep +0 -0
- package/project-templates/threejs/assets/audio/sfx/.gitkeep +0 -0
- package/project-templates/threejs/assets/bundles/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/bg/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/reference/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/storyboard/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/tiles/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/ui/.gitkeep +0 -0
- package/project-templates/threejs/assets/images/vfx/.gitkeep +0 -0
- package/project-templates/threejs/assets/models/.gitkeep +0 -0
- package/project-templates/threejs/docs/DESIGN.md +65 -0
- package/project-templates/threejs/docs/intent-clarifications.md +58 -0
- package/project-templates/threejs/docs/pipeline-overview.md +69 -0
- package/project-templates/threejs/docs/project-state.md +211 -0
- package/project-templates/threejs/docs/scaffold-manifest.md +10 -0
- package/project-templates/threejs/docs/team/agent-conduct.md +67 -0
- package/project-templates/threejs/docs/team/agent-runtime-matrix.md +80 -0
- package/project-templates/threejs/docs/team/atom-tree-format.md +114 -0
- package/project-templates/threejs/docs/team/collaboration.md +391 -0
- package/project-templates/threejs/docs/team/core-model.md +85 -0
- package/project-templates/threejs/docs/team/game-designer-migration-todo.md +8 -0
- package/project-templates/threejs/docs/team/harness-legacy-deprecation.md +23 -0
- package/project-templates/threejs/docs/team/platform-capabilities.md +18 -0
- package/project-templates/threejs/docs/team/workflow-changelog.md +137 -0
- package/project-templates/threejs/docs/team/workflow-consistency-checklist.md +240 -0
- package/project-templates/threejs/focus-lab/.gitkeep +0 -0
- package/project-templates/threejs/game/config/.gitkeep +0 -0
- package/project-templates/threejs/game/config/game-config.ts +46 -0
- package/project-templates/threejs/game/contract/publish.ts +141 -0
- package/project-templates/threejs/game/contract/types.ts +34 -0
- package/project-templates/threejs/game/gameplay/.gitkeep +0 -0
- package/project-templates/threejs/game/index.ts +76 -0
- package/project-templates/threejs/game/runtime-contract.ts +15 -0
- package/project-templates/threejs/game/scenes/.gitkeep +0 -0
- package/project-templates/threejs/globals.d.ts +51 -0
- package/project-templates/threejs/index.css +34 -0
- package/project-templates/threejs/index.html +18 -0
- package/project-templates/threejs/main.ts +9 -0
- package/project-templates/threejs/package.json +79 -0
- package/project-templates/threejs/skills/README.md +52 -0
- package/project-templates/threejs/skills/_shared/agent-prep.md +136 -0
- package/project-templates/threejs/skills/_shared/requirements.txt +1 -0
- package/project-templates/threejs/skills/_shared/scripts/build-evidence-gate.mjs +87 -0
- package/project-templates/threejs/skills/_shared/scripts/context-budget.mjs +215 -0
- package/project-templates/threejs/skills/_shared/scripts/create-playable.mjs +140 -0
- package/project-templates/threejs/skills/_shared/scripts/dev-start.mjs +151 -0
- package/project-templates/threejs/skills/_shared/scripts/disclosure-config.mjs +480 -0
- package/project-templates/threejs/skills/_shared/scripts/ensure-project.mjs +532 -0
- package/project-templates/threejs/skills/_shared/scripts/gen-placeholder-audio.py +345 -0
- package/project-templates/threejs/skills/_shared/scripts/gen-placeholder.py +244 -0
- package/project-templates/threejs/skills/_shared/scripts/harness-smoke.mjs +257 -0
- package/project-templates/threejs/skills/_shared/scripts/lib/validator-artifacts.mjs +129 -0
- package/project-templates/threejs/skills/_shared/scripts/placeholder-pack-sheet.mjs +67 -0
- package/project-templates/threejs/skills/_shared/scripts/placeholder_audio_lib.py +142 -0
- package/project-templates/threejs/skills/_shared/scripts/placeholder_lib.py +993 -0
- package/project-templates/threejs/skills/_shared/scripts/render-project-state.mjs +278 -0
- package/project-templates/threejs/skills/_shared/scripts/ring-config.mjs +252 -0
- package/project-templates/threejs/skills/_shared/scripts/skills-check.mjs +176 -0
- package/project-templates/threejs/skills/_shared/scripts/slice-set.mjs +77 -0
- package/project-templates/threejs/skills/_shared/scripts/state-advance-ring.mjs +63 -0
- package/project-templates/threejs/skills/_shared/scripts/state-get.mjs +215 -0
- package/project-templates/threejs/skills/_shared/scripts/state-handoff.mjs +120 -0
- package/project-templates/threejs/skills/_shared/scripts/state-set.mjs +113 -0
- package/project-templates/threejs/skills/_shared/scripts/state-store.mjs +893 -0
- package/project-templates/threejs/skills/_shared/scripts/sync-template-skills.mjs +112 -0
- package/project-templates/threejs/skills/_shared/scripts/verify-asset-code-sync.mjs +265 -0
- package/project-templates/threejs/skills/_shared/scripts/verify-atom-conformance.mjs +181 -0
- package/project-templates/threejs/skills/_shared/scripts/verify-env.mjs +285 -0
- package/project-templates/threejs/skills/_shared/scripts/verify-placeholders.mjs +161 -0
- package/project-templates/threejs/skills/_shared/scripts/workflow-doctor.mjs +348 -0
- package/project-templates/threejs/skills/playable-animate/SKILL.md +52 -0
- package/project-templates/threejs/skills/playable-animate/agents/openai.yaml +4 -0
- package/project-templates/threejs/skills/playable-animate/references/board-refresh.md +30 -0
- package/project-templates/threejs/skills/playable-animate/references/diagnosis-checklist.md +25 -0
- package/project-templates/threejs/skills/playable-animate/references/entrance-sequencing.md +33 -0
- package/project-templates/threejs/skills/playable-animate/references/interaction-timing.md +23 -0
- package/project-templates/threejs/skills/playable-art/SKILL.md +203 -0
- package/project-templates/threejs/skills/playable-art/agents/openai.yaml +4 -0
- package/project-templates/threejs/skills/playable-art/references/alpha-postprocess.md +46 -0
- package/project-templates/threejs/skills/playable-art/references/cta-art-spec.md +59 -0
- package/project-templates/threejs/skills/playable-art/references/layout-proportions.md +30 -0
- package/project-templates/threejs/skills/playable-art/references/prompt-patterns.md +83 -0
- package/project-templates/threejs/skills/playable-art/references/reference-comparison.md +30 -0
- package/project-templates/threejs/skills/playable-art/references/sheet-import-v2.md +91 -0
- package/project-templates/threejs/skills/playable-art/scripts/build-atlas.py +332 -0
- package/project-templates/threejs/skills/playable-art/scripts/chroma-key.py +50 -0
- package/project-templates/threejs/skills/playable-art/scripts/extract-alpha-split.py +65 -0
- package/project-templates/threejs/skills/playable-art/scripts/extract-dual-bg-alpha.py +118 -0
- package/project-templates/threejs/skills/playable-art/scripts/import-gpt-art-sheets-v2.py +403 -0
- package/project-templates/threejs/skills/playable-art/scripts/import-gpt-art-sheets.py +280 -0
- package/project-templates/threejs/skills/playable-art/scripts/import-gpt-tile-sheet.py +114 -0
- package/project-templates/threejs/skills/playable-art/scripts/import_gpt_art_pipeline.py +321 -0
- package/project-templates/threejs/skills/playable-art/scripts/import_gpt_art_sheets_v2_test.py +126 -0
- package/project-templates/threejs/skills/playable-art/scripts/placeholder_common.py +98 -0
- package/project-templates/threejs/skills/playable-art/scripts/remove-bg.py +91 -0
- package/project-templates/threejs/skills/playable-art/scripts/review-processed-assets.py +468 -0
- package/project-templates/threejs/skills/playable-art/scripts/review_processed_assets_test.py +116 -0
- package/project-templates/threejs/skills/playable-art/scripts/verify-alpha-clean.py +105 -0
- package/project-templates/threejs/skills/playable-debug/SKILL.md +116 -0
- package/project-templates/threejs/skills/playable-debug/agents/openai.yaml +4 -0
- package/project-templates/threejs/skills/playable-debug/references/debug-config.md +40 -0
- package/project-templates/threejs/skills/playable-focus/SKILL.md +148 -0
- package/project-templates/threejs/skills/playable-focus/scripts/bootstrap-playground.mjs +84 -0
- package/project-templates/threejs/skills/playable-focus/scripts/extract-focus-frames.mjs +87 -0
- package/project-templates/threejs/skills/playable-focus/scripts/generate-focus-reports.mjs +121 -0
- package/project-templates/threejs/skills/playable-focus/scripts/playground.mjs +390 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/frame.html +39 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/clean-stage.js +114 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/frame-lab-scene.js +94 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/harness/particle-lab-scene.js +224 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/model.html +16 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/particle.html +38 -0
- package/project-templates/threejs/skills/playable-focus/templates/focus-lab/shatter.html +47 -0
- package/project-templates/threejs/skills/playable-fx-decompose/SKILL.md +212 -0
- package/project-templates/threejs/skills/playable-fx-decompose/examples.md +89 -0
- package/project-templates/threejs/skills/playable-fx-decompose/reference.md +201 -0
- package/project-templates/threejs/skills/playable-fx-decompose/requirements.txt +2 -0
- package/project-templates/threejs/skills/playable-fx-decompose/scripts/build-blank-tile-crack.py +192 -0
- package/project-templates/threejs/skills/playable-fx-decompose/scripts/fix-shard-debris-frames.py +60 -0
- package/project-templates/threejs/skills/playable-fx-decompose/scripts/generate-shard-debris.py +276 -0
- package/project-templates/threejs/skills/playable-fx-peak/SKILL.md +237 -0
- package/project-templates/threejs/skills/playable-fx-peak/requirements.txt +2 -0
- package/project-templates/threejs/skills/playable-fx-peak/scripts/fix-frame-edges.py +70 -0
- package/project-templates/threejs/skills/playable-fx-peak/scripts/repack-frame-sequence.py +526 -0
- package/project-templates/threejs/skills/playable-fx-peak/scripts/validate-frame-anchors.py +130 -0
- package/project-templates/threejs/skills/playable-placeholder/SKILL.md +239 -0
- package/project-templates/threejs/skills/playable-record/SKILL.md +166 -0
- package/project-templates/threejs/skills/playable-record/scripts/lib/build-artifact.mjs +92 -0
- package/project-templates/threejs/skills/playable-record/scripts/lib/dev-server.mjs +104 -0
- package/project-templates/threejs/skills/playable-record/scripts/lib/record-audio-bridge.js +141 -0
- package/project-templates/threejs/skills/playable-record/scripts/lib/slice-structure-verify.mjs +199 -0
- package/project-templates/threejs/skills/playable-record/scripts/record-playable.mjs +583 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-build.mjs +185 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-contract.mjs +261 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-firstwin.mjs +398 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-fusion.mjs +320 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-lifecycle.mjs +78 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-slice-artist.mjs +53 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-slice-ta.mjs +53 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-slice.mjs +142 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-visual-ring.mjs +250 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-visual-ring1.mjs +190 -0
- package/project-templates/threejs/skills/playable-record/scripts/verify-vlm-video.mjs +227 -0
- package/project-templates/threejs/skills/playable-validate/SKILL.md +260 -0
- package/project-templates/threejs/skills/playable-validate/references/checklist-detail.md +36 -0
- package/project-templates/threejs/skills/playable-validate/references/single-html-bundle.md +76 -0
- package/project-templates/threejs/skills/playable-validate/validation-rules.md +200 -0
- package/project-templates/threejs/skills/playable-verify-ui/SKILL.md +295 -0
- package/project-templates/threejs/skills/playable-verify-ui/examples/asset-manifest.example.json +36 -0
- package/project-templates/threejs/skills/playable-verify-ui/examples/mahjong-match.profile.yaml +334 -0
- package/project-templates/threejs/skills/playable-verify-ui/profiles/template.profile.yaml +84 -0
- package/project-templates/threejs/skills/playable-verify-ui/reference.md +165 -0
- package/project-templates/threejs/skills/playable-verify-ui/references/phaser-patterns.md +67 -0
- package/project-templates/threejs/skills/playable-verify-ui/references/scaling-decision-tree.md +51 -0
- package/project-templates/threejs/skills/playable-verify-ui/requirements.txt +7 -0
- package/project-templates/threejs/skills/playable-verify-ui/schema/asset-manifest.schema.json +68 -0
- package/project-templates/threejs/skills/playable-verify-ui/schema/playable-ui-profile.schema.json +171 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/asset_manifest.py +231 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/__init__.py +1 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/config_expr.js +218 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/node_utils.js +51 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/profile_loader.py +59 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/report.py +106 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/lib/runtime_contract.js +116 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/measure_frame_content.py +77 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/run_all.py +265 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_asset_sizes.py +77 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_assets_present.py +62 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_atlas_budget.py +84 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_atlas_frames.py +79 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_bg_clean.py +365 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_doc_asset_sync.py +90 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_fetch_antipatterns.py +59 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_game_config_load.js +54 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_hardcoded_layout.js +64 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_layout_regions.js +110 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_profile_schema.py +37 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_ring1_visual.py +211 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_runtime_contract.js +58 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_script_load_order.js +73 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_slice_plan.py +238 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_slice_plan_test.py +125 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_text_overlap.py +333 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_tile_consistency.py +323 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_vision_evidence.py +894 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_vision_evidence_test.py +122 -0
- package/project-templates/threejs/skills/playable-verify-ui/scripts/verify_visual.py +422 -0
- package/project-templates/threejs/ta-workspace/scripts/.gitkeep +0 -0
- package/project-templates/threejs/templates/artist-log.template.md +182 -0
- package/project-templates/threejs/templates/atom-tree.template.json +133 -0
- package/project-templates/threejs/templates/design-brief.template.md +92 -0
- package/project-templates/threejs/templates/design-lens-checklist.reference.md +117 -0
- package/project-templates/threejs/templates/design-methodology.md +99 -0
- package/project-templates/threejs/templates/design.template.md +50 -0
- package/project-templates/threejs/templates/developer-log.template.md +258 -0
- package/project-templates/threejs/templates/five-axis-framework.md +194 -0
- package/project-templates/threejs/templates/gen-placeholder-audio.template.mjs +63 -0
- package/project-templates/threejs/templates/gen-placeholders.template.mjs +81 -0
- package/project-templates/threejs/templates/intent-clarifications.template.md +58 -0
- package/project-templates/threejs/templates/layout-spec.template.md +198 -0
- package/project-templates/threejs/templates/plan.template.md +80 -0
- package/project-templates/threejs/templates/project-state.template.md +136 -0
- package/project-templates/threejs/templates/review-report.template.md +275 -0
- package/project-templates/threejs/templates/style-exploration.template.md +93 -0
- package/project-templates/threejs/templates/ta-log.template.md +394 -0
- package/project-templates/threejs/tsconfig.json +20 -0
- package/project-templates/threejs/vite.config.ts +27 -0
- package/dist/atom-plan/validate-atom-plan.js +0 -298
- package/project-template/.claude/agents/designer.md +0 -124
- package/project-template/.claude/agents/pm.md +0 -166
- package/project-template/.claude/agents/refs/designer-style-exploration-flow.md +0 -67
- package/project-template/.claude/agents/refs/pm-workflow-detail.md +0 -567
- package/project-template/.claude/hooks/validate-atom-plan.mjs +0 -224
- package/project-template/.claude/skills/playcraft-workflow/SKILL.md +0 -485
- package/project-template/docs/team/atom-plan-format.md +0 -173
- package/project-template/templates/atom-plan.template.json +0 -44
- package/project-template/templates/atom-plan.template.md +0 -108
- /package/dist/{atom-plan → asr}/validate-asr-coverage.js +0 -0
- /package/{project-template → engine-packs/phaser}/game/config/.gitkeep +0 -0
- /package/{project-template → engine-packs/phaser}/game/gameplay/.gitkeep +0 -0
- /package/{project-template → engine-packs/phaser}/game/scenes/.gitkeep +0 -0
- /package/project-template/.claude/agents/refs/{designer-art-style-catalog.md → artist-art-style-catalog.md} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { parseAtomRef } from './atom-ref.js';
|
|
2
|
+
import { loadSpineRegistry } from './load-spec.js';
|
|
3
|
+
import { resolvePath } from './paths.js';
|
|
4
|
+
import { effectiveAtomId, loadManifestImports, loadRegistryAtomIds } from './skills-index.js';
|
|
5
|
+
export function explainPradPath(doc, logicalPath, options = {}) {
|
|
6
|
+
const visit = resolvePath(doc, logicalPath);
|
|
7
|
+
if (!visit) {
|
|
8
|
+
return { path: logicalPath, found: false };
|
|
9
|
+
}
|
|
10
|
+
const registry = loadRegistryAtomIds(options.skillsDir);
|
|
11
|
+
const spineReg = loadSpineRegistry(options.specDir);
|
|
12
|
+
const result = { path: logicalPath, found: true, kind: visit.kind };
|
|
13
|
+
if (visit.kind === 'entity' && visit.entity) {
|
|
14
|
+
const atom = parseAtomRef(visit.entity.atom);
|
|
15
|
+
result.atom = atom ?? undefined;
|
|
16
|
+
result.effectiveAtomId = atom ? effectiveAtomId(atom) : undefined;
|
|
17
|
+
result.registryHit = atom ? registry.has(atom.id) : undefined;
|
|
18
|
+
if (atom?.resolve === 'draft' && atom.substitute) {
|
|
19
|
+
result.registryHit = registry.has(atom.substitute);
|
|
20
|
+
}
|
|
21
|
+
result.slot = visit.entity.slot;
|
|
22
|
+
result.sinceGate = visit.entity.sinceGate;
|
|
23
|
+
const spineId = visit.entity.slot?.spine;
|
|
24
|
+
if (spineId && spineReg.spines[spineId]) {
|
|
25
|
+
result.spineDescription = spineReg.spines[spineId].description;
|
|
26
|
+
}
|
|
27
|
+
const props = visit.entity.props;
|
|
28
|
+
if (props) {
|
|
29
|
+
const refs = [];
|
|
30
|
+
for (const [k, v] of Object.entries(props)) {
|
|
31
|
+
if (v && typeof v === 'object' && 'ref' in v)
|
|
32
|
+
refs.push(`${k} → ${v.ref}`);
|
|
33
|
+
if (typeof v === 'string' && k.endsWith('Ref'))
|
|
34
|
+
refs.push(`${k} → ${v}`);
|
|
35
|
+
if (k === 'binding' && typeof v === 'string')
|
|
36
|
+
refs.push(`binding → ${v}`);
|
|
37
|
+
}
|
|
38
|
+
if (refs.length)
|
|
39
|
+
result.refs = refs;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (visit.kind === 'media' && visit.mediaInstance) {
|
|
43
|
+
const atom = parseAtomRef(visit.mediaInstance.atom);
|
|
44
|
+
result.atom = atom ?? undefined;
|
|
45
|
+
result.effectiveAtomId = atom ? effectiveAtomId(atom) : undefined;
|
|
46
|
+
result.bindAs = visit.mediaInstance.bindAs;
|
|
47
|
+
const bindTargetRef = visit.mediaInstance.bindTargetRef;
|
|
48
|
+
if (bindTargetRef) {
|
|
49
|
+
result.bindTargetRef = bindTargetRef;
|
|
50
|
+
const targetVisit = resolvePath(doc, bindTargetRef);
|
|
51
|
+
if (targetVisit?.entity) {
|
|
52
|
+
const targetAtom = parseAtomRef(targetVisit.entity.atom);
|
|
53
|
+
if (targetAtom) {
|
|
54
|
+
const targetEff = effectiveAtomId(targetAtom);
|
|
55
|
+
result.bindTargetEffectiveAtom = targetEff;
|
|
56
|
+
const imports = loadManifestImports(targetEff, options.skillsDir);
|
|
57
|
+
if (imports)
|
|
58
|
+
result.manifestImportSlots = [...imports.bindAsSet];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else if (visit.parentEntityAtom) {
|
|
63
|
+
const parentEff = effectiveAtomId(visit.parentEntityAtom);
|
|
64
|
+
result.parentEffectiveAtom = parentEff;
|
|
65
|
+
const imports = loadManifestImports(parentEff, options.skillsDir);
|
|
66
|
+
if (imports)
|
|
67
|
+
result.manifestImportSlots = [...imports.bindAsSet];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (visit.kind === 'global' && visit.mediaInstance) {
|
|
71
|
+
result.atom = parseAtomRef(visit.mediaInstance.atom) ?? undefined;
|
|
72
|
+
result.bindAs = visit.mediaInstance.bindAs;
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
export function formatExplain(result) {
|
|
77
|
+
const lines = [`path: ${result.path}`, `found: ${result.found}`];
|
|
78
|
+
if (!result.found)
|
|
79
|
+
return lines.join('\n');
|
|
80
|
+
if (result.kind)
|
|
81
|
+
lines.push(`kind: ${result.kind}`);
|
|
82
|
+
if (result.slot)
|
|
83
|
+
lines.push(`slot: ${JSON.stringify(result.slot)}`);
|
|
84
|
+
if (result.sinceGate != null)
|
|
85
|
+
lines.push(`sinceGate: ${result.sinceGate}`);
|
|
86
|
+
if (result.atom)
|
|
87
|
+
lines.push(`atom: ${JSON.stringify(result.atom)}`);
|
|
88
|
+
if (result.effectiveAtomId)
|
|
89
|
+
lines.push(`effectiveAtomId: ${result.effectiveAtomId}`);
|
|
90
|
+
if (result.registryHit != null)
|
|
91
|
+
lines.push(`registryHit: ${result.registryHit}`);
|
|
92
|
+
if (result.spineDescription) {
|
|
93
|
+
lines.push(`spineDescription: ${result.spineDescription.zh ?? result.spineDescription.en ?? ''}`);
|
|
94
|
+
}
|
|
95
|
+
if (result.bindAs)
|
|
96
|
+
lines.push(`bindAs: ${result.bindAs}`);
|
|
97
|
+
if (result.bindTargetRef)
|
|
98
|
+
lines.push(`bindTargetRef: ${result.bindTargetRef}`);
|
|
99
|
+
if (result.parentEffectiveAtom)
|
|
100
|
+
lines.push(`parentEffectiveAtom: ${result.parentEffectiveAtom}`);
|
|
101
|
+
if (result.bindTargetEffectiveAtom)
|
|
102
|
+
lines.push(`bindTargetEffectiveAtom: ${result.bindTargetEffectiveAtom}`);
|
|
103
|
+
if (result.manifestImportSlots?.length) {
|
|
104
|
+
lines.push(`manifestImportSlots: ${result.manifestImportSlots.join(', ')}`);
|
|
105
|
+
}
|
|
106
|
+
if (result.refs?.length)
|
|
107
|
+
lines.push(`refs:\n ${result.refs.join('\n ')}`);
|
|
108
|
+
return lines.join('\n');
|
|
109
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
export function resolvePradSpecDir(customDir) {
|
|
6
|
+
if (customDir)
|
|
7
|
+
return path.resolve(customDir);
|
|
8
|
+
const mono = path.resolve(__dirname, '..', '..', '..', '..', 'docs', 'prad', 'spec');
|
|
9
|
+
if (fs.existsSync(path.join(mono, 'spine-registry.v1.json')))
|
|
10
|
+
return mono;
|
|
11
|
+
const cwd = path.join(process.cwd(), 'docs', 'prad', 'spec');
|
|
12
|
+
if (fs.existsSync(path.join(cwd, 'spine-registry.v1.json')))
|
|
13
|
+
return cwd;
|
|
14
|
+
return mono;
|
|
15
|
+
}
|
|
16
|
+
export function loadSpineRegistry(specDir) {
|
|
17
|
+
const file = path.join(resolvePradSpecDir(specDir), 'spine-registry.v1.json');
|
|
18
|
+
return JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
19
|
+
}
|
|
20
|
+
export function loadGateRequirements(specDir) {
|
|
21
|
+
const file = path.join(resolvePradSpecDir(specDir), 'gate-requirements.v1.json');
|
|
22
|
+
return JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
23
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { parseAtomRef } from './atom-ref.js';
|
|
2
|
+
function visitEntities(basePath, entities, out, parentEntityAtom) {
|
|
3
|
+
if (!Array.isArray(entities))
|
|
4
|
+
return;
|
|
5
|
+
for (const raw of entities) {
|
|
6
|
+
if (!raw || typeof raw !== 'object')
|
|
7
|
+
continue;
|
|
8
|
+
const entity = raw;
|
|
9
|
+
const id = entity.id;
|
|
10
|
+
if (typeof id !== 'string')
|
|
11
|
+
continue;
|
|
12
|
+
const entityPath = `${basePath}.${id}`;
|
|
13
|
+
const atomRef = parseAtomRef(entity.atom);
|
|
14
|
+
out.push({ path: entityPath, kind: 'entity', entity, parentEntityAtom });
|
|
15
|
+
const props = entity.props;
|
|
16
|
+
if (props && typeof props === 'object') {
|
|
17
|
+
for (const [key, val] of Object.entries(props)) {
|
|
18
|
+
if (val && typeof val === 'object' && 'atom' in val) {
|
|
19
|
+
out.push({
|
|
20
|
+
path: `${entityPath}.props.${key}`,
|
|
21
|
+
kind: 'media',
|
|
22
|
+
entity,
|
|
23
|
+
parentEntityAtom: atomRef ?? undefined,
|
|
24
|
+
mediaPropKey: key,
|
|
25
|
+
mediaInstance: val,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (Array.isArray(entity.children)) {
|
|
31
|
+
visitEntities(entityPath, entity.children, out, atomRef ?? undefined);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export function walkPradDocument(doc) {
|
|
36
|
+
const out = [];
|
|
37
|
+
const globals = doc.globals;
|
|
38
|
+
if (globals && typeof globals === 'object') {
|
|
39
|
+
for (const [key, val] of Object.entries(globals)) {
|
|
40
|
+
if (val && typeof val === 'object' && 'atom' in val) {
|
|
41
|
+
out.push({
|
|
42
|
+
path: `globals.${key}`,
|
|
43
|
+
kind: 'global',
|
|
44
|
+
globalKey: key,
|
|
45
|
+
mediaInstance: val,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const scenes = doc.scenes;
|
|
51
|
+
if (Array.isArray(scenes)) {
|
|
52
|
+
for (const scene of scenes) {
|
|
53
|
+
if (!scene || typeof scene !== 'object')
|
|
54
|
+
continue;
|
|
55
|
+
const sceneId = scene.id;
|
|
56
|
+
if (typeof sceneId !== 'string')
|
|
57
|
+
continue;
|
|
58
|
+
const layers = scene.layers;
|
|
59
|
+
if (!Array.isArray(layers))
|
|
60
|
+
continue;
|
|
61
|
+
for (const layer of layers) {
|
|
62
|
+
if (!layer || typeof layer !== 'object')
|
|
63
|
+
continue;
|
|
64
|
+
const layerId = layer.id;
|
|
65
|
+
if (typeof layerId !== 'string')
|
|
66
|
+
continue;
|
|
67
|
+
const base = `scenes.${sceneId}.${layerId}`;
|
|
68
|
+
visitEntities(base, layer.entities ?? [], out);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
export function resolvePath(doc, logicalPath) {
|
|
75
|
+
return walkPradDocument(doc).find((v) => v.path === logicalPath);
|
|
76
|
+
}
|
|
77
|
+
/** Media path `scenes.x.y.z.props.key` → entity path `scenes.x.y.z` */
|
|
78
|
+
export function parentEntityPath(mediaPath) {
|
|
79
|
+
const idx = mediaPath.lastIndexOf('.props.');
|
|
80
|
+
if (idx === -1)
|
|
81
|
+
return undefined;
|
|
82
|
+
return mediaPath.slice(0, idx);
|
|
83
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { resolveSkillsDirs } from '../atom-tree/selection.js';
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
function allSkillsDirs(customDir) {
|
|
7
|
+
const dirs = resolveSkillsDirs(customDir);
|
|
8
|
+
const monoFromPrad = path.resolve(__dirname, '..', '..', '..', 'skills', 'skills');
|
|
9
|
+
if (fs.existsSync(monoFromPrad))
|
|
10
|
+
dirs.push(monoFromPrad);
|
|
11
|
+
return [...new Set(dirs)];
|
|
12
|
+
}
|
|
13
|
+
/** Load set of registry atom ids from Skills directories. */
|
|
14
|
+
export function loadRegistryAtomIds(skillsDir) {
|
|
15
|
+
const ids = new Set();
|
|
16
|
+
for (const dir of allSkillsDirs(skillsDir)) {
|
|
17
|
+
if (!fs.existsSync(dir))
|
|
18
|
+
continue;
|
|
19
|
+
for (const name of fs.readdirSync(dir)) {
|
|
20
|
+
const manifestPath = path.join(dir, name, 'manifest.json');
|
|
21
|
+
if (!fs.existsSync(manifestPath))
|
|
22
|
+
continue;
|
|
23
|
+
try {
|
|
24
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
25
|
+
if (manifest.atomId)
|
|
26
|
+
ids.add(manifest.atomId);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
// skip invalid manifest
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return ids;
|
|
34
|
+
}
|
|
35
|
+
export function loadManifestImports(atomId, skillsDir) {
|
|
36
|
+
for (const dir of allSkillsDirs(skillsDir)) {
|
|
37
|
+
const manifestPath = path.join(dir, atomId, 'manifest.json');
|
|
38
|
+
if (!fs.existsSync(manifestPath))
|
|
39
|
+
continue;
|
|
40
|
+
try {
|
|
41
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
42
|
+
const bindAsSet = new Set();
|
|
43
|
+
for (const imp of manifest.imports ?? []) {
|
|
44
|
+
if (imp.bindAs)
|
|
45
|
+
bindAsSet.add(imp.bindAs);
|
|
46
|
+
}
|
|
47
|
+
return { atomId: manifest.atomId ?? atomId, bindAsSet };
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
/** Effective atom id for compile: draft uses substitute when present. */
|
|
56
|
+
export function effectiveAtomId(ref) {
|
|
57
|
+
if (ref.resolve === 'draft' && ref.substitute)
|
|
58
|
+
return ref.substitute;
|
|
59
|
+
return ref.id;
|
|
60
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as path from 'node:path';
|
|
2
|
+
import { applyEnginePackToProject, bakeFullTemplate, KNOWN_ADAPTERS, readAdapterFromAtomTree, readEngineMarker, resolveCliPackageRoot, } from '../scaffold/compose.js';
|
|
3
|
+
import { autoLinkSkillsFromAtomTree } from '../commands/skills.js';
|
|
4
|
+
function resolveAdapter(opts) {
|
|
5
|
+
if (opts.engine) {
|
|
6
|
+
const e = opts.engine.toLowerCase();
|
|
7
|
+
if (!KNOWN_ADAPTERS.includes(e)) {
|
|
8
|
+
throw new Error(`Unknown engine "${opts.engine}". Supported: ${KNOWN_ADAPTERS.join(', ')}`);
|
|
9
|
+
}
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
if (opts.fromAtomTree) {
|
|
13
|
+
const fromTree = readAdapterFromAtomTree(opts.projectDir);
|
|
14
|
+
if (!fromTree) {
|
|
15
|
+
throw new Error('docs/atom-tree.json missing meta.engineDecision.adapter — run init-atom-tree or pass --engine');
|
|
16
|
+
}
|
|
17
|
+
return fromTree;
|
|
18
|
+
}
|
|
19
|
+
throw new Error('Specify --engine phaser|threejs or --from-atom-tree');
|
|
20
|
+
}
|
|
21
|
+
export async function initTemplateCommand(opts) {
|
|
22
|
+
const cliRoot = resolveCliPackageRoot();
|
|
23
|
+
const projectDir = path.resolve(opts.projectDir);
|
|
24
|
+
if (opts.bake && opts.allEngines) {
|
|
25
|
+
for (const adapter of KNOWN_ADAPTERS) {
|
|
26
|
+
const outDir = path.join(cliRoot, 'project-templates', adapter);
|
|
27
|
+
const result = await bakeFullTemplate({ adapter, outDir, cliRoot });
|
|
28
|
+
console.log(`✓ Baked ${adapter} → ${result.outDir}`);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const adapter = resolveAdapter(opts);
|
|
33
|
+
if (opts.bake) {
|
|
34
|
+
const outDir = path.join(cliRoot, 'project-templates', adapter);
|
|
35
|
+
const result = await bakeFullTemplate({ adapter, outDir, cliRoot });
|
|
36
|
+
console.log(`✓ Baked ${adapter} template → ${result.outDir}`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const existing = readEngineMarker(projectDir);
|
|
40
|
+
if (existing && existing !== adapter && !opts.force) {
|
|
41
|
+
console.error(`Adapter mismatch: project has .playcraft-engine=${existing}, requested ${adapter}. Use --force to replace game/.`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const result = await applyEnginePackToProject({
|
|
45
|
+
projectDir,
|
|
46
|
+
adapter,
|
|
47
|
+
force: opts.force,
|
|
48
|
+
cliRoot,
|
|
49
|
+
});
|
|
50
|
+
console.log(`\n✓ Engine template applied: ${result.adapter}`);
|
|
51
|
+
console.log(` game/ + .playcraft-engine + docs/scaffold-manifest.md`);
|
|
52
|
+
// Fallback auto-link: ensure selected atom skills are materialized into
|
|
53
|
+
// .claude/skills/ even if the atom-tree write hook didn't run. The
|
|
54
|
+
// validate-atom-tree-selection hook normally links on every atom-tree save;
|
|
55
|
+
// this guarantees a project bootstrapped via --from-atom-tree is never left
|
|
56
|
+
// with selected-but-unlinked atoms.
|
|
57
|
+
if (opts.fromAtomTree) {
|
|
58
|
+
try {
|
|
59
|
+
const link = await autoLinkSkillsFromAtomTree(projectDir, { prune: true });
|
|
60
|
+
if (link.linked.length > 0) {
|
|
61
|
+
console.log(` .claude/skills/ ← linked atom skills (${link.linked.length}): ${link.linked.join(', ')}`);
|
|
62
|
+
}
|
|
63
|
+
if (link.missing.length > 0) {
|
|
64
|
+
console.log(` ⚠ skills not found for: ${link.missing.join(', ')} — check meta.selectedAtoms`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
console.log(` ⚠ auto-link skipped: ${err.message}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
console.log('\n下一步:');
|
|
72
|
+
console.log(' npm install');
|
|
73
|
+
console.log(' 阅读 .claude/skills/<atom>/SKILL.md(已自动 link)并填 logs/developer-log.md § Skill Preflight');
|
|
74
|
+
console.log(' npm run placeholder:gen # 生成占位图(Ring 1 起强制,禁止纯代码绘制)');
|
|
75
|
+
console.log(' npm run verify:contract');
|
|
76
|
+
console.log(' npm run verify:placeholders');
|
|
77
|
+
console.log(' npm run harness:smoke');
|
|
78
|
+
console.log(' → Invoke @developer for ring 1 build');
|
|
79
|
+
console.log('');
|
|
80
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
export const KNOWN_ADAPTERS = ['phaser', 'threejs'];
|
|
5
|
+
const TEMPLATE_COPY_EXCLUDES = new Set([
|
|
6
|
+
'.DS_Store',
|
|
7
|
+
'.git',
|
|
8
|
+
'node_modules',
|
|
9
|
+
'dist',
|
|
10
|
+
'package-lock.json',
|
|
11
|
+
'playground',
|
|
12
|
+
'recordings',
|
|
13
|
+
'validate',
|
|
14
|
+
'game',
|
|
15
|
+
]);
|
|
16
|
+
function isAdapterId(value) {
|
|
17
|
+
return KNOWN_ADAPTERS.includes(value);
|
|
18
|
+
}
|
|
19
|
+
/** CLI package root (packages/cli). */
|
|
20
|
+
export function resolveCliPackageRoot() {
|
|
21
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
22
|
+
return path.resolve(path.dirname(__filename), '..', '..');
|
|
23
|
+
}
|
|
24
|
+
export function resolveTemplateBaseDir(cliRoot = resolveCliPackageRoot()) {
|
|
25
|
+
return path.join(cliRoot, 'project-template');
|
|
26
|
+
}
|
|
27
|
+
export function resolveEnginePackDir(adapter, cliRoot = resolveCliPackageRoot()) {
|
|
28
|
+
return path.join(cliRoot, 'engine-packs', adapter);
|
|
29
|
+
}
|
|
30
|
+
export function readEngineMarker(projectDir) {
|
|
31
|
+
const markerPath = path.join(projectDir, '.playcraft-engine');
|
|
32
|
+
if (!fs.existsSync(markerPath))
|
|
33
|
+
return null;
|
|
34
|
+
const value = fs.readFileSync(markerPath, 'utf8').trim().toLowerCase();
|
|
35
|
+
return isAdapterId(value) ? value : null;
|
|
36
|
+
}
|
|
37
|
+
const SCAFFOLD_PENDING_FILE = '.playcraft-scaffold-pending';
|
|
38
|
+
const SCAFFOLD_MANIFEST_MARKER = 'playcraft remix init-template';
|
|
39
|
+
function listGameEntries(gameDir) {
|
|
40
|
+
if (!fs.existsSync(gameDir))
|
|
41
|
+
return [];
|
|
42
|
+
return fs.readdirSync(gameDir).filter((e) => e !== '.DS_Store');
|
|
43
|
+
}
|
|
44
|
+
/** True when game/ is missing or still the pre-scaffold placeholder from `playcraft create`. */
|
|
45
|
+
export function isGameDirEmptyOrPending(gameDir) {
|
|
46
|
+
const entries = listGameEntries(gameDir);
|
|
47
|
+
if (entries.length === 0)
|
|
48
|
+
return true;
|
|
49
|
+
if (entries.includes(SCAFFOLD_PENDING_FILE)) {
|
|
50
|
+
const rest = entries.filter((e) => e !== SCAFFOLD_PENDING_FILE);
|
|
51
|
+
if (rest.length === 0)
|
|
52
|
+
return true;
|
|
53
|
+
if (rest.length === 1 && rest[0] === 'index.ts') {
|
|
54
|
+
const src = fs.readFileSync(path.join(gameDir, 'index.ts'), 'utf8');
|
|
55
|
+
return src.includes('Engine not scaffolded') || src.includes('init-template');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
export function hasInitTemplateScaffoldManifest(projectDir) {
|
|
61
|
+
const manifestPath = path.join(projectDir, 'docs', 'scaffold-manifest.md');
|
|
62
|
+
if (!fs.existsSync(manifestPath))
|
|
63
|
+
return false;
|
|
64
|
+
const content = fs.readFileSync(manifestPath, 'utf8');
|
|
65
|
+
return content.includes(SCAFFOLD_MANIFEST_MARKER);
|
|
66
|
+
}
|
|
67
|
+
/** Throws unless replacing game/ is explicitly allowed. */
|
|
68
|
+
export function assertGameDirReplaceAllowed(projectDir, force) {
|
|
69
|
+
if (force)
|
|
70
|
+
return;
|
|
71
|
+
const gameDest = path.join(projectDir, 'game');
|
|
72
|
+
if (!fs.existsSync(gameDest))
|
|
73
|
+
return;
|
|
74
|
+
if (isGameDirEmptyOrPending(gameDest))
|
|
75
|
+
return;
|
|
76
|
+
if (hasInitTemplateScaffoldManifest(projectDir))
|
|
77
|
+
return;
|
|
78
|
+
throw new Error('game/ already contains user implementation — refusing to overwrite. Re-run with --force to replace the entire game/ tree.');
|
|
79
|
+
}
|
|
80
|
+
function shouldSkipTemplateEntry(name) {
|
|
81
|
+
return TEMPLATE_COPY_EXCLUDES.has(name);
|
|
82
|
+
}
|
|
83
|
+
async function copyDirFiltered(src, dest, skipNames) {
|
|
84
|
+
await fs.promises.mkdir(dest, { recursive: true });
|
|
85
|
+
const entries = await fs.promises.readdir(src, { withFileTypes: true });
|
|
86
|
+
for (const entry of entries) {
|
|
87
|
+
if (skipNames.has(entry.name))
|
|
88
|
+
continue;
|
|
89
|
+
const srcPath = path.join(src, entry.name);
|
|
90
|
+
const destPath = path.join(dest, entry.name);
|
|
91
|
+
if (entry.isDirectory()) {
|
|
92
|
+
await copyDirFiltered(srcPath, destPath, skipNames);
|
|
93
|
+
}
|
|
94
|
+
else if (entry.isFile()) {
|
|
95
|
+
await fs.promises.copyFile(srcPath, destPath);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function copyDirRecursive(src, dest) {
|
|
100
|
+
await fs.promises.mkdir(dest, { recursive: true });
|
|
101
|
+
const entries = await fs.promises.readdir(src, { withFileTypes: true });
|
|
102
|
+
for (const entry of entries) {
|
|
103
|
+
const srcPath = path.join(src, entry.name);
|
|
104
|
+
const destPath = path.join(dest, entry.name);
|
|
105
|
+
if (entry.isDirectory()) {
|
|
106
|
+
await copyDirRecursive(srcPath, destPath);
|
|
107
|
+
}
|
|
108
|
+
else if (entry.isFile()) {
|
|
109
|
+
await fs.promises.copyFile(srcPath, destPath);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function mergePackageDeps(projectDir, adapter, packDir) {
|
|
114
|
+
const pkgPath = path.join(projectDir, 'package.json');
|
|
115
|
+
const depsPath = path.join(packDir, 'package.deps.json');
|
|
116
|
+
if (!fs.existsSync(pkgPath) || !fs.existsSync(depsPath))
|
|
117
|
+
return;
|
|
118
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
119
|
+
const extra = JSON.parse(fs.readFileSync(depsPath, 'utf8'));
|
|
120
|
+
pkg.dependencies = { ...pkg.dependencies, ...extra.dependencies };
|
|
121
|
+
if (extra.devDependencies) {
|
|
122
|
+
pkg.devDependencies = { ...pkg.devDependencies, ...extra.devDependencies };
|
|
123
|
+
}
|
|
124
|
+
// Remove deps from other adapters when switching engines
|
|
125
|
+
for (const other of KNOWN_ADAPTERS) {
|
|
126
|
+
if (other === adapter)
|
|
127
|
+
continue;
|
|
128
|
+
const otherPack = path.join(resolveEnginePackDir(other), 'package.deps.json');
|
|
129
|
+
if (!fs.existsSync(otherPack))
|
|
130
|
+
continue;
|
|
131
|
+
const otherDeps = JSON.parse(fs.readFileSync(otherPack, 'utf8'));
|
|
132
|
+
for (const key of Object.keys(otherDeps.dependencies ?? {})) {
|
|
133
|
+
delete pkg.dependencies?.[key];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
137
|
+
}
|
|
138
|
+
function writeScaffoldManifest(projectDir, adapter, mode) {
|
|
139
|
+
const manifestPath = path.join(projectDir, 'docs', 'scaffold-manifest.md');
|
|
140
|
+
const lines = [
|
|
141
|
+
'# Scaffold Manifest',
|
|
142
|
+
'',
|
|
143
|
+
`| Field | Value |`,
|
|
144
|
+
`| --- | --- |`,
|
|
145
|
+
`| adapter | ${adapter} |`,
|
|
146
|
+
`| appliedAt | ${new Date().toISOString()} |`,
|
|
147
|
+
`| mode | ${mode} |`,
|
|
148
|
+
`| runtimeContract | window.__playable |`,
|
|
149
|
+
'',
|
|
150
|
+
'Applied by `playcraft remix init-template`.',
|
|
151
|
+
'',
|
|
152
|
+
];
|
|
153
|
+
fs.mkdirSync(path.dirname(manifestPath), { recursive: true });
|
|
154
|
+
fs.writeFileSync(manifestPath, lines.join('\n'));
|
|
155
|
+
}
|
|
156
|
+
/** Apply engine pack to an existing project (user/agent mode). */
|
|
157
|
+
export async function applyEnginePackToProject(options) {
|
|
158
|
+
const cliRoot = options.cliRoot ?? resolveCliPackageRoot();
|
|
159
|
+
const projectDir = path.resolve(options.projectDir);
|
|
160
|
+
const adapter = options.adapter;
|
|
161
|
+
const packDir = resolveEnginePackDir(adapter, cliRoot);
|
|
162
|
+
const gameSrc = path.join(packDir, 'game');
|
|
163
|
+
const gameDest = path.join(projectDir, 'game');
|
|
164
|
+
if (!fs.existsSync(gameSrc)) {
|
|
165
|
+
throw new Error(`Engine pack missing game/: ${gameSrc}`);
|
|
166
|
+
}
|
|
167
|
+
const existing = readEngineMarker(projectDir);
|
|
168
|
+
if (existing && existing !== adapter && !options.force) {
|
|
169
|
+
throw new Error(`Adapter mismatch: .playcraft-engine=${existing} but requested ${adapter}. Use --force to replace game/.`);
|
|
170
|
+
}
|
|
171
|
+
assertGameDirReplaceAllowed(projectDir, options.force);
|
|
172
|
+
if (fs.existsSync(gameDest)) {
|
|
173
|
+
await fs.promises.rm(gameDest, { recursive: true, force: true });
|
|
174
|
+
}
|
|
175
|
+
await copyDirRecursive(gameSrc, gameDest);
|
|
176
|
+
mergePackageDeps(projectDir, adapter, packDir);
|
|
177
|
+
fs.writeFileSync(path.join(projectDir, '.playcraft-engine'), `${adapter}\n`);
|
|
178
|
+
writeScaffoldManifest(projectDir, adapter, 'apply');
|
|
179
|
+
return { adapter, outDir: projectDir, filesWritten: ['game/', '.playcraft-engine', 'docs/scaffold-manifest.md', 'package.json'] };
|
|
180
|
+
}
|
|
181
|
+
/** Bake full template-base ⊕ engine-pack (maintainer mode). */
|
|
182
|
+
export async function bakeFullTemplate(options) {
|
|
183
|
+
const cliRoot = options.cliRoot ?? resolveCliPackageRoot();
|
|
184
|
+
const baseDir = resolveTemplateBaseDir(cliRoot);
|
|
185
|
+
const packDir = resolveEnginePackDir(options.adapter, cliRoot);
|
|
186
|
+
const outDir = path.resolve(options.outDir);
|
|
187
|
+
if (fs.existsSync(outDir)) {
|
|
188
|
+
await fs.promises.rm(outDir, { recursive: true, force: true });
|
|
189
|
+
}
|
|
190
|
+
await copyDirFiltered(baseDir, outDir, TEMPLATE_COPY_EXCLUDES);
|
|
191
|
+
await copyDirRecursive(path.join(packDir, 'game'), path.join(outDir, 'game'));
|
|
192
|
+
mergePackageDeps(outDir, options.adapter, packDir);
|
|
193
|
+
fs.writeFileSync(path.join(outDir, '.playcraft-engine'), `${options.adapter}\n`);
|
|
194
|
+
writeScaffoldManifest(outDir, options.adapter, 'bake');
|
|
195
|
+
return { adapter: options.adapter, outDir, filesWritten: ['full template tree'] };
|
|
196
|
+
}
|
|
197
|
+
export function readAdapterFromAtomTree(projectDir) {
|
|
198
|
+
const jsonPath = path.join(projectDir, 'docs', 'atom-tree.json');
|
|
199
|
+
if (!fs.existsSync(jsonPath))
|
|
200
|
+
return null;
|
|
201
|
+
try {
|
|
202
|
+
const tree = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
|
|
203
|
+
const adapter = tree.meta?.engineDecision?.adapter;
|
|
204
|
+
if (typeof adapter === 'string' && isAdapterId(adapter))
|
|
205
|
+
return adapter;
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type Phaser from "phaser";
|
|
2
|
+
import {
|
|
3
|
+
assertPlayableSceneContract,
|
|
4
|
+
publishPlayableRuntime,
|
|
5
|
+
type PlayableMainSceneLike,
|
|
6
|
+
type SceneManagerContract,
|
|
7
|
+
} from "../contract/publish.js";
|
|
8
|
+
|
|
9
|
+
/** The MainScene shape the legacy Phaser recorder/debug harness expects. */
|
|
10
|
+
export interface PlayableMainScene extends Phaser.Scene {
|
|
11
|
+
sceneManager: SceneManagerContract;
|
|
12
|
+
_onDebugAutoPlay(): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Publish the Phaser.Game instance for engine-specific tools.
|
|
17
|
+
* Harness entry point remains window.__playable — do not shadow Game.start().
|
|
18
|
+
*/
|
|
19
|
+
export function registerPlayable(game: Phaser.Game): Phaser.Game {
|
|
20
|
+
window.__game = game;
|
|
21
|
+
return game;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function bindPlayableScene(
|
|
25
|
+
scene: Phaser.Scene,
|
|
26
|
+
binding: { sceneManager: SceneManagerContract; onDebugAutoPlay: () => void },
|
|
27
|
+
): void {
|
|
28
|
+
const target = scene as PlayableMainScene;
|
|
29
|
+
target.sceneManager = binding.sceneManager;
|
|
30
|
+
target._onDebugAutoPlay = binding.onDebugAutoPlay;
|
|
31
|
+
if (scene.game) {
|
|
32
|
+
publishPlayableRuntime({
|
|
33
|
+
engine: "phaser",
|
|
34
|
+
engineHandle: scene.game,
|
|
35
|
+
sceneManager: binding.sceneManager,
|
|
36
|
+
onDebugAutoPlay: binding.onDebugAutoPlay,
|
|
37
|
+
getCanvas: () => scene.game?.canvas ?? null,
|
|
38
|
+
getCaptureFps: () => scene.game?.loop?.targetFps ?? 60,
|
|
39
|
+
hideDebugUi: () => {
|
|
40
|
+
const main = scene.game?.scene?.getScene("MainScene") as PlayableMainSceneLike & {
|
|
41
|
+
debugButton?: { container?: { setVisible(v: boolean): void } };
|
|
42
|
+
};
|
|
43
|
+
main?.debugButton?.container?.setVisible(false);
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (__DEV__) {
|
|
48
|
+
assertPlayableSceneContract(target);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { assertPlayableSceneContract, publishPlayableRuntime };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GAME_CONFIG — single source of truth for layout + runtime switches.
|
|
3
|
+
*
|
|
4
|
+
* Both the running game (TypeScript) and the verification harness
|
|
5
|
+
* (`verify:ui` loads this file directly via esbuild) read THIS file.
|
|
6
|
+
* There is no generated copy, so the values verify against can never drift
|
|
7
|
+
* from the values the game runs with.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export interface GameConfig {
|
|
11
|
+
/** Design-space canvas width in px (portrait playable). */
|
|
12
|
+
DESIGN_WIDTH: number;
|
|
13
|
+
/** Design-space canvas height in px. */
|
|
14
|
+
DESIGN_HEIGHT: number;
|
|
15
|
+
|
|
16
|
+
/** CTA band vertical center / height / width in design space. */
|
|
17
|
+
CTA_Y: number;
|
|
18
|
+
CTA_H: number;
|
|
19
|
+
CTA_W: number;
|
|
20
|
+
|
|
21
|
+
/** Safe-area insets in px. */
|
|
22
|
+
SAFE_TOP: number;
|
|
23
|
+
SAFE_BOTTOM: number;
|
|
24
|
+
SAFE_SIDE: number;
|
|
25
|
+
|
|
26
|
+
/** Dev/record switch: show the one-click auto-play debug button. */
|
|
27
|
+
SHOW_DEBUG_BUTTON: boolean;
|
|
28
|
+
/** Dev/record switch: skip transitions to speed up capture. */
|
|
29
|
+
SKIP_TRANSITIONS: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const GAME_CONFIG: GameConfig = {
|
|
33
|
+
DESIGN_WIDTH: 1080,
|
|
34
|
+
DESIGN_HEIGHT: 1920,
|
|
35
|
+
|
|
36
|
+
CTA_Y: 1620,
|
|
37
|
+
CTA_H: 300,
|
|
38
|
+
CTA_W: 1080,
|
|
39
|
+
|
|
40
|
+
SAFE_TOP: 48,
|
|
41
|
+
SAFE_BOTTOM: 48,
|
|
42
|
+
SAFE_SIDE: 16,
|
|
43
|
+
|
|
44
|
+
SHOW_DEBUG_BUTTON: true,
|
|
45
|
+
SKIP_TRANSITIONS: false,
|
|
46
|
+
};
|