🧩 Quiz Wizard BP CS

status: recycle β†’ wizard | surface: https://wiki.elv3.loca.zone/quiz/* | app: https://elv3.loca.zone | voice: Eleven v3 | intelligence: OpenRouter (text + optional multimodal)

Dense operator blueprint. Legacy monolithic WWTBAM pack is input debt; wizard atoms are the target product.


0 Β· Verdict

  • problem: 600 monolithic MP3s bake letters, login CTA, always-right praise, and Aβ‰ correct bias into audio.
  • product: atomic quiz wizard β€” UI owns letters/shuffle/flow; VO owns question + reveal + shared feedback only.
  • doctrine: JSONL/YAML = SSOT Β· multimodal = salvage/QC only Β· prefer re-TTS over carving contaminated clips.
  • public wiki: workflows + schemas Β· never secrets, cookies, loopback, provider keys.

1 Β· Stack

surfaces:
  wiki:  https://wiki.elv3.loca.zone/quiz/*      # Quartz docs SSOT
  app:   https://elv3.loca.zone                  # SvelteKit Eleven3 bench
  auth:  https://elv3.loca.zone/auth
runtime:
  wiki_engine: Quartz v5 via /home/loca/dev/wikis/build.sh elv3
  app:         SvelteKit + Node 22 Β· systemd elv3.service Β· PORT 51115
  tts:         ElevenLabs eleven_v3 via app proxy /api/elevenlabs/tts
  recycle_ai:  OpenRouter text (enrich) + optional audio multimodal (salvage)
tooling:
  recycle: batches/recycle_wwtbam.py
  pilot:   batches/quiz-wizard-v1/
  legacy:  batches/wwtbam-de-eleven3-*.{jsonl,tsv,yaml,json} + batches/audio/
media:
  format: mp3_44100_128
  voice:  nsiEp1alHkdiizNqCK2X   # keep stable across recycle unless A/B voice test

