Permit city

A tiny city builder undercut by zoning, hearings and paperwork, with rule tests and a scripted city that reaches a known state.

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/permit-city
Version
0.2.2
Published by
nova
Updated
15 Nov 2026

Build this spec

Build the spec at https://spekkr.com/nova/permit-city/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?

Permit city: heroPermit city: loop

What can I customize?

Map The starting parcel layout.

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.

    Permit city

    What this builds

    A small-map city builder where almost nothing is built on the day you ask for it. Parcels have zones. A building needs a permit, and a permit can be delayed, denied, or (if the option is on) appealed. The joke is the paperwork, but the rules are strict and testable. The map, the buildings and the forms are original.

    Read spekkr.inputs.json first. city_name and budget start the game. map chooses the parcel file. hearings and appeals turn those rules on.

    Out of scope

    • A 3D city or a traffic microsimulation.
    • Network, multiplayer, or real-world GIS.
    • A real legal system. The rules are a game.

    Requirements

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

    R1. Zoning
    • Each parcel has a zone: house, shop, works, or park, or none.
    • A building type may only be requested on a parcel whose zone is in that type's list in design.md.
    • Rezoning is itself a permit of type rezone.

    Accept when: a house on a works parcel is refused, and a house on a house parcel is accepted as a request.

    R2. Permits and denials
    • A permit has a cost, a decision delay of 0 or 3 days if hearings is on and the type requires it, and a documented reason if denied.
    • Denial reasons are the codes in design.md (budget, zone, neighbour, hearing).
    • If appeals is on, a denied permit may be appealed once; an appeal costs 200 and is decided the next day, at a 50% chance from a seeded rng. Tests use a seed that produces a known yes and a known no.

    Accept when: the permit fixtures grant, delay and deny as in the table, and the seeded appeal cases match.

    R3. A scripted city
    • fixtures/millstead-script.json is a list of days and actions. Starting from the river map and budget 12000, it must end at the city state in fixtures/millstead-day-40.json (budget, buildings, open permits).
    • A golden map screenshot is taken at day 0, after zoning, at a hearing, and at day 40.

    Accept when: the ending state matches the file, and the four frames match the goldens.

    R4. Files
    • One command runs zoning, permit, appeal and script tests, and writes the screenshots. No network. Chance only where a seed is given.

    Accept when: the command passes on both maps, with hearings off (delays become 0) and on.

    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

    Rule tests cover zoning, permit grants, delays, denials and seeded appeals. A scripted city starting from the river map reaches the documented day-40 state. Four golden map screenshots are checked. No live GIS and 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 run the checks, and how to add a building type.
    # Permit city
    
    ## What this builds
    
    A small-map city builder where almost nothing is built on the day you ask
    for it. Parcels have zones. A building needs a permit, and a permit can be
    delayed, denied, or (if the option is on) appealed. The joke is the
    paperwork, but the rules are strict and testable. The map, the buildings
    and the forms are original.
    
    Read `spekkr.inputs.json` first. `city_name` and `budget` start the game.
    `map` chooses the parcel file. `hearings` and `appeals` turn those rules
    on.
    
    ## Out of scope
    
    - A 3D city or a traffic microsimulation.
    - Network, multiplayer, or real-world GIS.
    - A real legal system. The rules are a game.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. Zoning
    
    - Each parcel has a zone: `house`, `shop`, `works`, or `park`, or `none`.
    - A building type may only be requested on a parcel whose zone is in that
      type's list in `design.md`.
    - Rezoning is itself a permit of type `rezone`.
    
    Accept when: a house on a `works` parcel is refused, and a house on a
    `house` parcel is accepted as a request.
    
    ### R2. Permits and denials
    
    - A permit has a cost, a decision delay of 0 or 3 days if `hearings` is on
      and the type requires it, and a documented reason if denied.
    - Denial reasons are the codes in `design.md` (budget, zone, neighbour,
      hearing).
    - If `appeals` is on, a denied permit may be appealed once; an appeal
      costs 200 and is decided the next day, at a 50% chance from a seeded
      rng. Tests use a seed that produces a known yes and a known no.
    
    Accept when: the permit fixtures grant, delay and deny as in the table,
    and the seeded appeal cases match.
    
    ### R3. A scripted city
    
    - `fixtures/millstead-script.json` is a list of days and actions. Starting
      from the `river` map and budget 12000, it must end at the city state in
      `fixtures/millstead-day-40.json` (budget, buildings, open permits).
    - A golden map screenshot is taken at day 0, after zoning, at a hearing,
      and at day 40.
    
    Accept when: the ending state matches the file, and the four frames match
    the goldens.
    
    ### R4. Files
    
    - One command runs zoning, permit, appeal and script tests, and writes the
      screenshots. No network. Chance only where a seed is given.
    
    Accept when: the command passes on both maps, with hearings off (delays
    become 0) and on.
    
    ### 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
    
    Rule tests cover zoning, permit grants, delays, denials and seeded
    appeals. A scripted city starting from the river map reaches the
    documented day-40 state. Four golden map screenshots are checked. No live
    GIS and 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 run the checks, and how to add a
      building type.
    

    Open spec.md as plain text

  • design.md Zoning tables, permit fixtures and the scripted city.

    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.

    Building types and zones

    TypeAllowed zonesCostHearing if that option is on
    cottagehouse800no
    terracehouse1400no
    shopfrontshop2000yes
    millworks5000yes
    greenpark300no
    rezoneany400yes

    Denial codes: budget if the cost exceeds the current budget; zone if the parcel's zone is not allowed; neighbour if a mill shares an edge with a cottage; hearing if a hearing decides no (scripted or seeded).

    Appeal seeds

    Seed 4 on an appeal of a neighbour denial of a mill returns yes. Seed 5 returns no. These are fixed in fixtures/appeals.json.

    Scripted city

    The script and the day-40 state are files. Tests compare the whole state, not a summary.

    Screenshot tolerance

    8 levels, 98% of pixels.

    Inputs

    KeyLabelDefaultNotes
    city_nameCity nameMillsteadShown on the map and on forms.
    budgetStarting budget12000A whole number of pounds, from 1000 to 99999.
    hearingsRequire hearingsonSome permits need a hearing delay before they are decided.
    appealsAllow appealsonA denied permit may be appealed once.
    mapMapriverThe starting parcel layout.

    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/appeals.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    fixtures/millstead-day-40.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    fixtures/millstead-script.jsonA shipped fixture. The build may move it, but then design.md must name the new path.
    spekkr.inputs.jsonA 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.

    FileWhat it shows
    shots/city.pngMillstead from above, a Thursday hearing on lot C2, budget 12 000.

    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. Rule tests cover zoning, permit grants, delays, denials and seeded appeals. A scripted city starting from the river map reaches the documented day-40 state. Four golden map screenshots are checked. No live GIS and no network.
    # 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.
    
    ## Building types and zones
    
    | Type | Allowed zones | Cost | Hearing if that option is on |
    | --- | --- | --- | --- |
    | cottage | house | 800 | no |
    | terrace | house | 1400 | no |
    | shopfront | shop | 2000 | yes |
    | mill | works | 5000 | yes |
    | green | park | 300 | no |
    | rezone | any | 400 | yes |
    
    Denial codes: `budget` if the cost exceeds the current budget; `zone` if
    the parcel's zone is not allowed; `neighbour` if a `mill` shares an edge
    with a `cottage`; `hearing` if a hearing decides no (scripted or seeded).
    
    ## Appeal seeds
    
    Seed 4 on an appeal of a `neighbour` denial of a mill returns yes. Seed 5
    returns no. These are fixed in `fixtures/appeals.json`.
    
    ## Scripted city
    
    The script and the day-40 state are files. Tests compare the whole state,
    not a summary.
    
    ## Screenshot tolerance
    
    8 levels, 98% of pixels.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `city_name` | City name | Millstead | Shown on the map and on forms. |
    | `budget` | Starting budget | 12000 | A whole number of pounds, from 1000 to 99999. |
    | `hearings` | Require hearings | on | Some permits need a hearing delay before they are decided. |
    | `appeals` | Allow appeals | on | A denied permit may be appealed once. |
    | `map` | Map | river | The starting parcel layout. |
    
    ## 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/appeals.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `fixtures/millstead-day-40.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. |
    | `fixtures/millstead-script.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/city.png` | Millstead from above, a Thursday hearing on lot C2, budget 12 000. |
    
    
    ## 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. Rule tests cover zoning, permit grants, delays, denials and seeded
    appeals. A scripted city starting from the river map reaches the
    documented day-40 state. Four golden map screenshots are checked. No live
    GIS and no network.
    

    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. Zoning (R1). Build what R1. Zoning asks for, to the numbers in design.md. In particular: Each parcel has a zone: house, shop, works, or park, or none. Check: the R1. Zoning acceptance checks pass.
    3. Permits and denials (R2). Build what R2. Permits and denials asks for, to the numbers in design.md. In particular: A permit has a cost, a decision delay of 0 or 3 days if hearings is on and the type requires it, and a documented reason if denied. Check: the R2. Permits and denials acceptance checks pass.
    4. A scripted city (R3). Build what R3. A scripted city asks for, to the numbers in design.md. In particular: fixtures/millstead-script.json is a list of days and actions. Starting from the river map and budget 12000, it must end at the city state in fixtures/millstead-day-40.json (budget, buildings, open permits). Check: the R3. A scripted city acceptance checks pass.
    5. Files (R4). Build what R4. Files asks for, to the numbers in design.md. In particular: One command runs zoning, permit, appeal and script tests, and writes the screenshots. No network. Chance only where a seed is given. Check: the R4. Files acceptance checks pass.
    6. Inputs (R5). Build what R5. 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 R5. Inputs 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. **Zoning (R1).** Build what `R1. Zoning` asks for, to the numbers in
    `design.md`. In particular: Each parcel has a zone: `house`, `shop`,
    `works`, or `park`, or `none`.
       Check: the `R1. Zoning` acceptance checks pass.
    
    3. **Permits and denials (R2).** Build what `R2. Permits and denials` asks
    for, to the numbers in `design.md`. In particular: A permit has a cost, a
    decision delay of 0 or 3 days if `hearings` is on and the type requires
    it, and a documented reason if denied.
       Check: the `R2. Permits and denials` acceptance checks pass.
    
    4. **A scripted city (R3).** Build what `R3. A scripted city` asks for, to
    the numbers in `design.md`. In particular:
    `fixtures/millstead-script.json` is a list of days and actions. Starting
    from the `river` map and budget 12000, it must end at the city state in
    `fixtures/millstead-day-40.json` (budget, buildings, open permits).
       Check: the `R3. A scripted city` acceptance checks pass.
    
    5. **Files (R4).** Build what `R4. Files` asks for, to the numbers in
    `design.md`. In particular: One command runs zoning, permit, appeal and
    script tests, and writes the screenshots. No network. Chance only where a
    seed is given.
       Check: the `R4. Files` acceptance checks pass.
    
    6. **Inputs (R5).** Build what `R5. 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 `R5. Inputs` 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/Fraunces.ttf Fraunces variable typeface for the reference preview.
  • reference/fonts/Fraunces-Italic.ttf Fraunces 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 install a tool that compares screenshots

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.