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