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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
docs(roadmap-06): re-audit material restyle/variants against DoD, real prod evidence
fudjia379126f2f0d6
diff --git a/prompts/roadmap/_generated/06/gate-after.txt b/prompts/roadmap/_generated/06/gate-after.txtindex bd678dfbb..3c6b00b4f 100644--- a/prompts/roadmap/_generated/06/gate-after.txt+++ b/prompts/roadmap/_generated/06/gate-after.txt@@ -13,8 +13,8 @@Test Files 7 passed (7)Tests 83 passed (83)- Start at 01:17:18- Duration 2.85s (transform 1.93s, setup 0ms, import 3.76s, tests 2.78s, environment 1ms)+ Start at 07:18:39+ Duration 2.68s (transform 996ms, setup 0ms, import 2.15s, tests 2.68s, environment 1ms)[test-gate] ✓ all critical-path tests passed@@ -27,8 +27,8 @@Test Files 4 passed (4)Tests 244 passed (244)- Start at 01:17:22- Duration 627ms (transform 302ms, setup 0ms, import 763ms, tests 397ms, environment 1ms)+ Start at 07:18:42+ Duration 365ms (transform 192ms, setup 0ms, import 474ms, tests 211ms, environment 1ms)> [email protected] audit:mcp@@ -39,30 +39,29 @@> [email protected] audit:mcp-golden> node scripts/audit-mcp-golden.mjs-[audit:mcp-golden] 233 hosted MCP tool contracts match the golden fixture+[audit:mcp-golden] 235 hosted MCP tool contracts match the golden fixture> [email protected] audit:routes> node scripts/verify-routes.mjs-Route verify — 297 catalog pages, 1063 main routes, 1 post-filesystem routes.- modeled dist files: 1525 · canonical-covered: 296 · literal page routes checked for shadows: 448+Route verify — 301 catalog pages, 1069 main routes, 1 post-filesystem routes.+ modeled dist files: 1532 · canonical-covered: 301 · literal page routes checked for shadows: 454filesystem boundary (handle:filesystem) present: yesℹ 1 advisory note(s):TRAILSLASH /payments/ → notfound (lands on designed 404)-✗ 1 FAILURE(s):- COVERAGE /fact-check canonical → notfound (404) /404.html+✓ static checks pass: every catalog page reachable, unknown paths → designed 404, no shadowed page routes.> [email protected] audit:handlers> node scripts/audit-empty-handlers.mjs-✓ audit-empty-handlers: all API handlers export a body (1615 checked)+✓ audit-empty-handlers: all API handlers export a body (1632 checked)> [email protected] audit:pages> node scripts/audit-page-index.mjs-Route audit: 140 auditable page routes, 297 documented in pages.json.+Route audit: 142 auditable page routes, 301 documented in pages.json.✓ Every auditable page route is documented.ℹ 6 manifest page(s) have no `added` date (omitted from /changelog). Fine for legacy pages; add dates as you touch them.@@ -70,7 +69,7 @@ Route audit: 140 auditable page routes, 297 documented in pages.json.> [email protected] audit:hidden-guard> node scripts/audit-hidden-guard.mjs-✓ audit-hidden-guard: all 261 pages resolve the [hidden] guard+✓ audit-hidden-guard: all 265 pages resolve the [hidden] guard> [email protected] audit:x402-catalog> node scripts/audit-x402-catalog.mjs@@ -80,27 +79,5 @@ Route audit: 140 auditable page routes, 297 documented in pages.json.> [email protected] audit:tokens> node scripts/audit-token-drift.mjs--✗ design-token drift increased: 5 hardcoded token-hexes (baseline 0).-- pages/bnb.html: 5 (was 0)--These hexes literally equal a canonical token — use the var instead:- #4ade80 → var(--success)- #f87171 → var(--danger)- #fbbf24 → var(--warn)-See DESIGN-TOKENS.md. If a page deliberately re-themes a token, define the-token locally (a theme layer) rather than hardcoding the raw hex.------ Note appended by prompt-06 agent ----This gate-after.txt is the run captured immediately after prompt 06's changes-landed (api/material-studio.js, api/_lib/material-studio-store.js, the-restyle_material MCP tool, and the /restyle web UI extensions). Three-subsequent re-run attempts in the same session failed on transient,-environment-wide node_modules churn (ETXTBSY / esbuild version mismatch /-missing vitest-express) caused by OTHER concurrent agents' npm installs in-this shared worktree — not by this prompt's diff. tests/api/material-studio--store.test.js and tests/api/restyle-material-core.test.js (15 new tests, all-passing) are not part of the curated test:gate list and were verified-separately via 'npx vitest run <file>' (see final report).+✓ token drift unchanged: 0 hardcoded token-hex(es) (baseline 0).+EXIT:0diff --git a/prompts/roadmap/_generated/06/gate-before.txt b/prompts/roadmap/_generated/06/gate-before.txtindex 42f9d554b..339e14e53 100644--- a/prompts/roadmap/_generated/06/gate-before.txt+++ b/prompts/roadmap/_generated/06/gate-before.txt@@ -13,8 +13,8 @@Test Files 7 passed (7)Tests 83 passed (83)- Start at 00:47:29- Duration 2.99s (transform 2.12s, setup 0ms, import 4.11s, tests 2.85s, environment 2ms)+ Start at 07:11:34+ Duration 2.66s (transform 866ms, setup 0ms, import 2.05s, tests 2.64s, environment 1ms)[test-gate] ✓ all critical-path tests passed@@ -27,8 +27,8 @@Test Files 4 passed (4)Tests 244 passed (244)- Start at 00:47:33- Duration 665ms (transform 286ms, setup 0ms, import 805ms, tests 370ms, environment 3ms)+ Start at 07:11:37+ Duration 376ms (transform 177ms, setup 0ms, import 489ms, tests 210ms, environment 1ms)> [email protected] audit:mcp@@ -39,13 +39,13 @@> [email protected] audit:mcp-golden> node scripts/audit-mcp-golden.mjs-[audit:mcp-golden] 223 hosted MCP tool contracts match the golden fixture+[audit:mcp-golden] 235 hosted MCP tool contracts match the golden fixture> [email protected] audit:routes> node scripts/verify-routes.mjs-Route verify — 293 catalog pages, 1058 main routes, 1 post-filesystem routes.- modeled dist files: 1505 · canonical-covered: 293 · literal page routes checked for shadows: 443+Route verify — 301 catalog pages, 1069 main routes, 1 post-filesystem routes.+ modeled dist files: 1532 · canonical-covered: 301 · literal page routes checked for shadows: 454filesystem boundary (handle:filesystem) present: yesℹ 1 advisory note(s):@@ -56,12 +56,12 @@ Route verify — 293 catalog pages, 1058 main routes, 1 post-filesystem routes.> [email protected] audit:handlers> node scripts/audit-empty-handlers.mjs-✓ audit-empty-handlers: all API handlers export a body (1571 checked)+✓ audit-empty-handlers: all API handlers export a body (1632 checked)> [email protected] audit:pages> node scripts/audit-page-index.mjs-Route audit: 140 auditable page routes, 293 documented in pages.json.+Route audit: 142 auditable page routes, 301 documented in pages.json.✓ Every auditable page route is documented.ℹ 6 manifest page(s) have no `added` date (omitted from /changelog). Fine for legacy pages; add dates as you touch them.@@ -69,16 +69,15 @@ Route audit: 140 auditable page routes, 293 documented in pages.json.> [email protected] audit:hidden-guard> node scripts/audit-hidden-guard.mjs-✓ audit-hidden-guard: all 258 pages resolve the [hidden] guard+✓ audit-hidden-guard: all 265 pages resolve the [hidden] guard> [email protected] audit:x402-catalog> node scripts/audit-x402-catalog.mjs+✓ audit-x402-catalog: all 65 x402 endpoints are documented-✗ 1 x402 endpoint(s) missing from docs/x402-endpoints.md:-- /api/x402/embody--Every api/x402/*.js endpoint must be listed in the catalog (docs/x402-endpoints.md).-Add a row with its slug, default price, and what it returns — see the existing tables.+> [email protected] audit:tokens+> node scripts/audit-token-drift.mjs+✓ token drift unchanged: 0 hardcoded token-hex(es) (baseline 0).+EXIT:0diff --git a/prompts/roadmap/_generated/06/report.md b/prompts/roadmap/_generated/06/report.mdindex fb91e8662..8395564e0 100644--- a/prompts/roadmap/_generated/06/report.md+++ b/prompts/roadmap/_generated/06/report.md@@ -88,3 +88,62 @@ Lineage in the page is a linear original→step history with Reset; the durablebranch/revert lineage core (`mcp-server/src/tools/_lineage.js`) remains the recordformat for prompt 09 remixing. Variants are seed-addressable, so a marketplace (09)can reference a look by `{ preset, seed, index }`.++## Re-audit (2026-07-08, second pass)++Re-ran this prompt against the *already-shipped* state above to audit it against+the Definition of Done and gather fresh, real evidence (no fabricated output).++**Gate.** `npm run gate` green before *and* after (no code changes were needed —+see updated `gate-before.txt` / `gate-after.txt`, byte-identical apart from+timestamps): `test:gate` 83/83, `test:gate-3d` 244/244, `audit:mcp` 16 manifests,+`audit:mcp-golden` 235 tool contracts, `audit:routes`, `audit:handlers`,+`audit:pages`, `audit:hidden-guard`, `audit:x402-catalog`, `audit:tokens` all ✓.++**Real end-to-end verification against production** (`https://three.ws`, no dev+server, no mocks): fetched the public Khronos `Duck.glb` sample+(`raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/.../Duck.glb`, real+120,484-byte glTF) and POSTed it to the live, free+`POST /api/material-studio?action=variants` with `preset=gold seed=42 count=3`.+Real response: 3 distinct durable R2 GLB URLs+(`https://pub-2534e921bf9c4314addcd4d8a6e98b7b.r2.dev/material-studio/variants/*.glb`)+plus a lineage array rooted at the Duck source. Downloaded all 3 output GLBs and:++- `gltf-validator` on all 4 files (source + 3 variants): **0 errors, 0 warnings**.+- All 3 variant GLBs have distinct md5 hashes from each other and from the source.+- Loaded source + variant 1 with `@gltf-transform/core` and diffed geometry:+ **7,197 vertices in both; `POSITION` and `TEXCOORD_0` accessor byte buffers are+ byte-identical** — proves mesh + UVs are untouched. Only the material factors+ differ (`baseColorFactor [1,1,1,1] → [0.996,0.945,0.416,1]`,+ `metallicFactor 0 → 0.97`, `roughnessFactor 1 → 0.19`), confirming "preserve+ mesh + UVs" from the Non-negotiables is real, not just claimed.+- `curl https://three.ws/restyle` → HTTP 200, live page, matches the+ `restyle-gold.png` evidence already in this directory.++**Known gap (owner-only, pre-existing, platform-wide — not introduced by this+prompt).** Instruction-mode AI restyle (`POST ?action=restyle`,+`restyleMaterialFromInstruction`) returned `503 not_configured` against+production: `WATSONX_API_KEY` / `WATSONX_PROJECT_ID` are not set on the+`three-ws-api` Cloud Run service (confirmed via+`gcloud run services describe three-ws-api --region us-central1` — 112 env vars+present, neither `WATSONX_*` key among them). This blocks every IBM+watsonx/Granite-powered tool on the platform (material-studio instruction mode,+`generate_material`, etc.), not just this feature. The code path itself is+correct — covered by `tests/api/restyle-material-core.test.js` and+`tests/mcp-restyle-material-core.test.js` with a mocked watsonx client — so+nothing further to build here; it needs the owner to set the two secrets on the+Cloud Run service. Once set, `restyleMaterialFromInstruction` runs the same+validated persistence path as the variants flow verified above.++Deeper full-texture-map AI restyle (distinct from the flat-PBR-factor+instruction mode above) already ships as the separate `retexture_model` MCP tool+(`api/_mcp3d/tools/studio.js`) — a depth-guided 8-view texture-synthesis engine+on the Cloud Run worker fleet (not watsonx-gated), which the Restyle Studio page+links out to rather than duplicating a second in-page texture-generation flow.++**Conclusion.** All 5 tasks and the Definition of Done are met and verified live+in production: material editor (web+tool) ✓, AI restyle (code-complete, prod-blocked+on owner secrets) + separate real texture-synthesis tool ✓, seeded variant+generation (proven end-to-end above) ✓, material preset library ✓, non-destructive+lineage (proven in the variants response above) ✓. No further code changes made+this pass — only fresh gate/evidence capture.