2 Β· Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ source.yaml ────────────┐
β”‚ answers[0]=correct Β· no letters     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€ recycle pipeline ───────────┐
β”‚ 1 dissect (deterministic)           β”‚
β”‚ 2 enrich  (OpenRouter text)         β”‚
β”‚ 3 salvage (multimodal Β· optional)   β”‚
β”‚ 4 emit    (quiz-pack + tts-batch)   β”‚
β”‚ 5 render  (ElevenLabs via elv3)     β”‚
β”‚ 6 qc      (facts Β· durations Β· bal) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€ quiz-pack.json ─────────────┐
β”‚ questions[] Β· clips{} Β· playback{}  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β–Ό               β–Ό
   wiki docs        wizard UI
   (Quartz)         (SPA / elv3 tab)
        β”‚               β”‚
        └────── audio/atoms/*.mp3 β”€β”€β”€β”€β”˜
  • boundaries:

    • wiki: human SSOT + operator contracts.
    • batches/: machine payloads (outside Quartz content when large).
    • app: paid TTS proxy + future /quiz play surface.
    • OpenRouter: rewrite/fact-check/salvage β€” not gameplay runtime.
  • anti-architecture (legacy β€” do not repeat):

    • one MP3 = question + A–D + CTA.
    • one MP3 = lettered reveal + praise + β€œnext”.
    • shuffle frozen into filename forever.
    • β€œcorrect never on A” as a feature.

3 Β· Wiki Route Map (/quiz/*)

slugrole
/quiz/hub β€” status, outputs, links
/quiz/blueprint/this BP CS β€” stack β†’ rollout
/quiz/batch-files/legacy artifact map (debt reference)
/quiz/prompt-stack/ear-first templates β†’ migrate to atomic
/quiz/tag-library/safe Eleven v3 tags
/quiz/voice-batches/render loop / cache contract
  • future (add when built):
    • /quiz/wizard-pack/ β€” quiz-pack schema + playback graph.
    • /quiz/recycle/ β€” dissect β†’ enrich β†’ salvage β†’ emit runbook.
    • /quiz/qc/ β€” fact/letter/duration gates.

4 Β· Data Model

4.1 Source (canonical)

question:
  id: qw-01                    # stable
  category: allgemeinwissen
  difficulty: easy|medium|hard
  question: "…"                # DE, short, no prefix spam
  answers: [CORRECT, w1, w2, w3]  # index 0 ALWAYS correct

4.2 Runtime pack (quiz-pack.json)

pack:
  id: string
  language: de
  letter_policy: "UI assigns A–D after shuffle; VO never speaks letters"
  playback:
    on_start: [shared-intro]
    before_answer: [shared-ask]          # optional
    on_correct: [shared-correct-*, "{qid}-reveal", shared-next]
    on_wrong:   [shared-wrong-*,   "{qid}-reveal", shared-next]
    on_timeout: [shared-timeout,   "{qid}-reveal", shared-next]
    on_finish:  [shared-outro]
  questions[]:
    id, category, difficulty, question, answers, correct_index: 0
    clips: { question: "{id}-question", reveal: "{id}-reveal" }

4.3 TTS atoms (tts-batch.jsonl)

kindcount policytext rules
shared~9–12 totalintro/ask/correctΓ—N/wrongΓ—N/timeout/next/outro
question1 per Qquestion only Β· tags ok Β· no letters Β· no CTA
reveal1 per Qcorrect answer text only Β· no letter Β· no praise
  • forbidden in any atom: Logg dich ein Β· Antwort A–D Β· Gut gemerkt Β· Weiter geht's Β· baked correct letter.

4.4 Legacy bridge fields (dissect only)

dissected:
  id, category_*, question_nr
  question, answers_correct_first
  options_spoken_order      # from old script β€” discard for play
  baked_correct_letter      # QC evidence of bias
  files: { prompt_mp3, answer_mp3 }
  prompt_junk: { had_login_cta, had_which_cta, tag_count }
  reveal: { reveal_text, had_always_right_praise, had_baked_letter }

5 Β· UI / UX

5.1 Wizard loop (one job per beat)

intro VO β†’ [category pick] β†’
  play question VO β†’ show A–D (UI shuffle) β†’
  optional ask VO β†’ await tap / timeout β†’
  play correct|wrong VO β†’ play reveal VO β†’
  shared next VO β†’ … β†’ outro VO

5.2 Screen inventory

  • hub: start Β· resume Β· category Β· settings (voice mute, timer).
  • play: question text + 4 answer buttons + progress + timer ring.
  • feedback: correct/wrong state color Β· reveal text mirrored from VO.
  • summary: score Β· streak Β· replay misses Β· share (optional).

5.3 UX invariants

  • letters live only in UI chrome; never in VO.
  • wrong answers get real feedback (not fake praise).
  • last question uses outro, not β€œnΓ€chste Frage”.
  • skip VO allowed; UI remains playable muted.
  • no login CTA mid-question (auth is app gate, not quiz beat).
  • first viewport of play: brand-free focus β€” question + answers + one primary action.

5.4 Motion / a11y

  • motion: answer press Β· feedback flash Β· progress step (2–3 intentional).
  • a11y: keyboard 1–4 / Enter Β· ARIA live region on feedback Β· captions = question text.
  • timing: expose clip duration_s in manifest for UI sync; prefer short Q VO (~2–5s).

6 Β· App Routes & Integration

6.1 Existing Eleven3 (keep)

methodrouteuse
GET/authsession gate
GET/api/voicesvoice list
POST/api/elevenlabs/tts?stream=trueatom render
POST/api/elevenlabs/sfxoptional stings
UI tabsSpeech Β· Voices Β· Designer Β· SFX Β· Batch Β· Historyoperator bench

6.2 Proposed quiz surface (elv3 or sibling)

methodrouteuse
GET/quizwizard SPA entry
GET/quiz/api/pack/:idserve quiz-pack.json
GET/quiz/api/audio/:clipIdatom MP3 (auth’d or static)
POST/quiz/api/sessionoptional score session
POST/api/admin/recycle/*operator-only; not public

6.3 Recycle CLI (batches)

# free
python3 batches/recycle_wwtbam.py dissect
python3 batches/recycle_wwtbam.py emit
 
# needs OPENROUTER_API_KEY
python3 batches/recycle_wwtbam.py enrich --limit 20
python3 batches/recycle_wwtbam.py salvage --limit 5   # multimodal sample
python3 batches/recycle_wwtbam.py all --limit 20

6.4 External systems

elevenlabs:  paid TTS via elv3 proxy only
openrouter:  enrich + optional salvage Β· key in env Β· never wiki
nginx:       elv3.loca.zone β†’ :51115 Β· wiki.elv3.loca.zone β†’ wikis/elv3/current
systemd:     elv3.service (user)
build:       /home/loca/dev/wikis/build.sh elv3

7 Β· Playback Graph (composition)

atoms:
  shared: [intro, ask, correct-01..N, wrong-01..N, timeout, next, outro]
  per_q:  [question, reveal]
compose:
  start:   intro
  turn:    question β†’ (ask?) β†’ wait β†’ branch
  branch:
    correct: pick(correct-*) β†’ reveal β†’ next
    wrong:   pick(wrong-*)   β†’ reveal β†’ next
    timeout: timeout         β†’ reveal β†’ next
  end:     outro   # replaces next on last index
shuffle:
  ui_only: true
  balance_letters: target ~25% A/B/C/D over session
  seed: optional per-session Β· never bake into MP3

8 Β· QC Gates

  • facts: enrich fact_ok Β· spot-check elephants β‰  giraffes.
  • script: zero hits for login / Antwort [A-D] / Gut gemerkt / lettered reveal.
  • audio: MP3 magic Β· min bytes Β· duration bounds (Q: 1.5–8s Β· reveal: 0.8–4s Β· shared: 0.5–5s).
  • pack: every question has 4 answers Β· correct_index=0 Β· clips resolve on disk.
  • bias: if any atom still contains letters β†’ fail build.
  • salvage: default recommend=regenerate unless clean silence boundaries.

9 Β· Rollout Phases

P0 β€” Hub & truth (now)

  • publish this BP under /quiz/blueprint/.
  • mark legacy quiz pages as debt reference.
  • keep pilot: batches/quiz-wizard-v1/ (20Q) as gold sample.

P1 β€” Recycle pilot

  • dissect full 300 Β· report login/praise/letter bias.
  • enrich --limit 20 via OpenRouter Β· emit wizard pack.
  • render 20Q atoms through elv3 TTS Β· listen QA.
  • decision: regenerate-all vs selective salvage (expect regenerate).

P2 β€” Wizard playable

  • ship /quiz play UI against quiz-pack + atoms.
  • shared VO bank locked Β· categories selectable Β· mute/timer.
  • score summary + miss list.

P3 β€” Full bank

  • enrich+emit remaining questions in chunks (50).
  • fact-fix pass Β· drop/rewrite bad items.
  • render full atom set Β· retire monolithic /quiz β€œ600 tts_items” as success metric.

P4 β€” Polish

  • SFX stings Β· optional second host voice Β· captions.
  • session persistence Β· difficulty curves.
  • wiki pages: wizard-pack Β· recycle Β· qc.

10 Β· File Map (operator)

dev/wikis/elv3/
  content/quiz/
    index.md                 # hub
    blueprint/index.md       # THIS BP CS
    batch-files|prompt-stack|tag-library|voice-batches/
  batches/
    wwtbam-de-*              # LEGACY monolithic
    audio/                   # LEGACY mp3 (600)
    quiz-wizard-v1/          # GOLD pilot atoms schema
    recycle_wwtbam.py        # dissect→enrich→salvage→emit
    recycled/                # pipeline outputs
      01-dissected.jsonl
      02-enriched.jsonl
      03-salvage.jsonl
      wizard/{quiz-pack,tts-batch,manifest}
dev/elv3/                    # app Β· TTS proxy Β· future /quiz UI

11 Β· Invariants (new)

  • answers[0] = correct in source; UI shuffles; VO never speaks A–D.
  • branching feedback is shared clips, not per-question praise.
  • no auth/marketing CTA inside question audio.
  • multimodal never replaces JSONL as SSOT.
  • public wiki: behavior + contracts only.
  • metric of done: playable wizard Β· not β€œN MP3s rendered”.


loca.zone Β· elv3.loca.zone Β· wiki.elv3.loca.zone/quiz/

0 items under this folder.