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.

docs(avatars): fix four claims that had drifted from the code

nirholas5c9a80c2b64b
diff --git a/data/pages.json b/data/pages.json
index adc5baa50..2a30aaac7 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -4081,7 +4081,7 @@
{
"path": "/docs/avatar-thumbnails",
"title": "Docs · Avatar thumbnails",
- "description": "Where an avatar's preview image comes from, the one rule every code path obeys (never publish a thumbnail URL whose object does not exist), the crons that keep coverage at 100%, and how to run the backfill yourself.",
+ "description": "Where an avatar's preview image comes from, the one rule every code path obeys (never publish a thumbnail URL whose object does not exist), the crons that keep coverage near 100%, and how to run the backfill yourself.",
"priority": 0.6,
"changefreq": "monthly"
},
diff --git a/docs/architecture.md b/docs/architecture.md
index 85188b4da..1b713d505 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -226,7 +226,7 @@ Per-chain registry addresses, ABIs, and helpers live in `src/erc8004/`. RPC endp
## 9. Security model
- **Client-side processing.** GLB files never leave the browser unless the user explicitly pins them. Drag-and-drop uses the File API and blob URLs — no upload.
-- **Skill sandbox.** Skills are arbitrary JS. The registry has three trust modes: `any` (dev only), `owned-only` (skill author must match agent owner), and `whitelist`. Combined with **ERC-7710 delegation** for wallet-touching capabilities, a skill can only sign or transact with permissions the user has explicitly delegated.
+- **Skill sandbox.** Skills are arbitrary JS. The registry has three trust modes: `any` (dev only), `owned-only` (the default: skill author must match agent owner), and `whitelist` (reserved, the allowlist consultation is still a hook in `src/skills/index.js`). Combined with **ERC-7710 delegation** for wallet-touching capabilities, a skill can only sign or transact with permissions the user has explicitly delegated.
- **CSP compatibility.** The embed bundle has no inline scripts; host pages can set strict CSP.
- **Embed policy.** The manifest can declare `embed.origins` as an allowlist or denylist. Enforced client-side by the element and server-side via referrer checks.
- **SIWE.** Sign-In With Ethereum for backend mutations: signed typed message with server nonce → session cookie. No passwords.
diff --git a/docs/avatar-creation.md b/docs/avatar-creation.md
index 1f63f9a75..361a33f74 100644
--- a/docs/avatar-creation.md
+++ b/docs/avatar-creation.md
@@ -33,7 +33,7 @@ Good lighting and a plain background give the best results. Photos can be JPEG o
1. Go to **https://three.ws/create** and pick the selfie path (or open **https://three.ws/create/selfie** directly)
2. Choose **Camera** (to take live photos in-browser) or **Upload** (to pick files from your device)
3. Fill the frontal slot; add left/right photos if you have them
-4. Select your preferred **body type** (male / female) and **avatar style** (v1 = Photoreal, v2 = Stylized)
+4. Select your **avatar style** (v1 = Photoreal, v2 = Stylized). There is deliberately no body-type picker: reconstruction fits your face onto one shared template body today, so a masc/femme toggle would change nothing. Body choice returns when reconstruction moves onto the parametric base, tracked in [avatar-fidelity-program.md](avatar-fidelity-program.md) under Track 5
5. Click **Submit**
The photos are downscaled in the browser and sent to the native avatar reconstruction backend. A build view shows progress while the rigged GLB renders (typically a minute or two); when the job finishes, the avatar is saved to your three.ws account automatically and opens for review.
@@ -46,8 +46,8 @@ If your browser or device doesn't support `getUserMedia`, the Camera option is d
For developers who want to understand what happens under the hood:
-1. [selfie-capture.js](../src/selfie-capture.js) manages the two-step UI: method choice (camera vs upload) and the photo slots (frontal required, sides optional). On submit it dispatches a `selfie:submit` CustomEvent with `{ files, bodyType, avatarType }`.
-2. [selfie-pipeline.js](../src/selfie-pipeline.js) handles that event: it runs an on-device photo check and refinement pass ([selfie-refine.js](../src/selfie-refine.js)), downscales each photo to a max of 1024px as JPEG, then POSTs to `/api/avatars/reconstruct` with the photos and body/style preferences.
+1. [selfie-capture.js](../src/selfie-capture.js) manages the two-step UI: method choice (camera vs upload) and the photo slots (frontal required, sides optional). On submit it dispatches a `selfie:submit` CustomEvent with `{ files, avatarType, method }`.
+2. [selfie-pipeline.js](../src/selfie-pipeline.js) handles that event: it runs an on-device photo check and refinement pass ([selfie-refine.js](../src/selfie-refine.js)), downscales each photo to a max of 1024px as JPEG, then POSTs to `/api/avatars/reconstruct` with the photos and the chosen style.
3. The endpoint returns a `jobId`. The pipeline dispatches `selfie:building` and polls `/api/avatars/regenerate-status?jobId=...` every 3 seconds, dispatching `selfie:progress` ticks the build view renders.
4. On `{ status: 'done', resultAvatarId }` it dispatches `selfie:done { avatarId }`. The avatar record and its GLB in R2 storage were created server-side, so nothing else needs to be uploaded. Failures dispatch `selfie:build-error` with a message and, when detectable, the photo slot that caused it.
diff --git a/docs/avatar-reconstruction.md b/docs/avatar-reconstruction.md
index 4be398d80..115957385 100644
--- a/docs/avatar-reconstruction.md
+++ b/docs/avatar-reconstruction.md
@@ -76,11 +76,14 @@ closes that gap:
freely, so a Gaussian locality mask fades the field to zero off the face and
the scalp, ears and neck stay put.
-`strength` and `max_displacement_frac` default to **0.6 / 0.45**, chosen by an
-ISE sweep over the 40-face reference set (`python -m eval.tune_morph`), not by
-eye. They cut mean ISE 43% against the original 0.75 / 0.18, whose ~1.9 cm
-displacement ceiling was throttling genuine facial variation rather than
-rejecting outliers. See [avatar-fidelity-program.md](avatar-fidelity-program.md)
+`strength` and `max_displacement_frac` default to **0.6 / 0.55**, chosen by two
+sweeps over the 40-face reference set, not by eye: `python -m eval.tune_morph`
+(mean ISE, is the shape right?) and `python -m eval.robustness` (does a degraded
+photo of the same person still give the same head?). 0.55 sits at the knee of
+that fidelity-vs-robustness curve, cutting mean ISE 46% against the original
+0.75 / 0.18, whose ~1.9 cm displacement ceiling was throttling genuine facial
+variation rather than rejecting outliers; past 0.65 fidelity flatlines while
+instability keeps rising. See [avatar-fidelity-program.md](avatar-fidelity-program.md)
for why the sweep's own looser optimum was deliberately not shipped.
Because vertex count and order never change, `glb_ops.set_head_geometry` writes
diff --git a/prompts/swarm-100/docs-batch-27.md b/prompts/swarm-100/docs-batch-27.md
deleted file mode 100644
index 5b2bab0ce..000000000
--- a/prompts/swarm-100/docs-batch-27.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# Docs audit batch 27: /docs/animations through /docs/avatar-thumbnails
-
-How to run: paste this file's repo path into a fresh Claude Code chat in this
-repository and say "run this work order". This file is fully self-contained:
-it depends on no other prompt file anywhere. If neighboring files in
-prompts/swarm-100/ are gone, that work is done; if present, ignore them.
-Every claim below rots; step 0 re-measures, and what you measure wins.
-
-## Operating clause (binding)
-
-- Read CLAUDE.md first. Its rules override everything, including this file.
-- Finish 100% in this session. Never end the turn with a question, an option
- list, or an unexecuted plan. A judgment call goes in one line of the final
- report; it never becomes a question that halts work.
-- The only permitted stops are the CLAUDE.md stop-and-ask gates: spending real
- funds or any irreversible on-chain write, git push or a production deploy,
- committing content that references a crypto project other than $THREE, and
- destroying unrecoverable data.
-- No mocks, no fake data, no placeholder stubs, no unfinished-work markers, no
- commented-out code. Real APIs and real integrations only.
-- The em-dash and en-dash characters are banned in everything you write.
-- Concurrent agents share this worktree: stage explicit paths only (never a
- bare add-everything), and commit finished work promptly.
-- Before committing, run: npm run check:rules -- --paths <files you touched>.
- It must exit 0.
-
-## Step 0: re-derive the current state
-
-1. Confirm each path below still exists in data/pages.json; a path that was
- removed there is out of scope (note it in the report, skip it).
-2. Start (or reuse) the local dev server: npm run dev (vite, port 3000).
-3. Probe production for each path:
-
- for p in /docs/animations /docs/choreography /docs/architecture /docs/avatar-creation /docs/avatar-inspector /docs/avatar-pipeline /docs/avatar-reconstruction /docs/avatar-thumbnails; do printf '%s ' "$p"; curl -so /dev/null -w '%{http_code}\n' "https://three.ws$p"; done
-
-## Task: audit this batch of docs pages, then fix everything found
-
-Pages in this batch:
-
-- /docs/animations ("Docs · Animations")
-- /docs/choreography ("Docs · Choreography")
-- /docs/architecture ("Docs · Architecture overview")
-- /docs/avatar-creation ("Docs · Avatar creation")
-- /docs/avatar-inspector ("Docs · Avatar inspector")
-- /docs/avatar-pipeline ("Docs · The avatar pipeline")
-- /docs/avatar-reconstruction ("Docs · Selfie to avatar reconstruction")
-- /docs/avatar-thumbnails ("Docs · Avatar thumbnails")
-
-For every page, in a real headless browser against localhost:
-
-1. HTTP 200, zero console errors, zero unhandled failed requests.
-2. Every link on the page resolves (internal paths exist in the route table;
- anchors have targets). Fix or remove dead ones.
-3. Content accuracy: the page documents current behavior. Spot-check its claims against the code it describes; where it names a command, run the command; where it shows a code sample, the sample must actually run. Fix stale claims in the same change.
-4. Title tag and meta description present and specific.
-5. Fix defects at their root and re-run until clean.
-
-## Definition of done
-
-- [ ] Every page in the batch loads locally with HTTP 200 and zero console
- errors.
-- [ ] Zero dead links across the batch.
-- [ ] Every named command and code sample on these pages verified runnable, or corrected.
-- [ ] Title and meta description verified on every page.
-- [ ] npm run check:rules -- --paths <touched files> exits 0; npm test passes
- if you touched code.
-- [ ] Production status per page recorded in the report.
-
-## Never blocked
-
-| Blocker | Resolution (act, do not ask) |
-|---|---|
-| Missing env var or credential | Check .env and .env.local, then the Cloud Run service env, then Secret Manager (the CLAUDE.md self-unblock playbook has the exact commands). If it truly exists nowhere, wire the code fully behind the env var, prove the wiring with a dry run, and name the single missing var in the report. |
-| gcloud not on PATH | Run: export PATH="$HOME/google-cloud-sdk/bin:$PATH" |
-| Dev server port 3000 busy | Another agent may be serving this repo; probe it and reuse if so. Otherwise start your own on a free port: npx vite --port 3101 |
-| Playwright browser missing | npx playwright install chromium |
-| A surface needs a signed-in user | Register a fresh account through the real /register flow against the real API and use it. Never mock the session. |
-| A defect sits in code you did not touch | Fix it if it blocks a Definition of done line (root cause it, never mask it). Otherwise note it in the report and continue. |
-| An unrelated test is red | Same rule. Never pipe npm test through tail; it masks exit codes. |
-
-## Close out (required)
-
-1. Verify every Definition of done line with the actual command output in
- front of you. Never claim a line you did not verify.
-2. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares).
-3. Delete this prompt file in that same commit:
-
- git rm prompts/swarm-100/docs-batch-27.md
-
- The shrinking directory is this campaign's only progress ledger; there is
- no progress log to update.
-4. Final report: what step 0 measured, what changed (file list), evidence per
- Definition of done line, and any one-line judgment calls. No trailing
- questions, no unexecuted plans.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns
-it. Never delete this file on a partial.