Project Dungeo

Porting Mainframe Zork to the Sharpee Interactive Fiction Engine

December 27, 2025 - January 9, 2026 | 14 Days of Development
169 Rooms Complete 650/650 Points (100%) Published to npm 25+ Puzzles Working 61 Transcript Tests

Project Overview

Project Dungeo is an ambitious effort to port the complete Mainframe Zork (also known as "Dungeon") to Sharpee, a modern interactive fiction engine. The project is feature-complete with all 169 rooms, 33 treasures (650 points), and continues to expand puzzle mechanics and infrastructure improvements.

169
Rooms (100%)
33
Treasures (100%)
650
Max Score (100%)
7
NPCs Active
25+
Puzzles Working
61
Transcript Tests

Progress Meters

Rooms: 169 / 169

100%

Treasures: 650 / 650 points

100%

Core Puzzles: 25+ implemented

100%

What's New Since January 3

Key Accomplishments (Jan 4-9)

  • Stdlib Bug Fixes: Fixed critical dropping and drinking action mutations
  • World State Tests: Added golden tests to verify actual world mutations
  • 6 New Puzzles: Balloon, Coal Machine, Coffin Transport, Basket, Tiny Room, Rope
  • River Navigation: Boat mechanics with vehicle traits, Aragain Falls death
  • Robot Commands: TELL ROBOT TO X pattern implemented
  • 8 New ADRs: Grammar, scoring, events, transcript directives (085-092)
  • Region Consolidation: 6 regions consolidated into single files for cleaner architecture
  • 25 More Transcripts: From 36 to 61 test transcripts
๐Ÿ”ง

Critical Stdlib Fixes

World state verification discovered silent failures

The "dropping bug" revealed that stdlib actions could appear to work (emit events, show messages) while failing to actually mutate world state. This pattern was also found in the drinking action. Both are now fixed with comprehensive world state verification tests.

// New golden test pattern ensures actual mutations
expect(world.getLocation(ball.id)).toBe(room.id);  // Precondition
executeAction(droppingAction, context);
expect(world.getLocation(ball.id)).toBe(player.id); // CRITICAL - verify mutation

New Puzzles Implemented

Puzzle Mechanic Status
Balloon Flight Inflate/deflate, TIE wire to railing, daemon-controlled flight New Jan 4
Coal Machine PUT COAL IN MACHINE, TURN ON SWITCH creates diamond New Jan 5
Coffin Transport Gold coffin becomes takeable after dam drains reservoir New Jan 5
Basket Elevator LOWER/RAISE basket via capability dispatch pattern New Jan 5
Tiny Room/Pool Size-based access to tiny room via pool New Jan 5
Rope Puzzle TIE ROPE TO RAILING in Dome Room for descent New Jan 9
River Navigation Boat as vehicle, river entry blocked without boat New Jan 7
Dam Flooding Dam controls flood/drain reservoir over time New Jan 4

Robot NPC Commanding

๐Ÿค–

TELL ROBOT TO Command System

Natural language commands for robot NPC

Implemented comprehensive robot command system matching Mainframe Zork FORTRAN source:

> tell robot to follow
"Whirr, buzz, click!"

> robot, push button
The robot presses the button...
[Carousel mechanism activates]

> order robot to dance
"I am only a stupid robot and cannot perform that command."

Robot recognizes: FOLLOW, STAY, PUSH BUTTON, WALK, TAKE, DROP, PUT, THROW, TURN, LEAP

Architecture Decisions (ADRs 085-092)

ADR-085

Scoring System - Event-based scoring to solve handler collision

ADR-086

Event Handler Unification - Multiple handlers per event type

ADR-087

Action-Centric Grammar - .forAction() API for verb patterns

ADR-088

Grammar Engine Refactor - Cleaner pattern matching

ADR-089

Pronoun Identity System - IT/THEM/HIM/HER resolution

ADR-090

Entity-Centric Action Dispatch - Capability behaviors

ADR-091

Text Decorations - Styled text output support

ADR-092

Smart Transcript Directives - Enhanced test assertions

Total ADRs: 99 (92 in main documentation)

Development Timeline

January 3, 2026

Feature Complete - 650/650 Points!

Egg/Canary/Bauble puzzle. Mail Order system. All 33 treasures. 636 tests.

January 4, 2026

Balloon Puzzle & Scoring ADR

3-phase balloon implementation. Braided wire fix. ADR-085 scoring system. Dam flooding mechanics. Undo system. GDT KL command.

January 5, 2026

Advanced Puzzles & Grammar Fixes

Coal machine, coffin transport, basket elevator, tiny room puzzles. Grammar conflict resolution. ADR-087 action-centric grammar.

January 7, 2026

Critical Bug Fixes & Robot Commands

Dropping action fix (missing moveEntity). Robot COMMANDING action. River navigation with boat mechanics. Wave/rainbow puzzle fix. Stdlib test review analysis reveals drinking bug.

January 8, 2026

Stdlib Testing Initiative

Drinking action fix. World state verification tests (golden tests). stdlib-testing branch merged. 24 new mutation verification tests.

January 9, 2026

Region Consolidation & Rope Puzzle

6 regions consolidated into single files. Dome Room rope puzzle. Magic word system. Walkthrough chain fixes. 61 transcript tests.

Testing Infrastructure

๐Ÿงช

World State Verification

Golden tests ensure actions actually mutate state

After discovering the dropping/drinking bug pattern, we established "golden tests" that verify:

  • Precondition: Assert initial state before action
  • Execute: Run the action
  • Postcondition: Verify actual world state changed

Coverage: taking, dropping, putting, going, drinking, inserting, removing, entering, exiting

61
Transcript Files
208
Test Files
99
ADRs Total

Key Lessons Learned

Events Are Not Mutations

An action can emit perfect events with perfect messages while failing to change world state. Always verify both events AND actual mutations.

Capability Dispatch Pattern

ADR-090 established when to use capability dispatch (LOWER, RAISE, TURN) vs stdlib actions (TAKE, DROP, OPEN). Entity-specific behaviors implement 4-phase pattern.

Region Consolidation

Single-file regions are easier to maintain than scattered room/object files. Index.ts exports all creators and handles connections.

Story-Specific vs Stdlib Actions

New verbs (SAY, INCANT, RING, COMMANDING) are story actions. Standard verbs with entity-specific behavior use capability dispatch.

Future Work

Category Items
Vehicle Polish Boat travel along full river, balloon landing variations
Testing Full walkthrough transcript, edge case coverage
Documentation Update CLAUDE.md with golden test patterns
Polish Message refinements, additional room descriptions

All core gameplay is complete!
Players can explore all 169 rooms, collect all 33 treasures (650 points), and achieve victory.

Recent Git Activity

a322cfb refactor(dungeo): Complete region consolidation, fix walkthrough chain
050ba0f refactor(dungeo): Consolidate 6 regions into single files, fix aliases
d476618 docs: Add session summaries and room catalog
1ba9b3b test(dungeo): Add transcripts for rope puzzle and walkthrough goals
389f8eb feat(dungeo): Add Dome Room rope puzzle and magic words
7442dfd fix(transcript-tester): Improve entity resolution and isAlive check
3df7014 feat(transcript-tester): Implement ADR-092 smart transcript directives
cf51e9c Merge pull request #48 from ChicagoDave/stdlib-testing
30bb4e6 fix(stdlib): Complete stdlib testing mitigation plan
79152f3 fix(stdlib): Fix drinking action mutations + add world state tests
b55834c fix(stdlib): Fix dropping action missing moveEntity