Skip to content

Letters: families in the homes thank the mayor - #39

Merged
Sagyam merged 1 commit into
mainfrom
claude/letters
Nov 7, 2026
Merged

Sagyam merged 1 commit into
mainfrom
claude/letters

Conversation

@Sagyam

@Sagyam Sagyam commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Thank-you letters from the roadmap's Residents idea. Families leaving neglected homes is still on the roadmap.

Who writes, and when

Each finished home (cottage or apartment) has a family. A house called "The Hart house" is the Harts. Other homes get a surname from the new names/families.txt, by lot index. The file is append-only, so a family never changes.

Letters are folded from the ledger like everything else:

Event Writer
Street upgraded A family on that street, else one of the 3 nearest
Building whole again (bought, kit, or session repairs) Its own family, else one of the nearest
Park decoration One of the nearest families
Public building opens (water, power, school, clinic, …) One of the nearest families
Set finished A family on the street, else one of the nearest

They pay nothing, and reading is never rewarded (the one rule). The wording lives in letters.rs. Public buildings are named as nouns ("the new school"), and later levels' water and power get a second wording.

App

  • An envelope in the menu, with a brand-coloured dot for unread letters. What was read is a per-window note in localStorage, like the theme. A first run starts with nothing unread rather than a backlog.
  • The Letters panel lists letters newest first, each signed by the family and their address, with "See it" opening the building's deed.
  • A story line, "A letter from the … family", when one arrives while the app is open.
  • The mock writes simpler letters for the same events.

Checks

  • cargo test (140 in the daemon, incl. families_write_to_thank_the_mayor and the letters unit tests), cargo clippy --all-targets and cargo fmt are clean.
  • bun test (47) and tsc pass.
  • Printed the letters a 20-day ledger folds to check the wording; screenshot of the panel on ?mock=city.
  • Not run on the real daemon; there's a host check for it in the roadmap.

🤖 Generated with Claude Code

- letters.rs: a family per home (from "The Hart house", else names/families.txt
  by lot) and the wordings, per thing thanked for.
- world.rs: letters folded from the ledger for a street upgrade, a building
  made whole, a park decoration, a public building opening and a finished
  set; from a family on the street, else one of the three nearest.
- World.letters in proto (last 30).
- App: an envelope in the menu with an unread dot, a Letters panel with a
  link to each building's deed, and a story line when one arrives. What was
  read stays in localStorage; a first run starts with nothing unread.
  The mock writes simpler letters for the same events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sagyam
Sagyam merged commit 45c76f4 into main Nov 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant