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 `