Article degrees

The shortest path between two articles on a fixture graph, animated on screen, with no live encyclopedia required.

This is an interactive visual 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/article-degrees
Version
0.2.1
Published by
nova
Updated
15 Nov 2026

Build this spec

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

Article degrees: hero

What can I customize?

Fixture graph A shipped graph of articles and links. No live encyclopedia.

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.

    Article degrees

    What this builds

    A smallest-step path between two articles, drawn as a graph. The articles and the links are a fixture graph shipped with the project, so the checks never call a live encyclopedia. A search is a breadth-first walk on that graph. The UI shows the documented path, or a clear no-path state. Names are original and fictional.

    Read spekkr.inputs.json first. title labels the page. from and to are the starting query, and must exist in the chosen graph or be refused. animate and undirected change the walk and the picture.

    Out of scope

    • A live encyclopedia API in the checks.
    • A trademarked encyclopedia name in the product name or the id.
    • A world-size dump in this version; the shipped graphs are small.

    Requirements

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

    R1. Shortest paths
    • The path is a shortest walk of links, found by BFS, with predecessors recorded to reconstruct it.
    • On tiny, the path from oak to moon is the list in design.md. A second pair has no path.
    • If undirected is on, the no-path pair may become a path, as in the file.

    Accept when: each fixture pair produces the documented path or none, in both directed and undirected modes.

    R2. Missing ids and the UI
    • An id not in the graph is refused before the search, with a message that names it.
    • The UI lists the path as article titles in order, and a settled screenshot matches the golden.
    • A fetch hook fails the test if a known encyclopedia host is contacted.

    Accept when: a bad id is refused, the oak–moon path is shown, and no encyclopedia host is contacted.

    R3. Files
    • One command runs the path tests, the fetch hook, and writes the four screenshots. No network.

    Accept when: the command passes for both graphs.

    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

    Shortest-path tests run on a fixture graph, not a live encyclopedia. The UI shows the documented path (and a no-path state). A fetch hook fails if an encyclopedia host is contacted. Golden frames are taken. Names in the product are original.

    Definition of done

    • Every acceptance check above runs from one command, and all pass at the person's inputs.
    • A README says how to search, how to add a fixture graph, and how to run the checks.
    # Article degrees
    
    ## What this builds
    
    A smallest-step path between two articles, drawn as a graph. The articles
    and the links are a fixture graph shipped with the project, so the checks
    never call a live encyclopedia. A search is a breadth-first walk on that
    graph. The UI shows the documented path, or a clear no-path state. Names
    are original and fictional.
    
    Read `spekkr.inputs.json` first. `title` labels the page. `from` and `to`
    are the starting query, and must exist in the chosen `graph` or be
    refused. `animate` and `undirected` change the walk and the picture.
    
    ## Out of scope
    
    - A live encyclopedia API in the checks.
    - A trademarked encyclopedia name in the product name or the id.
    - A world-size dump in this version; the shipped graphs are small.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. Shortest paths
    
    - The path is a shortest walk of links, found by BFS, with predecessors
      recorded to reconstruct it.
    - On `tiny`, the path from `oak` to `moon` is the list in `design.md`. A
      second pair has no path.
    - If `undirected` is on, the no-path pair may become a path, as in the
      file.
    
    Accept when: each fixture pair produces the documented path or `none`, in
    both directed and undirected modes.
    
    ### R2. Missing ids and the UI
    
    - An id not in the graph is refused before the search, with a message that
      names it.
    - The UI lists the path as article titles in order, and a settled
      screenshot matches the golden.
    - A fetch hook fails the test if a known encyclopedia host is contacted.
    
    Accept when: a bad id is refused, the oak–moon path is shown, and no
    encyclopedia host is contacted.
    
    ### R3. Files
    
    - One command runs the path tests, the fetch hook, and writes the four
      screenshots. No network.
    
    Accept when: the command passes for both graphs.
    
    ### 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
    
    Shortest-path tests run on a fixture graph, not a live encyclopedia. The
    UI shows the documented path (and a no-path state). A fetch hook fails if
    an encyclopedia host is contacted. Golden frames are taken. Names in the
    product are original.
    
    ## Definition of done
    
    - Every acceptance check above runs from one command, and all pass at the
      person's inputs.
    - A README says how to search, how to add a fixture graph, and how to run
      the checks.
    

    Open spec.md as plain text

  • design.md Fixture graphs, shortest-path pairs, and the no-path case.

    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.

    Tiny graph

    Nodes and directed edges are graphs/tiny.json. The oak → moon path is [oak, grove, river, moon] (3 hops). The pair oak → isolated is none when directed, and [oak, isolated] when undirected if that edge exists as a reverse of isolated → oak — the file is the authority.

    campus has at least 30 nodes and its own fixture pairs in fixtures/campus-paths.json.

    Screenshot tolerance

    8 levels, 98% of pixels. The on-page path text must also match the fixture list exactly.

    Inputs

    KeyLabelDefaultNotes
    titleTitleHow many steps between them?Shown above the search.
    fromDefault fromoakAn article id in the fixture graph.
    toDefault tomoonAn article id in the fixture graph.
    animateAnimate the pathonNodes appear in order. Tests may settle at the end.
    undirectedIgnore directionoffIf on, edges are treated as two-way. The default graph is directed as shipped.
    graphFixture graphtinyA shipped graph of articles and links. No live encyclopedia.

    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
    design.mdA shipped fixture. The build may move it, but then design.md must name the new path.
    fixtures/campus-paths.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    graphs/tiny.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/graph.pngThe shortest fixture path from oak to moon, four steps, drawn on the graph.

    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. Shortest-path tests run on a fixture graph, not a live encyclopedia. The UI shows the documented path (and a no-path state). A fetch hook fails if an encyclopedia host is contacted. Golden frames are taken. Names in the product are original.
    # 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.
    
    ## Tiny graph
    
    Nodes and directed edges are `graphs/tiny.json`. The oak → moon path is
    `[oak, grove, river, moon]` (3 hops). The pair `oak` → `isolated` is
    `none` when directed, and `[oak, isolated]` when undirected if that edge
    exists as a reverse of `isolated → oak` — the file is the authority.
    
    `campus` has at least 30 nodes and its own fixture pairs in
    `fixtures/campus-paths.json`.
    
    ## Screenshot tolerance
    
    8 levels, 98% of pixels. The on-page path text must also match the fixture
    list exactly.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `title` | Title | How many steps between them? | Shown above the search. |
    | `from` | Default from | oak | An article id in the fixture graph. |
    | `to` | Default to | moon | An article id in the fixture graph. |
    | `animate` | Animate the path | on | Nodes appear in order. Tests may settle at the end. |
    | `undirected` | Ignore direction | off | If on, edges are treated as two-way. The default graph is directed as shipped. |
    | `graph` | Fixture graph | tiny | A shipped graph of articles and links. No live encyclopedia. |
    
    ## 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 |
    | --- | --- |
    | `design.md` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `fixtures/campus-paths.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `graphs/tiny.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/graph.png` | The shortest fixture path from oak to moon, four steps, drawn on the graph. |
    
    
    ## 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. Shortest-path tests run on a fixture graph, not a live encyclopedia.
    The UI shows the documented path (and a no-path state). A fetch hook fails
    if an encyclopedia host is contacted. Golden frames are taken. Names in
    the product are original.
    

    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. Shortest paths (R1). Build what R1. Shortest paths asks for, to the numbers in design.md. In particular: The path is a shortest walk of links, found by BFS, with predecessors recorded to reconstruct it. Check: the R1. Shortest paths acceptance checks pass.
    3. Missing ids and the UI (R2). Build what R2. Missing ids and the UI asks for, to the numbers in design.md. In particular: An id not in the graph is refused before the search, with a message that names it. Check: the R2. Missing ids and the UI acceptance checks pass.
    4. Files (R3). Build what R3. Files asks for, to the numbers in design.md. In particular: One command runs the path tests, the fetch hook, and writes the four screenshots. No network. Check: the R3. 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. **Shortest paths (R1).** Build what `R1. Shortest paths` asks for, to
    the numbers in `design.md`. In particular: The path is a shortest walk of
    links, found by BFS, with predecessors recorded to reconstruct it.
       Check: the `R1. Shortest paths` acceptance checks pass.
    
    3. **Missing ids and the UI (R2).** Build what `R2. Missing ids and the
    UI` asks for, to the numbers in `design.md`. In particular: An id not in
    the graph is refused before the search, with a message that names it.
       Check: the `R2. Missing ids and the UI` acceptance checks pass.
    
    4. **Files (R3).** Build what `R3. Files` asks for, to the numbers in
    `design.md`. In particular: One command runs the path tests, the fetch
    hook, and writes the four screenshots. No network.
       Check: the `R3. 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.