19d1efc5864aa774c1d8f0846aa39af253c55643
After each state-mutating dispatch, evaluate world.endings in priority
order (true > wrong > bad). The first whose whenFlags are all satisfied
sets state.endedWith and appends a kind:'ending' transcript line. Once
ended, further dispatches return a "story has ended" narration.
Also update test-world fixtures and placeholder ending markdown files
to use whenFlags: { _never: true } instead of {} so that vacuously-true
empty flags don't accidentally fire on every successful turn.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Halfstreet
A gothic text adventure. Second person, present tense, sparse — never explains.
Style anchors: Le Fanu's Carmilla, Shirley Jackson's The Haunting of Hill House, M.R. James's ghost stories.
Played at halfstreet.io.
Stack
- Astro static site
- TypeScript engine — pure (no DOM,
Date,Math.random, or console) - World content authored in markdown (rooms, items, encounters, endings) under
src/world/ - Vitest for tests
Development
npm install
npm test # engine + world tests
npm run dev # local dev server
npm run build # type-check + production build
Layout
src/engine/— parser, dispatcher, encounter logicsrc/ui/— terminal renderer, theme, chipssrc/world/— markdown content (rooms, items, encounters, endings)src/pages/index.astro— entry page
Design docs
docs/superpowers/specs/halfstreet-bible.md— content bible (canonical world)docs/superpowers/specs/2026-05-08-mystery-text-adventure-design.md— engine/UI architecturedocs/superpowers/specs/halfstreet-followon-notes.md— pending engine work before authoring more roomsdocs/superpowers/specs/2026-05-09-mystery-markdown-migration-design.md— markdown content migration designdocs/superpowers/plans/2026-05-09-mystery-markdown-migration.md— migration plan that was executed
License
GPL-3.0-or-later. See LICENSE.
Description
Languages
TypeScript
92.3%
CSS
4.5%
Astro
3.1%