Original prompt: Run a roughly 90-minute bug hunt with up to eight concurrent subagents using CUA, covering bugs, visual issues, weak UI text/layout areas, fixes, and retesting.
Work ahead
This file is exclusively the backlog. Completed work lives in git log
(each round carries a detailed commit message) and in the agent memory
(measured kit facts, physics laws, debugging methods, pin tables).
Current state in one line: M1–M25 are live — endless mode is an
N-marble physics race (1–9999 racers at 4× realtime via physics LOD,
fuel boost economy, drafting wakes, seeded rivalries + temper, glass
marbles with real cores, rubber-banded pilots, ghost respawns), the
world reorients gravity 90°/180° between islands, the line BRAIDS with
LANE CHARACTER (icy vs boost lanes, wanderers, per-peer prng lanes) and
OPEN FORKS chaining up to 3 segments (2 braids/segment), the CLIMATE is
a generation input (snowdrift zones ice over, goldhour zones soar) and
every seed draws a TEMPERAMENT, islands come in ten biomes with real
MASS FAMILIES (snow/grass voxel bodies, not just tints), drafting wakes
REFILL fuel (trains form and detonate), seeded rivalries + temper run
on REAL shim contact events, the world keeps SCARS/scuffs/tipped
furniture until segments sink, floating island shards / ships / ghosts
/ meteors drift in the void, gust walls pulse in phase-locked banks,
and loop mode grew twin diamonds, stub gardens and rotundas. Diagnostic rig: ?gallery=1 piece bench (variants,
collision overlay, autopilot sim, copy-info, CUA benchGo/benchJump).
Collision is MEASURED against the kit (audit round 2026-08-09:
docs/collision-mesh-audit.md — shared proxy builder, open bores,
authored drop cups, additive wide shift, rim-height profile, 4-way
cross composite, quantitative metrics CI).
217 tests green, deno task check clean.
Active 2026-08-26 bug hunt
- Verified/fixed: responsive title-menu width/height, native Advanced keyboard handling, accessible menu buttons/labels, disabled loop-only controls, exact whitespace-preserving seed URLs, long-seed HUD ellipsis, and menu-only HUD hiding.
- Verified/fixed: endless orbit now carries its pivot with the streamed subject instead of watching disposed segments until only stars remain.
- Verified/fixed: same-page seed changes now destroy the Box3D world, hero, statics, mesh handles, and WASM readback buffers; the native shim source and export were rebuilt locally and repeated disposal has a regression test.
- Verified/fixed: injected marble-core geometries and shared scar resources now dispose with their session. Alternating the same two seeds repeatedly plateaus at 261/276 endless geometries and 269 finite geometries instead of climbing.
- Verified/fixed: the motion ribbon no longer twists or keeps a false streak across teleports/leader changes. Boost is now a separate short orange-red additive trail (in loop and endless modes) instead of a marble color filter; it fades after flameout and remains constant-cost at pack scale.
- Verified/fixed: slow rail/kinematic movement now accumulates distance from a committed sampling anchor instead of its moving visual head. This prevents the trail from freezing at one point and stretching until physics motion resumes.
- Added
?debug=1rail-flow provenance: distance-LOD handoffs are informational, while fall/stall recoveries warn astileCandidate: truewith seed, racer, segment, station, window, concrete piece id, family, zone, lane/part, repeat count, and the reseat destination. Events are rate-limited at 1/2/4/8… and the latest 12 are mirrored intorender_game_to_text().stream.railDebugfor CUA. - Rail recovery sample: 18 Chrome runs × 401 racers × 300 simulated seconds
produced 644 genuine fall/stall candidates. Two generated layouts account for
87.73%:
rail-sample-008segment 11'sramp-long-b→helix-large-quarter-righttransition, andrail-sample-015segment 14's icy-alt/braid straight cluster. Full table and sensitivity analysis live indocs/.rail-recovery-sample-2026-08-26.md - Fixed debug provenance after the sample exposed stale
placementIndexvalues: dropped jump/reorient meshes now remap surviving path windows to the final placement array, so supports/decor can no longer be mislabeled as track tiles. - Verified/fixed: the asset gallery and title menu fit 320–480px phone widths, short-height Advanced options remain scrollable, focus rings are visible, and keyboard input no longer starts the game or loses a text caret.
- Browser retests passed: exact whitespace/Unicode seeds, 15 finite regenerations, 12 endless regenerations at 301 racers, finite/endless boost encounters, orbit streaming, responsive menu/gallery, and clean console scans.
- Residual S2: some generated slabs can still obscure 50–80% of the follow/orbit
view at isolated
camera-soak-acheckpoints. Orbit no longer loses the world, and tunnel shells fade around the lens, but generic occlusion needs a broader camera/composition treatment. A 9999-racer cold start also remains ~21s.
Presentation polish
- Twist bench (
?demo=twist, keys 1/2/3/4 = 0/±90/180°): the chute now extrudes the kit straight's own sliced section with shared kit materials — keep the bench for any future chute iteration (banners at the twist entry remain an option if the set-piece should announce itself more). - Rider lanes at pack scale: demoted far racers glide fixed lane offsets — reads as an orderly stream from distance; per-rider wander (pilotOffset reuse) would loosen it if it ever reads mechanical.
- Camera banking under reorient: the follow-cam's banking lean samples the path in the world y-plane; inside a 90° frame the lean is computed against the wrong plane (tiny effect — the up-vector roll dominates). Fold banking into the local frame if it ever reads off.
Physics / feel
- Torque-servo authority: only if feel ever demands spin-on-bounce / ice burnouts. Force-at-COM + Box3D contact friction is the standing decision; revisit needs new shim surface (apply torque).
Rendering
- Glass-through-glass: transmission shells cannot refract other transparent shells (only opaques land in the transmission buffer). Escalation if close-ups demand it: port a MeshTransmissionMaterial- style shared-buffer material (drei-vanilla reference).
- Nothing emits on the glass shell. A transmission material ADDS emissive on top of the refracted core instead of blending with it, so any glow written to the shell floods the whole sphere with one flat colour and hides the marble inside. Boost glow lives on the CORE, in the racer's own hue pushed toward white — the old fixed blue at 0.9 repainted every boosting marble identical (user: "the outer shell gets a blue tint at some locations or angles").
- One reflection layer, half strength. The RoomEnvironment PMREM is
brighter than this world, and
clearcoat: 1stacked a second full Fresnel over the glass's own — together they sprayed ~8% of a hot env over every marble pixel, which the zone mood then tinted. Measured on a red-cored marble: the wash lifted G/B from ~4 to ~47.
Generation
- Cross-frame world overlap (residual): occupancy prevents overlap in PLAN space; after a reorient, co-live chunks in different frames could in principle overlap in world space. Never observed (the survivability corpus + goldens are clean, twists claim a swept drum and the stream departs along the twist axis) — if a fuzz ever finds interpenetration, add a world-space AABB check across frames at generation time.
- Slope cubic-spillover residual: island terraces got the spillover low-base fix; PLAIN slope windows' neighbor cells still claim flat bands while the realized cubic dips slightly below its base near part boundaries — no observed failure (fuzz clean), but the claim is not airtight. Tighten commitSlope's neighbor bands if a fuzz ever finds it.
- World memory (M25) residual: scars/scuffs/furniture tip-overs shipped (contact-event driven, per-segment lifetime). Open: a browser soak to tune SCAR_SPEED (4.5) and mark sizes; island-top destructibles stay dormant (still off the channel — trackside furniture was the honest first target).
- Bumper density tuning: after watching feedback (pins currently only on wide island decks).
- Braid residual (V2/V3/M23): lane mods, wanderers, open forks, TWO braids per segment and 3-SEGMENT CHAINS (stay-open middles riding whole segments, OPEN_BRAID_CAP 60) all shipped. Still deferred ON THE RECORD: vertical lane divergence (re-litigates the junction-dip law), braids over islands, chains past 3 segments (needs a per-chain segment budget beyond the cell cap). Super-bounce zone assessed and parked (fights shock's reason to exist).
- Theme biomes (M18a residual): winter/spooky/tropical/autumn rows shipped on Holiday/Graveyard/Pirate/Survival kits. Open: biome-weight and scale-range tuning after watching real streams, and the SPACE biome — Space Kit's terrain_* family is a candidate ALTERNATIVE ISLAND MASS (real measuring round: grid fit, slope/corner coverage, origins) and deliberately deferred; meteors/craft arrive cheaper as void decor.
- Fan vocabulary (M19a residual): gust walls (pulsed blockades, phase-locked banks + anti-phase pairs), vortex eddies and the loop wind backport shipped. Left open: gust strength/duty tuning after watching the pack time real banks, and downdrafts (RULED OUT over dips — that is where wishdir pilots park; revisit only with a different host).
Audio (PARKED — user rule)
- IGNORE audio for now. The user HATED the procedural ambient sound.
TODO when picked back up: source real samples from the game assets
library (
/andUsers/ dami/ Documents/ Game Dev Asset Packs/ audio/ .../— Interface Sounds, Impact Sounds, Music Loops, RPG Audio). Shim CONTACT EVENTS exist now (ph_hits — the contact-cue blocker is gone), but audio stays parked by user rule.kennygames/ Audio/
Housekeeping
- Scenario pins move whenever a planner clause changes the weighted
draw — re-scan with a scratch script (current pins: grav-scan-25
jump, helix-scan-6 propeller, grav-scan-9 diamond, wide-scan-7 wide,
grav-scan-6 helix, wide-scan-17 icy, wide-scan-21 gravity,
spurs grav-scan-3@0 + grav-scan-22@1, reorients grav-scan-20 (+90@0)
- grav-scan-33 (180@0), jump grav-scan-2, propeller grav-scan-0,
helix jump-scan-14@0, braids grav-scan-17/38 + marbles, gust bank
wind-scan-9@4, tagged open braid grav-scan-17@1, 3-segment chain
grav-scan-32@0-2 — M24 re-scan; climate + temperament biases moved
the pins twice this round);
regenerate endless goldens with
deno run --allow-read --allow-write tools/. Canon note: golden placements hash wind pulse/swirl since M19a.pin_endless.ts
- grav-scan-33 (180@0), jump grav-scan-2, propeller grav-scan-0,
helix jump-scan-14@0, braids grav-scan-17/38 + marbles, gust bank
wind-scan-9@4, tagged open braid grav-scan-17@1, 3-segment chain
grav-scan-32@0-2 — M24 re-scan; climate + temperament biases moved
the pins twice this round);
regenerate endless goldens with
- Loop named scenarios (M19c): loop-scan-981 twin diamonds, loop-scan-20 stub garden, loop-scan-33 rotunda (track_test.ts). genVersion shifted once for the M19c batch (computed, not hand-bumped).
deno task checkis fully clean now — keep it that way;deno task testremains the gate.
September 30, 2026 continuation — UX and recorded track stalls
Current request: update and improve the site's UX and address tracks that stall; the user confirmed the previous agent's work had not been wrapped up. Preserved all pre-existing uncommitted trail, physics-provenance and generation changes.
- Replaced the title menu with an opaque illustrated game launch screen: clear Endless/Classic choices, racer presets/custom count, optional seed and a large start button. Native form controls, focus states, mobile/short-height scrolling and reduced-motion styling; the menu no longer loads game assets or a renderer.
- Added a visible playback dock: orbit/follow, hero/leader, pause/resume, full screen, share with feedback and controls help. Kept diagnostic stats behind Backquote and audio hidden. Both run modes share playback state and CUA reports it. New runs resume; keyboard shortcuts respect text editing and native Space activation. Loading failures now offer a visible route back to Settings.
- Replaced the pixel-frame toast/place chrome with the dock's quiet styling and kept overlays clear of the phone controls. Loop overview now frames the circuit rather than distant scenery and reframes when the viewport changes.
- Fixed discontinuous braid collision ribbons, which silently connected separate lanes with invisible walls. Packed independent strips without joining triangles to stay within the native mesh-handle budget.
- Reproduced the ramp/helix obstruction as segment 9 geometry overlapping segment 11 after reorientation. Added native per-checkpoint static contact masks for each racer (own + adjacent checkpoints), preserving marble contacts and ghost behavior. Rebuilt the native module and added a build:physics task.
- Verification: 222 tests passed; type check, build and changed-file lint passed. Recorded ramp/helix and both braid lanes clear in native tests without recovery. Two browser soaks × 401 racers × 300 simulated seconds: rail-sample-008 had zero fall/stall recoveries; rail-sample-015 had two end-hole-rounded recoveries and zero braid-cluster recoveries. Neither hero died; no browser errors.
- Details and limitations: docs/stall-fixes-2026-09-30.md. Browser screenshots, interaction checks and soak telemetry are in ignored output/.
Remaining physics target: the two drop-cup stalls in the stress run. The recorded ramp/helix and icy-braid failures are resolved. World-space visual overlap and broader camera occlusion are still separate follow-up concerns. A distribution must include the rebuilt box3d.mjs/wasm, not just the browser JS bundle.
Final UX verification: 32 browser interaction checks passed with no console or page errors, covering laptop CTA visibility, phone/short-height layout, exact Unicode/whitespace seeds, presets/custom counts, both modes, paused camera switching, sharing, fullscreen, native Space activation, focused-button letter shortcuts, Settings prefill and new-run playback reset. Inspected final menu, loop, endless, phone and controls screenshots. Built-in browser preview queued at http://localhost:8000/?menu=1; the local server remains running.
September 30 follow-up — persistent zoom and less menu copy
-
User preference: camera zoom must stay at the chosen distance. Removed the follow camera's idle zoom decay and teleport zoom reset. Drag angles still ease back toward the path; obstruction handling still restores the chosen distance when clear. Zoom survives streaming, retargeting and mode switches.
-
Verification: 11 browser checks passed with no console/page errors, including idle zoom in/out, teleport, retarget, stream bounds, mode round trip, resize and zoom limits. Seven camera tests, full type check, build and lint passed.
-
User UI preference: omit subtitles unless they explain context that is not already clear. Removed the title eyebrow/subtitle, top-right tagline, hero graphic caption, footer copy, mode descriptions and racer/seed helper copy. The menu top bar now contains only the logo, with the title in main content. Preserved the seed's optional label. Cleaned up unused subtitle CSS.
-
Final menu browser check passed on desktop and phone: requested text absent, logo-only top bar, visible start button, no horizontal overflow, mode/racer selection and seed editing intact. Inspected both screenshots; no page errors.
-
Steering clarification: the former Automatic steering checkbox enabled the newer autopilot when checked and the older track-assist law when unchecked. Both automate steering. Replaced it with an explicit Steering choice: Modern autopilot / Legacy track assist, preserving defaults, stored settings and URL flags. Twelve menu browser checks passed for selection, mode gating, submitted URLs, stored preferences and phone fit; no page errors. Build, type check and lint passed; inspected desktop/phone option layouts.
-
Classic loop is a simulation/debug option, per user direction. Removed the primary run-mode cards; Endless is the normal launch flow. Classic loop is now a checkbox within Simulation options beside diagnostics and Piece gallery. Active Classic settings reveal that section on return and disable the endless-only controls; stored selections and shared URLs remain compatible. Sixteen browser checks passed, including actual Classic and Endless launches, field-size restoration, newer steering selection and phone layout. No browser errors. Build, type check and lint passed; inspected final menu screenshots.
-
Solo runs now omit the hero/leader button and Space help, and reject leader toggles. Decorative peers in legacy mode also omit the control. Real packs retain both button and shortcut; regeneration keeps visibility correct.
-
Follow camera clearance now pairs entry/exit on the same mesh/instance, and wide views tolerate foreground scenery while still avoiding a lens endpoint inside geometry. Open shells no longer count as containing a distant lens. Wide views ease more slowly through turns. Teleport detection compares actual consecutive subject positions, so smoothing lag cannot trigger a false cut.
-
Verification: 230 tests passed, including eight new real-geometry camera cases; full type check, build, format and changed-file lint passed. Fourteen camera/control browser checks passed, including solo/new-run/pack/legacy visibility and continuous fast motion at 30/60/120 fps. All eleven persistent zoom checks still pass. No browser errors. On e0b75o4y7s at maximum wheel zoom, an 80-second, 4800-frame comparison reduced moves over 2 units/frame from 21 to zero, largest move from 22.95 to 1.36, and frames below half the intended boom from 630 to four. Inspected default and wide-view screenshots.
-
Added a repeatable complete-site build for the existing Cloudflare Pages project: builds JS and native physics, then packages static files plus assets into ignored output/site. The complete build passed, including the native rebuild and packaging. The checkout has no Git remote; the user requested local commits and clarified that deployment should still proceed.
-
Deployment follow-up: removed account_id from wrangler.jsonc because Pages rejects that configuration field. The existing authenticated Pages project supplies the deployment account.