Type the novel
A typing trainer on a bundled public-domain book: a fixture passage scores keystrokes and WPM, and the book loads offline.
This is a small site spec on Spekkr, published by lume. It is listed with the other specs. Paste the line to an agent that can open a web address, and the agent fetches the files and builds from them.
- Spec
lume/type-the-novel- Version
- 0.2.2
- Published by
- lume
- Updated
- 15 Nov 2026
Build this spec
Build the spec at https://spekkr.com/lume/type-the-novel/start.md.
Paste this to your AI agent. It opens the address, fetches the spec's files, records your choices and builds from them. Nothing to install, no account.
Published by lume.
What does the result look like?
What can I customize?
Your choices go into the line you copy. Anything else is yours to edit, but it leaves the tested path.
What do I get?
-
spec.mdRequirements and acceptance checks.Type the novel
What this builds
A trainer that asks you to type a passage from a bundled public-domain book. Correct and incorrect keystrokes are tracked, and a words-per-minute figure is computed from an injectable clock. A fixture passage has a documented score. The book files are shipped; a test fails if the loader needs a network. Rights are listed in a licence file.
Read
spekkr.inputs.jsonfirst.titlelabels the page.bookchooses a bundled id.passageis the length.soundsandcaretchange the chrome. The clock is injectable.Out of scope
- A copyrighted novel, or a live bookstore.
- A network fetch of a book in the checks.
- A secretarial certification.
Requirements
Each requirement has an id. Checks name the id they cover.
R1. Loading a book
- Each bundled book is a text file and a licence note. The default excerpt loads without a network, and a hook fails if a fetch is attempted.
- A missing book id is refused with a message that names it.
Accept when: the default book loads, a bad id is refused, and the hook stays quiet.
R2. Scoring
- The fixture tape
fixtures/type-run.jsontypes the short passage of the default book, with listed mistakes, on an injected clock. - Correct and incorrect keystroke counts, and WPM, match the file. WPM is (correct words / minutes), with a word as five characters, as in the file.
- A backspace un-types the last character and can correct a mistake, as in a second tape.
Accept when: both tapes match the counts and WPM in their files.
R3. Frames and files
- Goldens: the start of the passage, a mid point, a visible error, and a result card.
- One command loads the book, runs the tapes, the hook, and writes the frames. No network.
Accept when: the command passes for both passage lengths, and the frames match the goldens.
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
A fixture passage tracks correct and incorrect keystrokes and a WPM figure against a file, using an injectable clock. A bundled public-domain book loads with no network; a fetch hook fails otherwise. Licence notes are shipped. Golden frames cover the run.
Definition of done
- Every acceptance check above runs from one command, and all pass at the person's inputs.
- A README says how to pick a book, how the books are licensed, and how to run the checks.
# Type the novel ## What this builds A trainer that asks you to type a passage from a bundled public-domain book. Correct and incorrect keystrokes are tracked, and a words-per-minute figure is computed from an injectable clock. A fixture passage has a documented score. The book files are shipped; a test fails if the loader needs a network. Rights are listed in a licence file. Read `spekkr.inputs.json` first. `title` labels the page. `book` chooses a bundled id. `passage` is the length. `sounds` and `caret` change the chrome. The clock is injectable. ## Out of scope - A copyrighted novel, or a live bookstore. - A network fetch of a book in the checks. - A secretarial certification. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Loading a book - Each bundled book is a text file and a licence note. The default excerpt loads without a network, and a hook fails if a fetch is attempted. - A missing book id is refused with a message that names it. Accept when: the default book loads, a bad id is refused, and the hook stays quiet. ### R2. Scoring - The fixture tape `fixtures/type-run.json` types the short passage of the default book, with listed mistakes, on an injected clock. - Correct and incorrect keystroke counts, and WPM, match the file. WPM is (correct words / minutes), with a word as five characters, as in the file. - A backspace un-types the last character and can correct a mistake, as in a second tape. Accept when: both tapes match the counts and WPM in their files. ### R3. Frames and files - Goldens: the start of the passage, a mid point, a visible error, and a result card. - One command loads the book, runs the tapes, the hook, and writes the frames. No network. Accept when: the command passes for both passage lengths, and the frames match the goldens. ### 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 A fixture passage tracks correct and incorrect keystrokes and a WPM figure against a file, using an injectable clock. A bundled public-domain book loads with no network; a fetch hook fails otherwise. Licence notes are shipped. Golden frames cover the run. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to pick a book, how the books are licensed, and how to run the checks.
-
design.mdBundled books, keystroke tapes, and the WPM rule.Design
This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold.
WPM
A correct word is five correct characters (spaces count). Minutes are from the injected clock, from the first key to the last. The fixture files are the authority for the arithmetic.
Screenshot tolerance
8 levels, 98% of pixels.
Inputs
Key Label Default Notes titleTitle Type what you read Shown above the passage. bookDefault book mill-on-the-floss-excerpt An id from the bundled public-domain set. soundsKey sounds off Optional clicks. Tests may mock audio. caretShow a caret on A mark at the current character. passagePassage length short short is a fixture of a few paragraphs. chapter is a longer bundled slice. Acceptance at the defaults
The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins.
Fixture Role fixtures/type-run.jsonA shipped fixture. The build may move it, but then design.mdmust name the new path.spekkr.inputs.jsonA shipped fixture. The build may move it, but then design.mdmust name the new path.Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy.
Screenshots
These pictures are headless-Chrome captures of the working reference in
reference/preview.html, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel.File What it shows shots/passage.pngA Mill on the Floss excerpt mid-type, 42 WPM, 99% accuracy. How to verify
- Run the checks at the default inputs, without a network.
- Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file.
- Repeat once at the person's inputs when they differ from the defaults.
- A fixture passage tracks correct and incorrect keystrokes and a WPM figure against a file, using an injectable clock. A bundled public-domain book loads with no network; a fetch hook fails otherwise. Licence notes are shipped. Golden frames cover the run.
# Design This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold. ## WPM A correct word is five correct characters (spaces count). Minutes are from the injected clock, from the first key to the last. The fixture files are the authority for the arithmetic. ## Screenshot tolerance 8 levels, 98% of pixels. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | Type what you read | Shown above the passage. | | `book` | Default book | mill-on-the-floss-excerpt | An id from the bundled public-domain set. | | `sounds` | Key sounds | off | Optional clicks. Tests may mock audio. | | `caret` | Show a caret | on | A mark at the current character. | | `passage` | Passage length | short | short is a fixture of a few paragraphs. chapter is a longer bundled slice. | ## Acceptance at the defaults The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins. | Fixture | Role | | --- | --- | | `fixtures/type-run.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy. ## Screenshots These pictures are headless-Chrome captures of the working reference in `reference/preview.html`, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/passage.png` | A Mill on the Floss excerpt mid-type, 42 WPM, 99% accuracy. | ## How to verify 1. Run the checks at the default inputs, without a network. 2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file. 3. Repeat once at the person's inputs when they differ from the defaults. 4. A fixture passage tracks correct and incorrect keystrokes and a WPM figure against a file, using an injectable clock. A bundled public-domain book loads with no network; a fetch hook fails otherwise. Licence notes are shipped. Golden frames cover the run.
-
tasks.mdBuild tasks in order, each with a check.Tasks
Work in order. Finish a task's check before starting the next.
- Set up. Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read
spekkr.inputs.jsonfirst. Check: a blank or heading page loads, and an empty test run passes. - Loading a book (R1). Build what
R1. Loading a bookasks for, to the numbers indesign.md. In particular: Each bundled book is a text file and a licence note. The default excerpt loads without a network, and a hook fails if a fetch is attempted. Check: theR1. Loading a bookacceptance checks pass. - Scoring (R2). Build what
R2. Scoringasks for, to the numbers indesign.md. In particular: The fixture tapefixtures/type-run.jsontypes the short passage of the default book, with listed mistakes, on an injected clock. Check: theR2. Scoringacceptance checks pass. - Frames and files (R3). Build what
R3. Frames and filesasks for, to the numbers indesign.md. In particular: Goldens: the start of the passage, a mid point, a visible error, and a result card. Check: theR3. Frames and filesacceptance checks pass. - Inputs (R4). Build what
R4. Inputsasks for, to the numbers indesign.md. In particular: The build readsspekkr.inputs.json. Settings label the UI, options turn features on or off, and a swap must be one of its choices. Check: theR4. Inputsacceptance checks pass. - Goldens. Capture the frames named in
design.mdat the defaults, with motion frozen where the file says so. Compare them within the stated tolerance. Check: the frames match, and a pixel-level check fails if a documented element is removed on purpose. - Finish. Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in
spec.mdis true.
# Tasks Work in order. Finish a task's check before starting the next. 1. **Set up.** Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read `spekkr.inputs.json` first. Check: a blank or heading page loads, and an empty test run passes. 2. **Loading a book (R1).** Build what `R1. Loading a book` asks for, to the numbers in `design.md`. In particular: Each bundled book is a text file and a licence note. The default excerpt loads without a network, and a hook fails if a fetch is attempted. Check: the `R1. Loading a book` acceptance checks pass. 3. **Scoring (R2).** Build what `R2. Scoring` asks for, to the numbers in `design.md`. In particular: The fixture tape `fixtures/type-run.json` types the short passage of the default book, with listed mistakes, on an injected clock. Check: the `R2. Scoring` acceptance checks pass. 4. **Frames and files (R3).** Build what `R3. Frames and files` asks for, to the numbers in `design.md`. In particular: Goldens: the start of the passage, a mid point, a visible error, and a result card. Check: the `R3. Frames and files` acceptance checks pass. 5. **Inputs (R4).** Build what `R4. Inputs` asks for, to the numbers in `design.md`. In particular: 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. Check: the `R4. Inputs` acceptance checks pass. 6. **Goldens.** Capture the frames named in `design.md` at the defaults, with motion frozen where the file says so. Compare them within the stated tolerance. Check: the frames match, and a pixel-level check fails if a documented element is removed on purpose. 7. **Finish.** Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in `spec.md` is true.
- Set up. Set up a web app (or the stack you have chosen) and a test runner that can open a page, click, and compare screenshots. Read
-
reference/preview.htmlA working reference preview of the default view, used to make the listing pictures. A build does not have to start from this file. -
reference/fonts/fonts.cssWebfont faces for the reference preview. -
reference/fonts/Geist.ttfGeist variable typeface for the reference preview. -
reference/fonts/Newsreader.ttfNewsreader variable typeface for the reference preview. -
reference/fonts/Newsreader-Italic.ttfNewsreader italic variable typeface for the reference preview. -
reference/fonts/Fraunces.ttfFraunces variable typeface for the reference preview. -
reference/fonts/Fraunces-Italic.ttfFraunces italic variable typeface for the reference preview.
Is it for me?
- Kind
- small site
- Platforms
- web
- Tools
- TypeScript
What does it need?
- Agent permissions
- shell
- Commands it runs
install a test runner
What changed?
- 0.2.215 Nov 2026Names what it builds.
- 0.2.115 Nov 2026Fill the manuscript page with more of the chapter, a progress bar, and an animated loop.
- 0.2.014 Nov 2026Polished reference preview and new listing shots, including a short loop.
- 0.1.014 Nov 2026First version.
For agents: start.md says how to build this spec, spec.json holds everything on this page, and bundle.tar.gz holds its files.