t1k:playablelabs:base:stdlib-adopt-web
| Field | Value |
|---|---|
| Module | base |
| Version | 2.29.2 |
| Effort | low |
| Tools | — |
Keywords: adopt playablelabs package web, adopt stdlib web, install cpm package web, none host reuse, three playable stdlib, web playable reuse
How to invoke
Section titled “How to invoke”/t1k:playablelabs:base:stdlib-adopt-web<capability phrase> [--project <dir>]Adopt a stdlib package in a web or none project
Section titled “Adopt a stdlib package in a web or none project”Run BEFORE writing a gameplay primitive (random, timer, tween, grid, FSM, …) in a project whose host is web (three,
Pixi, Phaser) or none. Read-only: it ends in one verdict line per need and, for REUSE, the install command for the
user’s session to run. It ships no hook (deferred behind core #5417). Cocos projects use t1k-cocos-playable-stdlib-adopt.
Facts and the verdict vocabulary: t1k-playablelabs-base-cpm-sweep -> references/cpm-facts.md. Never copy package
source into the game: consumption is CPM-only (playablelabs-decouple-game-code.md).
-
Detect the host. Run
bun .claude/skills/t1k-playablelabs-base-cpm-sweep/scripts/web-install-check.cjs <any-package> --project <dir> --json. Exit 2 with “Cocos project” means STOP and hand over to the Cocos adopt skill. Otherwise readhost.id(webornone). -
Sweep.
mcp__knowledge-retrieval__doc_searchwith 2-3 content words andassembly_prefix: "packages"; then filter the committedcapability-index.jsonrows toengineCompatcontaininghost.id. A row withengineCompat: nullisunknown: say so, and apply the layer rules incpm-facts.md. -
Ground each hit.
rg -n "from ['\"](cc|three)" <package>/srcon the package source: acore-*,feature-*ormechanic-*hit with nocc/threeimport is usable. Acc-*hit is prior art for design only, never an install. -
Preflight each candidate.
bun .claude/skills/t1k-playablelabs-base-cpm-sweep/scripts/web-install-check.cjs @playablelabs/<name> --project <dir> --json.Exit Meaning Next 0 installable print install.bunandimportForm.line2 usage error or Cocos project fix the call, or stop (step 1) 3 cc-*orengineCompatexcludes the hostprior art only; verdict EXTEND,NEWorKEEP4 no registry scope or auth print the fix from verdict.reasons; verdictunverified -
Print one verdict line per need, in core’s vocabulary (
data/reuse-gate.json):reuse-verdict: REUSE|EXTEND|NEW|KEEP|unverified — <package@version or symbol> — scope: <what you swept> — via: <mcp|cpm|both|index>. Core’s gate writesreuse-verdicts.jsonlonly for Cocos projects, so here the verdict lines go in the PR body. -
Never install silently. The user’s session runs
bun add @playablelabs/<name>; bun installs peers itself.
Executed by
Section titled “Executed by”Steps 1 and 4 are mechanical (run the script, read its exit code), so a cheap-tier agent may do them. Choosing the verdict word and judging step 3 stays with the main session or a native agent. Routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”.
Hard rules
Section titled “Hard rules”- A broad corpus query that shows no stdlib hit proves nothing; use
assembly_prefix: "packages". - No capability index on disk: the script reports
engineCompat: unknown; do not guess it, sayunverified.