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(prompts): retire the quality-campaign pack, record roadmap gate outputs

nirholaseb92be40b56e
diff --git a/prompts/bnb-chain/00-CONTEXT.md b/prompts/bnb-chain/00-CONTEXT.md
index 91919af15..a3ffa6b1b 100644
--- a/prompts/bnb-chain/00-CONTEXT.md
+++ b/prompts/bnb-chain/00-CONTEXT.md
@@ -73,7 +73,7 @@ Honest-docs rule: any "only on BNB Chain" claim you write must trace to the veri
| opBNB | out of scope this campaign (note gaps in PROGRESS if relevant) |
| Greenfield mainnet / testnet | chain `greenfield_1017-1` / `greenfield_5600-1`; SP + RPC endpoints per `@bnb-chain/greenfield-js-sdk` docs |
| MegaFuel | mainnet `https://bsc-megafuel.nodereal.io`, testnet `https://bsc-megafuel-testnet.nodereal.io` (confirm exact paths in docs.nodereal.io/docs/megafuel) |
-| tBNB faucet | `https://www.bnbchain.org/en/testnet-faucet` (alternatives: QuickNode/Chainlink faucets) |
+| tBNB faucet | `https://www.bnbchain.org/en/testnet-faucet` (alternatives: Quicknode/Chainlink faucets) |
## The codebase map (so you never have to hunt)
diff --git a/prompts/quality-campaign/01-photoreal-3d-pipeline.md b/prompts/quality-campaign/01-photoreal-3d-pipeline.md
deleted file mode 100644
index ada55db4e..000000000
--- a/prompts/quality-campaign/01-photoreal-3d-pipeline.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# 01 - Photoreal objects: multi-view fusion + texture fidelity
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question. GCP spend is pre-approved; no new third-party APIs.
-
-## Mission
-
-A text->3D generation on three.ws should look like a photograph of a real object from every
-angle. The single-reference-image pipeline guesses the back and sides of every object; the fix
-is multi-view: generate front/side/back reference views with the Vertex image model and fuse
-them in TRELLIS (`run_multi_image`) and Hunyuan3D (both accept multiple input images; the
-worker `/infer` already takes `images: []` as a list). Then close the texture-fidelity gap:
-the final mesh texture must carry the reference image's material detail, not a blurred bake.
-
-## Current state (verified 2026-07-16; re-verify against the tree, the swarm moves fast)
-
-- A multi-view synthesis effort was mid-flight in the swarm on 07-16 ("multiview-fusion" tier
- blurbs landed in commit c2e07162a). FIRST ACTION: `git log --oneline -20` and
- `grep -rn "multi_image\|multiview\|multi_view" api/ workers/model-trellis/ workers/model-hunyuan3d/`
- to find what already shipped. Extend what exists; do not duplicate it.
-- Reference images: `api/_mcp3d/text-to-image.js` (realism suffixes live here) over
- `api/_mcp3d/vertex-imagen.js` (`gemini-2.5-flash-image`, `:generateContent`). The Gemini
- image model accepts an input image + instruction, which is how you get consistent side/back
- views: pass the generated front view with "same exact object, rotated to a direct side view,
- same lighting and background" rather than re-prompting from text (re-prompting drifts).
-- Workers: `workers/model-trellis/main.py` (TRELLIS pipeline; `run_multi_image` exists in the
- TRELLIS library), `workers/model-hunyuan3d/main.py` (`images` list already in the wire
- shape). Worker auth: Secret Manager `avatar-reconstruction-key`. Wire: POST /infer -> task_id,
- GET /tasks/:id -> result_gcs_url, /health.
-- Lane plumbing: `api/_providers/gcp.js` (modes `trellis`/`hunyuan`, passes `params.quality`),
- `api/_lib/forge-tiers.js` (per-tier budgets), `api/forge.js` (routing, ~2000 lines).
-- Tier semantics: draft = speed, standard = default, high = paid Hunyuan3D lane. Multi-view
- belongs on standard and high (draft stays single-view fast).
-
-## Tasks
-
-1. **Audit what shipped.** Map the current multi-view state end to end. If the swarm finished
- it, skip to task 3 and deepen texture fidelity instead; report which branch you took.
-2. **Multi-view reference synthesis.** In `text-to-image.js` (or a sibling module), add
- `textToMultiView(prompt)`: front view from text, then side + back via image+instruction
- edits of the front view for object consistency. Store all views in R2 like single
- references. Wire through `gcp.js` so `images[]` carries all views to TRELLIS
- (`run_multi_image`) and Hunyuan3D on standard/high tiers. Flag-gate:
- `FORGE_MULTIVIEW=1` on by default in code, `0` reverts to single-view. Cost per gen is
- 2 extra Vertex images + longer GPU seconds: pre-approved.
-3. **Texture fidelity.** The reconstruction's baked texture is the weak link. Options already
- in-house, in preference order: raise texture bake size where the worker clamps it (2048 is
- the current clamp; measure whether 4096 fits L4 VRAM at high tier before enabling);
- Hunyuan3D's paint/texture stage settings in `workers/model-hunyuan3d/main.py`
- (`_quality_for`); the `stylize`/`texture` workers for a detail pass. Pick what measurably
- helps; show before/after renders.
-4. **Prompt treatment.** The realism suffixes are good; extend them only where evaluation shows
- drift (e.g. metallic/glass materials, text on labels). Keep the ART_STYLE_WORDS skip rule:
- a user asking for "cartoon" must never get photoreal.
-5. **Verification harness (definition of done).** Generate this fixed prompt set at standard
- and high, before and after your changes: leather armchair, chrome espresso machine, worn
- hiking boot, glass perfume bottle, wooden acoustic guitar. For each: GLB size, triangle
- count, texture resolution, quality score from the pipeline, and a 4-angle render
- (front/back/left/right; `scripts/` has GLB render helpers, else use three.js headless via
- the existing test tooling). Back/side views must depict the object, not a mirrored front.
-6. **Ship.** Deploy touched workers (Cloud Build, clean worktree), set env on `three-ws-api`,
- run one live production generation per tier, commit code + docs (changelog entry: holders
- care about "3D generations now look real from every angle").
-
-## Guardrails
-
-- Do not break the free draft lane's latency; multi-view is standard/high only.
-- NVCF hosted results are consume-once (poll handling in `api/_lib/forge-failover.js`); do not
- re-fetch a hosted result URL twice.
-- The swarm may be mid-deploy on these exact workers. Before deploying, `gcloud run revisions
- list` and confirm you are not clobbering a newer revision than your base; rebase your change
- on the deployed source if the repo and the deployed image diverge.
-
-## Acceptance criteria
-
-- [ ] Standard + high tiers fuse >= 3 reference views (proven by worker logs + payload capture).
-- [ ] The 5-prompt eval set shows better back/side fidelity than baseline (renders in the report).
-- [ ] `FORGE_MULTIVIEW=0` cleanly reverts to today's behavior (tested).
-- [ ] One live production generation per tier completes E2E; URLs in the report.
-- [ ] Committed with changelog entry + docs; `npm test` green; report contains every command and measurement.
diff --git a/prompts/quality-campaign/02-photoreal-humans.md b/prompts/quality-campaign/02-photoreal-humans.md
deleted file mode 100644
index 1ea92fe25..000000000
--- a/prompts/quality-campaign/02-photoreal-humans.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# 02 - Photoreal humans: faces, skin, hair that read as IRL people
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question. GCP spend is pre-approved; no new third-party APIs.
-
-## Mission
-
-Avatars generated on three.ws should look like actual people: skin with pores and asymmetry,
-believable hair, eyes with catchlights, not glossy mannequins. The person-realism prompt work
-landed 07-16 (`PERSON_REALISM_SUFFIX` in `api/_mcp3d/text-to-image.js`); this prompt finishes
-the job across the whole avatar chain: reference image -> reconstruction -> rigging -> the way
-skin is shaded in every viewer.
-
-## Current state (verified 2026-07-16; re-verify against the tree)
-
-- `PERSON_SUBJECT_RE` routes human prompts to portrait-photography language (85mm DSLR, pores,
- hair strands). ART_STYLE_WORDS still correctly suppresses realism for stylized asks.
-- Avatar chain: `text_to_avatar` / `forge_avatar` MCP tools -> mesh generation -> UniRig
- auto-rig (`GCP_UNIRIG_URL`, service `unirig`, live) with humanoid gate
- (`AnimationManager.supportsCanonicalClips()` fallback, never a T-pose). Universal retarget:
- `src/glb-canonicalize.js` + `src/animation-retarget.js`.
-- `avatar-reconstruction` Cloud Run service (photo->avatar) is live with L4.
-- Viewers: the IRL view got ACES filmic tone mapping + cinematic lighting 07-15
- (`src/` IRL modules); avatar-result viewers were brought up to that bar in commit 8cd1be411.
-- Hunyuan3D-2 (`GCP_HUNYUAN3D_URL`, live) reconstructs humans better than TRELLIS at high tier.
-
-## Tasks
-
-1. **Face fidelity through multi-view.** Bodies survive single-view reconstruction; faces do
- not. Reuse prompt 01's multi-view machinery (check `git log` for its state; if 01 has not
- run yet, build the person-specific slice here and leave a note in 01's file): front portrait
- plus 3/4-left and 3/4-right views via Gemini image edit ("same exact person, head turned 40
- degrees left, identical lighting"), fused in the reconstruction. The face must survive a
- 90-degree orbit without smearing.
-2. **Skin shading in the viewers.** Reconstructed textures often ship flat albedo. In the
- shared viewer setup (the module 8cd1be411 touched; find it via
- `grep -rn "ACESFilmicToneMapping" src/ | head`), ensure avatar materials get: correct sRGB
- texture encoding, a modest clearcoat=0 / roughness floor (glossy skin reads mannequin),
- and environment lighting from the existing HDRI/room env. If the GLB carries PBR maps, do
- not override them.
-3. **Hair.** Reconstruction collapses hair to a helmet. Mitigate at the reference stage: the
- portrait prompt should specify visible individual hair strands and avoid flyaway backlight
- halos (they reconstruct as spikes). Measure on the eval set; if reference-stage language is
- insufficient, document what a dedicated hair pass would need (do not bolt on a new model).
-4. **The full-body proportion check.** Full-body prompts must produce anatomically plausible
- proportions for rigging (UniRig fails or produces bad skinning on distorted bodies). Add a
- pre-rig sanity gate if failures show up in `forge_creations` records for avatar jobs.
-5. **Eval set (definition of done).** Generate at standard and high, before/after: "a
- middle-aged carpenter with a gray beard", "a young woman with curly red hair, freckles",
- "an elderly man in a linen suit", "a female astronaut, helmet off", "a teenage boy in a
- hoodie". For each: 4-angle render, rigged idle-animation check (the retarget must drive it;
- no T-pose), and the platform quality score. Faces must hold up at 90-degree orbit.
-6. **Ship.** Deploy, one live production avatar per tier E2E (generation -> rig -> animated in
- the viewer), commit + changelog ("avatars now look like real people").
-
-## Guardrails
-
-- Never regress stylized asks: "cartoon knight" must stay cartoon (ART_STYLE_WORDS test).
-- Rigging gate stays universal: no rig allowlists (CLAUDE.md stack note); a new skeleton
- convention gets a bone-name mapping in `glb-canonicalize.js` + test.
-- Bone names with punctuation broke a USDZ bake once (bone-name-sanitize, memory 07-15): run
- the iOS AR bake path on one eval avatar to confirm no regression.
-
-## Acceptance criteria
-
-- [ ] Eval faces survive a 90-degree orbit (before/after renders in the report).
-- [ ] Avatar materials render with sRGB + env lighting in the shared viewers (screenshot proof).
-- [ ] All 5 eval avatars rig and play the canonical idle (no T-pose, no console errors).
-- [ ] One live production avatar per tier E2E; URLs in the report.
-- [ ] Committed with changelog + docs; `npm test` green; report shows every measurement.
diff --git a/prompts/quality-campaign/03-presentation-lighting.md b/prompts/quality-campaign/03-presentation-lighting.md
deleted file mode 100644
index 6785f04e3..000000000
--- a/prompts/quality-campaign/03-presentation-lighting.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# 03 - Presentation: every 3D surface renders at the cinematic bar
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question. GCP spend is pre-approved; no new third-party APIs.
-
-## Mission
-
-A photoreal mesh shown in a flat-lit viewer still looks fake. The IRL camera view set the bar
-on 07-15: ACES filmic tone mapping, rich key/fill/rim lighting, soft shadows, sharp textures.
-Avatar-result viewers were partially aligned (commit 8cd1be411). This prompt finishes the
-sweep: every place a model or avatar renders on the platform uses the same cinematic pipeline,
-and every generated asset gets a presentation-quality thumbnail.
-
-## Current state (verified 2026-07-16; re-verify)
-
-- The bar: IRL view modules (find via `grep -rln "ACESFilmicToneMapping" src/`). Elements:
- `renderer.toneMapping = ACESFilmicToneMapping`, physically-correct lights, environment map,
- shadow-mapped key light, `outputColorSpace = SRGBColorSpace`.
-- Known viewer surfaces (enumerate more from `STRUCTURE.md` and `grep -rln "new WebGLRenderer" src/ public/`):
- the main agent viewer, /forge result viewer, /avatar and pose studio, /scene Studio, /ar,
- /irl, /walk + /play worlds, marketplace cards, agent profile pages, the `<agent-3d>` embed
- (`apps-sdk/embodiment/embodiment-stage.js`), README-3D, Shopify tour embeds.
-- Thumbnails: `forge_creations` records carry thumbnail URLs; memory rule: never synthesize
- thumbnail URLs, always render real ones.
-- /walk exhausted WebGL contexts with 8 iframes once (memory 07-10): shared-context or
- frugal-context patterns matter on multi-viewer pages.
-- A frame governor + Eco mode shipped for /play (07-14): respect it; cinematic must not cost
- battery on low-power mode.
-
-## Tasks
-
-1. **Inventory.** Every renderer creation site in `src/`, `public/`, `apps-sdk/`, plus each
- page that shows a GLB. Table: surface, current tone mapping, lighting rig, env map, shadows,
- pixel ratio handling. This inventory drives the rest and goes in the report.
-2. **Extract the standard.** One shared module (e.g. `src/shared/cinematic-stage.js`, or extend
- the one 8cd1be411 used) exporting the canonical setup: tone mapping, color space, light rig,
- env, shadow config, and a `quality` knob (high / balanced / eco) that the frame governor and
- embed contexts can select. Small API, no framework.
-3. **Adopt everywhere.** Convert every inventoried surface. Visual check each at 320/768/1440
- widths. Embeds (`<agent-3d>`, Shopify, README-3D) must default to balanced and honor an
- explicit quality attr.
-4. **Thumbnails at the same bar.** The thumbnail/OG render path for generated assets renders
- with the same stage (lighting is most of why thumbnails look cheap). Regenerate thumbnails
- for the most-viewed existing assets (query `forge_creations` by views/downloads; backfill
- cron pattern already exists in the avatar-thumbnail work, see `api/cron/`).
-5. **AR parity.** iOS Quick Look uses baked USDZ (animated bake shipped 07-16 in 8b23b8d9e);
- confirm the bake inherits texture quality (no downscale below 2048 for high-tier assets) and
- the WebXR path uses the shared stage.
-6. **Ship.** Deploy from a clean worktree, verify on production URLs on desktop + a phone
- viewport, commit + changelog ("every 3D view on the platform now renders with cinematic
- lighting").
-
-## Guardrails
-
-- No per-frame allocations in render loops; the stage must not regress the /play frame
- governor or Eco mode.
-- Multi-viewer pages (/walk grid, marketplace) must not exceed ~4 live WebGL contexts; use
- poster images + lazy context creation where the inventory shows more.
-- `public/*.html` pages not registered as Vite inputs ship raw `/src` (vite-raw-src trap,
- memory 07-10): if you add a page or module, register it in `vite.config.js` inputs.
-- Never hand-edit generated bundles; `npx vercel build` overwriting `api/*.js` is a known trap.
-
-## Acceptance criteria
-
-- [ ] Inventory table in the report; every surface converted or explicitly justified.
-- [ ] Same model screenshotted before/after on >= 6 surfaces (forge, avatar studio, marketplace card, agent profile, embed, IRL) showing the uplift.
-- [ ] Thumbnails regenerate through the cinematic stage; top-viewed assets backfilled (count in report).
-- [ ] No new console errors; frame rate on /play and /walk unchanged (measure with the existing governor stats).
-- [ ] Committed with changelog + docs; `npm test` green.
diff --git a/prompts/quality-campaign/04-ux-funnel-sweep.md b/prompts/quality-campaign/04-ux-funnel-sweep.md
deleted file mode 100644
index cda7ed6a3..000000000
--- a/prompts/quality-campaign/04-ux-funnel-sweep.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# 04 - UX sweep: the core funnels feel like a top-tier product
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question.
-
-## Mission
-
-Walk the five funnels a real user actually takes, find every rough edge, and fix all of them:
-missing loading/empty/error states, dead buttons, layout jank, unlabeled controls, confusing
-copy, broken mobile layouts. The bar is CLAUDE.md's UI/UX standards section (every state
-designed, transitions, responsive, accessibility, microinteractions). This is a fix-everything
-sweep, not an audit report.
-
-## The five funnels (in priority order)
-
-1. **Text -> 3D**: home -> /forge -> generate -> result viewer -> download / AR / send-to-scene.
-2. **Create an agent**: /create or /create-agent -> avatar generation -> agent profile -> embed code.
-3. **Markets**: /markets -> /markets/news -> article reader -> /coin/:id detail.
-4. **Worlds**: /play (join, move, interact) and /walk.
-5. **Wallet-money paths**: premium pass purchase page rendering and x402 paywall UX (UI states
- only; never execute real payments without the confirmation gate).
-
-## Tooling you already have (use it, do not rebuild it)
-
-- `npm run dev` (port 3000). Real browser verification is mandatory per CLAUDE.md.
-- `npm run audit:web`: authed console sweep across 300+ pages; QA account creds already in
- `.env`. Run it before AND after; your after-run must show strictly fewer errors.
-- Playwright is in the repo (e2e stage of `npm test`); write throwaway drive-the-funnel scripts
- in `scripts/` if manual walking is too slow, delete them before committing (repo-hygiene rule)
- or keep them only if they earn a place as real e2e tests in `tests/`.
-- Crawler gotcha (memory 07-10): high crawler concurrency produces false texture errors; keep
- concurrency modest before believing an error.
-
-## Method (per funnel)
-
-1. Walk it on desktop (1440), tablet (768), and phone (320-390) viewports, signed out AND
- signed in (QA account).
-2. Record every defect in a working list: state, element, expected vs actual, severity.
-3. Fix them all. Patterns to hold:
- - Loading: skeletons over spinners (CLAUDE.md), no layout shift on resolve.
- - Empty: what this is + one action to take, never a blank void.
- - Error: what failed + how to recover; network errors get a retry action.
- - Interactive elements: hover/active/focus states, keyboard reachable, ARIA labels.
- - Copy: plain language, no jargon, no dead-end messages.
-4. Re-walk after fixing. Then `npm run audit:web` for the regression sweep.
-
-## Known live issues to verify fixed or fix now
-
-- Re-check the 07-14 console-sweep fixes deployed cleanly (memory: fixes committed, deploy was
- pending; if still undeployed, deploying them is part of this prompt).
-- /forge engine-switch UX shipped 07-16 (never-dead-end failover): confirm the switch control
- is discoverable and announces what happened (a lane failing over silently confuses users).
-- Session-expiry mid-flow: exercise an authed page after clearing the session cookie; the UX
- must be a reauth prompt, not a silent 401 spiral (pattern from the /play 4002 fix).
-
-## Guardrails
-
-- Stage explicit paths only; concurrent agents share the worktree.
-- No visual redesigns of brand surfaces; this is polish and correctness, not a new design
- language. Use existing design tokens/CSS variables; if a page has none, adopt the nearest
- surface's tokens.
-- Every fix must hold at 320px. If a fix needs layout surgery, do the surgery.
-
-## Acceptance criteria
-
-- [ ] Defect list in the report: found -> fixed status for every item (target: zero open).
-- [ ] `npm run audit:web` after-run error count < before-run (both counts in the report).
-- [ ] Every funnel walked clean on 3 viewports, signed in and out; no console errors from platform code.
-- [ ] All five funnels' interactive elements keyboard-navigable with visible focus.
-- [ ] Committed with changelog entries for user-noticeable fixes; `npm test` green.
diff --git a/prompts/quality-campaign/05-performance-vitals.md b/prompts/quality-campaign/05-performance-vitals.md
deleted file mode 100644
index f08a3b6ef..000000000
--- a/prompts/quality-campaign/05-performance-vitals.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# 05 - Performance: fast first paint, no jank, honest async
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question.
-
-## Mission
-
-Make the platform feel instant. Measure Core Web Vitals on the ten highest-traffic pages, fix
-what the numbers say, and protect the wins with budgets. Perceived speed counts double: a
-skeleton at 100ms beats a spinner at 400ms beats a blank page at 250ms.
-
-## Measure first (baseline goes in the report)
-
-- Pages: `/`, `/forge`, `/markets`, `/markets/news`, `/coins`, `/coin/bitcoin`, `/agents`,
- `/play`, `/walk`, one agent profile. Production URLs (https://three.ws), not dev.
-- Tool: Lighthouse CLI is already installable via npx (`npx lighthouse <url> --preset=desktop`
- and default mobile, `--output=json`). Capture LCP, CLS, TBT, transfer size per page. Three
- runs each, take the median; single runs lie.
-- Bundle: `npm run build` then read the Vite output table. Anything > 250 kB gzip in the
- initial graph of a page is a finding. `dist/` chunk names are hashed; grep the manifest, not
- the filenames (chunk-grep gotcha, memory 07-15).
-
-## Fix what the numbers say (typical findings and their standard fixes)
-
-- Three.js in the initial bundle of non-3D pages: dynamic-import the viewer behind first
- interaction or viewport entry (pattern exists in `src/game/wheel-station.js`: lazy-import on
- interact).
-- Fonts blocking render: `font-display: swap` and preload only the weights above the fold
- (`public/fonts/fonts.css`).
-- CLS from images/thumbnails: explicit width/height or aspect-ratio boxes everywhere a dynamic
- image lands (news cards, marketplace grids, coin tables).
-- Uncompressed or oversized textures/posters: posters for 3D scenes should be WebP <= 100 kB;
- the full GLB loads only on interaction.
-- API waterfalls: pages that fetch sequentially (profile -> then assets -> then prices) get
- `Promise.all` or a combined endpoint if one already exists (check `api/` before adding one).
-- Long main-thread tasks from JSON parsing (news/markets): move to `response.json()` streaming
- patterns or slice rendering with `requestIdleCallback` batches; the tables already paginate,
- ensure initial page size is sane.
-
-## Infrastructure lever (GCP credits, pre-approved)
-
-- `three-ws-api` Cloud Run: check `minInstances` on the service; if cold starts show in TTFB
- (compare first-hit vs warm TTFB), raise minScale to keep 1..2 warm instances. Credits absorb it.
-- Confirm CDN cache hit rates for static assets (`gcloud compute backend-services` /
- `docs/ops/gcp-production.md` runbook has the LB layout). Assets with hashed names must be
- `cache-control: immutable`; HTML must not be cached stale (deploys purge via
- `npm run deploy:gcp`, never raw `gcloud builds submit`, which skips the purge).
-
-## Guardrails
-
-- Never fake it: no `setTimeout` progress, no optimistic spinners that lie (hard rule 5).
-- Lazy-loading must not break deep links or SEO: server-rendered/SEO-injected meta stays
- (the SEO injector stamps pages at build; do not move meta client-side).
-- Do not regress the audit:web console-error count.
-- `npm test` failures gate the e2e stage; run the full suite, do not pipe through `tail`.
-
-## Acceptance criteria
-
-- [ ] Baseline vs after table for all 10 pages (LCP, CLS, TBT, transfer), medians of 3 runs.
-- [ ] Every page: mobile LCP <= 3.0s, CLS <= 0.1, or a written reason why a page is at its floor.
-- [ ] Initial JS on non-3D pages excludes three.js (proven from the build manifest).
-- [ ] Cold-start TTFB measured; minScale raised if it was the bottleneck (numbers in report).
-- [ ] Committed with changelog entry ("the site got faster": holders notice speed); `npm test` green.
diff --git a/prompts/quality-campaign/06-quality-eval-harness.md b/prompts/quality-campaign/06-quality-eval-harness.md
deleted file mode 100644
index 59aa2415f..000000000
--- a/prompts/quality-campaign/06-quality-eval-harness.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# 06 - Quality eval harness: generation quality can never silently regress again
-
-Read `README.md` in this directory first (never-stop contract, standing approvals, shared
-context). Never end a turn with a question. GCP spend is pre-approved (this harness burns GPU
-seconds nightly by design); no new third-party APIs.
-
-## Mission
-
-Prompts 01-03 raised generation quality. Nothing currently guarantees it stays raised: the
-only organic signal is download rate, and a bad worker deploy would show up as user complaints
-days later. Build the regression harness: a fixed golden-prompt set generated nightly on every
-live lane, scored, trended, and alerting on regression. Run it last, after 01-03 land, so the
-goldens capture the improved baseline.
-
-## Current state (verified 2026-07-16; re-verify)
-
-- Every generation already gets a quality score in its metadata (mesh-degeneracy check + score,
- shipped in the forge quality work; find it via `grep -rn "quality_score\|qualityScore" api/`).
-- `forge_creations` table records every generation (tier, lane, score, sizes, timings).
-- Cron pattern: `vercel.json` `crons` array is the source of truth; production runs Cloud
- Scheduler jobs hitting `/api/cron/<name>` with `Authorization: Bearer $CRON_SECRET`.
- IMPORTANT (memory 07-09): a NEW cron needs its Cloud Scheduler job created manually
- (`scripts/create-gcp-scheduler.mjs`); adding it to vercel.json alone does nothing in prod.
-- Autonomous-agent health-check precedent to copy: the x402 Granite health check
- (every 6h, real calls, verdict recorded, public feed at `/api/x402/granite-health`).
-- Lanes to cover: selfhost TRELLIS (draft/standard), Hunyuan3D (high), hosted NIM (failover),
- HF Spaces lane (failover), avatar chain (generate -> rig).
-
-## Tasks
-
-1. **Golden set.** 8 object prompts + 4 human prompts, fixed seeds where lanes support them
- (`seed` param exists on the forge API). Include the eval prompts from 01/02 so history is
- comparable. Store the set in `data/` as the single source.
-2. **Nightly cron** `/api/cron/forge-quality-eval`: for each lane in rotation (spread lanes
- across the week if a full nightly sweep is too heavy; document the rotation), run the
- golden set through the real production path, record per-item: lane, revision (worker
- `/health` can expose image tag; add it if missing), score, tri count, texture size, GLB
- bytes, wall time. Persist to a new `forge_quality_runs` table (migration in the existing
- migrations dir; follow neighboring migration style).
-3. **Regression rule.** Median score of a lane drops > 10% vs its 7-day median, or any golden
- fails to generate: mark the run regressed, write an ops alert through the existing alerting
- path (the Granite health check shows the pattern), and flag it on the internal health check.
-4. **Trend surface.** Page at `/quality` (or a dashboard-next page if that fits existing
- patterns better): per-lane score trend, last-run table, per-golden thumbnails
- (rendered through the cinematic stage from prompt 03). Public is fine; it is a flex.
- Register in `data/pages.json`, row in `STRUCTURE.md`, changelog entry.
-5. **Wire and prove.** Create the Scheduler job, trigger it manually once
- (`gcloud scheduler jobs run`), watch it complete, verify rows + page render from the real
- run. Then trigger a synthetic regression (temporarily point one lane's score threshold up)
- to prove the alert fires, and revert.
-
-## Guardrails
-
-- The eval must use the production request path (real `/api/forge` calls with an internal
- bypass key if one exists; check `api/_lib/` for the partner-key pattern), not worker-direct
- calls, so routing regressions are caught too.
-- Nightly GPU cost is intentional but bounded: cap a run at ~30 generations; the rotation
- covers the rest.
-- Never let eval traffic pollute user-facing galleries or `forge_creations`-driven surfaces:
- tag eval records and filter them everywhere the table feeds UI (grep every consumer).
-- New cron = manual Scheduler job creation (see above). Do not assume.
-
-## Acceptance criteria
-
-- [ ] One full real nightly run recorded end to end (row counts + screenshots of /quality).
-- [ ] Synthetic regression fired the alert and the health-check flag (evidence in report).
-- [ ] Eval records invisible on all user-facing surfaces (list the consumers you checked).
-- [ ] Scheduler job exists in GCP and in `vercel.json` crons; both shown in the report.
-- [ ] Committed with changelog + docs (`docs/` entry for the harness, page registered); `npm test` green.
diff --git a/prompts/quality-campaign/README.md b/prompts/quality-campaign/README.md
deleted file mode 100644
index 8c9e460ac..000000000
--- a/prompts/quality-campaign/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# Quality Campaign: photoreal 3D + sitewide UX/UI (GCP-credit funded)
-
-Owner directive 2026-07-16: improve the UX, UI, and quality of everything; make 3D generations
-as real-looking as IRL people and objects; spend the ~$100k Google Cloud credits freely to get
-there; onboard NO new third-party APIs. Run each prompt in a fresh Claude Code chat.
-
-## The never-stop contract (applies to every prompt in this pack)
-
-The owner's single biggest complaint is agents stopping mid-task to ask questions. Every prompt
-here is written to be 100% self-contained: it names the files, the env vars, where credentials
-live, the verification commands, and the standard resolution for every predictable blocker.
-Read the "Self-unblock playbook" in CLAUDE.md before starting; it is binding. In short:
-
-- Never end a turn with a question, an offer, or a plan. Finish, verify, then report.
-- Missing credential: check `.env`, then `gcloud run services describe three-ws-api --region us-central1`, then `gcloud secrets list`. Only after all three may you report it missing (with the feature fully built behind the env var).
-- Ambiguous choice: take the most reversible option that matches existing platform patterns, ship it, record the decision in your report.
-- GCP quota wall: file the increase, then route around (lower an idle service's minScale, another region, queue on existing capacity).
-- Someone else's failing test blocking your verification: root-cause and fix it; never mask, never stop.
-
-## Standing approvals (so nothing needs asking)
-
-- **GCP spend is pre-approved.** Project `aerial-vehicle-466722-p5`, region `us-central1`. GPU seconds, Vertex AI calls, minScale warm instances, storage: all fine. Prefer GCP over any paid third-party API.
-- **No new external paid APIs.** Vertex AI, Cloud Run, GCS, Cloud Build, Secret Manager are all in-house surfaces and pre-approved. Replicate/Meshy/etc. must NOT be added or funded.
-- **Commits to `main` are normal** (owner works on main, no feature branches). Stage explicit paths only (`git add <paths>`, never `-A`): concurrent agents share this worktree.
-- **`git push` and social posts still require owner approval.** GCP service deploys needed to complete a prompt are approved as part of running it; use the clean-worktree recipe below.
-
-## Shared operational context (verified 2026-07-16)
-
-- Production: Cloud Run service `three-ws-api` (us-central1) serves frontend + `vercel.json` routes + `api/**`. Deploy: `npm run build && npm run deploy:gcp`, ideally from a clean worktree (`git worktree add /workspaces/.deploy-wt HEAD`, deploy there, `git worktree remove`), because the swarm's dirty files must not ship. `gcloud builds submit` alone skips the CDN purge; use the npm script.
-- GPU fleet (all Cloud Run + NVIDIA L4, us-central1, verified live today):
- - `model-trellis` (TRELLIS image->3D, `MODEL_TRELLIS_URL`), quality knobs ss/slat 8..50 steps, simplify >= 0.5, texture <= 2048.
- - `model-hunyuan3d` (Hunyuan3D-2 image->3D, `GCP_HUNYUAN3D_URL`), high-tier lane.
- - `unirig` (auto-rigging, `GCP_UNIRIG_URL`), `avatar-reconstruction`, plus `rembg/remesh/segment/stylize` CPU helpers.
- - Worker auth: bearer key in Secret Manager secret `avatar-reconstruction-key`; wire shape `POST /infer -> {task_id}`, `GET /tasks/:id -> result_gcs_url`, health at `/health`.
-- Reference images: Vertex `gemini-2.5-flash-image` via `api/_mcp3d/vertex-imagen.js` (`:generateContent`); prompt realism treatment in `api/_mcp3d/text-to-image.js` (`REALISM_SUFFIX`, `PERSON_REALISM_SUFFIX`, skipped when the user names an art style).
-- Lane routing: `api/forge.js` + `api/_providers/gcp.js`; tier budgets in `api/_lib/forge-tiers.js` (`SELFHOST_TRELLIS_QUALITY`: draft 12 steps/1024tex, standard 25/2048, high 45/2048); `FORGE_SELFHOST_PRIMARY=true` is live, self-hosted L4 workers outrank hosted NVIDIA NIM (NIM is capped ~15 steps by its 30s sync window and is the old quality ceiling).
-- Quality signal: `forge_creations` DB table has a quality score per generation; download rate is the only organic user signal (ratings are unused).
-- Frontend: vanilla JS + Vite, `npm run dev` (port 3000). Tests: `npm test` (vitest failure gates the Playwright e2e stage; never pipe test output through `tail`, it eats exit codes). Authed console sweep across 300+ pages: `npm run audit:web` (QA account creds already in `.env`).
-- Docs duties per feature: `data/pages.json` for new routes, `data/changelog.json` entry for user-visible changes, `STRUCTURE.md` row for new surfaces. `npm run build:pages` validates.
-
-## Prompts
-
-| # | File | Theme | Parallel-safe with |
-|---|------|-------|--------------------|
-| 1 | `01-photoreal-3d-pipeline.md` | Multi-view fusion + texture fidelity for objects | 3, 4, 5 |
-| 2 | `02-photoreal-humans.md` | IRL-looking people: faces, skin, hair | 3, 4, 5 (after 1 is cleanest) |
-| 3 | `03-presentation-lighting.md` | Every viewer renders at the IRL cinematic bar | 1, 2, 4, 5 |
-| 4 | `04-ux-funnel-sweep.md` | Loading/empty/error/microinteraction sweep of the core funnels | 1, 2, 3, 5 |
-| 5 | `05-performance-vitals.md` | Core Web Vitals + perceived speed | 1, 2, 3, 4 |
-| 6 | `06-quality-eval-harness.md` | Nightly generation-quality regression harness | run last |
-
-Each prompt ends with acceptance criteria. A prompt is done when every criterion passes and the
-report shows the evidence (commands run, URLs, measured numbers). Not before.
diff --git a/prompts/roadmap/_generated/forge-router/gate-after.txt b/prompts/roadmap/_generated/forge-router/gate-after.txt
new file mode 100644
index 000000000..59d0ec6d8
--- /dev/null
+++ b/prompts/roadmap/_generated/forge-router/gate-after.txt
@@ -0,0 +1,80 @@
+
+> npm run test:gate && npm run test:gate-3d && npm run audit:mcp && npm run audit:mcp-golden && npm run audit:routes && npm run audit:handlers && npm run audit:pages && npm run audit:hidden-guard && npm run audit:x402-catalog && npm run audit:tokens
+
+
+> [email protected] test:gate
+> node scripts/test-gate.mjs
+
+[test-gate] running 7 critical-path test files…
+
+ RUN v4.1.9 /workspaces/three.ws
+
+
+ Test Files 7 passed (7)
+ Tests 86 passed (86)
+ Start at 21:48:18
+ Duration 2.70s (transform 1.32s, setup 0ms, import 2.80s, tests 2.70s, environment 1ms)
+
+[test-gate] ✓ all critical-path tests passed
+
+> [email protected] test:gate-3d
+> vitest run tests/glb-canonicalize.test.js tests/animation-retarget.test.js tests/animation-retarget-rest-pollution.test.js tests/viewer-framing.test.js
+
+
+ RUN v4.1.9 /workspaces/three.ws
+
+
+ Test Files 4 passed (4)
+ Tests 244 passed (244)
+ Start at 21:48:21
+ Duration 380ms (transform 224ms, setup 0ms, import 496ms, tests 226ms, environment 0ms)
+
+
+> [email protected] audit:mcp
+> node scripts/audit-mcp-manifests.mjs
+
+[audit:mcp] 16 MCP manifests consistent
+
+> [email protected] audit:mcp-golden
+> node scripts/audit-mcp-golden.mjs
+
+[audit:mcp-golden] 236 hosted MCP tool contracts match the golden fixture
+
+> [email protected] audit:routes
+> node scripts/verify-routes.mjs
+
+Route verify — 331 catalog pages, 1112 main routes, 1 post-filesystem routes.
+ modeled dist files: 1630 · canonical-covered: 331 · literal page routes checked for shadows: 481
+ filesystem boundary (handle:filesystem) present: yes
+
+✓ 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 (1764 checked)
+
+> [email protected] audit:pages
+> node scripts/audit-page-index.mjs
+
+Route audit: 145 auditable page routes, 331 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.
+
+> [email protected] audit:hidden-guard
+> node scripts/audit-hidden-guard.mjs
+
+✓ audit-hidden-guard: all 293 pages resolve the [hidden] guard
+
+> [email protected] audit:x402-catalog
+> node scripts/audit-x402-catalog.mjs
+
+✓ audit-x402-catalog: all 92 x402 endpoints are documented
+
+> [email protected] audit:tokens
+> node scripts/audit-token-drift.mjs
+
+✓ token drift unchanged: 0 hardcoded token-hex(es) (baseline 0).
+EXIT=0
diff --git a/prompts/roadmap/_generated/forge-ux/gate-after.txt b/prompts/roadmap/_generated/forge-ux/gate-after.txt
new file mode 100644
index 000000000..8ca9a528b
--- /dev/null
+++ b/prompts/roadmap/_generated/forge-ux/gate-after.txt
@@ -0,0 +1,79 @@
+
+> npm run test:gate && npm run test:gate-3d && npm run audit:mcp && npm run audit:mcp-golden && npm run audit:routes && npm run audit:handlers && npm run audit:pages && npm run audit:hidden-guard && npm run audit:x402-catalog && npm run audit:tokens
+
+
+> [email protected] test:gate
+> node scripts/test-gate.mjs
+
+[test-gate] running 7 critical-path test files…
+
+ RUN v4.1.9 /workspaces/three.ws
+
+
+ Test Files 7 passed (7)
+ Tests 86 passed (86)
+ Start at 21:39:54
+ Duration 2.75s (transform 1.27s, setup 0ms, import 2.75s, tests 2.78s, environment 1ms)
+
+[test-gate] ✓ all critical-path tests passed
+
+> [email protected] test:gate-3d
+> vitest run tests/glb-canonicalize.test.js tests/animation-retarget.test.js tests/animation-retarget-rest-pollution.test.js tests/viewer-framing.test.js
+
+
+ RUN v4.1.9 /workspaces/three.ws
+
+
+ Test Files 4 passed (4)
+ Tests 244 passed (244)
+ Start at 21:39:57
+ Duration 805ms (transform 299ms, setup 0ms, import 832ms, tests 450ms, environment 1ms)
+
+
+> [email protected] audit:mcp
+> node scripts/audit-mcp-manifests.mjs
+
+[audit:mcp] 16 MCP manifests consistent
+
+> [email protected] audit:mcp-golden
+> node scripts/audit-mcp-golden.mjs
+
+[audit:mcp-golden] 236 hosted MCP tool contracts match the golden fixture
+
+> [email protected] audit:routes
+> node scripts/verify-routes.mjs
+
+Route verify — 331 catalog pages, 1112 main routes, 1 post-filesystem routes.
+ modeled dist files: 1630 · canonical-covered: 331 · literal page routes checked for shadows: 481
+ filesystem boundary (handle:filesystem) present: yes
+
+✓ 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 (1764 checked)
+
+> [email protected] audit:pages
+> node scripts/audit-page-index.mjs
+
+Route audit: 145 auditable page routes, 331 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.
+
+> [email protected] audit:hidden-guard
+> node scripts/audit-hidden-guard.mjs
+
+✓ audit-hidden-guard: all 293 pages resolve the [hidden] guard
+
+> [email protected] audit:x402-catalog
+> node scripts/audit-x402-catalog.mjs
+
+✓ audit-x402-catalog: all 92 x402 endpoints are documented
+
+> [email protected] audit:tokens
+> node scripts/audit-token-drift.mjs
+
+✓ token drift unchanged: 0 hardcoded token-hex(es) (baseline 0).