t1k:playablelabs:optimize:release-hygiene
| Field | Value |
|---|---|
| Module | optimize |
| Version | 1.16.2 |
| Effort | medium |
| Tools | — |
Keywords: debug overlay left on, playable release hygiene, release-hygiene-scan, silent no-op optimize step
How to invoke
Section titled “How to invoke”/t1k:playablelabs:optimize:release-hygiene[--report pack-report.json] [--dir <src|packed dir>] [--claims <pr-body.md>]Release-build hygiene
Section titled “Release-build hygiene”One zero-dependency script, scripts/release-hygiene-scan.cjs, with deterministic rules for build mistakes that recurred
across finished playables. Exit 0 = clean, 1 = named findings, 2 = usage or unreadable input. It reads files only; it never
packs, never writes, and changes nothing for Cocos output (it is a reviewer-side check, run on a report or a directory).
bun scripts/release-hygiene-scan.cjs --report pack-report.json --dir <src> --dir <packed-out> --claims pr-body.md| Finding id | Fires when | Verified on real data |
|---|---|---|
RH-DEBUG-OVERLAY-ON | a stats/profiler/fps/debug style flag is true in source (key: true, key = true, this.key = true, Key: new BooleanParameter("..", true, ..)) or in param JSON (key: true / {default: true}); comments stripped; test, vendor, dist dirs skipped | yes: 7 true positives, 0 false positives |
RH-WEBP-NOT-RUN | report webp.requested === true and webp.tool === 'missing' (the --webp pass was asked for and did nothing); --require webp also flags requested:false; --allow webp waives | yes: 1 true positive (a ThreeJs spike report), 0 false positives; the default-off report shape is clean |
RH-DEDUPE-OFF | report vfsDedupe.enabled === false (--no-vfs-dedupe was passed); --allow dedupe waives | no real positive exists in 9 reports; field names verified against the packer source |
RH-OBJECT-DEFAULT | param JSON default is an object/array on a param whose type is image, audio, asset_3d or video | no: 0 hits in 4 projects (0 false positives); catches none of the historical cases |
RH-CSS-URL-BACKGROUND | background[-image]: ... url(<literal path>) in css/html/js; not data:, blob:, #, var() or a ${..} template | yes: 1 historical true positive, 0 false positives on 8 projects |
RH-UNMEASURED-CLAIM | a perf-word line in --claims also says unmeasured / not measured | partly: fires on an honest disclosure line, so it blocks disclosure as well as bluffing |
Not rules, on purpose: a zero dedupe saving (every real report has one; no two identical files is normal), webp requested:false
(the default, so it fired on 8 of 9 reports), an object default on a composite type such as formatted_node, coordinates,
formatted_text, table (legitimate, and it fired 48 to 110 times per project), and a templated url(${..}) background.
Evidence
Section titled “Evidence”Commit hashes and the cases the rules do and do not catch: references/evidence.md.
Hard rules
Section titled “Hard rules”- Run it on the source dir AND the packed out dir; the overlay flag can be baked in only at pack time.
- Findings are named, never auto-fixed. Fix the cause (flag default, param shape, loader path) and re-run.
- Perf numbers: measure with the gate (
referencesthere); this skill only blocks the word “unmeasured”.
Executed by
Section titled “Executed by”Running the scan and tabulating its findings is mechanical; deciding a fix or a waiver is not. Routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”.
| Step | Agent |
|---|---|
Run scripts/release-hygiene-scan.cjs, list the finding ids per file | t1k-tester (read-only build-verification lane), or the calling agent itself |
Fix the cause, or waive a rule with --allow | the calling agent |