# Durability scores ## What this builds A listing that scores products on durability, from a fixture set of reviews, not from a live shop or a trademarked review site. Aggregation is documented (a mean, a count, a band). Search and listing are tested. A golden product page is taken. The product does not use another publication's name in its id or its title. Read `spekkr.inputs.json` first. `title` labels the listing. `query` is the first search. `corpus` chooses the reviews. `breakdown` and `quotes` change the product page. ## Out of scope - A live shop, a trademarked review-aggregation name, or a scrape of either in the checks. - A paid API in the checks. - A legal warranty claim. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Aggregation and search - A product's score is the mean of its review scores, rounded to one decimal, and its count is the number of reviews, as in `fixtures/durability-scores.json`. - A search for `kettle` returns the documented list in the file's order. - A fetch hook fails if a known shop or review-host is contacted. Accept when: every listed product's mean and count match, the kettle search matches, and the hook stays quiet. ### R2. Frames and files - Goldens: the default listing, the kettle search, a product page, and a breakdown bar. - One command runs the aggregates, the search, 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 Score aggregation is tested on fixture reviews (mean, count, bands). Listing and search match documented lists. A golden product page is checked. A fetch hook fails if a live shop or review site is contacted. The product name does not use a trademarked review-site name. ## 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 review, how the mean is rounded, and how to run the checks.