# Anti-word ## What this builds A five-letter daily puzzle with an original word list. The secret is a word for that day. The aim is not to find it quickly, but to make as many valid guesses as possible without hitting the secret or being boxed in. A guess is coloured against the secret. The run ends when the person types the secret, or when no valid unused word remains that fits the hints. A share line is produced. This is not someone else's game, and the lists are original. Read `spekkr.inputs.json` first. `title` labels the grid. `day` selects the secret from the list. `list` chooses the dictionary. `hard` tightens later guesses. `keyboard` adds on-screen keys. ## Out of scope - Someone else's word list, or a trademarked name in the UI. - A live 'today' that cannot be pinned in tests. The fixture day is always injectable. - Network, accounts, or a public streak server in the checks. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Lists and colouring - Guesses must be in the chosen list, five letters, A–Z, case-insensitive, stored uppercase. - Colouring is the standard mark against the secret: exact position, present but wrong place, or absent, with double-letter rules in `design.md`. - The secret for a day is `list[(days since 2026-01-01) modulo list length]`. For the fixture day 2026-01-15 with `standard`, the secret is the word in `fixtures/day-2026-01-15.txt`. Accept when: colouring fixtures in `design.md` all hold, a word not in the list is refused, and the fixture day secret matches the file. ### R2. The anti-word aim - A guess that is the secret ends the run as a 'caught' result, with the number of guesses made. - A guess that is valid and not the secret is accepted, coloured, and added to the grid. - The run is a 'lasted' result when the remaining unused list has no word that is consistent with all hints so far (and with hard notes, if on). The score is the number of guesses made. Accept when: the fixture run in `design.md` lasts 11 guesses and then has no consistent unused word; typing the secret on guess 3 is a caught result of 3. ### R3. Share text - A finished run produces a five-line share card: title, day, result (`lasted 11` or `caught in 3`), and a row of colour marks per guess using the characters in `design.md`. - The exact fixture share text is `fixtures/share-2026-01-15.txt`. Accept when: the fixture run's share text matches the file byte for byte, including newlines. ### R4. Files - One command runs colouring, dictionary, fixture-day, and share-text tests, and writes the four screenshots. The clock is injected. No network. Accept when: the command passes for both lists and with `hard` on and off. ### R5. 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 Colouring and dictionary tests cover exact, present, absent, and double letters. A known puzzle day is a fixture, never wall-clock 'today'. A scripted run lasts the documented number of guesses, and its share text matches a file byte for byte. The word lists are original. 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 pin a day, and how to run the checks.