feat(talk): scripted ?demo run on real questions (Tool-Smith opener) - #30
Merged
Conversation
…ion run Tool-Smith-first, ?demo-triggered, console answer-key dump. Spec only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… old fake demo Demo run grants the full spellbook and looks identical to normal play (badge removed). Graduating this deletes the old fake-bank demo: demo-questions.json, demoBadge, the debug button, beginDemoCampaign, and the realBank swap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 bite-sized tasks: seeded RNG export, ?demo helpers, DEMO constants, beginScriptedDemo + retire fake demo, seeded pick + console key, badge/bank deletion, seed lock + cheat sheet, manual verify. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Seed 1 chosen for its Tool-Smith opener spread (B C A C C B A) and varied, audience-readable MCP questions. Cheat sheet lists the per-boss answer key in pick order for the live talk demo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pre-PR review hardening: - Golden test (demoKey.test.ts) pins the per-boss answer key against the live bank via the real demoRngForFloor→pickQuestionsForFight path, so a bank edit that shifts the key fails CI instead of silently invalidating the cheat sheet on stage. Also asserts DEMO_BOSS_ORDER is a valid Tool-Smith-first permutation. - BossFightScene: throw if demoRun is set but the campaign/seed is missing, instead of a silent Math.random / seed-0 fallback (wrong-but-deterministic run). - HubScene: grant spells by iterating the spellbook's own keys (auto-exhaustive over SpellId) instead of a hardcoded list. - Comment precision: per-fight answer dump, no-progression-persist, golden-test pointer on the DEMO_SEED rationale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g saves - Continue button: long labels (e.g. "… The Compiler-King, approaching") overran the 500px button and clipped the closing paren on the border. Scale the label down to the button's inner width. - writeSave now also skips when demoRun is set. A demo save otherwise survived a page reload (the in-memory demoRun flag does not) and leaked into normal play as a "Continue" offer — contradicting the demo's no-real-save contract. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a scripted, fully-deterministic demo run of the Slay the Cert dungeon, triggered by a
?demoURL query param, over the real question bank (no mock data). It starts at the Tool-Smith boss, grants the full spellbook, and looks identical to normal play (no demo badge). The per-fight answer key is dumped to the console for the live talk.It also retires the old fake-bank demo (the debug-mode "start demo campaign (fake questions)" button).
Built from an approved spec + plan:
docs/superpowers/specs/2026-05-30-scripted-demo-flow-design.md,docs/superpowers/plans/2026-05-30-scripted-demo-flow.md.How it works
The game was already deterministic from a seed except the one
Math.randomquestion pick. The whole feature hinges on closing that gap:?demo(optional?demo=<seed>) →HubScene.beginScriptedDemo()starts afirst-runcampaign with a lockedDEMO_SEED = 1and a fixed boss order (DEMO_BOSS_ORDER, Tool-Smith first), on the real bank.BossFightScenefeedsdemoRngForFloor(seed, floor)topickQuestionsForFightonly whendemoRunis set — normal play staysMath.random.[demo] <boss>: B → C → A → …for cheat-sheet generation.demoRunno-progression-persist plumbing, so the demo never touches the real save/NG+ progression.Answer key (seed 1) lives in
public/talks/2026-06-03-slay-the-cert/prep/demo-cheat-sheet.mdand is pinned bysrc/scenes/demoKey.test.tsagainst the live bank.Retired (deleted)
public/data/demo-questions.json(752-line fake bank)src/ui/demoBadge.ts+ its 3 scene call sitesbeginDemoCampaign()+ therealBankswapTests / checks
npx vitest run→ 119 passing (23 files), incl. the golden answer-key + boss-order-permutation guard.npx tsc --noEmitclean ·npm run buildclean.Pre-PR review (
/pr-review-toolkit:review-pr)Four specialized reviewers (code, tests, comments, silent-failure) — no Critical/blocking issues. Hardening applied in response:
demoRunis set but the campaign/seed is lost (was a silent wrong-but-deterministic fallback).SpellIdlist).Manual verification (for reviewer — interactive, not automatable in CI)
Open
…/dungeon/?demoand confirm:[demo]keys match the cheat sheet(DEMO)badge anywhere (fight / interstitial / complete)?demo→ identical questions?demorun is still randomized, no badge, and real save/progression untouched🤖 Generated with Claude Code