suited briefs
Flywheel product

Create-game skill + Dice Sums

The reusable game-kit and the skill that scaffolds a new pad game end to end.

2026-10-16 · product brief

One-paragraph product

Agents use a project skill (.cursor/skills/create-flywheel-game/) plus a shared flywheel-game-kit to scaffold Flywheel pad games at dice-over-under integration parity: dual registry, FlywheelVault Game Wallet, settler settle + provably fair, lobby/launch/play CTAs, practice-only when no house token, and mandatory rake knobs (default 0 OK) wired through settler rakes[] with rakeWei always in gamePayload. First game built with the skill: dice-sums (“Dice Sums”) — two d6, 10× on 5+5 or 6+6, 2× on sum 7/8/9, else lose; rake 0 at ship.

In scope for v1

  1. Skill — checklist + rake recipe + scaffold steps; audience = agents.
  2. flywheel-game-kit — shared live Game Wallet, wallet events, settle/fair clients, rake types/helpers, settle-error formatting (pad + all games import).
  3. dice-sums — full pad embed (alias, route, registry, settler, WalletBar / post-buy / ?token=), CSS 3D dice copied into the game (not a shared dice package), PF via HMAC → two faces.
  4. Update launchpad/deploy/DEPLOY.md if deploy/runtime changes.
  5. Migrate dice-over-under + pad off Vite rewrite hacks onto the kit where practical; rake knobs on over-under (default 0) for skill compliance.

Out of scope for v1

  • Marketplace submission / approve flow
  • Player rakeback
  • Extracting shared dice visuals package (dice-shared/)
  • On-chain HMAC verification
  • Blackjack pad rebuild

Domain commitments

PieceRule
RakeEvery game ships rakeBps + rakeBasis; practice never rakes; no rakeback; game-defined formula; amount → rakes[] + gamePayload.rakeWei
RegistryApp games.ts + on-chain GAME_* + VaultFactory must match
CustodyOne FlywheelVault; deposit before real play; live GW singleton from kit
SettlerOne process; per-game branches for roll/payload math
Namingdice-sums dir; label Dice Sums; gameId = keccak256("DICE_SUMS")
Dice artCopy into dice-sums from archived over-under design; no shared asset pkg

Rake knobs (skill contract)

rakeBps: number
rakeBasis: 'none' | 'bet' | 'grossWin' | 'netWin' | 'custom'

rakeBps === 0 or basis === 'none' → settler rakes = [0]; payload still includes rakeWei: 0.

Dice Sums rules

  • Two faces 1–6 from HMAC bytes.
  • 5+5 or 6+6 → pay 10× stake (net +9× after returning stake, or gross 10× total return — implement as total return = stake × mult, net = stake×(mult−1)).
  • Sum 7, 8, or 9 → 2× total return.
  • Else → lose stake.
  • Exact pair/sum as above; no push.

Open follow-ups

  • Portable skill outside this repo (later).
  • Optional migrate over-under UI to show rake=0 knobs in Fair/settings.
  • Whether houseTokens stays pad-only (injected) vs moves into kit later.