Commit Graph

32 Commits

Author SHA1 Message Date
ejlewis 52fb869976 feat(mystery): add altered rooms and drunk sequence 2026-05-12 20:22:20 -05:00
ejlewis 0755213d6a feat(ui): add confirmations and terminal motion
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-12 19:44:18 -05:00
ejlewis cc98aa180b feat(world): expand Halfstreet content slices
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-12 14:48:19 -05:00
ejlewis 26dd91947f feat: add kitchen and glitchtip wiring
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-10 12:03:12 -05:00
ejlewis 4d9077d586 feat(world): add light timer and indicator
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-10 10:17:42 -05:00
ejlewis d56c0c8363 Implement match interactions and wait chip
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-10 07:56:31 -05:00
ejlewis 83e4877852 feat(content): add upper floor slice 2026-05-10 07:34:51 -05:00
ejlewis daa5e9d655 fix(ui): polish terminal options and assets
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-10 07:00:22 -05:00
ejlewis 33933b00d7 fix(mystery): improve mobile terminal and chips
ci/woodpecker/push/woodpecker Pipeline was successful
2026-05-10 05:53:32 -05:00
ejlewis 2a9b6155ef feat(mystery): add opening and main-floor content 2026-05-09 21:51:12 -05:00
ejlewis e46b2359c0 docs(mystery): Phase 2 content-rewrite roadmap
Workflow guide for authoring the bible into markdown now that engine
prereqs have shipped. Suggests slicing by region rather than by kind so
each PR produces a playable surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 15:11:06 -05:00
ejlewis 19d1efc586 feat(engine): detect endings on every successful turn
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>
2026-05-09 14:53:07 -05:00
ejlewis 2fecc7878d feat(world): annotate lamp/matches/letter for read/light/extinguish
Adds the new schema flags and per-state body sections so the dispatcher's
new verb handlers have content to narrate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:12:10 -05:00
ejlewis ee3cfcc00d feat(world): parseItem extracts optional ## read / lit / extinguished / lighter-empty sections
Existing items with no body sections continue to load unchanged. New items
can author per-state prose in dedicated sections; the dispatcher will read
these in subsequent commits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:08:33 -05:00
ejlewis df50afa479 feat(world): item schema — readable, lightable, lighter, lighterUses
Optional fields used by the new read/light/extinguish dispatcher branches.
Loader updates and dispatcher logic follow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:01:31 -05:00
ejlewis 1f472402fd fix(mystery): code-review followups (locked-exit, endings, headers)
- Validate lockedExits[*].requires resolves to a known item or flag
- Throw if any of true/wrong/bad ending markdown files are missing
- Detect malformed ## headers (spaces, dots, etc.) and throw a clear
  error rather than silently dropping the section

Tests: 86 passing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 11:12:26 -05:00
ejlewis 4b8ebafe6f fix(mystery): swap gray-matter for yaml package (browser-safe)
gray-matter eagerly loads Node's Buffer API path even when only
matter(rawString) is called, crashing browser bundles. Replace it with
an inline frontmatter parser backed by the browser-safe yaml package.
All 84 mystery tests pass; build is clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:52:21 -05:00
ejlewis 20619cec09 chore(mystery): commit minimal Obsidian vault config; ignore workspace cache 2026-05-09 09:43:53 -05:00
ejlewis 506e36b801 refactor(mystery): remove story.ts; endings live in markdown 2026-05-09 09:36:28 -05:00
ejlewis 1b992642ec feat(mystery): encounters.ts uses narration() helper for prose 2026-05-09 09:35:41 -05:00
ejlewis c0c1a7e930 feat(mystery): assemble World from markdown via import.meta.glob
Rooms, items, and endings now come from .md files under world/{rooms,items,endings}/.
Encounters still come from encounters.ts (Tasks 11–12 will complete that leg).
Cross-reference validation at module init ensures exits, item refs, and encounter
refs are all consistent. Deletes rooms.ts, items.ts, roundtrip.test.ts, and the
one-shot migration script (whose output is already committed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:34:27 -05:00
ejlewis 0523158e61 test(mystery): round-trip verification of migrated markdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:27:39 -05:00
ejlewis bbea3f4473 feat(mystery): migration script and produced markdown content
Adds scripts/migrate-mystery-content.ts which reads rooms, items,
encounters, and endings from TypeScript source and emits byte-identical
markdown files under src/mystery/world/{rooms,items,encounters,endings}/.
Installs tsx as a devDep to support .ts imports across src/ during the
one-shot run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:26:02 -05:00
ejlewis d3a2f4e1d7 feat(mystery): narration() helper and encounter narration registry
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:23:37 -05:00
ejlewis bf8a693949 feat(mystery): parseEncounterNarration — phase and transition prose
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:21:29 -05:00
ejlewis e60844a937 feat(mystery): parseEnding — markdown to typed Ending
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:17:11 -05:00
ejlewis e108ca16e0 feat(mystery): parseItem — markdown to typed Item
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:13:51 -05:00
ejlewis cf257c040a fix(mystery): handle aliased wikilinks; symmetric locked-exit validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:09:38 -05:00
ejlewis 5f3356ffb5 feat(mystery): parseRoom — markdown to typed Room
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 09:00:35 -05:00
ejlewis da7b6fac83 feat(mystery): add Zod schemas for markdown frontmatter
Defines runtime validation schemas (roomFrontmatterSchema,
itemFrontmatterSchema, endingFrontmatterSchema, encounterFrontmatterSchema)
and their inferred TypeScript types. All 8 TDD tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 08:56:44 -05:00
ejlewis d8c9b44058 feat(mystery): sample 3-room world for engine validation 2026-05-08 23:26:45 -05:00
ejlewis 7ee5cf96f6 feat(mystery): define engine and world type contracts 2026-05-08 22:31:36 -05:00