Skip to content

Make Mind-Hack Autopsy a playable arcade lab + attractor evidence export#92

Draft
slavazeph-coder wants to merge 3 commits into
mainfrom
claude/simulator-playground-strategy-6dl25j
Draft

Make Mind-Hack Autopsy a playable arcade lab + attractor evidence export#92
slavazeph-coder wants to merge 3 commits into
mainfrom
claude/simulator-playground-strategy-6dl25j

Conversation

@slavazeph-coder

Copy link
Copy Markdown
Owner

Summary

  • Turns the arcade's "Mind-Hack Autopsy" card into a real playable lab (experiment 013): paste content → live 3D brain reaction → four headline scores → one-click rewrites → shareable score card, all fully client-side.
  • Adds the first "truth layer" to the arcade: an Export evidence button on the Butterfly Effect (Lorenz) lab that downloads a content-hashed JSON proofpack of the exact run.
  • Links the landing's research section to the published gaugegap-foundry Deep Foundry playground.

Type of change

  • bug fix
  • feature
  • docs
  • visual polish
  • performance
  • launch / growth asset

What changed

  • Content Reaction Lab (src/features/gaugegap/ContentReactionLab.jsx, useContentScan.js): genre chips (ad / tweet / landing page / email) with one-click samples from the classics presets, a paste box with Cmd/Ctrl+Enter, and a scan that runs entirely in the browser (analysisEngine + layerRouter — the e2e test asserts no /api/analyze request). The live 3D brain (Brain3D, with the 2D BrainVisualizer fallback) reacts to each run, and four headline tiles — Attention, Trust, Emotional Charge, Manipulation Risk — show delta badges vs. the previous run. Registered as arcade experiment 013 with automatic XP/daily-mission integration; the landing card opens the lab in place, with "Open full analysis →" still deep-linking into /app.
  • Rewrites: three one-click goals (build trust / add real urgency / reduce manipulation) scored client-side with before→after deltas via compareResults; new additive urgency goal in improve/rewrite.js (also available in /app).
  • Headline score mapping (src/lib/headlineScores.js): thin relabeling of getBusinessMetrics so the playground, PNG score card, share text and share preview all show the same four rows. Note: this intentionally changes /app's share card rows (Hook Strength / Viral Pull → the headline set).
  • Evidence export (src/features/gaugegap/evidence.js): schema gaugegap.browser_attractor_proofpack.v1 — live sigma/rho/beta/speed, solver settings, scores, share URL, explicit claim boundary, SHA-256 content hash (WebCrypto with graceful fallback).
  • Tests: new tinyVitest suites (headlineScores.test.js, evidence.test.js), urgency coverage in rewrite.test.js, updated scoreCard.test.js. Rewrote the stale pre-arcade e2e landing specs (they targeted "Try a live example" / .landing-nav-actions / classics gallery, none of which exist on the arcade landing) against the current DOM.
  • Landing/arcade copy updated from twelve to thirteen experiments.

Screenshots / video

Run locally and open /?lab=content#playground — the lab is the most visual way to review this change.

Validation

  • npm install (npm ci)
  • npm run build (vite + esbuild, passes)
  • tested on desktop (npm run lint typecheck, 79 unit tests, Playwright chromium project: 13 passed)
  • tested on mobile width (Playwright mobile project passes; score grid collapses to 2 columns, input stacks above the brain)

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01725FqR5KopKJJXN3RTfLpD


Generated by Claude Code

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces 'Mind-Hack Autopsy' (experiment 013), a new client-side interactive lab allowing users to simulate brain reactions to various content types locally. It updates the arcade layout, landing page, sharing dialogs, and E2E tests to support thirteen experiments, and adds a new evidence export feature for the attractor playground. The review feedback suggests several robustness and compatibility improvements, including defensive checks for clipboard API availability, safer destructuring of parameters in the evidence builder, and appending the temporary download link to the document body to ensure cross-browser compatibility.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread brainsnn-r3f-app/src/features/gaugegap/ContentReactionLab.jsx
Comment thread brainsnn-r3f-app/src/features/gaugegap/evidence.js Outdated
Comment thread brainsnn-r3f-app/src/features/gaugegap/evidence.js
slavazeph-coder and others added 2 commits July 12, 2026 20:56
…ce export

Content Reaction Lab (arcade experiment 013):
- New src/features/gaugegap/ContentReactionLab.jsx: paste an ad / tweet /
  landing page / email, run a fully client-side scan (analysisEngine +
  layerRouter, no /api round-trip), watch the live 3D brain react, and read
  four headline scores — Attention, Trust, Emotional Charge, Manipulation
  Risk — with delta badges against the previous run.
- One-click rewrites (build trust / add real urgency / reduce manipulation)
  scored in-browser with before→after deltas; new additive "urgency" goal in
  improve/rewrite.js. Share score card reuses ShareDialog.
- Registered as lab 013 in ExperimentArcade with XP/daily-mission integration;
  the landing's Mind-Hack Autopsy card now opens the lab in place instead of
  bouncing to /app ("Open full analysis" remains the escape hatch).
- New src/lib/headlineScores.js maps getBusinessMetrics to the four headline
  scores; score card, share text and share preview now show the same four
  rows so the playground and shared cards never disagree (this also changes
  /app's share card rows from Hook/Viral Pull to the headline set).

Truth layer:
- New src/features/gaugegap/evidence.js: "Export evidence" button on the
  Butterfly Effect (Lorenz) lab downloads a content-hashed JSON proofpack
  (schema gaugegap.browser_attractor_proofpack.v1) with live parameters,
  solver settings, scores, share URL and an explicit claim boundary.
- Deep Foundry link from the landing's research section to the published
  gaugegap-foundry Foundry Experience playground.

Tests: new tinyVitest suites for headlineScores and evidence; urgency-goal
coverage in rewrite.test.js; scoreCard test updated to the new rows. Stale
e2e landing specs (pre-arcade selectors) rewritten against the arcade:
content lab local-scan flow asserts no /api/analyze request; 3D-mount and
Reconstruct-nav specs target the current DOM. Full suite: 79 unit tests,
13 e2e passed locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01725FqR5KopKJJXN3RTfLpD
@slavazeph-coder slavazeph-coder force-pushed the claude/simulator-playground-strategy-6dl25j branch from 3d48582 to 138dc92 Compare July 12, 2026 20:59
A shared link (?lab=content&state=<text>) now prefills the lab and runs the
scan automatically, matching the challenge-link loop of the other arcade
labs (same `state` param, so lab-switch URL cleanup applies unchanged).
"Share challenge" / "Copy link" actions reuse the DeepLabChrome helpers.
Shared text is capped and validated before auto-running.

Tests: unit coverage for the URL round-trip, foreign-lab guarding, size cap
and stale-run-param cleanup; new e2e spec proves a shared link auto-runs to
scored tiles. The auto-run effect keys on the parsed share payload only, so
StrictMode's dev double-invoke re-arms the cleared scan timer instead of
deadlocking, and keystrokes never re-apply the shared text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01725FqR5KopKJJXN3RTfLpD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant