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
feat: walk task specs 08-30, walk.js improvements, features update
nirholasf6a62639ff37
diff --git a/public/features.json b/public/features.jsonindex 5a628c941..29d8c2d5b 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-05-25T14:54:17.695Z",+ "generated_at": "2026-05-25T15:10:15.004Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/walk.js b/src/walk.jsindex 04a9f0945..0467146da 100644--- a/src/walk.js+++ b/src/walk.js@@ -36,7 +36,19 @@ import nipplejs from 'nipplejs';import { AnimationManager } from './animation-manager.js';import { WalkNet } from './walk-net.js';-const AVATAR_URL = '/avatars/default.glb';+const AVATAR_URL_DEFAULT = '/avatars/default.glb';++async function resolveAvatarUrl() {+ const params = new URLSearchParams(location.search);+ const id = params.get('avatar');+ if (!id) return AVATAR_URL_DEFAULT;+ const res = await fetch(`/api/avatars/${encodeURIComponent(id)}`);+ if (!res.ok) throw new Error(`avatar ${id} not found (HTTP ${res.status})`);+ const { avatar } = await res.json();+ if (!avatar?.url) throw new Error(`avatar ${id} has no GLB URL`);+ return avatar.url;+}+const ANIMATIONS_MANIFEST_URL = '/animations/manifest.json';const CLIP_IDLE = 'idle';const CLIP_WALK = 'av-walk-feminine';@@ -273,8 +285,9 @@ let animationDefs = null;async function loadAvatar() {setStatus('loading avatar…', { sticky: true });+ const avatarUrl = await resolveAvatarUrl();const loader = new GLTFLoader();- const gltf = await loader.loadAsync(AVATAR_URL);+ const gltf = await loader.loadAsync(avatarUrl);avatar = gltf.scene;avatarTemplate = gltf.scene;avatar.traverse((n) => {@@ -750,8 +763,12 @@ loadAvatar()}).catch((err) => {console.error('[walk] failed to load avatar:', err);- setStatus(`failed to load avatar: ${err?.message ?? err}`, { error: true, sticky: true });- // Render the empty scene anyway so the user sees the ground/sky and- // understands the page loaded — better than a blank screen.+ const hasParam = new URLSearchParams(location.search).has('avatar');+ const suffix = hasParam ? ' — <a href="/walk">try the default avatar</a>' : '';+ if (statusEl) statusEl.innerHTML = `failed to load avatar: ${err?.message ?? err}${suffix}`;+ if (statusEl) {+ statusEl.classList.add('is-error');+ statusEl.classList.remove('is-hidden');+ }requestAnimationFrame(tick);});diff --git a/tasks/walk/08-chrome-extension-settings.md b/tasks/walk/08-chrome-extension-settings.mdnew file mode 100644index 000000000..d18c49fae--- /dev/null+++ b/tasks/walk/08-chrome-extension-settings.md@@ -0,0 +1,37 @@+# Task 08 — Chrome Extension: Settings Page++## Priority: HIGH++## Objective+Build a dedicated extension options/settings page where users configure default behavior of their walking avatar across all sites — defaults that apply when they enable the extension on a new site.++## Scope+- File: `extensions/walk-avatar/options.html` + `options.js` + `options.css`+- Register in `manifest.json` as `options_page`+- Settings (all persisted to `chrome.storage.sync` so they roam across the user's Chrome installs):+ - Default avatar (avatar picker reused from popup)+ - Default position: bottom-right | bottom-left | top-right | top-left | follow-cursor+ - Default size: small (120×180) | medium (180×260) | large (240×340) | custom (W/H number inputs)+ - Walk speed default (0.5x–2x slider)+ - Site allowlist: textarea, one domain per line (avatar only appears on these sites)+ - Site blocklist: textarea, one domain per line (avatar never appears on these sites — takes precedence)+ - "Read page sections aloud" toggle (enables TTS narration — see task 09)+ - Voice select (uses `/api/tts/voices` real endpoint to populate dropdown)+ - Theme: light | dark | auto (follows host page background luminance)+ - Reset to defaults button+- Settings change → background.js broadcasts to all open tabs to update the running iframes via postMessage+- Diagnostics section at bottom:+ - Current session status (signed in / signed out)+ - Sign out button (clears `chrome.storage.local` session)+ - Extension version (read from `chrome.runtime.getManifest().version`)+ - Link to `https://three.ws/docs/extension` for help++## Definition of Done+- Open chrome://extensions → click extension Details → Extension options → opens this page+- Changing any setting persists across browser restarts+- Allowlist/blocklist actually filters where the avatar appears (verified on 3 different sites)+- All TTS voices listed are real voices from the API+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Wire every step end-to-end and verify in a real browser with the dev server running.diff --git a/tasks/walk/09-chrome-extension-page-narrator.md b/tasks/walk/09-chrome-extension-page-narrator.mdnew file mode 100644index 000000000..43d802d65--- /dev/null+++ b/tasks/walk/09-chrome-extension-page-narrator.md@@ -0,0 +1,33 @@+# Task 09 — Chrome Extension: Walking Avatar Reads the Page Aloud++## Priority: HIGH++## Objective+Make the walking avatar a true browsing companion: as the user scrolls, the avatar narrates page sections via TTS, with a speech bubble showing what's being read. Pair this with simple page-aware walking — avatar appears to walk toward the section currently in view.++## Scope+- File: `extensions/walk-avatar/content-narrator.js` (new module loaded by `content.js`)+- Content extraction:+ - Walk the DOM and identify "readable sections" — `<article>`, `<section>`, `<h1>`–`<h3>` with following sibling paragraphs, `<main>` blocks+ - Strip nav, footer, scripts, ads (use `Readability.js` from Mozilla — vendored into `extensions/walk-avatar/vendor/readability.js`, real BSD-licensed copy)+- Section tracking:+ - `IntersectionObserver` on each section; when ≥60% in viewport, mark as "active"+ - On active section change: post `{ type: 'walk:narrate', text: <section.innerText slice 0..400> }` to iframe+- iframe walk-embed page receives the message and:+ - Plays gesture animation ("reading" — use idle variant)+ - Calls real `/api/tts/speak?text=<encoded>&voice=<setting>` — uses existing TTS API (see `api/tts/speak.js`)+ - Streams audio via MediaSource or plays returned audio blob+ - Renders a speech bubble overlay above the avatar with the text (auto-wraps, 3 lines max, fades after audio ends)+- Mute toggle in the avatar container (hover-revealed icon top-right)+- Respect `prefers-reduced-motion` and a setting to disable narration++## Definition of Done+- Open any article (e.g., a Wikipedia page) with extension enabled+- Scroll → avatar narrates the section in view with real TTS audio+- Speech bubble shows the text being read+- Mute toggle silences immediately and cancels in-flight audio+- No double-narration on rapid scroll (debounce active-section changes by 600 ms)+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Use the real TTS endpoint. Wire every step end-to-end and verify in a real browser.diff --git a/tasks/walk/10-chrome-extension-store-release.md b/tasks/walk/10-chrome-extension-store-release.mdnew file mode 100644index 000000000..a1765074f--- /dev/null+++ b/tasks/walk/10-chrome-extension-store-release.md@@ -0,0 +1,34 @@+# Task 10 — Chrome Extension: Web Store Release Package++## Priority: HIGH++## Objective+Prepare the extension for publishing to the Chrome Web Store: legal pages, listing assets, privacy policy, content security review, and production build pipeline.++## Scope+- Production build:+ - `npm run build:extension:prod` — minifies, removes source maps, bumps version from `package.json`+ - Outputs a zip at `dist/extension-<version>.zip` ready to upload+- `extensions/walk-avatar/PRIVACY.md` — real privacy policy: declares what we collect (avatar selection, site allow/blocklist, session token), how we use it (rendering avatars), what we don't (no page content sent to our servers without explicit user action via TTS toggle)+- Publish corresponding page at `pages/extension-privacy.html` routed via vercel.json to `https://three.ws/extension/privacy`+- `extensions/walk-avatar/TERMS.md` and `pages/extension-terms.html` at `https://three.ws/extension/terms`+- Listing assets generated and placed at `extensions/walk-avatar/store-assets/`:+ - 128×128 icon (PNG)+ - 440×280 small promotional tile (PNG)+ - 1280×800 marquee (PNG)+ - 5 screenshots (1280×800) — take real screenshots of the extension running on real sites using Playwright (script at `scripts/extension-screenshots.mjs`)+- Update `manifest.json`:+ - `description`: under 132 chars, accurate+ - `permissions`: justify each one in `extensions/walk-avatar/PERMISSIONS.md` (Chrome reviewers require this)+ - Remove any wildcard permissions not actually used+- CSP review: ensure no inline scripts, no remote code execution; all JS bundled locally+- Add `extensions/walk-avatar/RELEASE.md` — manual checklist for each Web Store submission++## Definition of Done+- `npm run build:extension:prod` produces a zip that loads cleanly in Chrome with no warnings+- Privacy and terms pages are live at the documented URLs and pass a real CSP/lint check+- All listing assets exist as real PNGs of the actual product (no mockups)+- A self-review against [Chrome Web Store program policies](https://developer.chrome.com/docs/webstore/program-policies/) is documented in `RELEASE.md` with each item checked++## Rules+Complete 100%. No stubs. No fake data. Take real screenshots from a real browser. Wire everything end-to-end.diff --git a/tasks/walk/11-walk-keyboard-controls.md b/tasks/walk/11-walk-keyboard-controls.mdnew file mode 100644index 000000000..c64fad91b--- /dev/null+++ b/tasks/walk/11-walk-keyboard-controls.md@@ -0,0 +1,37 @@+# Task 11 — Walk Page: Keyboard Controls (WASD + Arrows + Modifiers)++## Priority: HIGH++## Objective+Polish the desktop keyboard control scheme on `/walk` so it feels like a proper 3D game: smooth acceleration, run modifier, jump, look-around — not just on/off booleans flipping a transform.++## Scope+- File: `src/walk.js` (or wherever the walk controller lives — locate the existing input handler)+- Movement keys:+ - `W` / `↑` — forward+ - `S` / `↓` — backward+ - `A` / `←` — strafe left+ - `D` / `→` — strafe right+ - `Shift` (held) — run modifier (1.8× speed)+ - `Space` — jump (uses existing jump animation if available; if not, real arc + gravity)+ - `Q` / `E` — rotate avatar 90° (snap turn — useful for fixed-camera mode)+ - `Esc` — release pointer lock / exit immersive mode+- Mouse look:+ - Click canvas → request pointer lock → mouse moves rotate the camera (third-person orbit around avatar, distance fixed)+ - Scroll wheel → zoom camera distance (clamped 2m–8m)+- Smooth input:+ - Use a per-frame accumulator with easing — do not jump from 0 → max speed in one frame+ - Damping when keys release (decel over ~150 ms)+- Wire input → animation state machine: idle ↔ walk ↔ run ↔ jump+- Accessibility: focus indicator on canvas, `aria-label`, full key map listed in a `?` overlay (toggle with `?` key)++## Definition of Done+- Movement on desktop feels smooth; no judder+- Run modifier engages and disengages animation correctly+- Jump arcs and lands cleanly with gravity+- Pointer lock requests work in Chrome and Firefox+- Key map overlay opens with `?` and is keyboard-navigable+- No console errors; no input swallowed by other listeners++## Rules+Complete 100%. No stubs. No fake data. Wire to the existing animation state machine — do not create a parallel one. Verify in a real browser with the dev server running.diff --git a/tasks/walk/12-walk-mobile-joystick.md b/tasks/walk/12-walk-mobile-joystick.mdnew file mode 100644index 000000000..094b9b6b0--- /dev/null+++ b/tasks/walk/12-walk-mobile-joystick.md@@ -0,0 +1,41 @@+# Task 12 — Walk Page: Mobile Joystick + Haptics++## Priority: HIGH++## Objective+Make the mobile walk experience first-class: a responsive virtual joystick with proper dead zone, multi-touch support (joystick + camera drag simultaneously), and tactile haptic feedback.++## Scope+- File: existing joystick code in `pages/walk.html` / `src/walk.js`+- Joystick:+ - Anchored bottom-left, 120px outer / 56px inner thumb+ - Thumb follows touch within outer ring; clamped at ring radius+ - Magnitude → walk speed (0..1), angle → heading+ - Dead zone of ~12% (no movement for tiny touches)+ - Floating mode: tap anywhere on the left half of the screen to re-anchor the joystick at touch point+- Camera drag:+ - Single-finger drag on right half of screen orbits the camera around the avatar+ - Pinch (two fingers) on right half zooms+ - Touch events must be multi-touch aware (use `Pointer Events` not `Touch Events` where possible)+- Action buttons (bottom-right cluster):+ - Jump (large circular button, primary)+ - Wave / gesture (secondary)+ - Camera flip (third-person / first-person)+- Haptics:+ - `navigator.vibrate(10)` on jump press+ - `navigator.vibrate(5)` on action button press+ - Behind a setting (default on, toggleable in HUD overlay)+- iOS Safari quirks:+ - Disable pull-to-refresh and rubber-band scroll on the canvas container (`overscroll-behavior: none`, `touch-action: none`)+ - Honor `viewport-fit=cover` safe areas (`env(safe-area-inset-*)`)+- Landscape/portrait responsive — HUD reflows correctly++## Definition of Done+- Tested on real iOS Safari and real Android Chrome (or via remote debugging with a real device)+- Joystick + camera drag work simultaneously without input crosstalk+- Jump button vibrates on press where supported+- No accidental page zoom or scroll while playing+- 60 FPS sustained on a recent iPhone++## Rules+Complete 100%. No stubs. No fake data. Real device verification preferred — emulator at minimum. Wire end-to-end.diff --git a/tasks/walk/13-walk-camera-modes.md b/tasks/walk/13-walk-camera-modes.mdnew file mode 100644index 000000000..5ad3f4f52--- /dev/null+++ b/tasks/walk/13-walk-camera-modes.md@@ -0,0 +1,29 @@+# Task 13 — Walk Page: Camera Modes (Third / First / Orbit / Cinematic)++## Priority: HIGH++## Objective+Add four switchable camera modes so users can choose the perspective that fits how they want to experience the walking avatar.++## Scope+- File: `src/walk.js` + new `src/walk-cameras.js` module+- Modes:+ 1. **Third-person** (default): camera 4m behind, 1.6m up, looks at avatar head; smoothly follows movement and rotation with critically-damped spring+ 2. **First-person**: camera at avatar's eye position, follows head rotation; avatar mesh culled from view OR rendered with `renderOrder` so own arms/legs visible+ 3. **Orbit**: free orbit around the avatar (existing OrbitControls), no follow+ 4. **Cinematic**: scripted dolly — slowly arcs around avatar at fixed radius; auto-cuts every 5s to a new angle (for screenshot/showcase mode)+- UI: small camera-mode toggle in top-right HUD, four icons; current mode highlighted; keyboard shortcut `C` cycles modes+- Mode change is smooth: 600ms lerp from old camera transform to new — no snap+- Per-mode FOV: third 50°, first 75°, orbit 45°, cinematic 35° (cinematic feel)+- Each mode persists in `localStorage` as `walk:camera-mode`+- First-person mode: hide avatar's head mesh (lookup by node name like `Head`, `Wolf3D_Head`) to avoid clipping++## Definition of Done+- All four modes work and switch smoothly with `C` or HUD button+- First-person camera does not clip into the head/body+- Cinematic mode auto-cuts and looks good for at least 60s without breaking+- Camera mode persists across page reloads+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Wire to the existing Three.js scene — do not duplicate scene setup. Verify in a real browser.diff --git a/tasks/walk/14-walk-avatar-gestures.md b/tasks/walk/14-walk-avatar-gestures.mdnew file mode 100644index 000000000..afe963ff0--- /dev/null+++ b/tasks/walk/14-walk-avatar-gestures.md@@ -0,0 +1,37 @@+# Task 14 — Walk Page: Avatar Gestures (Wave, Dance, Sit, Point, Cheer)++## Priority: HIGH++## Objective+Add a gesture/emote system so the avatar can express itself while walking — wave, dance, sit, point, cheer, agree/disagree. These are triggered by the user and also by other systems (TTS narration triggers "talking" gesture, etc.).++## Scope+- New module: `src/walk-gestures.js`+- Animation source: use real animation clips from `public/animations/` (verify available clips; if missing, source CC0 clips from Mixamo or Ready Player Me's free library and add to `public/animations/gestures/`)+- Gestures (each one a real FBX/GLB clip):+ - `wave` — raise hand and wave+ - `dance` — short looping dance (4s loop)+ - `sit` — sit on ground, idle while sitting; rises on next walk input+ - `point` — point forward (used by narrator to point at sections)+ - `cheer` — both arms up+ - `agree` — head nod+ - `disagree` — head shake+ - `talking` — mouth/upper-body talking idle (looped during TTS)+- State machine integration:+ - Extend `src/animation-state-machine.js` (existing) with a `gesture` slot that crossfades over the base walk/idle layer+ - Gestures play once unless looping; auto-return to base state+ - Walking + gesture: upper-body-only blending (use animation masks on bones above pelvis)+- UI:+ - Gesture wheel: hold `G` (desktop) or long-press action button (mobile) → radial picker fades in with 8 gesture icons; release to play selected gesture+ - Each gesture sends `walk:gesture` postMessage event from embed+- API: expose `window.walk.playGesture('wave')` for programmatic triggers (used by narrator, chat, etc.)++## Definition of Done+- All 8 gestures play smoothly with no T-pose flashes between clips+- Walking + gesture blends correctly (upper body gestures, lower body walks)+- Gesture wheel UI works on both desktop (hold G) and mobile (long-press)+- Programmatic API verified from console: `walk.playGesture('dance')`+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Use real animation clips with proper licenses. Wire to the existing state machine — do not bypass it.diff --git a/tasks/walk/15-walk-speech-bubbles.md b/tasks/walk/15-walk-speech-bubbles.mdnew file mode 100644index 000000000..6f2219d84--- /dev/null+++ b/tasks/walk/15-walk-speech-bubbles.md@@ -0,0 +1,38 @@+# Task 15 — Walk Page: Speech Bubbles & Chat Overlay++## Priority: HIGH++## Objective+Render speech bubbles above the avatar's head that follow it across the screen as it walks. The bubbles are used by the chat system, the narrator (extension task 09), and direct API calls. Bubbles look like the comic-style callouts in games like Animal Crossing or The Sims.++## Scope+- New module: `src/walk-speech-bubble.js`+- DOM-based bubbles (overlay div, not WebGL text) — easier to style, real text selection, accessible+- Each frame: project avatar head bone world position to screen coords (`Vector3.project(camera)`), set bubble CSS `transform: translate(...)`+- Bubble structure:+ - `.walk-bubble` container — max-width 280px, white background, rounded 16px, drop shadow+ - Pointer triangle below bubble pointing at the head+ - Text wraps; supports markdown bold/italic (use existing markdown lib if any in `node_modules`; if not, simple regex)+ - Optional avatar name pill above bubble (small)+- API:+ - `walk.say(text, opts?)` — opts: `{ duration: 4000, voice: false, gesture: 'talking' }`+ - Returns a Promise that resolves when bubble dismisses+ - Queue: multiple `say()` calls queue and play in order+- Auto-behaviors:+ - If `voice: true`, calls `/api/tts/speak` and times the bubble to audio length (uses `audio.duration` from real audio)+ - During speech, triggers `talking` gesture from task 14+ - Bubble fades out 600ms after duration ends+- Off-screen handling:+ - When avatar is behind camera: bubble hides (don't show backward-projected bubbles)+ - When avatar is at edge of screen: bubble clamps to screen edge with an arrow indicator pointing toward the avatar+- Bubble click: dismisses early++## Definition of Done+- `walk.say('Hello, world!')` from console shows a bubble that tracks the avatar smoothly+- Bubbles queue correctly when called rapidly+- TTS bubbles match audio length exactly (no early dismiss)+- Off-screen clamp + indicator works when avatar walks past camera edge+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real TTS for voice option. Wire end-to-end.diff --git a/tasks/walk/16-walk-voice-chat.md b/tasks/walk/16-walk-voice-chat.mdnew file mode 100644index 000000000..f0040f87c--- /dev/null+++ b/tasks/walk/16-walk-voice-chat.md@@ -0,0 +1,36 @@+# Task 16 — Walk Page: Two-Way Voice Chat with the Avatar++## Priority: HIGH++## Objective+Let the user hold a button (push-to-talk) and have a real voice conversation with their walking avatar. The avatar listens (mic → STT), thinks (LLM), speaks (TTS), animates lip-sync, and uses gestures from task 14 to react.++## Scope+- New module: `src/walk-voice-chat.js`+- Mic capture:+ - `navigator.mediaDevices.getUserMedia({ audio: true })`+ - Push-to-talk: hold `T` (desktop) or large mic button on mobile+ - Visual: pulsing ring around mic button while recording; waveform showing input level+- STT:+ - Use existing transcription endpoint if one exists in `api/` (search for `whisper`, `transcribe`, `stt`); if not, build `api/voice/transcribe.js` using OpenAI Whisper API (key from env `OPENAI_API_KEY`)+ - Upload recorded blob, get transcript back+- LLM:+ - POST to existing chat endpoint (search `api/chat/` and `api/agents/`) with the transcript and avatar's persona/system prompt (the avatar's `meta.persona` from `/api/avatars/<id>`)+ - Receive response text (stream if endpoint supports SSE)+- TTS + bubble:+ - Feed response into `walk.say(response, { voice: true, gesture: 'talking' })` from task 15+- Lip sync (best-effort):+ - If the avatar has visemes/blendshapes (Wolf3D / RPM-style), use audio amplitude → jaw open mapping+ - Use Web Audio `AnalyserNode` on the playing TTS audio to drive `viseme_aa` blendshape+- Conversation memory:+ - Keep last 10 turns in `walk-voice-chat.js` state+ - Send full context to LLM each turn++## Definition of Done+- Hold `T`, say "What's your name?" → avatar speaks back with a real LLM-generated response, lips move, talking gesture plays+- Conversation maintains context across multiple turns+- No mocks: real STT, real LLM, real TTS+- Mic permission errors handled gracefully with a real CTA to fix permissions++## Rules+Complete 100%. No stubs. No fake data. Real APIs throughout — Whisper, the chat backend, the TTS endpoint. Verify in a real browser with mic permission.diff --git a/tasks/walk/17-walk-multiplayer.md b/tasks/walk/17-walk-multiplayer.mdnew file mode 100644index 000000000..e418545ec--- /dev/null+++ b/tasks/walk/17-walk-multiplayer.md@@ -0,0 +1,37 @@+# Task 17 — Walk Page: Multiplayer (Colyseus Rooms)++## Priority: HIGH++## Objective+Enable multiple users to walk in the same shared space and see each other's avatars in real time. Build on the existing `multiplayer/` Colyseus workspace referenced in `pages/walk.html`'s `walk-server` meta tag.++## Scope+- Server: `multiplayer/` workspace (verify the existing Colyseus schema; extend if needed)+ - `WalkRoom` schema:+ - players: MapSchema of `{ id, avatarId, x, y, z, rotation, anim, gesture?, displayName? }`+ - chat: optional message log (last 20)+ - Tick rate: 20 Hz+ - Auto-create rooms by `roomCode` query param; default `lobby`+- Client: `src/walk-multiplayer.js`+ - On walk page load, if `?room=<code>` present (or always for default lobby), connect to Colyseus+ - Send local avatar position/rotation/anim state at 20 Hz (delta-only)+ - On peer join: fetch peer's avatar from `/api/avatars/<id>` and add to scene+ - On peer leave: remove from scene+ - On peer move: interpolate position smoothly (180 ms delay buffer)+ - Render peer name labels above their heads using the speech bubble system (task 15) for chat+- Production deployment:+ - Deploy `multiplayer/` to Fly.io (or use existing deployment if present)+ - Update `pages/walk.html` `<meta name="walk-server" content="wss://three-ws-multiplayer.fly.dev">` to the real host+- HUD additions:+ - Player count in top-right+ - "Share room" button → copies `https://three.ws/walk?avatar=<id>&room=<code>`++## Definition of Done+- Open `https://three.ws/walk?room=test` in two browser windows with different avatars → both see each other moving in real time+- Peer movement is smooth (interpolated, not jittery)+- Disconnect cleanly cleans up peer mesh+- Production Colyseus host responds within 100 ms p50+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real Colyseus server, real WebSocket connection, real avatar fetch for peers. Wire end-to-end.diff --git a/tasks/walk/18-walk-environment-selector.md b/tasks/walk/18-walk-environment-selector.mdnew file mode 100644index 000000000..fa2615c98--- /dev/null+++ b/tasks/walk/18-walk-environment-selector.md@@ -0,0 +1,35 @@+# Task 18 — Walk Page: Environment / Scene Selector++## Priority: HIGH++## Objective+Let users choose the environment their avatar walks in: park, cyberpunk street, beach, gallery, abstract void, three.ws office. Each environment is a real GLB scene with appropriate lighting, skybox, and ground.++## Scope+- New module: `src/walk-environments.js`+- Source environments — use real CC0 / properly licensed assets:+ - `park` — green grass, trees, simple bench (Poly Pizza / Quaternius CC0 packs)+ - `cyberpunk` — neon street scene+ - `beach` — sand, water shader, palm trees+ - `gallery` — white-walled art space (good for showcase)+ - `void` — minimal grid floor, gradient sky (procedural, no GLB needed)+ - `office` — three.ws virtual office (start with a simple room, can be replaced later)+- Store at `public/environments/<name>/scene.glb` + `preview.jpg` (256×256)+- Each environment includes:+ - GLB scene+ - HDR environment map (`public/environments/<name>/env.hdr`) for IBL+ - Recommended directional light direction/intensity (stored in `public/environments/index.json` metadata)+ - Walkable ground plane (avatar collides with `y=0` plus the GLB ground mesh raycast)+- URL param: `?env=park` — environment loads on page open+- HUD: environment picker dropdown showing previews; swap is smooth (fade to black 300ms, swap, fade in)+- Persists last selection in `localStorage`++## Definition of Done+- All six environments load and look visually distinct+- Avatar collides correctly with each ground (no clipping, no floating)+- Lighting matches environment (cyberpunk is dim with neon; beach is bright)+- `?env=beach` loads beach on first paint+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real GLBs, real HDRs, real licenses. No "coming soon" environments. Wire end-to-end.diff --git a/tasks/walk/19-walk-npc-companions.md b/tasks/walk/19-walk-npc-companions.mdnew file mode 100644index 000000000..f8cc269fe--- /dev/null+++ b/tasks/walk/19-walk-npc-companions.md@@ -0,0 +1,33 @@+# Task 19 — Walk Page: NPC Companion Avatars++## Priority: MEDIUM++## Objective+Populate the walk environment with one or more NPC companion avatars that wander, react to the player, and can be talked to. Makes the walk experience feel alive even when alone.++## Scope+- New module: `src/walk-npcs.js`+- NPC types (each is a real three.ws avatar, fetched from the avatar API):+ - `wanderer` — walks in random directions, idles, then walks again+ - `greeter` — stays near spawn, waves when player approaches within 4m, speaks a greeting via TTS+ - `guide` — walks ahead of the player, slows when player stops, points at things, narrates ("That's the gallery wing.")+- AI driver per NPC type:+ - Simple finite state machine: `idle → wander → approach → speak → idle`+ - Triggers: distance to player, time since last action, line-of-sight raycast+- Each NPC uses:+ - The animation state machine (task 14) for gestures+ - Speech bubbles (task 15) for dialogue+ - TTS for voice (uses real `/api/tts/speak`)+- Dialogue lines are real and contextual to the environment (e.g., greeter on beach says "Welcome to the beach!" — write a small JSON dialogue table at `public/environments/<env>/dialogue.json` per environment)+- Spawn config in environment metadata: `npcs: [{ type: 'greeter', avatarId: '<id>', pos: [x,y,z] }]`+- HUD: optional toggle "NPCs: on/off" in settings overlay++## Definition of Done+- Load `?env=gallery&avatar=<id>` → at least one NPC is present and behaving correctly+- Walk near greeter → it waves and speaks a real TTS line+- Guide NPC actually leads you somewhere coherent (not random)+- NPCs do not collide with player (or do, configurably)+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real avatars for NPCs, real TTS, real dialogue. Wire end-to-end.diff --git a/tasks/walk/20-walk-capture-screenshot-gif.md b/tasks/walk/20-walk-capture-screenshot-gif.mdnew file mode 100644index 000000000..04297d17c--- /dev/null+++ b/tasks/walk/20-walk-capture-screenshot-gif.md@@ -0,0 +1,34 @@+# Task 20 — Walk Page: Capture (Screenshot + GIF Export + Share)++## Priority: MEDIUM++## Objective+Let users capture screenshots and short GIFs/MP4s of their avatar walking and share them — drives organic distribution. Twitter share with auto-generated OG card.++## Scope+- New module: `src/walk-capture.js`+- Screenshot:+ - `P` key (desktop) or camera icon (mobile) → captures the WebGL canvas via `renderer.domElement.toBlob('image/png')`+ - Resolution: full canvas size, retina-scaled+ - Optional: include HUD-rendered watermark "three.ws/walk?avatar=<id>" in bottom-right of capture (real text overlay, not fake)+ - Save dialog: download immediately + "Share to X" / "Share to Farcaster" buttons+- GIF / MP4 export:+ - Hold `R` key or record button → records up to 10 seconds+ - Use `MediaRecorder` API with `canvas.captureStream(60)` → records to webm; transmux to mp4 via `ffmpeg.wasm` (vendored in `public/vendor/ffmpeg-wasm/`)+ - Show recording indicator (red dot + countdown)+ - On stop: preview modal with download + share buttons+- Share to X (Twitter):+ - Upload media via `/api/share/x` (build the endpoint if missing — uses X API v2 with `X_BEARER_TOKEN` from env)+ - Tweet text: "I walked my avatar around three.ws — try yours: three.ws/walk?avatar=<id>"+- Share to Farcaster:+ - Use Frames v2 — generate a frame URL at `https://three.ws/api/frames/walk?avatar=<id>` (real Vercel function)++## Definition of Done+- `P` saves a real PNG of the current scene+- `R` records a real 10s MP4 of the avatar walking+- Share to X posts a real tweet with the media attached+- Farcaster frame opens correctly in Warpcast+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real APIs, real ffmpeg, real share endpoints. Wire end-to-end.diff --git a/tasks/walk/21-embed-page-walking-avatar.md b/tasks/walk/21-embed-page-walking-avatar.mdnew file mode 100644index 000000000..07daae52c--- /dev/null+++ b/tasks/walk/21-embed-page-walking-avatar.md@@ -0,0 +1,34 @@+# Task 21 — Embed Page: Walking Avatar Mode for /embed++## Priority: URGENT++## Objective+Extend the existing `/embed` page (`pages/embed.html` → `public/embed/`) to support a "walking avatar" embed mode in addition to whatever current modes exist. The embed snippet generator UI must offer a "Walking" option alongside Static/Idle/Chat.++## Scope+- Files: `pages/embed.html`, `pages/a-embed.html`, `pages/agent-embed.html`, `pages/avatar-embed.html`, `src/agent-embed-modal.js` (audit all and apply changes consistently)+- Add new embed mode `walking` to whatever mode enum exists in the embed system+- Walking mode embed snippet:+ ```html+ <iframe src="https://three.ws/walk-embed?avatar=<id>&controls=joystick&autoplay=true" width="320" height="480" style="border:0;border-radius:16px"></iframe>+ ```+ (uses the embed page from task 03)+- Generator UI:+ - Mode toggle (Static | Idle | Chat | Walking)+ - When Walking selected, expose: controls (joystick/keyboard/none), background (color picker), size (S/M/L/custom), autoplay (toggle), environment (dropdown from task 18)+ - Live preview pane on the right showing the embed exactly as it would render+ - "Copy snippet" button → real copy to clipboard via `navigator.clipboard.writeText`+- Add a second snippet variant for the JS embed SDK from task 04:+ ```html+ <script src="https://three.ws/walk-embed-sdk.js" data-avatar="<id>"></script>+ ```++## Definition of Done+- Open `https://three.ws/embed?avatar=<id>` → Walking mode is selectable+- Live preview accurately reflects the snippet+- Snippet copies to clipboard+- Pasting snippet into a fresh `index.html` renders the walking avatar correctly+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real preview, real copy, real embed. Wire end-to-end.diff --git a/tasks/walk/22-widget-studio-walking-widget.md b/tasks/walk/22-widget-studio-walking-widget.mdnew file mode 100644index 000000000..c36de1bd4--- /dev/null+++ b/tasks/walk/22-widget-studio-walking-widget.md@@ -0,0 +1,34 @@+# Task 22 — Widget Studio: Walking Avatar Widget Type++## Priority: URGENT++## Objective+Add "Walking Avatar" as a first-class widget type in the Widget Studio (`pages/widget-studio.html`) so users can configure, preview, and publish a walking avatar widget the same way they configure other widget types.++## Scope+- Files: `pages/widget-studio.html`, `src/widget-studio.js` (locate the widget-type registry)+- Register new widget type: `walking-avatar`+- Schema (drives the editor UI on the left panel):+ - `avatarId` (avatar picker, required)+ - `controls` (enum: joystick | keyboard | none)+ - `environment` (enum: from environments list, task 18)+ - `autoplay` (bool)+ - `size` (preset: S/M/L/custom + W/H)+ - `position` (corner: tl/tr/bl/br/inline)+ - `bg` (color picker, supports transparent)+ - `walkSpeed` (slider 0.5–2.0)+ - `enableNarration` (bool — narrator from task 09; for site-embedded widgets)+- Live preview (right panel) renders the actual widget exactly as it will appear on a customer site — uses real iframe pointing to `/walk-embed`+- Save: persists widget config to `/api/widgets` (existing endpoint per the codebase) with `type: 'walking-avatar'`+- Publish: emits the snippet for the chosen embed flavor (iframe or JS SDK) and copies to clipboard+- Widget client (`public/widget-client.js`) must learn to render the walking type — extend its dispatcher to recognize `type: 'walking-avatar'` and inject the iframe accordingly++## Definition of Done+- Open Widget Studio → "Walking Avatar" appears as a widget type option+- All editor fields work and update the preview in real time+- Save persists to the real backend; refresh shows the saved widget in the user's widget list+- Embed snippet renders the configured widget on a blank page+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real backend persistence, real preview. Wire end-to-end.diff --git a/tasks/walk/23-agent-detail-walk-mode.md b/tasks/walk/23-agent-detail-walk-mode.mdnew file mode 100644index 000000000..8550683de--- /dev/null+++ b/tasks/walk/23-agent-detail-walk-mode.md@@ -0,0 +1,26 @@+# Task 23 — Agent Detail Page: "Walk With This Agent" Mode++## Priority: HIGH++## Objective+On every agent detail page (`pages/agent-detail.html` and `pages/handle.html`), add a prominent "Walk with this agent" CTA that opens the walk experience with that agent's avatar pre-loaded.++## Scope+- Files: `pages/agent-detail.html`, `src/agent-detail.js`, `pages/handle.html`+- Add CTA button in the hero/profile section, near the existing "Chat" / "Follow" actions+- Click → opens `/walk?avatar=<agent.avatarId>&agent=<agent.id>` in same tab (or new tab if held with modifier)+- On the walk page, if `?agent=<id>` is present, fetch agent metadata (`/api/agents/<id>`) and:+ - Set the avatar's display name pill to the agent's handle+ - Load the agent's persona into the voice chat (task 16) so conversations are in character+ - Use the agent's preferred environment if set in agent meta; else default+- Add a small inline walking-avatar preview card on the agent detail page itself (240×320), reuses `/walk-embed` iframe — shows the agent's avatar walking idly as a teaser+- The preview card has its own "Expand" button → opens full walk page++## Definition of Done+- Visit `https://three.ws/@somehandle` → see the avatar walking in the preview card+- Click "Walk with this agent" → walk page opens with correct avatar and agent persona loaded+- Voice chat in walk mode responds in the agent's persona+- No console errors on agent detail page or walk page++## Rules+Complete 100%. No stubs. No fake data. Real agent fetch, real avatar load, real persona injection. Wire end-to-end.diff --git a/tasks/walk/24-agent-embed-walking-mode.md b/tasks/walk/24-agent-embed-walking-mode.mdnew file mode 100644index 000000000..67cee3e37--- /dev/null+++ b/tasks/walk/24-agent-embed-walking-mode.md@@ -0,0 +1,28 @@+# Task 24 — Agent Embed: Walking Avatar Mode for Embedded Agents++## Priority: HIGH++## Objective+Extend `pages/agent-embed.html` (the embeddable agent widget) so the agent appears as a walking avatar — not just a chat box. Customers embedding an agent on their site get a live, walking, conversational character instead of a flat chat bubble.++## Scope+- Files: `pages/agent-embed.html`, `src/agent-embed-modal.js`+- Add a `mode=walking` query param to the embed page+- When `mode=walking`:+ - Render the walking avatar canvas (reuses `src/walk.js` core)+ - Render a chat input below the avatar (single-line, expands on focus)+ - User types → send to existing agent chat API → response → `walk.say(reply, { voice: true })` (task 15)+ - Avatar plays `talking` gesture during reply+ - Idle behavior: wanders subtly within a 2m radius (uses NPC wander AI from task 19, scoped)+- Custom domain support: if embedded under a customer's domain via the agent embed allowlist, keep working (no CORS issues — verify with real cross-origin test)+- Backward compatible: existing embeds without `mode=walking` continue to work as before++## Definition of Done+- `<iframe src="https://three.ws/agent-embed?agent=<id>&mode=walking">` renders a walking avatar with chat+- Type a message → avatar responds in voice + bubble + talking gesture+- Idle wander does not feel jittery+- Works on a foreign origin (test with a static HTML file served from a different localhost port)+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real chat backend, real TTS, real avatar. Wire end-to-end.diff --git a/tasks/walk/25-features-page-walking-demo.md b/tasks/walk/25-features-page-walking-demo.mdnew file mode 100644index 000000000..2701a633a--- /dev/null+++ b/tasks/walk/25-features-page-walking-demo.md@@ -0,0 +1,37 @@+# Task 25 — Features Page: Walking Avatar Demo Section++## Priority: MEDIUM++## Objective+Add a dedicated section on the features page (`pages/features.html`) that showcases the walking avatar capability: live, interactive demo embedded inline, plus benefit copy and a CTA.++## Scope+- Files: `pages/features.html`, `public/features.json`+- Add a new feature entry to `public/features.json`:+ ```json+ {+ "id": "walking-avatar",+ "title": "Walking Avatars",+ "tagline": "Your avatar walks. Anywhere on the web.",+ "description": "Embed a fully animated, voice-capable, walking 3D avatar on any page — or browse the web with your own avatar as your guide via our Chrome extension.",+ "demoType": "walking-avatar-inline",+ "ctaLabel": "Try Walking →",+ "ctaHref": "/walk"+ }+ ```+- Renderer in `pages/features.html` already handles `demoType` values; add handler for `walking-avatar-inline` that injects an iframe to `/walk-embed?avatar=<featured>&controls=joystick`+- Section layout:+ - Left: heading, tagline, 3-bullet feature list (Walk anywhere · Voice chat · Chrome extension), CTA+ - Right: 360×480 walking avatar iframe with rounded corners+- Below the section: three smaller cards linking to (a) `/walk` page, (b) Chrome extension store page, (c) embed snippet copy+- Mobile: stacks vertically, iframe shrinks to viewport width++## Definition of Done+- Visit `/features` → walking avatar section appears with a real, interactive walking avatar+- Joystick works inside the embedded iframe on the features page+- All three sub-CTAs link to real destinations (extension link points to the Web Store URL once published; until then, link to `/extension` info page)+- No console errors+- Mobile layout clean++## Rules+Complete 100%. No stubs. No fake data. Real iframe, real demo. Wire end-to-end.diff --git a/tasks/walk/26-pricing-page-walking-mascot.md b/tasks/walk/26-pricing-page-walking-mascot.mdnew file mode 100644index 000000000..7622c84f2--- /dev/null+++ b/tasks/walk/26-pricing-page-walking-mascot.md@@ -0,0 +1,29 @@+# Task 26 — Pricing Page: Walking Mascot++## Priority: MEDIUM++## Objective+Add a small walking avatar mascot to the pricing page (`pages/pricing.html` and/or `pages/x-pricing.html`) that walks across the pricing tier cards and reacts when the user hovers a tier. Subtle, charming, drives engagement.++## Scope+- File: `pages/pricing.html` (and `x-pricing.html`)+- Embed a walking avatar via the JS SDK from task 04, but in "stage" mode:+ - Avatar walks along an invisible horizontal path that spans the pricing tier row+ - On hover over a tier card, dispatch `walk:goto` postMessage with the tier's center X coord → avatar walks to that tier and stops, plays `point` gesture toward the tier+ - On mouse leave, resumes wandering+- Avatar size: 120×160px, transparent background, positioned absolutely above the pricing cards+- Speech bubble (task 15) shows tier-specific copy when avatar stops:+ - Free: "Great starting point!"+ - Pro: "Most popular!"+ - Studio: "Power-user pick."+- Disable on `prefers-reduced-motion` and on small mobile (<480px width)++## Definition of Done+- Visit pricing page → avatar walks along the tier row+- Hover a tier → avatar walks to it and points with a bubble+- Reduced motion users see a static avatar instead of animated wandering+- No console errors+- No layout breakage on mobile++## Rules+Complete 100%. No stubs. No fake data. Real avatar, real animation, real interaction. Wire end-to-end.diff --git a/tasks/walk/27-dashboard-topbar-walking-avatar.md b/tasks/walk/27-dashboard-topbar-walking-avatar.mdnew file mode 100644index 000000000..d8f1c5185--- /dev/null+++ b/tasks/walk/27-dashboard-topbar-walking-avatar.md@@ -0,0 +1,31 @@+# Task 27 — Dashboard: Walking Avatar in Topbar / Sidebar++## Priority: MEDIUM++## Objective+Show the signed-in user's primary avatar walking inside a small embedded canvas in the dashboard topbar. The avatar is a live status indicator: idle when no notifications, walks/waves when there's something new.++## Scope+- Files: `public/dashboard-classic/index.html`, `public/dashboard/`, `src/dashboard/dashboard.js`, `public/dashboard-next/`+- Add a 64×80px walking avatar canvas in the topbar (right side, before user menu)+- Uses real `/api/avatars/mine?primary=true` to get the user's primary avatar+- State driven by real data:+ - Default: avatar idles+ - New notification (poll `/api/notifications/unread-count` every 30s or via existing SSE/WS): avatar plays `wave` gesture+ - User receives a tip / payment: avatar plays `cheer` gesture+ - Long inactivity (10 min): avatar sits down+- Click the avatar → opens a dropdown with:+ - Avatar's name + handle+ - "Open Walk" → `/walk?avatar=<id>`+ - "Edit Avatar" → `/avatar-edit?id=<id>`+- Render with low-cost settings: 30 FPS, antialias off, no shadows — keeps dashboard snappy++## Definition of Done+- Sign in, open dashboard → avatar walks/idles in topbar+- Trigger a real notification → avatar waves within 30s+- Click avatar → dropdown opens with working links+- No measurable impact on dashboard render performance (verify with DevTools Performance tab)+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real avatar fetch, real notification source, real interactions. Wire end-to-end.diff --git a/tasks/walk/28-profile-page-walking-avatar.md b/tasks/walk/28-profile-page-walking-avatar.mdnew file mode 100644index 000000000..94035c402--- /dev/null+++ b/tasks/walk/28-profile-page-walking-avatar.md@@ -0,0 +1,29 @@+# Task 28 — Profile Page: Walking Avatar Hero++## Priority: MEDIUM++## Objective+Replace the static avatar image on user profile pages (`pages/profile.html`, `pages/handle.html`) with a live walking avatar canvas in a stage area. Avatar walks idly when no visitor interacts; reacts when a visitor clicks.++## Scope+- Files: `pages/profile.html`, `pages/handle.html`+- Hero section gets a 480×600 canvas (responsive: full-width on mobile)+- Avatar: the profile owner's primary avatar+- Background: gradient based on profile's accent color (read from `profile.theme.accent`)+- Default behavior: avatar wanders within stage area+- Visitor interactions:+ - Click stage → avatar walks to click point, plays `wave`+ - Hover stage → avatar turns to face cursor+ - "Say hi" button → visitor records a short voice clip → sent to profile owner's inbox (real `/api/messages`); avatar plays `agree` gesture and shows bubble "Got it!"+- Stats overlay (top-right of stage): follower count, agent count, joined date — real values from `/api/profiles/<handle>`+- "Walk with me" CTA → opens full `/walk?avatar=<id>&handle=<handle>` (multiplayer-aware: drops visitor into same room if profile owner is currently online)++## Definition of Done+- Visit a profile → avatar walks live in hero stage+- Click stage → avatar reacts as specified+- "Say hi" sends a real message and the owner sees it in their inbox+- Profile stats are real values+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real avatar, real profile data, real messaging. Wire end-to-end.diff --git a/tasks/walk/29-marketplace-walk-browse.md b/tasks/walk/29-marketplace-walk-browse.mdnew file mode 100644index 000000000..6b54282b2--- /dev/null+++ b/tasks/walk/29-marketplace-walk-browse.md@@ -0,0 +1,30 @@+# Task 29 — Marketplace: Walk-Browse Mode++## Priority: MEDIUM++## Objective+Add a "Walk-Browse" mode to the marketplace (`pages/marketplace.html`, `public/bazaar.html`) where the user's avatar walks through a 3D gallery of agents/avatars/skills — each listing rendered as a stage in a procedurally generated hall.++## Scope+- File: new `pages/marketplace-walk.html` linked from marketplace toggle button+- Reuses walk engine from task 1–18+- Procedurally generates a corridor with listing "plinths" every 4 meters:+ - Each plinth shows the agent/avatar/skill artwork on a vertical billboard+ - Title + price floating above+ - Walk close (within 2m) → details panel slides in from the right with full listing info+ - Press `E` (or tap) → opens that listing's detail page+- Pull listings from existing marketplace API endpoint (search `api/marketplace/` or `api/bazaar/`)+- Pagination: corridor extends as you walk; loads next page when user is within 20m of the end (infinite hallway pattern)+- Filter chips at top: All / Agents / Avatars / Skills — re-generates corridor with filtered listings+- Persist `?env=gallery` as default environment++## Definition of Done+- Open `/marketplace-walk` → walk into a hallway of real listings+- Approaching a plinth shows real listing data+- `E` opens the correct detail page+- Infinite scroll into next page works smoothly+- Filter chips work and re-generate+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real listings from real API. Wire end-to-end.diff --git a/tasks/walk/30-avatar-edit-walk-preview.md b/tasks/walk/30-avatar-edit-walk-preview.mdnew file mode 100644index 000000000..5713c7165--- /dev/null+++ b/tasks/walk/30-avatar-edit-walk-preview.md@@ -0,0 +1,28 @@+# Task 30 — Avatar Editor: Live Walk Preview++## Priority: MEDIUM++## Objective+In the avatar editor (`pages/avatar-edit.html`, `src/avatar-edit/`), add a "Walk Preview" tab so creators can test how their avatar looks while walking — not just standing in a T-pose or A-pose.++## Scope+- Files: `pages/avatar-edit.html`, `src/avatar-edit/` (locate editor entry)+- Add a third preview mode tab alongside existing (likely Idle / Pose): "Walk"+- When selected:+ - Camera switches to third-person follow+ - Avatar walks in a circle around the editor stage (radius 1.5m, speed 1 m/s)+ - WASD enabled in the preview so creator can drive avatar around+ - Optional: load any of the environments from task 18 via a small dropdown in the preview pane (default: void)+- Bone/blendshape edits in the editor reflect instantly on the walking preview (rig hot-reload)+- "Open in Walk page" button: deep-links to `/walk?avatar=<draftId>&preview=true` — uses the in-progress draft, not the saved version (requires draft preview endpoint at `/api/avatars/draft/<id>` if not present — build it real)+- Performance: preview canvas at 30 FPS to keep editor responsive++## Definition of Done+- Open avatar editor → switch to Walk preview → avatar walks+- Edit a blendshape (e.g., smile) → walking avatar reflects change in real time+- Drive avatar with WASD inside preview pane+- "Open in Walk page" opens a full walk experience with the draft avatar+- No console errors++## Rules+Complete 100%. No stubs. No fake data. Real draft endpoint if missing — build it. Real rig hot-reload. Wire end-to-end.