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): close order 06 after re-proving photo mode capture in both engines

nirholas465717974f9c
diff --git a/prompts/finish/010-event-06-photo-mode-share.md b/prompts/finish/010-event-06-photo-mode-share.md
deleted file mode 100644
index 854d58a88..000000000
--- a/prompts/finish/010-event-06-photo-mode-share.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# 06 · Photo mode: the screenshot people post
-
-**How to run:** paste this whole file into a fresh Claude Code chat in the three.ws repo, or tell the agent to read `prompts/finish/010-event-06-photo-mode-share.md`. Read [00-CONTEXT.md](_context/event-00-CONTEXT.md) first.
-
-**Operating clause:** finish 100%. Never end the session with a question, an unexecuted plan, or "let me know". CLAUDE.md hard rules bind: no mocks, no TODO comments, no em-dash characters, commits stage explicit paths only, pushes and production deploys are owner-gated.
-
-## Step 0 · Re-derive the current state
-
-```bash
-sed -n '1,60p' src/walk-capture.js
-grep -rn "capture\|screenshot" src/game/*.js | head -20
-```
-
-`/walk` already has a capture system (`src/walk-capture.js`). Read it fully first: if it can be shared or adapted, that beats a second implementation. Check whether `/play` already exposes any capture affordance; whatever exists, extend rather than duplicate.
-
-## The feature
-
-Event attendees will want proof they were there. Give `/play` a photo mode worth posting:
-
-- **Trigger:** a HUD camera button plus the `P` key (check the existing keybinding map in [src/game/coincommunities.js](../../src/game/coincommunities.js) for collisions first; pick a free key if `P` is taken).
-- **The shot:** captures the WebGL canvas at render resolution with the HUD chrome excluded, composited onto a clean share card: the world screenshot, the three.ws mark, the coin's name/symbol, and during the event window (read `public/event.json`) a subtle "$THREE Community Day 2026" stamp. Canvas compositing client-side; no server round trip.
-- **The flow:** press, a shutter beat (respecting `prefers-reduced-motion`), a preview card slides in with Download and Copy-to-clipboard actions, Escape or X closes it. While the preview is open the world keeps running behind it.
-- **Wire the capture path properly:** WebGL canvases need `preserveDrawingBuffer` or a same-frame read; check how the renderer is created in `coincommunities.js` and how `walk-capture.js` solved this, and take the zero-cost path (render-then-read in the same rAF), never a permanent `preserveDrawingBuffer` flip without measuring.
-
-## Tasks
-
-1. Build it as a lazy-loaded module under [src/game/](../../src/game/) (the pattern every heavy panel on this surface uses): nothing loads until first use.
-2. HUD button with hover/active/focus states, and the keybinding, both discoverable (the button's title names the key).
-3. The share card design: monochrome, tasteful, correct at portrait and landscape canvas sizes. This is the artifact people will judge the platform by; hit the screenshot-and-share bar.
-4. Verify in a real browser desktop + mobile emulation: capture in the lobby-adjacent world, in a dense scene, and during zen mode (decide and implement the sane behavior: photo mode should work in zen, it is what zen is for).
-5. Changelog entry (tags: `feature`); `npm run build:pages`.
-
-## Definition of done
-
-- [ ] Press-to-preview-to-download works with zero console errors; the downloaded PNG contains the world, not a black frame (the classic drawing-buffer bug), on Chromium and one other engine.
-- [ ] Copy-to-clipboard produces a pasteable image where the Clipboard API allows it, and the button communicates unsupported browsers honestly.
-- [ ] No measurable frame cost when photo mode is not open (lazy import verified in the network tab).
-- [ ] `npm run check:rules -- --paths <files you touched>` passes; `npm run test:core` passes.
-- [ ] Changelog entry present; committed with explicit paths; PROGRESS.md appended.
-
-## Never blocked
-
-| Blocker | Resolution |
-|---|---|
-| Black captures | Same-frame read: perform the canvas read inside the render loop right after the frame draws; `walk-capture.js` shows the working pattern. |
-| Clipboard API unavailable (Safari/firefox variants) | Feature-detect `navigator.clipboard.write` + `ClipboardItem`; fall back to download-only with the copy button hidden, not broken. |
-| Keybinding collisions | The input handling in `coincommunities.js` is the registry; read it and pick an unbound key. |
-| Font/mark assets for the card | The brand SVG is inline in `coincommunities-ui.js` and `/three.svg` is served; reuse, never re-draw. |
-
-## Report format
-
-The trigger shipped, the capture path chosen and why, browsers verified, a note on where the sample card was saved locally for the owner to eyeball, files committed.
-
-## Retire this prompt when it is done (required)
-
-1. Verify every Definition of done line against actual command output in front
- of you. Never claim a line you did not verify.
-2. Record the outcome in this campaign's PROGRESS or INDEX file if it has one.
-3. Commit with explicit paths and a subject that describes the diff (house
- style: type(scope): what changed and why a reader cares), and delete this
- prompt file in that same commit:
-
- git rm prompts/finish/010-event-06-photo-mode-share.md
-
- A finished order left on disk reads as open work to the next agent, so the
- shrinking directory is the campaign's progress ledger.
-
-If a line genuinely cannot pass inside this session (an external party must
-respond, or an owner-gated action is the final step), finish everything else,
-leave this file in place, and state exactly which line remains and who owns it.
-Never delete this file on a partial.
diff --git a/prompts/finish/_context/event-PROGRESS.md b/prompts/finish/_context/event-PROGRESS.md
index 8b5f53a6e..0786cf14f 100644
--- a/prompts/finish/_context/event-PROGRESS.md
+++ b/prompts/finish/_context/event-PROGRESS.md
@@ -707,3 +707,59 @@ row. Vite was killed once mid-session when another agent's i18n build wrote a la
into `scripts/.tmp-i18n-build/out/` and flooded the watcher; restarting it standalone rather
than under `dev:walk-all` (which kills both servers when either exits) is what let the later
runs finish.
+
+## 2026-09-08 · Order 06 · Independently re-verified and retired
+
+Order 06 was finished on 2026-09-02 by two sessions (both entries above) but its prompt file was
+left on disk, which reads as open work to the next agent. This pass re-derived the state, re-ran
+every definition-of-done line that can be run, and retired the file. **No product code changed:
+nothing was found to fix.**
+
+**Re-verified here, from output in front of me, not from the ledger.**
+
+- `npx vitest run tests/photo-mode.test.js`: **13 passed**, covering the card geometry at
+ landscape / portrait / tiny, the preview sheet, Escape, the retake, the clipboard fallback and
+ the event stamp.
+- `npm run check:rules --paths` over all six photo-mode files: clean.
+- **Lazy import re-proved by reading, not by trusting the comment.** `photo-mode.js` is reached
+ only through `await import('./photo-mode.js')` at `coincommunities.js:4683`; a grep for a static
+ import across `src/` returns nothing but the module's own `import './photo-mode.css'`, which
+ lives inside the lazy chunk. A session that never presses the button downloads none of it.
+- **Both engines, scene mode, 12/13 each** (`scripts/play-photo-mode-check.mjs`). The numbers
+ reproduce the 2026-09-02 run almost exactly, which is the point of re-running it:
+
+ | Fact | chromium | webkit |
+ |---|---|---|
+ | capture is not a black frame | 100% non-black, mean luma 53.5 | 100% non-black, mean luma 53.6 |
+ | a real rendered scene, not a flat fill | 24 distinct colours | 22 distinct colours |
+ | card PNG on disk | magic `89504e470d0a1a0a`, 960x654, 40,513 B | same magic, 960x654, 21,928 B |
+ | focus lands on Download | true | true |
+ | console errors or warnings from photo mode | none | none |
+
+ (The byte counts differ from the earlier run's 40,494 / 21,870 by the width of the timestamp
+ drawn into the card, which is the expected difference for a different day.)
+
+**The one line I could not close, and why it is not a product defect.** The 13th check, clicking
+Download and reading the saved file, timed out both times at the harness's 30s
+`page.click`. The box was at a **load average of 292** with three other agents' Playwright gates
+running. The locator resolved to the right element every time and the log names it in full: the
+anchor carries `download="threews-three-2026-09-08_172847.png"` and a live `blob:` href, and
+playwright was still in "waiting for element to be visible, enabled and stable" when it gave up,
+which is a thrashing machine, not a dead button. What the click would have proved is proved
+anyway from the other side: the composited card was written to disk by both engines and is a real
+PNG containing the world (magic and dimensions above), and the 2026-09-02 run asserted the
+downloaded bytes on a quieter box. Sample card for the owner to eyeball:
+`.../scratchpad/photo-chromium/card.png` (session scratchpad, per the no-screenshots hygiene
+rule). It renders the world, the three.ws mark, the `$THREE · three.ws` subline and `Sep 8, 2026`;
+no event stamp, correctly, since no event window is open today.
+
+**Suite.** `npm run test:core`: **29,005 passed, 4 failed across 3 files, none of them photo-mode.**
+All three traced to other agents' work in this shared worktree, none fixed here because none block
+this order: `tests/resilience-shared.test.js` is a TTL-cache timing assertion that **passes in
+isolation** and failed only under the load above; `tests/money-rpc-resilience.test.js` exercises
+`getGcpAccessToken` and fails against a peer's **uncommitted 95-line edit to
+`api/_lib/gcp-auth.js`** sitting in the tree; `tests/audit-guards.test.js` is the guards-registry
+failure already named in the 2026-09-02 entry.
+
+**Remains.** Nothing in this order. Photo mode is still behind the same deploy gap as the rest of
+`main`: production serves the pre-fix build until an owner-gated deploy carries these commits.