Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

chore(guards): register three guards that landed without a registry entry

ni3a6f1d205f563f
diff --git a/data/guards.json b/data/guards.json
index 714425cf8..896b7aa1f 100644
--- a/data/guards.json
+++ b/data/guards.json
@@ -923,6 +923,22 @@
"expect": "no longer reads"
}
},
+ {
+ "id": "check-asset-encoding",
+ "script": "scripts/check-asset-encoding.mjs",
+ "npm": "check:asset-encoding",
+ "title": "Served asset length matches the bytes delivered",
+ "protects": "The largest compressible files under public/ arrive in full when requested from the live site with the exact Accept-Encoding a current browser sends.",
+ "why": "On 2026-09-11 the CDN held a variant of the 11 MB MediaPipe WASM runtime whose content-length was the uncompressed size while the body was brotli-compressed with no content-encoding header. Every Chrome and Edge that advertises zstd waited forever for bytes that were never coming, and /create/selfie hung at \"Processing your face\". curl with a plain Accept-Encoding saw a healthy response, and every page check reads HTML rather than the largest binary on the site, so nothing else could see it.",
+ "stages": [
+ "manual"
+ ],
+ "needs": "network",
+ "proof": {
+ "kind": "live",
+ "reason": "It requests assets from the live CDN and compares the promised length against the bytes that actually arrive, so the failure it catches exists only in a served response. A local file has no content-encoding negotiation to get wrong."
+ }
+ },
{
"id": "check-awesome",
"script": "scripts/build-awesome.mjs",
@@ -1098,6 +1114,22 @@
"expect": "guard-proof"
}
},
+ {
+ "id": "check-docs-freshness",
+ "script": "scripts/doc-freshness.mjs",
+ "npm": "check:docs-freshness",
+ "title": "Documentation drift budget",
+ "protects": "No more docs describe code that changed after they were written than data/docs-freshness-budget.json allows.",
+ "why": "A stale doc does not read as stale, it reads as an instruction, and agents here execute docs verbatim. The dependency graph behind /docs/freshness measures which docs sit downstream of code that moved since their last commit, and the budget is a ratchet: it only goes down, and raising it requires a recorded reason, which is what stops drift from becoming permanently normal.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "kind": "live",
+ "reason": "The input is git history, not a file: a doc is stale because of the commits that landed after it, which a sandbox cannot fabricate without rewriting history. The corpus is also over its budget of 5 at the time of registering, so the control half of a two-sided proof would fail against the real repo until the queue is refreshed."
+ }
+ },
{
"id": "check-erc7710-addresses",
"script": "scripts/check-erc7710-addresses.js",
@@ -1305,6 +1337,22 @@
"expect": "9.9.9"
}
},
+ {
+ "id": "check-openai-fields",
+ "script": "scripts/build-openai-portal-fields.mjs",
+ "npm": "check:openai-fields",
+ "title": "OpenAI directory form fields fit their silent limits",
+ "protects": "Every justification, test-case expectation and negative scenario pasted into the OpenAI Plugin Directory form fits under the length the portal truncates at, and each justification is one sentence describing behavior.",
+ "why": "Version 1.0.0 was rejected twice. The portal returned every justification cut at exactly 200 characters and every expected output at 300, mid-word, so the reviewer judged fragments such as \"and the compute\". The form shows no counter and no warning, so the only defense is to measure before pasting.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "kind": "live",
+ "reason": "The fields it measures are constants defined inside the script itself, so the only way to plant an over-long field is to replace the checker with a modified copy of itself, which would prove the copy rather than the guard. The proof sandbox mutates inputs, and this guard has none outside its own source."
+ }
+ },
{
"id": "check-pages",
"script": "scripts/check-pages.mjs",
diff --git a/docs/guards.md b/docs/guards.md
index e1411d48e..fec512c1f 100644
--- a/docs/guards.md
+++ b/docs/guards.md
@@ -142,6 +142,8 @@ Run `npm run audit:guards` to print the current count and per-stage breakdown. T
| Documentation integrity | `npm run audit:docs` | No dead relative link, no site link that matches no route, no command naming a missing script, no `packages/*` or `workers/*` directory without a README, and no public doc that is live but unregistered in `data/pages.json` (or declared there with no article behind it). |
| Upstream resilience ratchet | `npm run audit:upstreams` | No new call to a third-party service without a deadline, and no existing one quietly getting weaker. |
| Tutorial reachability | `npm run check:tutorials` | Every tutorial appears in the library manifest, has its markdown on disk, and is registered in `data/pages.json`. |
+| Documentation drift budget | `npm run check:docs-freshness` | No more docs describe code that changed after they were written than `data/docs-freshness-budget.json` allows. The budget is a ratchet: it only goes down, and raising it needs a recorded reason. |
+| OpenAI directory field limits | `npm run check:openai-fields` | Every field pasted into the OpenAI Plugin Directory form fits under the length the portal silently truncates at, and each tool justification is one sentence describing behavior. |
| Home lane translation keys | `npm run i18n:home` | Every string the connected home speaks from JS has a key in `public/locales/en.json` whose English matches the code exactly, and no source value bakes a user's own room or device name into a translatable sentence. |
| Home Assistant support table | `npm run check:home-matrix` | The version table in [smart-home.md](smart-home.md) is exactly what the last real matrix run measured, so a supported release is a measurement rather than a claim. |
| Runnable doc samples | `npm run check:runnable-docs` | Every sample a reader can press Run on still returns what the doc says it returns. |
@@ -176,6 +178,7 @@ Run `npm run audit:guards` to print the current count and per-stage breakdown. T
|---|---|---|
| CSP-safe inline markup | `npm run audit:inline-handlers` | No served HTML carries an inline event handler attribute or a `javascript:` URL. |
| Live CSP sweep | `npm run audit:csp` | No page violates the Content-Security-Policy the server sends with it, and every response carries the security headers `vercel.json` declares. `--headers-only --base https://three.ws` checks the header half against a live origin with no browser. |
+| Served asset length | `npm run check:asset-encoding` | The largest compressible files under `public/` arrive in full from the live site when requested with a browser's exact `Accept-Encoding`, so a CDN variant whose declared length disagrees with its body cannot hang a page. |
| Console sweep | `npm run audit:console` | A clean browser console on every route, desktop and mobile. Any route that fails in the parallel pass is re-run once serially and the second reading is the one reported, because this worktree is shared and a page that misses its settle window beside somebody else's full build has not failed. The report names how many cleared that way. |
| Hosted IBM page | `npm run audit:ibm-hosted` | The publish-once partnership page still works from a domain that is not three.ws: the live update applies, i18n mounts, and the x402 widget binds. See [ops/ibm-hosted-page-audit.md](ops/ibm-hosted-page-audit.md). |
| `/play` failure modes | `npm run audit:play-failures` | `/play` stays usable when its dependencies fail, and hostile deep-link params never execute. |
diff --git a/public/guards.json b/public/guards.json
index 714425cf8..896b7aa1f 100644
--- a/public/guards.json
+++ b/public/guards.json
@@ -923,6 +923,22 @@
"expect": "no longer reads"
}
},
+ {
+ "id": "check-asset-encoding",
+ "script": "scripts/check-asset-encoding.mjs",
+ "npm": "check:asset-encoding",
+ "title": "Served asset length matches the bytes delivered",
+ "protects": "The largest compressible files under public/ arrive in full when requested from the live site with the exact Accept-Encoding a current browser sends.",
+ "why": "On 2026-09-11 the CDN held a variant of the 11 MB MediaPipe WASM runtime whose content-length was the uncompressed size while the body was brotli-compressed with no content-encoding header. Every Chrome and Edge that advertises zstd waited forever for bytes that were never coming, and /create/selfie hung at \"Processing your face\". curl with a plain Accept-Encoding saw a healthy response, and every page check reads HTML rather than the largest binary on the site, so nothing else could see it.",
+ "stages": [
+ "manual"
+ ],
+ "needs": "network",
+ "proof": {
+ "kind": "live",
+ "reason": "It requests assets from the live CDN and compares the promised length against the bytes that actually arrive, so the failure it catches exists only in a served response. A local file has no content-encoding negotiation to get wrong."
+ }
+ },
{
"id": "check-awesome",
"script": "scripts/build-awesome.mjs",
@@ -1098,6 +1114,22 @@
"expect": "guard-proof"
}
},
+ {
+ "id": "check-docs-freshness",
+ "script": "scripts/doc-freshness.mjs",
+ "npm": "check:docs-freshness",
+ "title": "Documentation drift budget",
+ "protects": "No more docs describe code that changed after they were written than data/docs-freshness-budget.json allows.",
+ "why": "A stale doc does not read as stale, it reads as an instruction, and agents here execute docs verbatim. The dependency graph behind /docs/freshness measures which docs sit downstream of code that moved since their last commit, and the budget is a ratchet: it only goes down, and raising it requires a recorded reason, which is what stops drift from becoming permanently normal.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "kind": "live",
+ "reason": "The input is git history, not a file: a doc is stale because of the commits that landed after it, which a sandbox cannot fabricate without rewriting history. The corpus is also over its budget of 5 at the time of registering, so the control half of a two-sided proof would fail against the real repo until the queue is refreshed."
+ }
+ },
{
"id": "check-erc7710-addresses",
"script": "scripts/check-erc7710-addresses.js",
@@ -1305,6 +1337,22 @@
"expect": "9.9.9"
}
},
+ {
+ "id": "check-openai-fields",
+ "script": "scripts/build-openai-portal-fields.mjs",
+ "npm": "check:openai-fields",
+ "title": "OpenAI directory form fields fit their silent limits",
+ "protects": "Every justification, test-case expectation and negative scenario pasted into the OpenAI Plugin Directory form fits under the length the portal truncates at, and each justification is one sentence describing behavior.",
+ "why": "Version 1.0.0 was rejected twice. The portal returned every justification cut at exactly 200 characters and every expected output at 300, mid-word, so the reviewer judged fragments such as \"and the compute\". The form shows no counter and no warning, so the only defense is to measure before pasting.",
+ "stages": [
+ "gate"
+ ],
+ "needs": "none",
+ "proof": {
+ "kind": "live",
+ "reason": "The fields it measures are constants defined inside the script itself, so the only way to plant an over-long field is to replace the checker with a modified copy of itself, which would prove the copy rather than the guard. The proof sandbox mutates inputs, and this guard has none outside its own source."
+ }
+ },
{
"id": "check-pages",
"script": "scripts/check-pages.mjs",