# Mentioned books ## What this builds A shelf of books drawn from a community's mentions. The mentions are a fixture corpus: a title, a count, a date, a short quote. Search and listing run over that corpus. Checks do not scrape a live community. A golden shelf page is taken. Titles in the sample corpus are used as mentions, with care for rights in the quotes (short, attributed, or invented). Read `spekkr.inputs.json` first. `title` labels the shelf. `query` is the first search. `corpus` chooses the log. `counts` and `blurbs` change the cards. ## Out of scope - A live scrape of a forum, a shop, or a social site in the checks. - A paid book API in the checks. - A claim of official sales rank. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Search and listing - The sample corpus is `fixtures/mentions-sample.json`. A search for `river` returns the documented list, in the sort order in the file (usually count descending). - An empty query lists the top N (20) by count. A query with no hit shows an empty state. - A fetch hook fails if a live community or shop host is contacted. Accept when: the river list, the top-20, and the empty state match, and the hook stays quiet. ### R2. Frames and files - Goldens: the default shelf (top), the river search, a book card, and the tiny corpus. - One command runs the searches, the hook, and writes the frames. No network. Accept when: the command passes for both corpora, and the frames match the goldens. ### R3. 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. ### R4. Checks and report - One command runs every acceptance check at the defaults and at the person's inputs, including golden frames where a requirement asks for them. - Checks do not need a network, a paid API, or physical hardware. Accept when: the command passes at the defaults, and a deliberately broken fixture or a wrong price fails it. ## Verification Search and listing run over a fixture corpus and match documented result lists. A golden shelf page is checked. A fetch hook fails if a live community is scraped. No shop API and no network are required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to add a mention record, how quotes are handled, and how to run the checks.