From e87b2bbdcced724fd8c324aef2fc8d2d7c759f81 Mon Sep 17 00:00:00 2001 From: vadimwit Date: Sat, 11 Jul 2026 15:54:43 +0100 Subject: [PATCH] =?UTF-8?q?docs(design):=20jam=20roulette=20spec=20?= =?UTF-8?q?=E2=80=94=20seed=20mechanism,=20matcher=20collapse=20fix,=20emp?= =?UTF-8?q?irical=20roll=20pool=20(task=20D-62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two-click flow (button -> style -> instant seed) writing lockedKey + detectedProgression + a seeded committed-vote so the whole dashboard fills as if detected and live playing continues from it; three commit-layer guards specced (every unguarded seed dies exactly one commit before earliest confirmation); fix (a): match.js additionally indexes collapsed forms — repairing the pre-existing live bug where 10 progressions (incl. blues-12bar) never match detection, plus country-145 misattribution; roll pool = steady-state all-offsets round-trip passers (52/56); sourceIndex remap covers guitar, piano AND bass play lookups. Returned twice, PASS on round-3 re-gate (a literal implementation of the sweep protocol reproduced the pinned numbers with zero interpretation gaps). Co-Authored-By: Claude Fable 5 --- docs/design/jam-roulette.md | 658 ++++++++++++++++++++++++++++++++++++ 1 file changed, 658 insertions(+) create mode 100644 docs/design/jam-roulette.md diff --git a/docs/design/jam-roulette.md b/docs/design/jam-roulette.md new file mode 100644 index 0000000..063e0ce --- /dev/null +++ b/docs/design/jam-roulette.md @@ -0,0 +1,658 @@ +# Jam Roulette — design spec (task D-62) + +> **Thesis:** one button, two clicks, a jam. "Jam roulette" in the controls bar +> opens a genre menu (the 10 KB styles + Surprise me); picking one instantly +> rolls a random key + an interesting KB progression and **seeds the exact +> state live detection already writes** — `lockedKey`, `detectedProgression`, +> and a committed-shape `progressionVoteRef` — so the loop strip, the voicing +> rail, the licks strip, and the related-progressions card all populate +> **exactly as if the loop had been detected**. Musicians read the screen and +> start playing; the L-31 commit layer then treats the seed like any committed +> loop: agreeing detections confirm it, a genuinely different loop replaces it +> after `REPLACE_VOTES`, and New Song clears it. **No new parallel state** — +> the seed is a writer into the existing machine, not a second machine. +> +> User ask (verbatim, sprint goal 2026-07-11): *"one button that would be a +> random chord progression selection. a button up top 'jam roulette' and then +> select a genre (like we have jazz, blues rock etc) and then have a random key +> chosen and an interesting progression show up as a loop in the screen. it +> would fill in the loop section and a 4 bar progression or something so that +> everyone can see the key and the chords to be played with different voicing +> so they can start playing… then musicians can start playing and it continues +> from it"* + +**Dependency note:** L-60 is dep-blocked on **C-50** (one-screen close-out). +This spec is written against `docs/design/one-screen.md`'s **target** layout +(controls bar per §1.1, slim loop strip per §1.2, the two-column dashboard), +which L-50 is building concurrently. Everything here that names the controls +bar or the strip means the *post-L-50* versions; the seed mechanism (§3) is +layout-independent and verified against App.jsx as it stands today (~b753b58). + +Standing principles honoured: reuse, don't duplicate; nothing shown twice; +scroll > click; tokens only, no raw hex; the 🚨 App.jsx audio contract +(callbacks / ref-sync / AudioCapture untouched). + +--- + +## 1. UX flow + +### 1.1 The button + +- **Where:** right end of the controls bar, in the global-chrome cluster next + to one-screen §1.1's `⛶ Jam view` toggle ("a button up top" — the controls + bar is the app's persistent top chrome; the header row stays reserved for + Settings / New Song / Start). +- **What:** `🎲 Jam roulette` — same button language as the existing controls: + `px-3 py-1 rounded-lg border border-border text-sm text-gray-200 + hover:border-gray-500 focus-visible:ring-2 focus-visible:ring-accent + transition-colors`. While a seed is active (unconfirmed, §1.3) the button + carries the seeded accent: `border-accent/40 text-accent bg-accent/10` + + `aria-pressed="true"` — same active treatment as the locked-key pill. +- **Keyboard:** real `