# Breath guide ## What this builds A quiet guide for a breathing pattern. Phases are inhale, an optional hold, and exhale, driven by an injectable clock, or (in a later hook) a fixture breath signal. No microphone is required, and a hook fails if one is used in the checks. Golden frames are taken at inhale and exhale. This is a visual timer, not a medical device. Read `spekkr.inputs.json` first. `title` labels the guide. `inhale` and `exhale` are durations. `hold` adds a hold (2 seconds unless the settings say otherwise — use 2 as the default hold). `shape` is the drawing. The clock is injectable. ## Out of scope - A medical claim, a diagnosis, or a microphone-based coach in the checks. - Network or an account. - A live bio-sensor. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Phases - With inhale 4, hold on (2 s), exhale 6, a cycle is 12 seconds. At injected t = 0–4 the phase is inhale, 4–6 hold, 6–12 exhale, then it repeats. - The circle's (or bar's) scale is a documented function of the phase time, in `design.md`, within 1%. - A fixture breath-signal file may drive the phase instead; when used, the phase follows the file, not the clock. Accept when: the default cycle's phases and scale match at the listed instants, and the signal file drives the phase when provided. ### R2. Frames and files - Goldens at mid-inhale, mid-hold, mid-exhale, and the end of a cycle. - A hook fails if a microphone API is used. One command runs the phase table, the signal file, the hook, and writes the frames. No network. Accept when: the hook stays quiet, and the four 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 Phase timing is tested with a fake clock, and optionally with a fixture breath signal. No microphone is required or permitted in the checks. Golden inhale, hold, and exhale frames are taken. This is not a medical device. 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 start a cycle, how to pin the clock, and how to run the checks.