One-button ring

Hold, release, and stay on a moving ring: a one-button timing game checked with a fake clock.

This is a browser game spec on Spekkr, published by nova. It is listed with the other specs. Paste the line to an agent that can open a web address, and the agent fetches the files and builds from them.

Spec
nova/one-button-ring
Version
0.2.2
Published by
nova
Updated
15 Nov 2026

Build this spec

Build the spec at https://spekkr.com/nova/one-button-ring/start.md.

Paste this to your AI agent. It opens the address, fetches the spec's files, records your choices and builds from them. Nothing to install, no account.

Published by nova.

What does the result look like?

One-button ring: heroOne-button ring: loop

What can I customize?

Pace Seconds per revolution at the start: 2.4, 1.6 or 1.0.

Your choices go into the line you copy. Anything else is yours to edit, but it leaves the tested path.

What do I get?

  • spec.md Requirements and acceptance checks.

    One-button ring

    What this builds

    A ring travels around a circle. The person holds one button or key to ride it, and releases in a narrow window at a marked target. A good release scores a point and slightly speeds the next lap. A miss ends the run. There is almost no other UI. This is an original timing game.

    Read spekkr.inputs.json first. title sits under the ring. window is the allowed error at the target, in milliseconds. pace sets the first lap's period. pulse and sound add feel; tests may mock sound.

    Out of scope

    • Multiplayer or a recorded soundtrack.
    • Network or a global scoreboard in the checks.
    • A second control. There is one button.

    Requirements

    Each requirement has an id. Checks name the id they cover.

    R1. The clock
    • All timing uses a clock the tests can replace. The production clock is performance.now.
    • A lap's period starts at 2.4 s, 1.6 s or 1.0 s according to pace. Each good release multiplies the next period by 0.97, never below 0.48 s.
    • The target sits at angle 0. The rider's angle is 2π * (elapsed / period) from the start of the lap, starting at π (the opposite side).

    Accept when: with a fake clock, the angle at t = 0, a quarter period, and a half period matches the table in design.md within 0.1 degrees.

    R2. Hold, release, miss
    • A hold starts a lap if one is not already running. A release is good when the absolute time error to the target is less than or equal to window milliseconds.
    • A good release adds 1 to the score and starts the next lap at the new period.
    • A release outside the window, or a hold that lasts more than one full period without a release, is a miss and ends the run. The last score stands.

    Accept when: the fake-clock cases in design.md cover a good release, a late miss, an early miss, and a held-too-long miss, with the stated scores.

    R3. Picture
    • The ring is a 240 px radius stroke on a 1600 by 1000 frame, centred.
    • One golden screenshot is taken at rest before the first hold (idle-ring). Three more frames (held, good-release, miss) are optional but shipped and checked.

    Accept when: the four frames match the goldens within the tolerance in design.md.

    R4. Files
    • One command runs the fake-clock tests and writes the screenshots. Sound is mocked. No network.

    Accept when: the command passes at every pace and at window 40 and 160.

    R5. Inputs
    • The build reads spekkr.inputs.json. Settings label the UI, options turn features on or off, and a swap must be one of its choices.
    • A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key.

    Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check.

    Verification

    Timing-window tests use a fake clock, never the wall clock. They cover a good release, both edges of the window, early and late misses, and a hold that lasts a full period. The score after each case matches the table. Four golden screenshots are checked, including one at rest. Audio is mocked.

    Definition of done

    • Every acceptance check above runs from one command, and all pass at the person's inputs.
    • A README says how to play, how to run the checks, and how to change the window.
    # One-button ring
    
    ## What this builds
    
    A ring travels around a circle. The person holds one button or key to ride
    it, and releases in a narrow window at a marked target. A good release
    scores a point and slightly speeds the next lap. A miss ends the run.
    There is almost no other UI. This is an original timing game.
    
    Read `spekkr.inputs.json` first. `title` sits under the ring. `window` is
    the allowed error at the target, in milliseconds. `pace` sets the first
    lap's period. `pulse` and `sound` add feel; tests may mock sound.
    
    ## Out of scope
    
    - Multiplayer or a recorded soundtrack.
    - Network or a global scoreboard in the checks.
    - A second control. There is one button.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. The clock
    
    - All timing uses a clock the tests can replace. The production clock is
      `performance.now`.
    - A lap's period starts at 2.4 s, 1.6 s or 1.0 s according to `pace`. Each
      good release multiplies the next period by 0.97, never below 0.48 s.
    - The target sits at angle 0. The rider's angle is 2π * (elapsed / period)
      from the start of the lap, starting at π (the opposite side).
    
    Accept when: with a fake clock, the angle at t = 0, a quarter period, and
    a half period matches the table in `design.md` within 0.1 degrees.
    
    ### R2. Hold, release, miss
    
    - A hold starts a lap if one is not already running. A release is good
      when the absolute time error to the target is less than or equal to
      `window` milliseconds.
    - A good release adds 1 to the score and starts the next lap at the new
      period.
    - A release outside the window, or a hold that lasts more than one full
      period without a release, is a miss and ends the run. The last score
      stands.
    
    Accept when: the fake-clock cases in `design.md` cover a good release, a
    late miss, an early miss, and a held-too-long miss, with the stated
    scores.
    
    ### R3. Picture
    
    - The ring is a 240 px radius stroke on a 1600 by 1000 frame, centred.
    - One golden screenshot is taken at rest before the first hold
      (`idle-ring`). Three more frames (held, good-release, miss) are optional
      but shipped and checked.
    
    Accept when: the four frames match the goldens within the tolerance in
    `design.md`.
    
    ### R4. Files
    
    - One command runs the fake-clock tests and writes the screenshots. Sound
      is mocked. No network.
    
    Accept when: the command passes at every pace and at `window` 40 and 160.
    
    ### R5. Inputs
    
    - The build reads `spekkr.inputs.json`. Settings label the UI, options
      turn features on or off, and a swap must be one of its choices.
    - A value outside a stated range, or a swap that is not one of its
      choices, is refused before the app starts its checks, with a message
      that names the key.
    
    Accept when: the default inputs render, an illegal swap is refused by
    name, and changing a visible setting (for example the title) shows up in a
    later check.
    
    ## Verification
    
    Timing-window tests use a fake clock, never the wall clock. They cover a
    good release, both edges of the window, early and late misses, and a hold
    that lasts a full period. The score after each case matches the table.
    Four golden screenshots are checked, including one at rest. Audio is
    mocked.
    
    ## Definition of done
    
    - Every acceptance check above runs from one command, and all pass at the
      person's inputs.
    - A README says how to play, how to run the checks, and how to change the
      window.
    

    Open spec.md as plain text

  • design.md The fake-clock timing windows, periods and angles.

    Design

    This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold.

    Angles (calm pace, period 2.4 s)

    Angle 0 is the target, at the right of the centre. The rider starts at π.

    t (s)Angle (radians)
    03.14159
    0.64.71239
    1.26.28318, which is 0, the target
    1.81.57080

    Fake-clock cases (window 80 ms, calm)

    CaseRelease atResultScore after
    goodt = 1.200good1
    good-edget = 1.280good1
    latet = 1.281miss0
    earlyt = 1.119miss0
    held too longno release by t = 2.4miss0

    A second good release, after a first at 1.200, is due at 1.200 + 2.4 * 0.97 = 3.528 s.

    Screenshot tolerance

    8 levels, 98% of pixels.

    Inputs

    KeyLabelDefaultNotes
    titleTitleStay on the ringShown faintly under the ring.
    windowTiming window, ms80How close to the target the release must be, from 40 to 160.
    pulsePulse the ringonThe ring's stroke thickens slightly with the beat.
    soundPlay a tickonA tick on a good release. Tests may mock audio.
    pacePacecalmSeconds per revolution at the start: 2.4, 1.6 or 1.0.

    Acceptance at the defaults

    The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins.

    FixtureRole
    spekkr.inputs.jsonA shipped fixture. The build may move it, but then design.md must name the new path.

    Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy.

    Screenshots

    These pictures are headless-Chrome captures of the working reference in reference/preview.html, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel.

    FileWhat it shows
    shots/ring.pngThe needle inside the 80 ms window, streak 7.

    How to verify

    1. Run the checks at the default inputs, without a network.
    2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file.
    3. Repeat once at the person's inputs when they differ from the defaults.
    4. Timing-window tests use a fake clock, never the wall clock. They cover a good release, both edges of the window, early and late misses, and a hold that lasts a full period. The score after each case matches the table. Four golden screenshots are checked, including one at rest. Audio is mocked.
    # Design
    
    This file fixes the parts that are easy to get wrong. The language and
    tools are up to you, as long as the numbers here hold.
    
    ## Angles (calm pace, period 2.4 s)
    
    Angle 0 is the target, at the right of the centre. The rider starts at π.
    
    | t (s) | Angle (radians) |
    | --- | --- |
    | 0 | 3.14159 |
    | 0.6 | 4.71239 |
    | 1.2 | 6.28318, which is 0, the target |
    | 1.8 | 1.57080 |
    
    ## Fake-clock cases (`window` 80 ms, calm)
    
    | Case | Release at | Result | Score after |
    | --- | --- | --- | --- |
    | good | t = 1.200 | good | 1 |
    | good-edge | t = 1.280 | good | 1 |
    | late | t = 1.281 | miss | 0 |
    | early | t = 1.119 | miss | 0 |
    | held too long | no release by t = 2.4 | miss | 0 |
    
    A second good release, after a first at 1.200, is due at 1.200 + 2.4 *
    0.97 = 3.528 s.
    
    ## Screenshot tolerance
    
    8 levels, 98% of pixels.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `title` | Title | Stay on the ring | Shown faintly under the ring. |
    | `window` | Timing window, ms | 80 | How close to the target the release must be, from 40 to 160. |
    | `pulse` | Pulse the ring | on | The ring's stroke thickens slightly with the beat. |
    | `sound` | Play a tick | on | A tick on a good release. Tests may mock audio. |
    | `pace` | Pace | calm | Seconds per revolution at the start: 2.4, 1.6 or 1.0. |
    
    ## Acceptance at the defaults
    
    The numbers, names and fixture paths already in this file are the
    authority. Where a later table or a shipped fixture file disagrees with
    prose, the table or the fixture wins.
    
    | Fixture | Role |
    | --- | --- |
    | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    
    Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement
    names another size. Tolerance, unless a tighter figure is given above: 8
    levels, 98% of pixels, with motion, cursors and clocks frozen as this file
    says. A build's goldens are of that build; they do not have to match a
    shipped reference preview pixel-for-pixel if the tool or the type is
    different, but they do have to match this file's layout, counts and copy.
    
    ## Screenshots
    
    These pictures are headless-Chrome captures of the working reference in
    `reference/preview.html`, at the default inputs. They are not drawings of a
    product that has not been built. The first picture is the one Spekkr shows on
    the spec's card. A build may ship its own goldens; those goldens are of that
    build and do not have to match these frames pixel-for-pixel.
    
    | File | What it shows |
    | --- | --- |
    | `shots/ring.png` | The needle inside the 80 ms window, streak 7. |
    
    
    ## How to verify
    
    1. Run the checks at the default inputs, without a network.
    
    2. Walk through the scripted playthroughs, fixture lookups or goldens
    named in the requirements; each must match this file.
    
    3. Repeat once at the person's inputs when they differ from the defaults.
    
    4. Timing-window tests use a fake clock, never the wall clock. They cover
    a good release, both edges of the window, early and late misses, and a
    hold that lasts a full period. The score after each case matches the
    table. Four golden screenshots are checked, including one at rest. Audio
    is mocked.
    

    Open design.md as plain text

  • tasks.md Build tasks in order, each with a check.

    Tasks

    Work in order. Finish a task's check before starting the next.

    1. Set up. Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read spekkr.inputs.json first. Check: a blank or heading page loads, and an empty test run passes.
    2. The clock (R1). Build what R1. The clock asks for, to the numbers in design.md. In particular: All timing uses a clock the tests can replace. The production clock is performance.now. Check: the R1. The clock acceptance checks pass.
    3. Hold, release, miss (R2). Build what R2. Hold, release, miss asks for, to the numbers in design.md. In particular: A hold starts a lap if one is not already running. A release is good when the absolute time error to the target is less than or equal to window milliseconds. Check: the R2. Hold, release, miss acceptance checks pass.
    4. Picture (R3). Build what R3. Picture asks for, to the numbers in design.md. In particular: The ring is a 240 px radius stroke on a 1600 by 1000 frame, centred. Check: the R3. Picture acceptance checks pass.
    5. Files (R4). Build what R4. Files asks for, to the numbers in design.md. In particular: One command runs the fake-clock tests and writes the screenshots. Sound is mocked. No network. Check: the R4. Files acceptance checks pass.
    6. Inputs (R5). Build what R5. Inputs asks for, to the numbers in design.md. In particular: The build reads spekkr.inputs.json. Settings label the UI, options turn features on or off, and a swap must be one of its choices. Check: the R5. Inputs acceptance checks pass.
    7. Goldens. Capture the frames named in design.md at the defaults, with motion frozen where the file says so. Compare them within the stated tolerance. Check: the frames match, and a pixel-level check fails if a documented element is removed on purpose.
    8. Finish. Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in spec.md is true.
    # Tasks
    
    Work in order. Finish a task's check before starting the next.
    
    1. **Set up.** Set up a web app (or the stack you have chosen) and a test
    runner that can open a page, click, and compare screenshots. Read
    `spekkr.inputs.json` first.
       Check: a blank or heading page loads, and an empty test run passes.
    
    2. **The clock (R1).** Build what `R1. The clock` asks for, to the numbers
    in `design.md`. In particular: All timing uses a clock the tests can
    replace. The production clock is `performance.now`.
       Check: the `R1. The clock` acceptance checks pass.
    
    3. **Hold, release, miss (R2).** Build what `R2. Hold, release, miss` asks
    for, to the numbers in `design.md`. In particular: A hold starts a lap if
    one is not already running. A release is good when the absolute time error
    to the target is less than or equal to `window` milliseconds.
       Check: the `R2. Hold, release, miss` acceptance checks pass.
    
    4. **Picture (R3).** Build what `R3. Picture` asks for, to the numbers in
    `design.md`. In particular: The ring is a 240 px radius stroke on a 1600
    by 1000 frame, centred.
       Check: the `R3. Picture` acceptance checks pass.
    
    5. **Files (R4).** Build what `R4. Files` asks for, to the numbers in
    `design.md`. In particular: One command runs the fake-clock tests and
    writes the screenshots. Sound is mocked. No network.
       Check: the `R4. Files` acceptance checks pass.
    
    6. **Inputs (R5).** Build what `R5. Inputs` asks for, to the numbers in
    `design.md`. In particular: The build reads `spekkr.inputs.json`. Settings
    label the UI, options turn features on or off, and a swap must be one of
    its choices.
       Check: the `R5. Inputs` acceptance checks pass.
    
    7. **Goldens.** Capture the frames named in `design.md` at the defaults,
    with motion frozen where the file says so. Compare them within the stated
    tolerance.
       Check: the frames match, and a pixel-level check fails if a documented
    element is removed on purpose.
    
    8. **Finish.** Write a README that says how to install what is needed, how
    to change the inputs, and how to run the checks. Run the one command from
    a clean folder.
       Check: every item under Definition of done in `spec.md` is true.
    

    Open tasks.md as plain text

  • reference/preview.html A working reference preview of the default view, used to make the listing pictures. A build does not have to start from this file.
  • reference/fonts/fonts.css Webfont faces for the reference preview.
  • reference/fonts/Geist.ttf Geist variable typeface for the reference preview.
  • reference/fonts/Fraunces.ttf Fraunces variable typeface for the reference preview.
  • reference/fonts/Fraunces-Italic.ttf Fraunces italic variable typeface for the reference preview.

Is it for me?

Platforms
web
Tools
TypeScript

What does it need?

Agent permissions
shell
Commands it runs
install a test runner install a tool that compares screenshots

What changed?

  • 0.2.215 Nov 2026Names what it builds.
  • 0.2.114 Nov 2026Add animated loop to the listing shots.
  • 0.2.014 Nov 2026Polished reference preview and new listing shots, including a short loop.
  • 0.1.014 Nov 2026First version.

For agents: start.md says how to build this spec, spec.json holds everything on this page, and bundle.tar.gz holds its files.