Hex pipes

A hex-grid pipes puzzle: rotate tiles until the network connects, with a known solved board, a known unsolved one, and a golden frame.

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/hex-pipes
Version
0.2.1
Published by
nova
Updated
15 Nov 2026

Build this spec

Build the spec at https://spekkr.com/nova/hex-pipes/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?

Hex pipes: hero

What can I customize?

Level pack intro is eight levels. full is forty.

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.

    Hex pipes

    What this builds

    A puzzle on a hex grid. Each tile is a pipe with a subset of its six edges open. A click rotates it 60 degrees. The level is solved when every open edge meets an open edge, and a stated source is connected to a stated sink. The art and the levels are original. Tests cover rotation, a known solved grid, and a known unsolved one.

    Read spekkr.inputs.json first. title labels the board. size is used by a fresh editor; shipped levels carry their own radius. pack chooses the levels. flow and hints change the chrome.

    Out of scope

    • A public level workshop in this version.
    • Network or a daily challenge server in the checks.
    • Square-grid pipes. This spec is hex only.

    Requirements

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

    R1. Rotation and edges
    • Edges are numbered 0 to 5, clockwise from east.
    • A rotate turns every open edge to (e + 1) modulo 6. Five more rotates return the start.
    • Two neighbouring tiles connect when each has the edge that faces the other open.

    Accept when: the rotation fixtures in design.md show the six orientations of a two-edge tile, and a neighbour pair is connected or not as listed.

    R2. Solved and unsolved
    • Level H1 is a radius-2 board whose documented solution (a list of orientations) is connected from source to sink and has no open edge facing an empty or a closed edge.
    • Level H0 is the same tiles at the starting orientations, and is not solved.
    • A connectivity check reports both results, and a search finds that H1's listed orientations are a solution.

    Accept when: H1 with the solution file is solved, H0 is not, and a single rotate from H1 on the centre tile makes it unsolved.

    R3. Frames and files
    • Screenshots: H0, H0 after one documented rotate, H1 solved, and H1 with flow on.
    • One command runs rotation, connectivity, and pack-load tests, and writes the frames. No network.

    Accept when: both packs load, every intro level has a shipped solution that the checker accepts, and the frames match the goldens.

    R4. 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

    Rotation mechanics and hex neighbour facing are unit-tested. A known solved grid is connected from source to sink; a known unsolved one is not. Every intro level ships a solution the checker accepts. A golden board screenshot is checked. No network.

    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 add a level, and how to run the checks.
    # Hex pipes
    
    ## What this builds
    
    A puzzle on a hex grid. Each tile is a pipe with a subset of its six edges
    open. A click rotates it 60 degrees. The level is solved when every open
    edge meets an open edge, and a stated source is connected to a stated
    sink. The art and the levels are original. Tests cover rotation, a known
    solved grid, and a known unsolved one.
    
    Read `spekkr.inputs.json` first. `title` labels the board. `size` is used
    by a fresh editor; shipped levels carry their own radius. `pack` chooses
    the levels. `flow` and `hints` change the chrome.
    
    ## Out of scope
    
    - A public level workshop in this version.
    - Network or a daily challenge server in the checks.
    - Square-grid pipes. This spec is hex only.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. Rotation and edges
    
    - Edges are numbered 0 to 5, clockwise from east.
    - A rotate turns every open edge to `(e + 1) modulo 6`. Five more rotates
      return the start.
    - Two neighbouring tiles connect when each has the edge that faces the
      other open.
    
    Accept when: the rotation fixtures in `design.md` show the six
    orientations of a two-edge tile, and a neighbour pair is connected or not
    as listed.
    
    ### R2. Solved and unsolved
    
    - Level H1 is a radius-2 board whose documented solution (a list of
      orientations) is connected from source to sink and has no open edge
      facing an empty or a closed edge.
    - Level H0 is the same tiles at the starting orientations, and is not
      solved.
    - A connectivity check reports both results, and a search finds that H1's
      listed orientations are a solution.
    
    Accept when: H1 with the solution file is solved, H0 is not, and a single
    rotate from H1 on the centre tile makes it unsolved.
    
    ### R3. Frames and files
    
    - Screenshots: H0, H0 after one documented rotate, H1 solved, and H1 with
      `flow` on.
    - One command runs rotation, connectivity, and pack-load tests, and writes
      the frames. No network.
    
    Accept when: both packs load, every intro level has a shipped solution
    that the checker accepts, and the frames match the goldens.
    
    ### R4. 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
    
    Rotation mechanics and hex neighbour facing are unit-tested. A known
    solved grid is connected from source to sink; a known unsolved one is not.
    Every intro level ships a solution the checker accepts. A golden board
    screenshot is checked. No network.
    
    ## 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 add a level, and how to run the
      checks.
    

    Open spec.md as plain text

  • design.md Hex edge math, rotation, and the solved and unsolved boards.

    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.

    Neighbour facing

    A tile's edge e faces a neighbour's edge (e + 3) modulo 6. Axial coordinates and the six neighbour deltas are in fixtures/hex-math.json.

    Levels

    packs/intro.json holds H0 (unsolved start of the first puzzle) and H1–H8 with solutions in fixtures/hex-solutions/. full adds H9–H40. H1's solution is the authority for the solved frame.

    Screenshot tolerance

    8 levels, 98% of pixels, 1600 by 1000.

    Inputs

    KeyLabelDefaultNotes
    titleTitleTurn until it flowsShown above the board.
    sizeBoard radius3A hex radius from 2 to 5, in tiles, not counting the centre.
    flowShow flowonConnected pipes fill with a colour once the network is solved.
    hintsMark a wrong tileoffA control marks one tile that is not in a documented solution orientation.
    packLevel packintrointro is eight levels. full is forty.

    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
    fixtures/hex-math.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    packs/intro.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    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/board.pngA size-3 hex pipes mid-solve, source and sink marked, some tiles already flowing.

    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. Rotation mechanics and hex neighbour facing are unit-tested. A known solved grid is connected from source to sink; a known unsolved one is not. Every intro level ships a solution the checker accepts. A golden board screenshot is checked. No network.
    # 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.
    
    ## Neighbour facing
    
    A tile's edge `e` faces a neighbour's edge `(e + 3) modulo 6`. Axial
    coordinates and the six neighbour deltas are in `fixtures/hex-math.json`.
    
    ## Levels
    
    `packs/intro.json` holds H0 (unsolved start of the first puzzle) and H1–H8
    with solutions in `fixtures/hex-solutions/`. `full` adds H9–H40. H1's
    solution is the authority for the solved frame.
    
    ## Screenshot tolerance
    
    8 levels, 98% of pixels, 1600 by 1000.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `title` | Title | Turn until it flows | Shown above the board. |
    | `size` | Board radius | 3 | A hex radius from 2 to 5, in tiles, not counting the centre. |
    | `flow` | Show flow | on | Connected pipes fill with a colour once the network is solved. |
    | `hints` | Mark a wrong tile | off | A control marks one tile that is not in a documented solution orientation. |
    | `pack` | Level pack | intro | intro is eight levels. full is forty. |
    
    ## 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 |
    | --- | --- |
    | `fixtures/hex-math.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `packs/intro.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `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/board.png` | A size-3 hex pipes mid-solve, source and sink marked, some tiles already flowing. |
    
    
    ## 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. Rotation mechanics and hex neighbour facing are unit-tested. A known
    solved grid is connected from source to sink; a known unsolved one is not.
    Every intro level ships a solution the checker accepts. A golden board
    screenshot is checked. No network.
    

    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. Rotation and edges (R1). Build what R1. Rotation and edges asks for, to the numbers in design.md. In particular: Edges are numbered 0 to 5, clockwise from east. Check: the R1. Rotation and edges acceptance checks pass.
    3. Solved and unsolved (R2). Build what R2. Solved and unsolved asks for, to the numbers in design.md. In particular: Level H1 is a radius-2 board whose documented solution (a list of orientations) is connected from source to sink and has no open edge facing an empty or a closed edge. Check: the R2. Solved and unsolved acceptance checks pass.
    4. Frames and files (R3). Build what R3. Frames and files asks for, to the numbers in design.md. In particular: Screenshots: H0, H0 after one documented rotate, H1 solved, and H1 with flow on. Check: the R3. Frames and files acceptance checks pass.
    5. Inputs (R4). Build what R4. 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 R4. Inputs acceptance checks pass.
    6. 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.
    7. 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. **Rotation and edges (R1).** Build what `R1. Rotation and edges` asks
    for, to the numbers in `design.md`. In particular: Edges are numbered 0 to
    5, clockwise from east.
       Check: the `R1. Rotation and edges` acceptance checks pass.
    
    3. **Solved and unsolved (R2).** Build what `R2. Solved and unsolved` asks
    for, to the numbers in `design.md`. In particular: Level H1 is a radius-2
    board whose documented solution (a list of orientations) is connected from
    source to sink and has no open edge facing an empty or a closed edge.
       Check: the `R2. Solved and unsolved` acceptance checks pass.
    
    4. **Frames and files (R3).** Build what `R3. Frames and files` asks for,
    to the numbers in `design.md`. In particular: Screenshots: H0, H0 after
    one documented rotate, H1 solved, and H1 with `flow` on.
       Check: the `R3. Frames and files` acceptance checks pass.
    
    5. **Inputs (R4).** Build what `R4. 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 `R4. Inputs` acceptance checks pass.
    
    6. **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.
    
    7. **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.115 Nov 2026Names what it builds.
  • 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.