Password rules

A form that keeps adding absurd password rules until the player is inventing a tiny universe to satisfy them.

This is a browser game spec on Spekkr, published by nova. 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
nova/password-rules
Version
0.2.2
Published by
nova
Updated
15 Nov 2026

Build this spec

Build the spec at https://spekkr.com/nova/password-rules/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 nova.

What does the result look like?

Password rules: heroPassword rules: almostPassword rules: startPassword rules: loop

What can I customize?

Rule script standard has 16 rules. short stops at 8, for a quicker path.

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.md Requirements and acceptance checks.

    Password rules

    What this builds

    A single field and a list of rules. The first few rules are ordinary (a minimum length, a digit, a capital). Each time the current set is satisfied, a new, stranger rule is revealed. Later rules refer to earlier ones, to the text itself, and to small facts (a Roman numeral that equals the count of vowels, a chess move in algebraic notation, a moon phase emoji). This is an original rule script, not someone else's puzzle with the serial numbers filed off.

    Read spekkr.inputs.json first. title labels the page. start_rules is how many rules are visible at first. script chooses the long or short set. show_why and timer change the chrome.

    Out of scope

    • A real account or sign-up. Nothing is stored.
    • Network calls to look up facts. Every fact a rule needs is in design.md.
    • A public share of solutions.

    Requirements

    Each requirement has an id. Checks name the id they cover.

    R1. The field
    • One password field, a submit control, and a list of the rules that have been revealed so far.
    • Submit is allowed only as a way to re-check; checking also happens as the person types, on every change.
    • title is the heading. The current value is never logged or sent anywhere.

    Accept when: the page loads with an empty field and only start_rules rules visible.

    R2. Each rule
    • Every rule has an id, a short statement, and a pure function of the current text (and, where design.md says so, of the current date used as a fixture).
    • A rule is either satisfied or not. There is no third state.
    • The functions and their fixtures live in code and are listed in design.md.

    Accept when: unit tests for each rule pass against the examples in design.md, including at least one yes and one no for every rule.

    R3. Revealing the next rule
    • A rule past the opening set is revealed only when every currently visible rule is satisfied.
    • Revealing does not hide earlier rules. A later edit may break an earlier rule; the later ones stay visible and go red.
    • The game is won when every rule in the chosen script is visible and satisfied.

    Accept when: a fixture string that satisfies a known prefix of rules is accepted up to that prefix, and is rejected by the next rule, as in the table in design.md.

    R4. Messages
    • If show_why is on, an unsatisfied visible rule includes its short statement and, after a failed check, a one-line reason from design.md.
    • If timer is on, the elapsed time is shown, starting at the first keystroke, pausing when the window is hidden, and stopping at a win.

    Accept when: the prefix fixture shows reasons only for the unsatisfied next rule, and the timer stays at 0 until a first keystroke.

    R5. Files
    • One command runs every unit test and a short UI test of the prefix fixture, and writes the screenshots in design.md.

    Accept when: the command passes for both scripts, and for start_rules of 1 and of 5.

    Verification

    Unit tests cover each rule with at least one string that passes and one that fails. A checked fixture file satisfies a known prefix of rules and is rejected by the next. A second fixture satisfies the whole script. No rule reads the real date, the real moon, or the network. UI tests take the four screenshots.

    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 run the checks, and how to add a rule.
    # Password rules
    
    ## What this builds
    
    A single field and a list of rules. The first few rules are ordinary (a
    minimum length, a digit, a capital). Each time the current set is
    satisfied, a new, stranger rule is revealed. Later rules refer to earlier
    ones, to the text itself, and to small facts (a Roman numeral that equals
    the count of vowels, a chess move in algebraic notation, a moon phase
    emoji). This is an original rule script, not someone else's puzzle with
    the serial numbers filed off.
    
    Read `spekkr.inputs.json` first. `title` labels the page. `start_rules` is
    how many rules are visible at first. `script` chooses the long or short
    set. `show_why` and `timer` change the chrome.
    
    ## Out of scope
    
    - A real account or sign-up. Nothing is stored.
    - Network calls to look up facts. Every fact a rule needs is in
      `design.md`.
    - A public share of solutions.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. The field
    
    - One password field, a submit control, and a list of the rules that have
      been revealed so far.
    - Submit is allowed only as a way to re-check; checking also happens as
      the person types, on every change.
    - `title` is the heading. The current value is never logged or sent
      anywhere.
    
    Accept when: the page loads with an empty field and only `start_rules`
    rules visible.
    
    ### R2. Each rule
    
    - Every rule has an id, a short statement, and a pure function of the
      current text (and, where `design.md` says so, of the current date used
      as a fixture).
    - A rule is either satisfied or not. There is no third state.
    - The functions and their fixtures live in code and are listed in
      `design.md`.
    
    Accept when: unit tests for each rule pass against the examples in
    `design.md`, including at least one yes and one no for every rule.
    
    ### R3. Revealing the next rule
    
    - A rule past the opening set is revealed only when every currently
      visible rule is satisfied.
    - Revealing does not hide earlier rules. A later edit may break an earlier
      rule; the later ones stay visible and go red.
    - The game is won when every rule in the chosen script is visible and
      satisfied.
    
    Accept when: a fixture string that satisfies a known prefix of rules is
    accepted up to that prefix, and is rejected by the next rule, as in the
    table in `design.md`.
    
    ### R4. Messages
    
    - If `show_why` is on, an unsatisfied visible rule includes its short
      statement and, after a failed check, a one-line reason from `design.md`.
    - If `timer` is on, the elapsed time is shown, starting at the first
      keystroke, pausing when the window is hidden, and stopping at a win.
    
    Accept when: the prefix fixture shows reasons only for the unsatisfied
    next rule, and the timer stays at 0 until a first keystroke.
    
    ### R5. Files
    
    - One command runs every unit test and a short UI test of the prefix
      fixture, and writes the screenshots in `design.md`.
    
    Accept when: the command passes for both scripts, and for `start_rules` of
    1 and of 5.
    
    ## Verification
    
    Unit tests cover each rule with at least one string that passes and one
    that fails. A checked fixture file satisfies a known prefix of rules and
    is rejected by the next. A second fixture satisfies the whole script. No
    rule reads the real date, the real moon, or the network. UI tests take the
    four screenshots.
    
    ## 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 run the checks, and how to add a rule.
    

    Open spec.md as plain text

  • design.md The rule script, the prefix fixtures and the screenshot points.

    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.

    The standard script

    Sixteen rules, in this order. short is the first eight.

    #IdStatementSatisfied when
    1lengthAt least 8 characterslen(text) >= 8
    2digitA digitany 0-9
    3capitalAn uppercase letterany A-Z
    4romanA Roman numerala substring in the set in the Roman table, case-insensitive
    5vowel-countThe Roman numeral equals the number of vowelsvowels are aeiouAEIOU; the last Roman token in the text equals that count
    6monthA month name or abbreviationa token in the month table
    7chessA legal pawn move in algebraic notationa token matching ^[a-h][2-7]$ or a capture ^[a-h]x[a-h][2-7]$
    8moonA moon-phase characterone of ๐ŸŒ‘๐ŸŒ’๐ŸŒ“๐ŸŒ”๐ŸŒ•๐ŸŒ–๐ŸŒ—๐ŸŒ˜
    9prime-lengthThe length is prime11, 13, 17, 19, 23, 29, 31
    10no-repeat-3No character appears three times in a rowno run of length 3+
    11balancedParentheses are balanced() only; no leftover
    12colourA CSS hex colour# plus 3 or 6 hex digits
    13sum-digitsThe digits sum to 25decimal digits only
    14weekdayAn English weekdayMondayโ€ฆSunday or a 3-letter abbreviation, any case
    15anagramContains an anagram of RULEfour letters that sort to ELRU, any case, not necessarily consecutive
    16periodEnds with a periodlast character is .

    Roman tokens recognised: I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XVIII, XIX, XX.

    Month table: Januaryโ€“December and Janโ€“Dec, any case.

    Prefix fixtures

    The exact strings live in fixtures/prefix-8.txt and fixtures/prefix-8-plus.txt next to the tests. Tests must read those files, not a re-typed copy.

    • prefix-8.txt satisfies rules 1โ€“8 and fails rule 9 (prime-length).
    • prefix-8-plus.txt satisfies rules 1โ€“16.

    A setup test fails if either file is missing, and a check test fails if a file no longer has the claimed properties.

    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.

    FileWhat it shows
    shots/form.pngThe default form mid-invention: a tree is still required.

    Dates

    Rules that could depend on "today" must not. The moon rule is a character in the text, not the real moon. No rule reads the system clock, except the optional timer.

    Inputs

    KeyLabelDefaultNotes
    titleTitlePlease choose a passwordShown above the field.
    start_rulesRules at the start3A whole number from 1 to 5. How many rules are visible before the first success.
    show_whyExplain failed rulesonA failed rule says what it wanted.
    timerCount the timeoffA clock starts on the first keystroke and stops when the last rule is satisfied.
    scriptRule scriptstandardstandard has 16 rules. short stops at 8, for a quicker path.

    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.

    FixtureRole
    design.mdA shipped fixture. The build may move it, but then design.md must name the new path.
    fixtures/prefix-8-plus.txtA shipped fixture. The build may move it, but then design.md must name the new path.
    fixtures/prefix-8.txtA shipped fixture. The build may move it, but then design.md must name the new path.
    prefix-8-plus.txtA shipped fixture. The build may move it, but then design.md must name the new path.
    prefix-8.txtA 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.

    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. Unit tests cover each rule with at least one string that passes and one that fails. A checked fixture file satisfies a known prefix of rules and is rejected by the next. A second fixture satisfies the whole script. No rule reads the real date, the real moon, or the network. UI tests take the four screenshots.
    # 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.
    
    ## The standard script
    
    Sixteen rules, in this order. `short` is the first eight.
    
    | # | Id | Statement | Satisfied when |
    | --- | --- | --- | --- |
    | 1 | `length` | At least 8 characters | `len(text) >= 8` |
    | 2 | `digit` | A digit | any `0-9` |
    | 3 | `capital` | An uppercase letter | any `A-Z` |
    | 4 | `roman` | A Roman numeral | a substring in the set in the Roman table, case-insensitive |
    | 5 | `vowel-count` | The Roman numeral equals the number of vowels | vowels are `aeiouAEIOU`; the last Roman token in the text equals that count |
    | 6 | `month` | A month name or abbreviation | a token in the month table |
    | 7 | `chess` | A legal pawn move in algebraic notation | a token matching `^[a-h][2-7]$` or a capture `^[a-h]x[a-h][2-7]$` |
    | 8 | `moon` | A moon-phase character | one of `๐ŸŒ‘๐ŸŒ’๐ŸŒ“๐ŸŒ”๐ŸŒ•๐ŸŒ–๐ŸŒ—๐ŸŒ˜` |
    | 9 | `prime-length` | The length is prime | 11, 13, 17, 19, 23, 29, 31 |
    | 10 | `no-repeat-3` | No character appears three times in a row | no run of length 3+ |
    | 11 | `balanced` | Parentheses are balanced | `()` only; no leftover |
    | 12 | `colour` | A CSS hex colour | `#` plus 3 or 6 hex digits |
    | 13 | `sum-digits` | The digits sum to 25 | decimal digits only |
    | 14 | `weekday` | An English weekday | `Monday`โ€ฆ`Sunday` or a 3-letter abbreviation, any case |
    | 15 | `anagram` | Contains an anagram of `RULE` | four letters that sort to `ELRU`, any case, not necessarily consecutive |
    | 16 | `period` | Ends with a period | last character is `.` |
    
    Roman tokens recognised: I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII,
    XIII, XIV, XV, XVI, XVII, XVIII, XIX, XX.
    
    Month table: Januaryโ€“December and Janโ€“Dec, any case.
    
    ## Prefix fixtures
    
    The exact strings live in `fixtures/prefix-8.txt` and
    `fixtures/prefix-8-plus.txt` next to the tests. Tests must read those
    files, not a re-typed copy.
    
    - `prefix-8.txt` satisfies rules 1โ€“8 and fails rule 9 (`prime-length`).
    - `prefix-8-plus.txt` satisfies rules 1โ€“16.
    
    A setup test fails if either file is missing, and a check test fails if a
    file no longer has the claimed properties.
    
    ## 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/form.png` | The default form mid-invention: a tree is still required. |
    
    ## Dates
    
    Rules that could depend on "today" must not. The moon rule is a character
    in the text, not the real moon. No rule reads the system clock, except the
    optional `timer`.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `title` | Title | Please choose a password | Shown above the field. |
    | `start_rules` | Rules at the start | 3 | A whole number from 1 to 5. How many rules are visible before the first success. |
    | `show_why` | Explain failed rules | on | A failed rule says what it wanted. |
    | `timer` | Count the time | off | A clock starts on the first keystroke and stops when the last rule is satisfied. |
    | `script` | Rule script | standard | standard has 16 rules. short stops at 8, for a quicker path. |
    
    ## 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 |
    | --- | --- |
    | `design.md` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `fixtures/prefix-8-plus.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `fixtures/prefix-8.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `prefix-8-plus.txt` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `prefix-8.txt` | 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.
    
    ## 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. Unit tests cover each rule with at least one string that passes and one
    that fails. A checked fixture file satisfies a known prefix of rules and
    is rejected by the next. A second fixture satisfies the whole script. No
    rule reads the real date, the real moon, or the network. UI tests take the
    four screenshots.
    

    Open design.md as plain text

  • tasks.md Build tasks in order, each with a check.

    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. The field (R1). Build what R1. The field asks for, to the numbers in design.md. In particular: One password field, a submit control, and a list of the rules that have been revealed so far. Check: the R1. The field acceptance checks pass.
    3. Each rule (R2). Build what R2. Each rule asks for, to the numbers in design.md. In particular: Every rule has an id, a short statement, and a pure function of the current text (and, where design.md says so, of the current date used as a fixture). Check: the R2. Each rule acceptance checks pass.
    4. Revealing the next rule (R3). Build what R3. Revealing the next rule asks for, to the numbers in design.md. In particular: A rule past the opening set is revealed only when every currently visible rule is satisfied. Check: the R3. Revealing the next rule acceptance checks pass.
    5. Messages (R4). Build what R4. Messages asks for, to the numbers in design.md. In particular: If show_why is on, an unsatisfied visible rule includes its short statement and, after a failed check, a one-line reason from design.md. Check: the R4. Messages acceptance checks pass.
    6. Files (R5). Build what R5. Files asks for, to the numbers in design.md. In particular: One command runs every unit test and a short UI test of the prefix fixture, and writes the screenshots in design.md. Check: the R5. Files acceptance checks pass.
    7. 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.
    8. 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.
    # 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. **The field (R1).** Build what `R1. The field` asks for, to the numbers
    in `design.md`. In particular: One password field, a submit control, and a
    list of the rules that have been revealed so far.
       Check: the `R1. The field` acceptance checks pass.
    
    3. **Each rule (R2).** Build what `R2. Each rule` asks for, to the numbers
    in `design.md`. In particular: Every rule has an id, a short statement,
    and a pure function of the current text (and, where `design.md` says so,
    of the current date used as a fixture).
       Check: the `R2. Each rule` acceptance checks pass.
    
    4. **Revealing the next rule (R3).** Build what `R3. Revealing the next
    rule` asks for, to the numbers in `design.md`. In particular: A rule past
    the opening set is revealed only when every currently visible rule is
    satisfied.
       Check: the `R3. Revealing the next rule` acceptance checks pass.
    
    5. **Messages (R4).** Build what `R4. Messages` asks for, to the numbers
    in `design.md`. In particular: If `show_why` is on, an unsatisfied visible
    rule includes its short statement and, after a failed check, a one-line
    reason from `design.md`.
       Check: the `R4. Messages` acceptance checks pass.
    
    6. **Files (R5).** Build what `R5. Files` asks for, to the numbers in
    `design.md`. In particular: One command runs every unit test and a short
    UI test of the prefix fixture, and writes the screenshots in `design.md`.
       Check: the `R5. Files` acceptance checks pass.
    
    7. **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.
    
    8. **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.
    

    Open tasks.md as plain text

  • reference/preview.html A 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.css Webfont faces for the reference preview.
  • reference/fonts/Geist.ttf Geist variable typeface for the reference preview.
  • reference/fonts/GeistMono.ttf Geist Mono variable typeface for the reference preview.
  • reference/fonts/Newsreader.ttf Newsreader variable typeface for the reference preview.
  • reference/fonts/Newsreader-Italic.ttf Newsreader italic variable typeface for the reference preview.

Is it for me?

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.114 Nov 2026Add animated loop to the listing shots.
  • 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.