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
chore: remove prompts specs for verified-shipped work
miniaturization49e0dc62f32d
diff --git a/prompts/agent-wallets/02-wallet-hud-drawer.md b/prompts/agent-wallets/02-wallet-hud-drawer.mddeleted file mode 100644index 2eeaea6b6..000000000--- a/prompts/agent-wallets/02-wallet-hud-drawer.md+++ /dev/null@@ -1,100 +0,0 @@-# Task 02 — The Wallet HUD (the full wallet, reachable from anywhere)--> **Read [00-README-orchestration.md](./00-README-orchestration.md) first** for the-> ownership model, tokens, real APIs, hard rules, definition of done, and the-> "improve then delete this file" close-out. Coordinate with **task 01** — this HUD-> opens from the wallet identity chip/popover it builds.--## Mission--Build the **Wallet HUD** — a single, gorgeous, full-featured wallet surface that-slides over any agent from anywhere in the app. The chip (task 01) is the glance;-this is the cockpit. It must feel like the best wallet experience in crypto:-faster than Phantom, clearer than a CEX, designed like Linear.--One shared component (`src/shared/agent-wallet-hud.js` or similar under-`src/shared/`), opened from any wallet chip/popover with an agent id. It adapts to-the viewer's role (owner / visitor / logged-out) per the ownership model.--## What the HUD contains--A drawer/overlay (slide-in panel on desktop, full-sheet on mobile) with these-sections, all backed by real APIs:--1. **Header** — avatar thumbnail, agent name, vanity address (mono, copyable),- ownership marker ("Yours" / "by @creator"), total portfolio value in USD,- 24h change. Real data via `GET /api/agents/:id/solana` +- `/api/agents/:id/solana/holdings`.-2. **Balances by chain & asset** — Solana (SOL, USDC, $THREE, other SPL) and EVM- (native + tokens). Each row: token, amount (mono), USD value, % of portfolio.- Real on-chain reads. $THREE is the only coin you ever *name/feature*; other- holdings render generically from runtime data.-3. **Deposit** (all viewers) — show the wallet address + a real QR code (use a real- QR lib already in the tree or add one properly), chain selector, copy. This is- how a wallet gets funded; make it frictionless.-4. **Withdraw / Sweep** (owner only) — `POST /api/agents/:id/solana/withdraw`.- Destination input with address validation, asset + amount (with MAX), live- USD preview, CSRF token, spend-policy awareness. Confirm step. Real tx, real- signature link to explorer on success.-5. **Activity** — recent transactions from `GET /api/agents/:id/solana/activity`- (owner) and/or public signatures: inflows (tips, deposits), outflows- (withdrawals, trades, skill payments). Link each to the explorer. Real data.-6. **Spend limits / policy** (owner only) — `GET/PUT /api/agents/:id/solana/limits`:- daily USD cap, per-tx ceiling, allowlist, freeze toggle. This is the safety rail- that makes autonomous agent trading trustworthy — present it as a feature, not a- settings dump.-7. **Custody trail** (owner only) — `GET /api/agents/:id/solana/custody`: every key- recovery / withdraw / limit change with reason + timestamp. Frame it as- "your wallet's security log." Real audit rows.-8. **Tip** (visitor) — `POST /api/agents/:id/solana/tip`. A delightful one-tap tip- flow for non-owners. Real record; if it involves an on-chain transfer from the- visitor's connected wallet, wire that for real.-9. **Vanity entry point** — link/launch into the Vanity Studio (task 03) for owners.-10. **Trade / Snipe entry point** — link/launch into the trading co-pilot (task 05)- for owners. Coordinate the handoff.--## Innovation mandate--- **The HUD is the same everywhere** — open it from the galaxy, from a trending row,- from the agent's profile: identical, instant, context-aware. That ubiquity is the- product.-- **Real-time feel** — when a tip lands or a trade fills, the balance and activity- update live (poll cheaply, or a real event source). No fake animation without a- real event behind it.-- **Portfolio intelligence** — allocation donut, biggest mover, "since you opened- this" delta. All from real holdings + real prices.-- **Keyboard-first** — `Esc` closes, focus trap, arrow-nav the asset list, a command- to copy the address. Designed for power users.-- Invent beyond this list where it raises the bar — but every pixel is backed by- real data.--## Real APIs (see orchestration README for the full list)--`api/agents/solana-wallet.js` exposes balance / holdings / activity / withdraw /-tip / limits / custody. CSRF tokens are required on writes — reuse the existing-CSRF pattern (recent commit "integrate CSRF token handling"); do not bypass it.-Ownership = `agent_identities.user_id === auth.userId`. If you need a new endpoint-for an innovative panel, build it for real (auth, CSRF, audit, spend-limit-enforcement, real chain calls) — never fake it.--## States & edge cases (all designed)--- Loading: skeleton rows, not spinners. Empty wallet: a warm empty state that tells- the owner how to fund it (deposit) and tells a visitor they can tip / fork.-- Withdraw errors (insufficient balance, bad address, over spend limit, network- fail): actionable inline messages, never a raw stack.-- 0 / 1 / many assets; very long token names; dust balances; an agent with no EVM- wallet yet (offer to provision); expired session mid-action (re-auth gracefully).-- Visitor must never see withdraw/limits/custody controls — enforce in UI **and**- rely on server-side owner checks (defense in depth).--## Definition of done--Per the orchestration README. Plus: the HUD opens from at least the chip on the-profile, trending, and galaxy surfaces; a real withdraw on devnet (or a real tip)-completes end-to-end with an explorer link; owner-only panels are invisible to-visitors; no console errors; responsive at 320/768/1440; `Esc`/focus-trap work.--When done: self-review + improvement pass, changelog entry, commit (explicit paths-only), then **delete this file**-(`prompts/agent-wallets/02-wallet-hud-drawer.md`).diff --git a/prompts/agent-wallets/03-vanity-studio.md b/prompts/agent-wallets/03-vanity-studio.mddeleted file mode 100644index aa910076a..000000000--- a/prompts/agent-wallets/03-vanity-studio.md+++ /dev/null@@ -1,89 +0,0 @@-# Task 03 — The Vanity Studio (make every agent's address a brand)--> **Read [00-README-orchestration.md](./00-README-orchestration.md) first** for the-> ownership model, tokens, real APIs, hard rules, definition of done, and the-> "improve then delete this file" close-out. Builds on the shared wallet component-> from **task 01** and is launched from the HUD (**task 02**).--## Mission--A custom (vanity) wallet address is an agent's signature — `THREExyz…` reads as-brand, not noise. The backend already grinds vanity addresses (Solana base58-prefix/suffix; EVM CREATE2 hex) and safely sweeps funds into the new address. Today-the UI is a bare link. Build the **Vanity Studio**: a delightful, owner-only-surface that makes minting a custom address feel like a premium feature people-brag about.--## What exists (read it before building)--- Solana grinder: [api/_lib/pump-vanity.js](../../api/_lib/pump-vanity.js)- (`grindMintKeypair`, `estimateAttempts`), base58, max ~6 chars, yields every 10k- attempts.-- Solana vanity endpoint: `GET/POST /api/agents/:id/solana/vanity` in- [api/agents/solana-wallet.js](../../api/agents/solana-wallet.js) — grinds a new- keypair server-side, **sweeps existing funds to the new address**, swaps keys- (money-safe). Stores `meta.solana_vanity_prefix/suffix`. Serverless bounds:- `VANITY_MAX_CHARS`, `VANITY_MAX_ITERATIONS`.-- EVM CREATE2 vanity: [api/agents/eth-vanity.js](../../api/agents/eth-vanity.js) —- hex prefix/suffix, verifies CREATE2 derivation and on-chain deployment.--## What the Studio must do--1. **Pattern designer** — input for prefix and/or suffix with **live validation**:- base58 alphabet for Solana (reject `0OIl`), hex for EVM, max-length enforcement.- Show a live **preview** of what the resulting address will look like- (`THREE…xyz`) with the matched part highlighted in the same violet the chip uses.-2. **Difficulty / time estimate** — call/replicate `estimateAttempts` to show, in- real time, "≈ N attempts, ~T to grind" as the user types. Make the cost of a- longer pattern visceral and honest. No fake progress.-3. **Grind with real progress** — kick off the real server grind. Because grinding- is bounded server-side, surface real status: queued → grinding → sweeping funds- → swapped, with the **real** attempt count / outcome from the endpoint. If the- pattern exceeds serverless bounds, tell the user the real limit and the longest- pattern that will succeed — don't pretend.-4. **Money-safe swap, clearly explained** — the user must understand their funds- move to the new address and the old key is retired. Show before/after addresses,- the sweep tx (explorer link), and a clear success state. This touches real- custodial funds — the copy must be precise and reassuring, the confirm explicit.-5. **Both chains** — Solana (base58) and EVM (CREATE2 hex) in one coherent surface,- each with its own validation and flow. Make the difference legible (an EVM- vanity is a predicted CREATE2 address that deploys; a Solana vanity is a real- keypair swap).-6. **Owner-only** — enforce in UI and rely on server owner checks. Visitors never- see grind controls.--## Innovation mandate--- **Vanity as identity, surfaced everywhere** — once minted, the vanity prefix/- suffix highlight propagates to the chip on every surface (it already does via the- shared component from task 01 — verify it does for newly minted patterns too).-- **Smart suggestions** — offer on-brand patterns derived from the agent's name- (e.g. name → valid base58 stub) so users get a great address without thinking.-- **A "rarity"/flex angle** — longer matched patterns are rarer; show that- tastefully (this is honest scarcity, computed from real attempt estimates, not a- fake badge).-- Make the grind feel alive and premium — real status, satisfying success moment,- shareable result. Invent beyond this if it raises the bar.--## States & edge cases--- Live validation errors (illegal chars, too long) as the user types — inline,- friendly. Estimate updates without jank (debounce).-- Grind that hits the serverless iteration cap: honest "couldn't find in N- attempts, try a shorter pattern" with the funds untouched and the old address- intact. Never lose funds, never leave the wallet in a half-swapped state — verify- the endpoint's guarantees and reflect them.-- Network failure mid-grind / mid-sweep: clear recoverable state, re-check actual- on-chain/db state before claiming success or failure.-- Agent with no wallet yet: provision first, then offer vanity.--## Definition of done--Per the orchestration README. Plus: a real Solana vanity grind + sweep completes-end-to-end (devnet acceptable) with the new address showing on the chip across-surfaces and a real sweep-tx explorer link; live estimate reflects real attempt-math; EVM CREATE2 flow validates and persists a real record; owner-only enforced;-no console errors; responsive.--When done: self-review + improvement pass, changelog entry, commit (explicit paths-only), then **delete this file** (`prompts/agent-wallets/03-vanity-studio.md`).diff --git a/prompts/animation-studio/00-README.md b/prompts/animation-studio/00-README.mddeleted file mode 100644index aa4266da7..000000000--- a/prompts/animation-studio/00-README.md+++ /dev/null@@ -1,183 +0,0 @@-# Animation Studio — build plan--This directory contains **sequenced task prompts**. Each `NN-*.md` file is meant to be-pasted into a **fresh agent chat** in this repo. Run them **in order** — later tasks-depend on earlier ones. Every task assumes the agent has already loaded the repo's-`CLAUDE.md` operating rules (no mocks, no stubs, wire 100%, real APIs, design every state).--## The goal (what we are building)--Turn the existing `/pose` page (today: a click-to-pose primitive mannequin) into a full-**Animation Studio**:--1. **Load a rig.** Users can pose either the built-in primitive mannequin (default) **or**- a real rigged GLB — including **their own custom avatars made on three.ws**, loaded by- `?avatar=<id>` or picked from a gallery.-2. **Pose ergonomically.** Click/drag joints with rotation gizmos and **inverse kinematics**- (drag a hand or foot, the limb solves) — not just raw per-axis sliders.-3. **Keyframe a timeline.** Set a pose → drop a keyframe → advance the playhead → re-pose →- drop another. The tool interpolates between keyframes and plays the result. This is how a- user authors a walk cycle, a wave, a dance.-4. **Export.** Download as a **GLB with embedded animation** and/or as a three.ws **clip JSON**.-5. **Save to account.** Persist animations to the signed-in user's account; manage a library- (rename, retag, set visibility, delete).-6. **Works across three.ws.** Saved/public animations play back anywhere via the existing- `AnimationManager` / viewer (avatar pages, embeds).-7. **Monetize.** Users can put a price on an animation and sell it for USDC via the existing- x402 rails; buyers pay once and download. Listed in the marketplace + bazaar.--## Task sequence--| # | File | Depends on | What it delivers |-|---|------|-----------|------------------|-| 1 | `01-avatar-loading-and-rigged-posing.md` | — | Load rigged GLB + own avatars into `/pose`; pose real skeletons with gizmos + IK; keep mannequin as default |-| 2 | `02-keyframe-timeline-and-export.md` | 1 | Timeline UI, keyframe model, bake to `AnimationClip`, live preview, GLB + clip-JSON export |-| 3 | `03-backend-animation-clips-api.md` | — (can run anytime) | DB migration + `/api/animations` CRUD with auth, ownership, visibility, pricing columns |-| 4 | `04-save-and-library.md` | 2, 3 | "Save to account", thumbnail capture, "My animations" library drawer in the editor |-| 5 | `05-playback-across-platform.md` | 3 | Saved/public animations resolvable + playable via `AnimationManager`/viewer; public gallery |-| 6 | `06-monetization.md` | 3, 4 | Price an animation → x402 paid download (USDC), per-creator payout, marketplace + bazaar listing |-| 7 | `07-nav-promotion-and-polish.md` | 1–6 | Shared nav/header/footer on the page, rename + promote out of Labs, cross-linking, final QA |--Tasks 1 and 3 are independent and can be started in parallel. Everything else follows the-dependency column.-------## Shared architecture & conventions (READ THIS — every task relies on it)--These are real, verified facts about the codebase as of this writing. Cite file paths in your-work and **read the referenced files before editing**.--### The pose studio today-- Page: [pages/pose.html](../../pages/pose.html) — standalone page, routed at `/pose`- ([vercel.json](../../vercel.json), [vite.config.js](../../vite.config.js)). It loads- `/nav.css` but does **not** currently inject the shared nav/header/footer.-- Logic: [src/pose-studio.js](../../src/pose-studio.js) — `setupScene()` builds the- `Scene`/`PerspectiveCamera`/`WebGLRenderer` (with `preserveDrawingBuffer: true` for PNG- export), `OrbitControls`, lights, a `ShadowMaterial` ground + `GridHelper`, and a `propLayer`- `Group`. Raycaster-based joint picking + drag-to-rotate. PNG export via `canvas.toDataURL`.-- Mannequin: [src/pose-mannequin.js](../../src/pose-mannequin.js) — `Mannequin` class with 16- joints (`JOINT_NAMES`: pelvis, spine, chest, neck, head, shoulder/elbow/wrist L+R,- hip/knee/ankle L+R). API: `setJointRotation(name, axis, radians)`, `getJointRotation(name)`,- `applyPose(pose)`, `getPose()`, `resetPose()`, `setConstraintsEnabled()`, `setBuild()`,- `setColor()`. Pose JSON is a flat map `{ jointName: {x,y,z}, rootPosition?: {x,y,z} }`.-- Presets: [src/pose-presets.js](../../src/pose-presets.js) — `PRESETS[]`, `getPresetById()`,- `getPresetsByGroup()`.--### Loading rigged avatars-- GLTFLoader pattern with Draco/KTX2/Meshopt decoders lives in- [src/viewer.js](../../src/viewer.js) (~lines 841–887). Reuse the same decoder setup — do not- hand-roll a bare loader.-- The `Viewer` class ([src/viewer.js](../../src/viewer.js)) loads avatars and exposes an- `AnimationManager`. A loaded `gltf` gives `gltf.scene` and `gltf.animations` (`AnimationClip[]`).-- **Avatar gallery picker (ready to use):** [src/avatar-gallery-picker.js](../../src/avatar-gallery-picker.js)- — `new AvatarGalleryPicker({ source: 'mine'|'public'|'both', onSelect: (avatar)=>{}, ... })`,- `.openModal()` / `.mountInline(el)`. `onSelect` receives an avatar with `id`, `name`,- `model_url`, `thumbnail_url`, `tags`.-- **Avatar list API:** `GET /api/avatars` (session auth, `credentials: 'include'`) returns- `{ avatars: [{ id, slug, name, model_url, thumbnail_url, tags, ... }], next_cursor }`.- Public variant: `GET /api/avatars/public`. Avatar decoration shape is in- [api/_lib/avatars.js](../../api/_lib/avatars.js) (`model_url` is the resolved/presigned GLB URL).-- **Demo avatars** (for `?avatar=` testing without auth): [api/_lib/demo-avatars.js](../../api/_lib/demo-avatars.js)- — ids like `avatar_demo_disk_cz`, `avatar_demo_disk_saga` (robot, animated), etc. Note: the- `?avatar=` param is currently **not read** by the pose studio — wiring it is Task 1.--### Bone naming (critical for cross-platform playback)-- Canonical skeleton = **Avaturn / Mixamo-retargeted** names: `Hips`, `Spine`, `Spine1`,- `Spine2`, `Neck`, `Head`, `LeftArm`/`LeftForeArm`/`LeftHand`, `RightArm`/`RightForeArm`/`RightHand`,- `LeftUpLeg`/`LeftLeg`/`LeftFoot`/`LeftToeBase`, `RightUpLeg`/`RightLeg`/`RightFoot`/`RightToeBase`,- plus finger bones.-- A robust bone-name normalizer already exists: `normalizeBoneName()` in- [src/avatar-export.js](../../src/avatar-export.js) (strips `mixamorig:`, `CC_Base_`, `Armature|`,- `rig:`, `Bip01`, separators). Reuse it; do not write a new one.-- Reference rig used by the build pipeline: `public/avatars/cz.glb`.--### Animation clip format (the format that "works on three.ws")-- Stored clips are `THREE.AnimationClip.toJSON()` output:- ```json- {- "name": "wave",- "duration": 1.0,- "tracks": [- { "name": "Hips.position", "type": "vector", "times": [...], "values": [x,y,z, ...] },- { "name": "Hips.quaternion", "type": "quaternion", "times": [...], "values": [x,y,z,w, ...] },- { "name": "Head.quaternion", "type": "quaternion", "times": [...], "values": [...] }- ]- }- ```- Track name = `BoneName.property`. Parse with `AnimationClip.parse(json)`.-- Manifest of built-in clips: [public/animations/manifest.json](../../public/animations/manifest.json)- — entries `{ name, url, label, icon, loop }`. Clips live in `public/animations/clips/*.json`.-- Build pipeline (reference only — we author in-browser, not via FBX): [scripts/build-animations.mjs](../../scripts/build-animations.mjs).-- **Playback engine:** [src/animation-manager.js](../../src/animation-manager.js) — `AnimationManager`- with `setAnimationDefs(defs)`, `attach(model)`, `loadAll()`, `ensureLoaded(name)`, `play(name)`,- `crossfadeTo(name, dur)`, `update(dt)`. It wraps a `THREE.AnimationMixer`. This is what your- exported/saved clips must be compatible with.-- **Export with animations:** [src/avatar-export.js](../../src/avatar-export.js) uses- `GLTFExporter` and already passes `animations: gltf.animations` — i.e., exporting a GLB with- embedded animation tracks is a solved path; reuse it.--### Posing aids available (already in node_modules — no install)-- `three/examples/jsm/animation/CCDIKSolver.js` — inverse kinematics.-- `three/examples/jsm/controls/TransformControls.js` — rotation/translation gizmos.-- three.js version: **0.176.0**. Import addons via `three/addons/...` or- `three/examples/jsm/...` consistent with existing imports in the file you're editing.--### Backend patterns (DB, auth, x402)-- **DB client:** [api/_lib/db.js](../../api/_lib/db.js) — `import { sql } from '../_lib/db.js'`,- Neon serverless, tagged-template queries (`await sql\`select ... ${val}\``).-- **Auth:** [api/_lib/auth.js](../../api/_lib/auth.js) — `getSessionUser(req)` (session cookie),- `authenticateBearer(extractBearer(req))` (API key / OAuth), `hasScope()`. The mocap endpoints- use a `resolveAuth(req, scope)` helper that tries session then bearer — mirror it.-- **Migrations:** `api/_lib/migrations/<YYYY-MM-DD>-<slug>.sql`, applied via- `npm run db:migrate` (runner: [scripts/apply-migrations.mjs](../../scripts/apply-migrations.mjs);- SHA-tracked in `schema_migrations` — never edit an applied file, roll forward). Also mirror the- table into [api/_lib/schema.sql](../../api/_lib/schema.sql) for clean deploys.-- **Closest precedent for user-owned clips:** the `mocap_clips` table + endpoints —- [api/mocap/clips.js](../../api/mocap/clips.js), [api/mocap/[id].js](../../api/mocap/[id].js),- migration [api/_lib/migrations/2026-05-24-mocap-clips.sql](../../api/_lib/migrations/2026-05-24-mocap-clips.sql).- It already has `owner_id`, `avatar_id`, `slug`, `visibility (private|unlisted|public)`,- `price_amount`, `price_currency`, `frames jsonb`, `storage_key` (R2 for large), soft-delete.- Zod validation, slug uniqueness per owner, avatar-ownership check — copy these patterns.-- **Monetization (the key reuse):** the platform already sells downloadable assets for USDC:- - `paid_assets` table + [api/x402/asset-download.js](../../api/x402/asset-download.js) —- "pay once → presigned R2 download", with per-creator payout overrides- (`creator_payto_base` / `creator_payto_solana` / `creator_payto_bsc`) and SIWX re-download.- - Paid-endpoint helper: [api/_lib/x402-paid-endpoint.js](../../api/_lib/x402-paid-endpoint.js)- (`paidEndpoint()`), spec/bazaar schema in [api/_lib/x402-spec.js](../../api/_lib/x402-spec.js)- (`buildBazaarSchema()`, `bazaarExtension()`). Prices are USDC atomics (6 decimals:- `1_000_000` = $1.00).- - Hosted checkout SKUs: [api/x402-skus.js](../../api/x402-skus.js) → `/pay/c/<slug>`.- - Marketplace page + bazaar UI: search the repo for `pages/marketplace*.html` /- `public/bazaar.js` and their data APIs.--### Navigation-- Nav is injected client-side: a page includes `<div id="nav-container"></div>` +- `<script src="/nav.js"></script>`; [public/nav.js](../../public/nav.js) fetches- [public/nav.html](../../public/nav.html) and wires handlers. `/pose` currently sits in the- **Labs** submenu of `nav.html` (~line 270). Promoting it is Task 7.-------## Rules for every task (do not skip)--- **Follow [CLAUDE.md](../../CLAUDE.md).** No mocks, no fake data, no stubs, no TODOs, no- commented-out code, no `setTimeout` fake loading. Real APIs, real wiring, every state designed- (loading/empty/error/populated), accessibility, hover/active/focus states.-- **Read before you write.** Open the referenced files and match existing patterns, naming, and- CSS variables/tokens already in the page.-- **Wire 100%.** Every button works, every link goes somewhere, every state is reachable. No dead- paths. Trace the full data flow before writing UI.-- **Verify in a real browser.** `npm run dev` (port 3000), exercise the feature, confirm no- console errors and real network calls succeed. State explicitly what you verified.-- **Keep the repo root clean.** No throwaway scripts in root (use `scripts/`), no committed- scratch files/screenshots.-- **Run the `completionist` subagent** over your changed files before declaring done; fix- everything it flags.-- **Do not push** unless the user explicitly approves. When they do, push to **both** remotes- (`git push threeD main` and `git push threews main`) as per CLAUDE.md. Never pull/fetch from- `threeD`.-- **Tests:** keep `npm test` green; add tests where the existing suite has a matching pattern- (e.g. contract tests under `tests/`).-- At the end of your task, write a short note of what changed and what the **next** task in the- sequence should build on, so the next chat has continuity.diff --git a/prompts/animation-studio/07-nav-promotion-and-polish.md b/prompts/animation-studio/07-nav-promotion-and-polish.mddeleted file mode 100644index ad74dbd85..000000000--- a/prompts/animation-studio/07-nav-promotion-and-polish.md+++ /dev/null@@ -1,90 +0,0 @@-# Task 7 — Promote the studio in nav, add page chrome, cross-link, final QA--> Read `prompts/animation-studio/00-README.md` first (nav injection, page-chrome pattern). Follow-> `CLAUDE.md`. No mocks, wire 100%, design every state, verify in a real browser.->-> **Depends on Tasks 1–6.** This is the integration + polish pass that makes the Animation Studio a-> first-class, discoverable platform feature. Read each prior task's handoff note.--The studio is now functional but the page is still a bare canvas buried in the **Labs** submenu-with no shared header/nav/footer. This task gives it real platform chrome, promotes it, wires every-cross-link, and runs a final quality audit.--## What to build--### 1. Page chrome on `/pose`-- Add the shared **nav** to [pages/pose.html](../../pages/pose.html): include- `<div id="nav-container"></div>` + `<script src="/nav.js"></script>` and the site header wrapper,- matching how an existing full page does it (e.g. study `pages/avatar-page.html` — its header,- nav-container, footer, and the CSS it links: `/nav.css` is already present; add `/footer.css`).-- Add the shared **footer** (copy the structure used by other pages; include the newsletter script- if other pages do). Ensure the 3D canvas + studio panels still lay out correctly **with** the- header/footer present (the studio currently assumes full-viewport; adjust so it sits in the page- shell without clipping or scroll-jank, responsive at 320 / 768 / 1440).--### 2. Rename + promote-- The page is currently "Pose Studio" in `nav.html` (~line 270, under Labs). Rename to- **"Animation Studio"** (keep `/pose` as the route; it's already public-facing and SEO-indexed —- do not break the URL). Update the page `<title>`, OG/Twitter meta, and `<meta name="description">`- in `pages/pose.html` to describe the animation authoring + marketplace capabilities.-- **Promote it out of Labs** into a prominent menu: add a top-level or **Build**-menu entry in- [public/nav.html](../../public/nav.html) (study the existing nav-item / submenu markup and copy- it exactly — title + subtitle spans, `role="menuitem"`). Decide whether to keep a Labs entry too;- if you remove it from Labs, make sure there are no orphaned references. Verify the nav still- renders and is keyboard-navigable after the edit.--### 3. Cross-linking (make it feel like one product)-Wire every natural connection (no dead links):-- **Avatar pages / gallery / dashboard:** an "Animate" / "Create animation" action that opens- `/pose?avatar=<id>` for that avatar.-- **Public animation gallery (Task 5):** links into the studio and to buy/play.-- **Marketplace (Task 6):** animation listings link to their detail/preview and Buy.-- **Studio → account:** the "My animations" library and (if signed in) a link to the user's- dashboard/marketplace seller view.-- **Docs/features:** add the Animation Studio to the features list / docs where other features are- catalogued (search for `public/features.json` and the features page) with accurate copy.--### 4. Final QA — run the self-review + completionist protocol over the whole feature-Exercise the full flow in a real browser and confirm:-- Open `/pose` cold (no params) → mannequin loads, nav + footer present, no console errors.-- `?avatar=<id>` and the picker load real rigged avatars; FK/IK posing works.-- Build a multi-keyframe animation, scrub + play it looping.-- Export GLB (plays its animation on re-open) and clip JSON.-- Sign in → Save → appears in "My animations"; reopen → keyframes restored; PATCH + delete work.-- Saved/public animation plays in the viewer via `?anim=<id>`; public gallery works.-- Price + publish an animation; it lists in marketplace + bazaar; the paid download endpoint serves- a real 402 and post-payment download (per Task 6's verification note).-- Every interactive element has hover/active/focus; every list has loading/empty/error states;- responsive at 320/768/1440; keyboard shortcuts documented in-UI; ARIA on controls.-- `npm test` green. Run the `completionist` subagent across **all** files touched by Tasks 1–7 and- fix everything it flags.--### 5. Documentation-- Update any READMEs/docs that enumerate routes or features to include the Animation Studio. Per the- project's docs-mirror note, if you edit `docs/`, sync the corresponding `public/docs/` mirror.--## Definition of done-- `/pose` is a fully-chromed, discoverable, prominently-linked **Animation Studio** with working- nav/header/footer, responsive at all three breakpoints, zero console errors.-- Every cross-link in section 3 exists and works; no dead paths anywhere in the feature.-- The end-to-end flow (load avatar → animate → save → play across platform → sell → buy) works in a- real browser; you've exercised it and can describe what you verified.-- `npm test` green; `completionist` clean.-- Summarize the shipped feature and call out anything intentionally deferred.--This is the last task. When the user approves, push to **both** remotes (`git push threeD main`-then `git push threews main`) per CLAUDE.md. Never pull/fetch from `threeD`.--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:--```bash-git rm "prompts/animation-studio/07-nav-promotion-and-polish.md"-```--Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.diff --git a/prompts/avatar-animation-hardening/00-README.md b/prompts/avatar-animation-hardening/00-README.mddeleted file mode 100644index 625f98335..000000000--- a/prompts/avatar-animation-hardening/00-README.md+++ /dev/null@@ -1,155 +0,0 @@-# Avatar Animation Hardening — build plan--This directory contains **sequenced task prompts** that take avatar animation on three.ws-from "the catastrophic case is fixed" to **100% production-ready: zero broken poses, correct-across every rig convention, and a polished embed/home-page experience.** Each `NN-*.md` file-is a self-contained unit of work meant to be pasted into a **fresh agent chat** in this repo.-Run them **in order** where the dependency column says so. Every task assumes the agent has-loaded the repo's `CLAUDE.md` operating rules (no mocks, no stubs, wire 100%, real APIs, design-every state, verify in a real browser).--## Why this initiative exists--The platform animates an avatar by retargeting one shared clip library-([public/animations/clips/*.json](../../public/animations/clips)) onto whatever rig a user-loads. A bug surfaced on the home page: the "Create" door-card avatar (`michelle.glb`, a Mixamo-export) **rendered lying on its back** the moment it played `celebrate`, while the neighboring-Avaturn-rigged avatar animated fine.--Root cause: Mixamo/FBX rigs bake the Y-up correction as `+90°X` on the armature root and a-compensating `−90°X` on `Hips`. The retargeter copied each clip bone's local rotation-**verbatim**, overwriting that `−90°X` and tipping the body flat.--### What already shipped (baseline — do NOT redo)--Commit `a1cdc528` added a **bind-rotation-aware correction** to-[src/animation-retarget.js](../../src/animation-retarget.js): for each bone the retargeter now-replays the clip's *deviation from rest* in the **target rig's own rest frame**-(`Ta = Tr · Sr⁻¹ · Sa`), instead of copying verbatim. The primitives are in place:--- `SOURCE_REST` — a map of `canonical bone → authoring-rig rest quaternion`. **Currently lists- only `Hips`** (rest = identity), because Hips is the bone carrying the up-axis convention.-- `bindCorrections(targetRest)` — builds the per-bone correction `C = Tr · Sr⁻¹`, skipping bones- where it is identity (so a matching rig round-trips bit-for-bit — verified on `cz.glb`).-- `canonicalRestMapFromObject` / `canonicalRestMapFromRig` — capture the target rig's rest pose.-- `premultiplyQuaternionTrack` / `rotateVectorTrack` — apply the correction to clip tracks.-- `AnimationManager.attach` captures `_canonicalRest` while the model is in bind pose and passes- it through `_retarget`.-- Unit coverage in [tests/animation-retarget.test.js](../../tests/animation-retarget.test.js)- (the `bind-rotation correction` describe block).--Verified result: michelle's Hips up-axis went from **90.4° off vertical → 1.7°**; cz unchanged-(**1.7° → 1.7°**).--**The fix is intentionally scoped to Hips only.** That stands every rig upright but leaves limb-fidelity, locomotion root-motion, ingest-time normalization, a permanent regression guard, and-the embed/home UX as the remaining work. That is what these tasks deliver.--## Task sequence--| # | File | Depends on | What it delivers |-|---|------|-----------|------------------|-| 1 | `01-full-bind-correction.md` | — | Extend `SOURCE_REST` from Hips-only to the **full** canonical authoring rest pose (captured from the reference rig) so limbs retarget correctly onto T-pose/A-pose mismatched rigs |-| 2 | `02-root-motion-cross-rig.md` | 1 | Make hip **position** (root motion) correct for any parent-axis convention — walk/run travels the right world direction & distance on Mixamo/RPM/Avaturn rigs |-| 3 | `03-ingest-rig-normalization.md` | — (parallel) | Canonicalize rig orientation + bone names at **avatar ingest** so all stored avatars share one convention — defense-in-depth + zero runtime cost for future avatars |-| 4 | `04-regression-corpus-and-runtime-guard.md` | 1 | Locked cross-rig regression corpus (upright-invariant assertions) + a runtime "fallen pose" guard wired to the observability pipeline — the "zero error, stays shipped" guarantee |-| 5 | `05-embed-and-home-avatar-ux.md` | — (parallel) | The surface the bug appeared on: `<agent-3d>` loading/error/reduced-motion states, seamless looping, per-clip framing, offscreen pause — the "best UX" mandate |-| 6 | `06-final-qa-and-promote.md` | 1–5 | End-to-end QA across every avatar surface (/pose, avatar pages, embeds, /irl, /walk), changelog, completionist — "shipped complete" |--Tasks 1, 3, and 5 are independent and can run in parallel. 2 and 4 follow 1; 6 is last.-------## Shared architecture & conventions (READ THIS — every task relies on it)--These are verified facts about the codebase. Cite file paths in your work and **read the-referenced files before editing.**--### The retargeting pipeline (the heart of this initiative)-- [src/animation-retarget.js](../../src/animation-retarget.js) — pure module (three + the- canonicalizer only; runs in browser AND Node). Key exports: `retargetClip`,- `retargetClipToObject`, `retargetClipToRig`, `canonicalNodeMapFromObject`,- `canonicalRestMapFromObject`, `MIN_COVERAGE`. The bind-correction internals- (`SOURCE_REST`, `bindCorrections`, `BIND_EPSILON`) are documented inline — read those comments- before changing the math.-- [src/animation-manager.js](../../src/animation-manager.js) — runtime playback engine wrapping- `THREE.AnimationMixer`. `attach(model)` builds `_canonicalToNode` + `_canonicalRest` and- retargets every registered clip. `_retarget` is the single chokepoint.-- The math invariant: `Ta = Tr · Sr⁻¹ · Sa` where `Sr` = authoring-rig rest, `Tr` = target-rig- rest, `Sa` = clip keyframe. When the clip is at the authoring rest, the target sits at the- target rest. A correction that is identity (rig already matches authoring convention) must be- skipped so output is byte-for-byte unchanged.--### The reference rig & canonical bone naming (critical)-- **Reference rig used by the build pipeline: [public/avatars/cz.glb](../../public/avatars/cz.glb).**- It is an Avaturn rig whose `Armature` has no rotation and whose `Hips` rest is identity — i.e.- it **is** the authoring convention the clips were baked against. Clips play on it verbatim with- zero correction. This makes cz.glb the source of truth for the authoring rest pose (Task 1).-- Mixamo test rig: [public/avatars/michelle.glb](../../public/avatars/michelle.glb) — bones are- `mixamorig:`-prefixed; `Character` armature = `+90°X`, `mixamorig:Hips` rest = `−90°X`. This is- the canonical "broken before the fix" avatar; use it as the cross-convention test subject.-- Canonical bone set: `CANONICAL_BONES` in- [src/glb-canonicalize.js](../../src/glb-canonicalize.js). `canonicalizeBoneName(name)` maps any- vendor name (`mixamorig:Hips`, `DEF-spine`, `left_arm`, `CH_Hips`, …) → canonical. A second- normalizer, `normalizeBoneName()`, lives in- [src/avatar-export.js](../../src/avatar-export.js) (used by export/ingest). **Reuse these —- never hand-roll bone-name parsing.**--### Clip format & built-ins-- Stored clips are `THREE.AnimationClip.toJSON()`; track name = `BoneName.property`- (`Hips.position` vector, `Hips.quaternion` quaternion). Parse with `AnimationClip.parse(json)`.-- Manifest: [public/animations/manifest.json](../../public/animations/manifest.json) —- `{ name, url, label, icon, loop }`. **Note the `loop` field** (e.g. `celebrate` is- `loop:false`, a one-shot) — Task 5 must honor it.-- Featured clips (what users hit first): `FEATURED` in- [src/animation-presets.js](../../src/animation-presets.js) — idle, walk, jump, wave, dance,- celebrate.--### Where avatars are rendered (the surfaces that must all stay correct)-- The `<agent-3d>` web component: [src/element.js](../../src/element.js) → wraps- [src/viewer.js](../../src/viewer.js) (`Viewer` class, GLTFLoader with Draco/KTX2/Meshopt,- ~lines 841–887) → `AnimationManager`.-- Home page door cards / bento / hero: `initLiveFeatures()` in- [pages/home.html](../../pages/home.html) (`LIVE_SPOTS`, `spawnMini`, the `IntersectionObserver`- ~line 6004+). This is where the bug was visible.-- Also: `/pose` studio, avatar profile pages, `/irl`, `/walk` — all drive the same- `AnimationManager`, so a retarget fix is global.--### Avatar ingest / canonicalization (Task 3)-- [src/glb-canonicalize.js](../../src/glb-canonicalize.js) — `canonicalizeGlbBoneNames(buffer)`- rewrites bone names in a GLB to canonical. Task 3 extends this concept to **orientation**.-- Ingest path: search for where uploaded/generated avatars are processed before R2 storage- (avatar create/upload endpoints under `api/`; the avatar decoration shape is in- [api/_lib/avatars.js](../../api/_lib/avatars.js)). Read before editing.--### Observability (Task 4)-- Client error reporter posts to `/api/client-errors` (logged as `[client-error]`). A runtime- "fallen pose" guard should report through this existing channel — do not invent a new one.-------## Rules for every task (do not skip)--- **Follow [CLAUDE.md](../../CLAUDE.md).** No mocks, no fake data, no stubs, no TODOs, no- commented-out code, no `setTimeout` fake loading. Real wiring, every state designed- (loading/empty/error/populated), accessibility, hover/active/focus states.-- **The no-regression bar is absolute.** Any change to the retarget math must remain a- byte-for-byte no-op for rigs that already animate correctly (prove it on `cz.glb`). The shipped- `cz: 1.7° → 1.7°` invariant must hold.-- **Read before you write.** Open the referenced files; match existing patterns, naming, tokens.-- **Verify with real assets.** Use `cz.glb` (reference) and `michelle.glb` (Mixamo) plus at least- one more convention. For UI, `npm run dev` (port 3000), exercise in a browser, confirm zero- console errors. State exactly what you verified and the measured numbers.-- **Tests:** keep `npm test` green; extend- [tests/animation-retarget.test.js](../../tests/animation-retarget.test.js) and add new suites- where a matching pattern exists. Respect the typecheck ratchet (`npm run typecheck`).-- **Changelog:** every user-visible change gets an entry in- [data/changelog.json](../../data/changelog.json); run `npm run build:pages` to validate.-- **Concurrent fleet:** other agents share this worktree on `main`. Stage **explicit paths**- (never `git add -A`), and re-check `git status` / `git diff --staged` right before committing.-- **Do not push** unless the user explicitly approves. When they do, push to **both** remotes- (`git push threeD main` && `git push threews main`). Never pull/fetch from `threeD`.-- **Run the `completionist` subagent** over your changed files before declaring done; fix- everything it flags.-- At the end of your task, write a short handoff note: what changed and what the next task should- build on.diff --git a/prompts/avatar-animation-hardening/01-full-bind-correction.md b/prompts/avatar-animation-hardening/01-full-bind-correction.mddeleted file mode 100644index b9cfcc046..000000000--- a/prompts/avatar-animation-hardening/01-full-bind-correction.md+++ /dev/null@@ -1,90 +0,0 @@-# Task 1 — Full per-bone bind correction (limb fidelity across rig conventions)--> Read [00-README.md](./00-README.md) first (the retarget pipeline, the `Ta = Tr · Sr⁻¹ · Sa`-> invariant, the reference rig `cz.glb`, the already-shipped Hips-only baseline).-> Follow [CLAUDE.md](../../CLAUDE.md). The no-regression bar is absolute: `cz.glb` must stay-> byte-for-byte unchanged.--The shipped fix corrects only the **Hips** bone, so every rig now stands upright. But the clip-library is authored against the Avaturn reference rest pose (`cz.glb`), and a Mixamo rig is in a-**T-pose** while Avaturn is an **A-pose** — so on `michelle.glb` the arms, shoulders, and legs-still play in the wrong local frame (shoulders too high/spread, elbows rolled). The motion is-upright but anatomically off. This task extends the bind correction from Hips-only to **every-bone**, using the real authoring rest pose, so any humanoid rig performs clips faithfully.--## What to build--### 1. Capture the canonical authoring rest pose (as committed data)-- Write a reproducible generator under `scripts/` (e.g. `scripts/build-canonical-rest.mjs`) that- reads the reference rig **[public/avatars/cz.glb](../../public/avatars/cz.glb)**, walks its- skeleton, and emits each canonical bone's **local rest (bind-pose) quaternion**. cz.glb is the- authoring convention (clips play on it with zero correction), so its rest pose *is* `Sr` for- every bone. Key each entry by `canonicalizeBoneName(boneName)`.-- Emit the result as a small committed module/data file the pure retarget module can import- without a build step (e.g. `src/animation-canonical-rest.js` exporting a frozen- `{ [canonicalBone]: [x,y,z,w] }`). Round to a stable precision so the file is diff-friendly and- deterministic. Document in a header comment that it is generated from `cz.glb` and how to- regenerate it.-- The generator must run in Node without a browser (parse the GLB JSON chunk directly, as the- diagnosis script did — `GLTFLoader` needs `self`/DOM). Make it idempotent and add an- `npm run` script alias if that matches repo convention.--### 2. Wire the full rest pose into the retargeter-- In [src/animation-retarget.js](../../src/animation-retarget.js), replace the Hips-only- `SOURCE_REST` with the full canonical rest map imported from Task 1.1 (keep `Hips` = identity- if and only if that is what cz.glb actually has — verify, don't assume).-- `bindCorrections` already computes `C = Tr · Sr⁻¹` per canonical bone and skips identities, so- the math generalizes for free. Confirm it now produces corrections for limb bones on a Mixamo- rig and **still skips every bone on cz.glb** (all corrections identity → empty map → verbatim).-- Quaternion tracks get `premultiplyQuaternionTrack`. Position tracks: only Hips carries root- motion, but if any other bone has a position track, decide and document whether it needs- rotating (Task 2 owns root-motion correctness — coordinate, don't double-handle).--### 3. Correctness & no-regression proof-- **cz.glb invariant:** retargeting any clip onto cz.glb yields tracks identical to the verbatim- path (deep-equal the values arrays). Add this as a locked test.-- **Mixamo fidelity:** on `michelle.glb`, after retarget, the *world-space direction* of each- major limb segment (upper arm, forearm, thigh, shin) at representative keyframes should match- cz.glb playing the same clip within a tolerance (e.g. ≤ a few degrees). Assert this numerically- — reconstruct the bone graph from the GLB and compose world transforms (the diagnosis script in- the conversation shows the technique). No eyeballing as the *only* check.-- Coverage gating (`MIN_COVERAGE`) and hip scaling must still behave as before.--### 4. Verify in a real browser-- `npm run dev`; load `michelle.glb` somewhere it animates (the `/pose` studio with- `?avatar=`, or a scratch page under `scripts/`). Play idle, wave, dance, celebrate, walk.- Confirm upright AND natural limb poses, zero console errors. Compare side-by-side with cz.glb.- State the avatars and clips you exercised.--## Definition of done-- A generated, committed canonical-rest data file derived from `cz.glb`, plus the generator- script (reproducible, documented, Node-only).-- `SOURCE_REST` (or its replacement) covers the full canonical skeleton; `bindCorrections`- produces per-limb corrections for Mixamo rigs and an empty map for cz.glb.-- Locked tests: cz.glb verbatim-equality invariant + numeric limb-direction parity for a Mixamo- rig. `npm test` green, `npm run typecheck` green.-- Browser-verified on ≥2 rig conventions; measured numbers reported.-- Changelog entry (improvement: avatars from any tool now animate with correct limb poses, not- just upright).-- `completionist` run; all findings fixed. Handoff note for Task 2 (root motion) and Task 4- (regression corpus).--Do not change root-motion/position semantics beyond what's needed here — that is Task 2. Do not-push unless the user approves (then both remotes).--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--This file is a unit of work, not a permanent doc. The moment every item above is **built, wired,-verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in-the same change:--```bash-git rm "prompts/avatar-animation-hardening/01-full-bind-correction.md"-```--Stage the deletion alongside your implementation and include it in the completion commit. A file-that still exists is unfinished work; a file that is gone has shipped.diff --git a/prompts/avatar-animation-hardening/06-final-qa-and-promote.md b/prompts/avatar-animation-hardening/06-final-qa-and-promote.mddeleted file mode 100644index 9c956a22b..000000000--- a/prompts/avatar-animation-hardening/06-final-qa-and-promote.md+++ /dev/null@@ -1,139 +0,0 @@-# Task 6 — Final QA across every avatar surface--> Read [00-README.md](./00-README.md) first. **Depends on Tasks 1–5** — read their handoff notes.-> Follow [CLAUDE.md](../../CLAUDE.md). This is the "shipped complete" gate.--Tasks 1–5 fix the math, the ingest path, the regression guard, and the embed UX. This task proves-the whole thing is production-ready end to end: every surface that renders an animated avatar is-correct, polished, and free of console errors, on a representative matrix of avatars and clips.--## Handoff from Task 4 (regression corpus + runtime fallen-pose guard)--Shipped and committed; build on it, don't redo it:--- **Regression corpus** — [tests/animation-upright-invariant.test.js](../../tests/animation-upright-invariant.test.js)- asserts the Hips world up-axis stays within **40°** of vertical at *every* keyframe across 4- rig conventions (cz Avaturn, michelle Mixamo `−90°X`, a synthetic `+90°Z`/`−90°Z`,- DEF-/snake_case names) × the `FEATURED` clips, plus a below-`MIN_COVERAGE` missing-bones rig.- **michelle + celebrate is the named regression lock** for the lying-down bug, with explicit- "has teeth" cases proving the verbatim (no-correction) path still falls flat (>80°). cz.glb is- asserted **byte-for-byte equal** to the verbatim path (the `1.7°→1.7°` no-regression invariant).- Runs in plain Node via a raw GLB JSON-chunk → Bone-graph reconstruction- ([tests/_helpers/glb-bone-graph.js](../../tests/_helpers/glb-bone-graph.js)) — no GLTFLoader,- no network — so it gates the Vercel build. 49 cases, all green.-- **Runtime guard** — [src/animation-manager.js](../../src/animation-manager.js): `measureHipsTiltDeg`- + `_guardAgainstFallenPose` sample the at-rest Hips tilt **once per (avatar, clip)** before an- action plays (never per frame). Past `CATASTROPHE_TILT_DEG` (**45°**) it disables the action,- falls back to the authored bind pose, and reports **once** (Set-debounced) via- `window.reportClientError` → `/api/client-errors` with `{avatarId, avatarUrl, clip, tiltDeg}`.- The viewer wires avatar context at [src/viewer.js:1008](../../src/viewer.js#L1008)- (`attach(content, { avatarUrl })`).-- **For your QA:** the guard must stay **silent** on every healthy avatar/clip you exercise — a- `[client-error] fallen-pose retarget` log line during the matrix run is a real regression, not- noise. To confirm the guard *fires* correctly, you don't need a broken avatar in the browser;- the corpus already proves the fire path (`michelle + celebrate` without the fix measures >45°).-- **Note on the full suite:** Task 4's animation suites are green (106/106) and `typecheck` is- 0 errors. If you see failures in `tests/api/marketplace-platform-fee.test.js` (vitest can't- resolve a `?cb=` dynamic import), `tests/branding.test.js` (Avaturn/Character Studio strings in- docs), `tests/src/usdz-pipeline.test.js` (meshopt decoder absent in Node), or `all-modules-load`- (unbuilt local workspace SDKs), those are **environment/build artifacts** — run the postinstall- ESM fixups and build the `agent-payments-sdk`/`solana-agent-sdk` workspaces, they are unrelated- to animation.--## Handoff from Task 2 (root-motion correctness across rig conventions)--Shipped and committed; build on it, don't redo it:--- **The fix is the parent-frame hip-position correction**, already in- [src/animation-retarget.js](../../src/animation-retarget.js): `hipPositionCorrection` rotates the- `Hips.position` (root-motion) track by the **inverse of the target Hips-parent rest world- rotation** (`hipsParentWorldQuat`), not by the Hips *bone* correction. This makes per-frame- world-space root displacement equal the authoring displacement (scaled for height) on **any**- parent-axis convention — the old bone-correction approach was exact only on the standard Mixamo- `+90°X/−90°X` split. Rotation and uniform `hipScale` compose (rotate first, then scale). The- runtime wires it through `AnimationManager.attach` → `_hipsParentWorldQuat` →- [src/animation-manager.js:182](../../src/animation-manager.js#L182)`._retarget`.-- **Locomotion cross-rig coverage** lives in the new `cross-rig locomotion invariants (real GLB)`- block in [tests/animation-retarget.test.js](../../tests/animation-retarget.test.js). It runs the- production retargeter against the real `cz.glb` + `michelle.glb` (via the shared- [tests/_helpers/glb-bone-graph.js](../../tests/_helpers/glb-bone-graph.js)) plus two synthetic- conventions — a compound **non-±90° armature** (`tilted`) and a 30° **yaw** (`yawed`) — and- asserts, for a travelling walk (`av-walk-crouching`) and jump (`jumpdown2`): net world travel- **direction** matches the authored direction on every rig (no sideways drift), the **vertical- fraction** of travel is preserved (no sinking/floating), and the in-place clips- (`idle`/`celebrate`/the in-place featured `walk`/`jump`) acquire **~zero** net XZ travel. The- `tilted` rig is the discriminator: its Hips bone-correction is identity, so only the parent-frame- correction can recover the right motion — reverting the fix fails 7 cases there (proven). cz.glb- is locked **byte-for-byte** to the verbatim path.-- **The featured `walk`/`jump` clips are authored in-place** (≈0 net XZ) — they walk/jump on the- spot; that is correct, not a drift bug. To *see* root-motion travel in a browser, pick a library- clip that actually translates (e.g. `av-walk-crouching`, `jumpdown2`, `farm-holding-walk`,- `goalkeeper`). On `/walk` the **game** drives locomotion, so the clip's own root motion is- in-place there by design; `/pose` plays the clip's authored root motion directly.-- **For your QA:** load a *travelling* clip on `michelle.glb` and `cz.glb` in `/pose` side by side- and confirm both bodies advance in the **same** world direction and stay planted on the ground- (no sinking/moonwalk). `scripts/verify-walk-rigs.mjs` is a headless cross-rig smoke check: it- mounts the real `<agent-3d>` element (Viewer → AnimationManager → retargeter) on `michelle.glb`- and `cz.glb`, plays a clip, and asserts each loads, renders the Hips **upright** (< 30° off- vertical — the lying-down regression), and logs zero console errors. Needs the DEV server- (`node scripts/verify-walk-rigs.mjs http://localhost:3000 walk`). Verified: michelle 6.2° / cz- 2.4° on walk, michelle 6.1° / cz 2.4° on jump, 0 console errors.--## What to do--### 1. Build the verification matrix-- **Avatars:** at minimum `cz.glb` (Avaturn), `michelle.glb` (Mixamo), one Ready Player Me /- Avaturn user avatar, and one platform-generated avatar. Cover the conventions Tasks 1–4 handle.-- **Clips:** the `FEATURED` set (idle, walk, jump, wave, dance, celebrate) plus a couple of- longer/library clips.-- **Surfaces:** the home page door/bento/hero embeds ([pages/home.html](../../pages/home.html)),- an avatar profile page, the `/pose` studio, `/walk`, `/irl`, and a bare third-party-style- `<agent-3d>` embed. (Confirm the surface list against Task 5's handoff.)--### 2. Exercise it for real-- `npm run dev` (port 3000). For each (avatar × surface) cell: load it, play the clip set, and- confirm: upright, natural limb poses (Task 1), correct travel for locomotion (Task 2), seamless- looping + designed loading/error/reduced-motion states + correct framing (Task 5), and **zero- console errors/warnings**. Capture before/after screenshots into `reports/` or the page-audit- tooling (`scripts/page-audit.mjs`) — do not commit scratch screenshots to the repo.-- Confirm the runtime fallen-pose guard (Task 4) stays silent on all healthy cells.-- Re-ingest one Mixamo avatar through the Task 3 path and confirm it animates with the runtime- correction reduced to a no-op.--### 3. Close the loop-- Fix any residual jank, mis-framing, or warning you find — no "good enough."-- Verify the public changelog reads coherently for the whole initiative (the entries from Tasks- 1–5 plus the original lying-down fix). Consolidate/clarify wording if needed; run- `npm run build:pages` to revalidate.-- Run the full `npm test` suite and `npm run typecheck`. Run the `completionist` subagent over the- cumulative diff of the initiative; fix everything it flags.--## Definition of done-- The full avatar × clip × surface matrix verified in a real browser with zero console- errors/warnings; before/after evidence captured (not committed as scratch).-- Locomotion, limb fidelity, framing, state design, reduced-motion, and offscreen-pause all- confirmed on every surface. Fallen-pose guard silent on healthy rigs.-- A re-ingested Mixamo avatar confirmed needing no runtime correction.-- `npm test` + `npm run typecheck` green; changelog coherent and validated.-- `completionist` clean. Final summary written: what's covered, any known limitations, and the- recommended catalog-backfill follow-up (from Task 3) if applicable.--When the user approves the push, push to **both** remotes (`git push threeD main` &&-`git push threews main`). Never pull/fetch from `threeD`.--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--When the whole initiative is verified, committed, and (if approved) pushed, remove this file and-the now-empty backlog:--```bash-git rm "prompts/avatar-animation-hardening/06-final-qa-and-promote.md"-# If 00-README.md and all NN-*.md tasks are gone, remove the README + dir too:-git rm "prompts/avatar-animation-hardening/00-README.md"-```--A backlog file that still exists is unfinished work; a directory that is gone has shipped.diff --git a/tasks/CLEANUP-MANIFEST.md b/tasks/CLEANUP-MANIFEST.mdindex 4df4e08bc..2d0c64d07 100644--- a/tasks/CLEANUP-MANIFEST.md+++ b/tasks/CLEANUP-MANIFEST.md@@ -81,3 +81,22 @@ Notable genuine gaps surfaced by the audit (still pending work):- **task-06** (mcp.js ≤60 lines: actual 90), **task-09** (no `PUT /api/agent-memory`).- **agent-monetization 03/08/12/15/16/17/19**: x402 404-vs-409 mismatch, payout-wallet UI section, platform-fee display, cron `SKIP LOCKED`, per-payer rate limit, per-type notif opt-out, security-review artifact.- **pump-dashboard 12**: server-side whale/fees/launch alert matching.+++## prompts/ sweep (2026-06-21) — 7 specs deleted (feature verified shipped)++Read-only verification across all prompts/ groups (most are aspirational best-version+specs that do not meet their own DoD — kept). DELETE only where every deliverable is+verifiably present in code:++| spec | evidence (file:symbol proving shipped) |+| --- | --- |+| prompts/agent-wallets/02-wallet-hud-drawer.md | pages/agent-wallet.html + src/agent-wallet-hub/tabs/{balance,deposit,withdraw,vanity}.js; /api/agents/:id/solana holdings/withdraw/limits/custody/activity all real |+| prompts/agent-wallets/03-vanity-studio.md | src/agent-wallet-hub/tabs/vanity.js (grind+estimate+sweep); POST /api/agents/:id/solana/vanity in api/agents/solana-wallet.js |+| prompts/animation-studio/00-README.md | whole group shipped: pages/pose.html, src/pose-studio.js, api/animations/clips.js, migration 2026-05-31-animation-clips.sql |+| prompts/animation-studio/07-nav-promotion-and-polish.md | /pose nav wired; api/animations/sell.js + api/x402/animation-download.js monetization live |+| prompts/avatar-animation-hardening/00-README.md | whole group shipped: src/animation-canonical-rest.js, src/animation-retarget.js, src/glb-canonicalize.js, tests/animation-upright-invariant.test.js |+| prompts/avatar-animation-hardening/01-full-bind-correction.md | canonical rest pose + per-bone bind correction in animation-retarget.js; locked by tests/animation-retarget.test.js |+| prompts/avatar-animation-hardening/06-final-qa-and-promote.md | runtime fallen-pose guard in animation-manager.js; regression corpus tests/animation-upright-invariant.test.js green |++**KEEP (notable):** all monetization/ + monetization-prompts/ (subscriptions, bundles, NFT receipts, fiat, creator payouts, email, admin — none shipped); all feature-innovation/ (improvement specs, gaps remain); all living-agents/, living-wallet/, wallet-innovation/, inventions/, moonshots/, agent-studio 04-12, vanity-* (named modules absent).