Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

docs(event): add six feature-build prompts to the event-readiness pack

nirholas79d508b1c958
diff --git a/docs/event-readiness/11-event-live-ops.md b/docs/event-readiness/11-event-live-ops.md
new file mode 100644
index 000000000..8def2b5b6
--- /dev/null
+++ b/docs/event-readiness/11-event-live-ops.md
@@ -0,0 +1,28 @@
+# Feature 11: live event ops (broadcast, stage moments, event config)
+
+Tomorrow the $THREE world hosts a live event. The countdown already exists (`src/game/event-countdown.js` reads `public/event.json` and mounts a lobby banner + in-world pill). What is missing is the live layer: a way for the operator to speak to everyone in the world at once, and for the world to visibly react when the event goes live. Build it end to end.
+
+## Where the code lives
+
+- Event config + countdown: `public/event.json`, `src/game/event-countdown.js` (self-attaching, zero edits to the core modules; keep that pattern)
+- Multiplayer server (in-repo): `multiplayer/src/rooms/WalkRoom.js`, `multiplayer/src/social-hub.js`; client socket + event bus: `src/game/community-net.js`
+- In-world screens for takeover moments: `src/game/x402-jumbotron.js`, `src/game/chart-screen.js`
+- Celebration FX precedent: the reaction-bar confetti in `src/game/coincommunities-ui.js`
+- Admin/API patterns: look at existing authed admin endpoints under `api/` before inventing a new auth scheme
+
+## What to build
+
+1. **Operator broadcast.** An authed API endpoint (follow the repo's existing admin-auth pattern; never an open endpoint) that pushes an announcement through the Colyseus room to every connected player in a given coin world (or all worlds). Client side: a distinct, high-visibility announcement banner in the HUD, auto-dismissing, queued if several arrive. Server-side rate limit so a bad script cannot spam every player.
+2. **Go-live moment.** When `event.json` flips to live (the countdown module already computes the state), the world marks it: jumbotron takeover with the event name, a one-shot celebration burst, and the countdown pill switching to its pulsing LIVE state. All of it must degrade to nothing when there is no event.
+3. **Event config hardening.** `event.json` is baked into the image at build time, which means a config change mid-event needs a redeploy. Add a small authed read path (for example an `app_settings`-backed override checked after the static file) so the operator can extend, rename, or end the event live without a deploy. Document the exact curl in the runbook (`10-event-day-runbook.md`).
+4. **Broadcast script.** A `scripts/` helper the operator runs from this workspace: takes a message, calls the endpoint, prints how many players received it.
+
+## Verify
+
+- Two browser windows on `npm run dev` joined to the same coin world: a broadcast reaches both within a second; the banner queues, dismisses, and never overlaps the chat panel or mobile joystick.
+- `event.json` state transitions (upcoming, live, over) exercised by editing the local file; nothing mounts when it is absent.
+- `npm test` green; add tests for the broadcast endpoint's auth and rate limit.
+
+## Report format
+
+What shipped (files + one line each), the exact operator commands for event day, and anything deliberately deferred with a one-line reason. Add the `data/changelog.json` entry (feature tag) and a row in `STRUCTURE.md` for the live-ops surface.
diff --git a/docs/event-readiness/12-photo-mode-share.md b/docs/event-readiness/12-photo-mode-share.md
new file mode 100644
index 000000000..d31521b23
--- /dev/null
+++ b/docs/event-readiness/12-photo-mode-share.md
@@ -0,0 +1,29 @@
+# Feature 12: photo mode with branded one-tap share
+
+The event's growth loop is screenshots. Right now only build mode has a screenshot + share sheet; the world itself has none. Build a photo mode so any player can capture a beautiful branded shot of their avatar in the $THREE world and share it in two taps.
+
+## Where the code lives
+
+- Camera: `src/game/camera-modes.js`; main loop + renderer: `src/game/coincommunities.js` (it already uses `toDataURL` and `navigator.share` for build shots; reuse those paths)
+- HUD mount points: `src/game/coincommunities-ui.js`, styles in `src/game/coincommunities.css`
+- Existing share-sheet precedent: the build screenshot flow in `src/game/world-persist.js` / build UI
+- OG card for shared links: `api/play-og.js` (verify the /play link preview actually renders the coin image and name; fix it if stale)
+- Deep-link contract: `coinWorldUrl()` covered by `tests/fits-lib.test.js`
+
+## What to build
+
+1. **Photo mode toggle.** A HUD button (and `P` key) that hides all HUD chrome, unlocks a free orbit camera with slow smoothed movement, and shows a minimal capture bar: shutter, frame toggle, exit. Mobile: pinch to zoom, drag to orbit, big shutter button.
+2. **Branded frame.** Composite the capture on a canvas with a tasteful frame: coin image, name, symbol (from the live world state, the same values the HUD banner uses), the three.ws wordmark, and the deep link. No watermark spam; it should look like something a person wants to post.
+3. **One-tap share.** `navigator.share` with the image file where supported; fallback to download + copy-link with a confirmation toast. The copied link is the canonical `/play?coin=...` URL for the current world.
+4. **Quality details.** Capture at device-pixel-ratio resolution, not CSS pixels. Hide nameplates of other players in the shot unless they opted in (privacy default). Restore the exact camera and HUD state on exit.
+5. **Self-attach if possible.** Prefer the `ambient-crowd.js` / `event-countdown.js` pattern (own module, own styles, zero or minimal edits to the 190 KB core files).
+
+## Verify
+
+- Desktop and emulated-mobile passes on `npm run dev`: enter photo mode, capture, share/download, exit; zero console errors; HUD returns exactly as it was.
+- The shared deep link round-trips into the same world, and its OG preview (via `api/play-og.js`) shows the coin identity.
+- `npm test` green.
+
+## Report format
+
+Files shipped, a saved sample capture path, what the share flow does per platform (share sheet vs download), and the `data/changelog.json` entry text you added.
diff --git a/docs/event-readiness/13-event-quests-leaderboard.md b/docs/event-readiness/13-event-quests-leaderboard.md
new file mode 100644
index 000000000..c1e1f5a02
--- /dev/null
+++ b/docs/event-readiness/13-event-quests-leaderboard.md
@@ -0,0 +1,29 @@
+# Feature 13: event quest line with a live leaderboard
+
+Give event visitors something to chase. A time-boxed quest line that runs only during the event window, scored server-side, with a live leaderboard in the world and a cosmetic reward for finishers. The pieces all exist; this task wires them into one loop.
+
+## Where the code lives
+
+- Quests: `src/game/quests-ui.js`, `src/game/npc/quest-npcs.js`, `src/game/npc/quest-markers.js`
+- Event window: `public/event.json` (the same config `src/game/event-countdown.js` reads; do not invent a second source of truth)
+- Live scoreboard precedent: the King of the Totem round HUD in `src/game/coincommunities-ui.js` (server-authoritative scores pushed through the room)
+- Server: `multiplayer/src/rooms/WalkRoom.js`; persistent scores belong in the database via an `api/` handler (migrations in `api/_lib/migrations/`, preview with `npm run db:status`)
+- Leaderboard OG precedent: `api/og-leaderboard.js`; cosmetics reward path: `src/game/cosmetics-*.js` and the cosmetics API
+
+## What to build
+
+1. **The quest line.** Three to five event quests using existing verbs (visit landmarks, gather, emote with another player, take a photo if Feature 12 landed, make one x402 micro-purchase). Defined in data, gated on the event window from `event.json`; outside the window the quest giver and markers do not exist.
+2. **Server-authoritative scoring.** Completion is validated and scored server-side (room or API, whichever the verb already trusts); the client never self-reports a finished quest. Persist per-wallet (signed-in) with a per-session fallback for anonymous players that clearly says sign in to enter the leaderboard.
+3. **Live leaderboard.** An in-world board (panel or world screen) showing top players and your own rank, updating live without refresh. Also expose it at an API endpoint so the event host can put it on a projector.
+4. **The reward.** Finishers get a real cosmetic granted through the existing cosmetics ownership path, visibly equipped-able immediately, with a celebration moment on grant.
+5. **Anti-grief basics.** Rate limits on completion attempts, idempotent grants (finishing twice never double-grants), and no negative or NaN scores possible.
+
+## Verify
+
+- Full loop on `npm run dev` with two browsers: complete quests in one, watch the leaderboard move in both; reward granted once, persists across reload.
+- Event window off: zero event-quest UI anywhere.
+- `npm test` green; add tests for the scoring endpoint (auth, idempotency, window gating). `npm run db:status` before any migration; note what `db:migrate` would apply.
+
+## Report format
+
+The quest list as players will see it, files shipped, the leaderboard endpoint URL, migration status, and the `data/changelog.json` entry. One line on anything deferred.
diff --git a/docs/event-readiness/14-welcome-concierge.md b/docs/event-readiness/14-welcome-concierge.md
new file mode 100644
index 000000000..99c2ea90a
--- /dev/null
+++ b/docs/event-readiness/14-welcome-concierge.md
@@ -0,0 +1,28 @@
+# Feature 14: welcome concierge NPC for first-time event visitors
+
+Most event visitors will be first-timers landing from one shared link. The onboarding overlay explains controls, but nobody in the world greets them, answers questions, or shows them where things are. Build a concierge NPC that does.
+
+## Where the code lives
+
+- NPC layer: `src/game/npc/npc.js`, `npc-catalog.js`, `npc-chat.js` (already talks to `/api/brain/chat`), `nav-graph.js` (pathing), `economy-npcs.js` for placement precedent
+- Onboarding today: `src/game/play-onboard.js` (3-step overlay); intro card: `src/game/play-intro.js`
+- Landmarks worth touring: the stations from `src/game/play-activities.js`, the chart jumbotron (`chart-screen.js`), the cosmetics boutique, the intel kiosk
+- First-visit detection: the same localStorage signals `play-onboard.js` uses
+
+## What to build
+
+1. **The greeter.** A distinct, well-dressed NPC near spawn. For first-time visitors it approaches (or waves and beckons) once, never repeatedly, and never blocks movement. Returning players see it idle at its post; it never re-triggers the greeting.
+2. **Real conversation.** Clicking or approaching opens the existing NPC chat with a concierge persona: it knows what this place is ($THREE's world on three.ws), what there is to do (name the actual stations and panels that exist in code, not marketing copy), how to earn and spend, and how to sign in. Ground the persona prompt in the real feature set so it never invents features.
+3. **Guided tour.** A "show me around" choice that walks the player (NPC leads using the nav graph, waypoint markers as fallback) through three or four real landmarks with one line at each. Skippable at any point; works with the mobile joystick.
+4. **Event awareness.** During the event window (`public/event.json`) the concierge's opening line points at the event: what is happening and where. Outside the window that line does not exist.
+5. **Zero-regression mount.** Prefer a self-attaching module in the `ambient-crowd.js` / `event-countdown.js` style. The concierge must never appear in worlds where the NPC layer is disabled, and must cost nothing when idle (no per-frame work while nobody is near).
+
+## Verify
+
+- Fresh profile (cleared localStorage) on `npm run dev`: greeting fires once, tour completes, chat answers "what is this place" and "how do I make money here" sensibly, on desktop and emulated mobile.
+- Second visit: no re-greeting. Console clean throughout.
+- `npm test` green.
+
+## Report format
+
+Files shipped, the persona prompt location, the tour stops, what the concierge says in its event-window line, and the `data/changelog.json` entry.
diff --git a/docs/event-readiness/15-live-hype-feed.md b/docs/event-readiness/15-live-hype-feed.md
new file mode 100644
index 000000000..0edfaa36a
--- /dev/null
+++ b/docs/event-readiness/15-live-hype-feed.md
@@ -0,0 +1,27 @@
+# Feature 15: live activity ticker and hype moments
+
+A live world should feel alive even when you just stand there. The market already drives world FX (`market-reactor.js`) and the chart jumbotron streams real trades; what is missing is a human-readable pulse: who joined, who bought, what just happened. Build the ticker and the hype moments on top of the feeds we already have.
+
+## Where the code lives
+
+- Market-to-world FX: `src/game/market-reactor.js`; trade feeds: `src/game/chart-screen.js` (`/api/pump/coin-trades`, `/api/robinhood/coin-trades` for hoodchain worlds)
+- Player joins/leaves: the Colyseus room state in `src/game/community-net.js` (the HUD online count already consumes it)
+- In-world purchases worth celebrating: cosmetics buys, wheel wins, x402 payments (`agent-commerce.js`, `x402-jumbotron.js`)
+- HUD layer + toast precedent: `src/game/coincommunities-ui.js`, styles in `src/game/coincommunities.css`
+
+## What to build
+
+1. **The ticker.** A compact, low-key activity feed (bottom corner opposite chat, collapsible, off by default on small screens) streaming real events: player joined, buy of size X, wheel win, cosmetic purchase, quest completion if Feature 13 landed. Real data only; if a feed is quiet the ticker is quiet. Cap the DOM (virtualize or prune old rows) so an hours-long session never leaks nodes.
+2. **Hype moments.** Threshold-based celebrations sourced from the real trade feed: a genuinely large buy for this coin triggers a short world moment (jumbotron flash, sound if unmuted, brief FX through the existing market-reactor hooks). Tune thresholds per-coin from recent trade sizes, not a hardcoded dollar number, so small coins get moments too. Strict cooldown so a volatile minute cannot strobe the world.
+3. **Privacy and abuse.** Wallet addresses truncated, player names as rendered in nameplates only, no external links from ticker rows, and coin metadata treated as untrusted display text (it never becomes markup or instructions).
+4. **Performance envelope.** Zero per-frame cost when nothing is happening; the ticker must respect the frame governor and never touch layout during the render loop.
+
+## Verify
+
+- On `npm run dev` against the live trade feed for the $THREE mint: rows appear on real trades, a simulated large-trade payload (dev-only injection through the same code path, removed before commit is not required if it is a proper debug hook gated off in production) triggers exactly one hype moment with cooldown honored.
+- Two-browser join/leave shows in the ticker. DOM node count stays bounded after 15 minutes.
+- `npm test` green; add a unit test for the threshold tuner.
+
+## Report format
+
+Files shipped, the threshold logic in two sentences, measured DOM/node behavior over a soak, and the `data/changelog.json` entry.
diff --git a/docs/event-readiness/16-invite-flow.md b/docs/event-readiness/16-invite-flow.md
new file mode 100644
index 000000000..dfdd880ab
--- /dev/null
+++ b/docs/event-readiness/16-invite-flow.md
@@ -0,0 +1,27 @@
+# Feature 16: invite flow (deep link, QR, OG card) for the event
+
+Everyone at the event arrives through one link, and everyone who has fun should be able to pull one more person in. Make inviting effortless from inside the world, and make the link unfurl beautifully everywhere it is pasted.
+
+## Where the code lives
+
+- Deep-link contract: `coinWorldUrl()` (tested in `tests/fits-lib.test.js`); canonical URL emission in `src/game/coincommunities.js` (`history.replaceState` on entry)
+- OG image for /play links: `api/play-og.js`; house OG patterns: `api/page-og.js`, `api/og-leaderboard.js`
+- HUD mount + share precedent: `src/game/coincommunities-ui.js` and the build-share sheet
+- QR: check `package.json` for an existing QR dependency first (open-source-first rule); a tiny well-maintained encoder is fine if none exists, no heavyweight additions
+
+## What to build
+
+1. **Invite button.** A HUD control (and lobby-card action) opening a small invite sheet: the canonical world link with copy button, a live QR code of that link (event hosts will show phones to each other), and `navigator.share` where available. The link always carries `coin`, `name`, `symbol`, `image` so the destination renders identity instantly, before any API round-trip.
+2. **OG card truth.** Paste-test the canonical $THREE URL: the unfurl must show the coin image, name, symbol, and a line that sells the world. If `api/play-og.js` renders stale or generic art, fix it: it should composite the real coin image (via the `/api/img` proxy, with a designed fallback when IPFS fails) and live-ish facts if cheap (online count is a nice touch only if it does not slow the card).
+3. **Arrival continuity.** An invitee landing from the link skips straight into the flow a first-timer needs: intro suppressed (a `coin` param already does this), onboarding shown once, and if Feature 14 landed the concierge greets them. Verify the whole arrival path on a fresh profile.
+4. **Event framing.** During the event window (`public/event.json`), the invite sheet leads with the event name and countdown, so the share reads as an invitation to a happening, not just a link.
+
+## Verify
+
+- `npm run dev`: invite sheet on desktop and emulated mobile; QR scans from a real phone camera to the right URL; copy toast; share sheet on mobile.
+- OG card rendered locally (hit the endpoint directly) and correct for the $THREE canonical URL, including the IPFS-failure fallback.
+- `npm test` green.
+
+## Report format
+
+Files shipped, any dependency added (name, weekly downloads, license, why), a rendered OG card sample path, and the `data/changelog.json` entry.
diff --git a/docs/event-readiness/README.md b/docs/event-readiness/README.md
index a9fc8267e..62cd9f0cf 100644
--- a/docs/event-readiness/README.md
+++ b/docs/event-readiness/README.md
@@ -1,8 +1,8 @@
-# Event readiness: audit prompt pack
+# Event readiness: prompt pack
-Ten self-contained agent prompts to get three.ws, and especially the /play world, to 100% before the event. Each file is a complete prompt: paste it into a fresh Claude Code session (or hand it to a subagent) and it runs end to end, fixing what it finds and reporting the rest.
+Sixteen self-contained agent prompts to get three.ws, and especially the /play world, to 100% before the event. Files 01-10 audit and fix what exists; files 11-16 build new event features. Each file is a complete prompt: paste it into a fresh Claude Code session (or hand it to a subagent) and it runs end to end, fixing or building, then reporting.
-Suggested order and parallelism:
+Suggested order and parallelism (audits):
| # | Prompt | Surface | Can run in parallel with |
|---|--------|---------|--------------------------|
@@ -17,6 +17,17 @@ Suggested order and parallelism:
| 9 | [09-accessibility-i18n.md](09-accessibility-i18n.md) | Keyboard, ARIA, contrast, translations | after 1 |
| 10 | [10-event-day-runbook.md](10-event-day-runbook.md) | Pre-scale, monitoring loop, rollback | last, after all fixes deploy |
+Feature builds (run after audits 1-3 land, or in parallel if staffed; 12, 14, and 16 interlink but each stands alone):
+
+| # | Prompt | Builds | Depends on |
+|---|--------|--------|------------|
+| 11 | [11-event-live-ops.md](11-event-live-ops.md) | Operator broadcast, go-live moment, live event config | nothing |
+| 12 | [12-photo-mode-share.md](12-photo-mode-share.md) | Photo mode with branded one-tap share | nothing |
+| 13 | [13-event-quests-leaderboard.md](13-event-quests-leaderboard.md) | Time-boxed quest line + live leaderboard + cosmetic reward | nothing (better with 12) |
+| 14 | [14-welcome-concierge.md](14-welcome-concierge.md) | Greeter NPC, guided tour, event-aware opening line | nothing |
+| 15 | [15-live-hype-feed.md](15-live-hype-feed.md) | Activity ticker + market hype moments | nothing (better with 13) |
+| 16 | [16-invite-flow.md](16-invite-flow.md) | Invite sheet, QR, OG card truth, arrival continuity | nothing (better with 14) |
+
Rules that apply to every prompt in this pack:
- The canonical test URL for the world is the $THREE community: `https://three.ws/play?coin=FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump&name=three.ws&symbol=three&image=%2Fapi%2Fimg%3Furl%3Dhttps%253A%252F%252Fipfs.io%252Fipfs%252Fbafybeihe22b5sxr3ihnxt7pregfieyteqvubqhik3j3y4bbx243xlqjw3q%26seed%3DFeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`