Make Mind-Hack Autopsy a playable arcade lab + attractor evidence export#92
Make Mind-Hack Autopsy a playable arcade lab + attractor evidence export#92slavazeph-coder wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
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.
…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
…load link Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01725FqR5KopKJJXN3RTfLpD
3d48582 to
138dc92
Compare
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
Summary
Type of change
What changed
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/analyzerequest). The live 3D brain (Brain3D, with the 2DBrainVisualizerfallback) 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.compareResults; new additiveurgencygoal inimprove/rewrite.js(also available in/app).src/lib/headlineScores.js): thin relabeling ofgetBusinessMetricsso 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).src/features/gaugegap/evidence.js): schemagaugegap.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).headlineScores.test.js,evidence.test.js), urgency coverage inrewrite.test.js, updatedscoreCard.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.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)npm run linttypecheck, 79 unit tests, Playwright chromium project: 13 passed)Notes
getBusinessMetricsunder different labels — no scoring formulas changed./api/analyze,/api/rewrite, Gemini/Stripe/Supabase integrations and the/appworkspace are untouched; the lab is purely additive.🤖 Generated with Claude Code
https://claude.ai/code/session_01725FqR5KopKJJXN3RTfLpD
Generated by Claude Code