t1k:unity:web:build
| Field | Value |
|---|---|
| Module | web |
| Version | 2.32.3 |
| Effort | high |
| Tools | — |
Keywords: brotli, build, coep, compression, coop, deployment, headers, hosting, web, webgl
How to invoke
Section titled “How to invoke”/t1k:unity:web:buildBuild a Unity Web Release
Section titled “Build a Unity Web Release”Turn a Web-ready Unity project into a reproducible build and a reviewable hosting contract. This command prepares artifacts and evidence; it never deploys them.
Preconditions
Section titled “Preconditions”/t1k:unity:web:audithas no unresolved blockers.- The target Unity version, scenes, scripting backend, memory budget, compression mode, and development/release intent are recorded.
- Threading is enabled only when the hosting origin can satisfy cross-origin isolation.
If runtime behavior still depends on unsupported mobile APIs, route to
/t1k:unity:web:convert first.
Workflow
Section titled “Workflow”-
Capture the effective Unity build settings and selected scenes.
-
Create the Web build through the project’s existing build profile or build automation. Do not silently change global project settings.
-
Inventory the generated deployment and produce its hosting manifest:
Terminal window bun .claude/skills/t1k-unity-web-build/scripts/create-web-deployment-manifest.cjs \<build-directory> --encoding br --format markdownWhen running from this source repo, use the module-local path under
.claude/modules/web/skills/t1k-unity-web-build/.Use
--threadsonly when the build requires cross-origin isolation. Use--output <path>to save the JSON manifest; an existing file is never overwritten. -
Verify that loader, framework, Wasm, and data artifacts form one complete encoding set.
-
Configure the host from the emitted MIME, content-encoding, cache, and isolation contract.
-
Serve the result over the intended HTTPS topology and hand off to
/t1k:unity:web:validate.
Read references/build-and-hosting-contract.md before approving a release configuration.
Executed by
Section titled “Executed by”The verify half of the build contract delegates to cheap-tier agents; creating the build and
deciding the release configuration stays on a reasoning tier (routing SSOT:
rules/orchestration-rules.md § “Task-Type → Agent Routing”):
| Step | Agent |
|---|---|
| Inventory the generated deployment and read each artifact’s byte size and SHA-256 digest off the manifest | t1k-fact-fetcher |
| Verify the loader/framework/Wasm/data artifacts form one complete encoding set per the manifest contract | t1k-data-verifier |
Recompute the per-resource MIME / Content-Encoding / cache contract from the artifact inventory | t1k-metrics-reporter |
| Create the Web build through the project’s existing build profile or build automation | reasoning tier — running Unity’s build pipeline is orchestration, not enumeration |
Configure the host from the emitted MIME / encoding / isolation contract and hand off to /t1k:unity:web:validate | reasoning tier — a hosting-configuration decision |
The artifact-integrity contract is deterministic: a stated digest set to compare against, a stated
encoding completeness rule to apply. The moment the question turns from do the bytes match the
manifest? to why is this encoding variant missing and is the mixed set safe to ship?, it has
changed tier — deciding what an incomplete set means is t1k-code-reviewer territory, not a
cheap-tier table
Required output
Section titled “Required output”- Unity version, build target/profile, scenes, and relevant settings.
- Exact artifact list with byte size and SHA-256 digest.
- Selected compression mode and any excluded alternative variants.
- Per-resource MIME,
Content-Encoding, and cache recommendations. - Required COOP/COEP headers when threads are enabled.
- Build command or reproducible Editor steps, warnings, and validation handoff.
Safety boundaries
Section titled “Safety boundaries”- Never deploy, upload, publish, or mutate hosting configuration without explicit authorization.
- Never call an incomplete or mixed-encoding artifact set release-ready.
- Never enable threads without proving the deployment can be cross-origin isolated.
- Never overwrite an existing manifest.
- Treat the generated manifest as a hosting contract, not proof that a live server follows it.