Changelog¶
All notable changes to Bashcrawl are documented in this file.
The format is based on Keep a Changelog.
0.4.0 (2026-11-23)¶
Added¶
- web: redesign the trainer, add a home page and consent-gated analytics (c0ad342)
- web: redesign, home page, consent-gated analytics and Azure deploy (d02cf7c)
0.3.0 (2026-11-18)¶
Added¶
- motion: add the Arcade and Reference door art as ASCII Motion clips (7a468f5), closes #91
- story: show quest checklist steps and tick them with feedback (93d380c)
- story: show quest checklist steps and tick them with feedback (571bef9), closes #113
- termforge: one-line "did you mean" hints; keep the error clip off the stage (35e4892), closes #111
- web: Ctrl+C abandons the prompt line, and a reload recaps where you are (6e702c1), closes #115
- web: make hint location-aware and add a "Stuck?" nudge (e4bfccc)
- web: make hint location-aware and nudge after three failed commands (17d6005), closes #105
- web: mount the fleet feedback widget in the trainer (923bb8b)
- web: mount the fleet feedback widget in the trainer (b120cba), closes #130
- web: play an ASCII Motion clip on the Arcade and Reference doors (397aa5f)
- web: play an ASCII Motion clip on the Arcade and Reference doors (065816d), closes #91
- web: say how to cast an encounter when cat shows its source (525b306)
- web: say how to cast an encounter when cat shows its source (fdd99eb), closes #114
Fixed¶
- story: map shows explored rooms as fog of war via Hud.mapModel (db92fa6), closes #107
- story: separate story and arena rank ladders, gate the top rank on the quest line (90caa1b), closes #106
- termforge: bash-faithful ls and cd, exact quest 5, one-line did-you-mean hints (a644fbb)
- termforge: parse ls options like ls(1), take cd / and cd ~ home, match quest 5 exactly (a12b5b3), closes #108
- web: keep the room visible in the prompt, add Ctrl+C and a reload recap (0c02dac)
- web: ls plays a generic scanline instead of a hard-coded room manifest (ea61592), closes #110
- web: story rank ladder, fog-of-war map, and honest ls scan (5369754)
- web: trim the prompt's path from the left so the room stays visible (b35c922), closes #112
0.2.1 (2026-11-10)¶
Fixed¶
0.2.0 (2026-10-28)¶
⚠ BREAKING CHANGES¶
- license: relicense from MIT to GPL-3.0-only to match upstream bashcrawl (#116)
- reduce to terminal-core + web flagship — Practice Arcade, Reference mode, lean MCP playtest (v3.1.0) (#66)
Added¶
- add agent mode for AI-driven gameplay with SVG screenshots (176ccd6)
- add complete walkthrough with SVG screenshots, fix test suite (faee6a9)
- add demo-test framework with full game walkthrough generation (8cb8ee9)
- Add interactive gameplay simulation and core game architecture (f503b4e)
- Add interactive terminal emulator and demo script for enhanced learning experience (17a7b8e)
- add MCP and browser automation interfaces (5938055)
- add static GitHub Pages web game (7f80835)
- add termforge session, motion, and host UX (#92) (32b43b9)
- add Textual TUI app and refactor terminal engine (2cc30b7)
- arcade: add the Vim Catacombs, a VIM Adventures-style trial (276673c)
- arcade: add the Vim Catacombs, a VIM Adventures-style trial (91bf794)
- comprehensive UX improvements for clarity, engagement, and education (26fd246)
- comprehensive UX improvements for clarity, engagement, and education (9c0f564)
- expand web gameplay with new quests and terminal effects (bc70d4a)
- improve bashcrawl prompts, map, area context, and mkdir -p support (3961e50)
- improve UI/UX across terminal emulator and game scrolls (eeef0c1)
- improve UI/UX across terminal emulator and game scrolls (3411ab6)
- integrate screenshot capture into test and logging framework (57a6750)
- Introduce intelligent help system with contextual command suggestions, error solutions, and workflows (ed0667d)
- persist test screenshots and logs in logs/ directory (d28971f)
- termforge: make ASCII Motion the art pipeline for the whole framework (#100) (6f912dd)
- terminal-illness: add optional audio system and settings modal (6b234c4)
- tui,help: add Merlin AI chat guide with F3 toggle panel (1f7fea3)
- viewer,game,test: add log viewer, hidden study room, live agent logging (4f36334)
- web: engagement pack — minigames, progression & sidebar overhaul (#59) (77cde77)
- web: rewrite the web trainer in React 19 + Vite + TypeScript as a 16-bit dungeon RPG (#120) (72d2af2)
- web: room-unlock parity fix + Training Arena, Pixel Hero & encounter art (#58) (bb96f8c)
- zero-knowledge playtest harness — Claude Code (OAuth) plays Bashcrawl via MCP (#61) (6a7563c)
Fixed¶
- address Copilot review on PR #20 (089c912)
- align demo framework with interactive bashcrawl game scripts (002ac09)
- bash 3 compat, color escapes, zsh support, goblet path, help unbound vars (aeea5c8)
- ci: drop leading blank line that fails yamllint (#89) (b3cdb8b)
- ci: green workflow checks — walkthrough paths, markdownlint, shellcheck, Windows tests (e7acec6)
- ci: make main's Lint and Contracts + Tests jobs pass (#93) (b3c714a)
- ci: repair game-tests.yml YAML — multiline python broke run block (4b4b582)
- close four gameplay exploits (review quit, fake flags, free crown, .study bypass) (#128) (423dbb3)
- improve _hardcoded_quests docstring with canonical YAML reference (bc8cca9)
- keep web terminal output scrollable (96d354f)
- platform: resolve the code-review findings on the learning platform (#119) (42b5dce)
- platform: resolve the code-review findings on the learning platform (#119) (4477818)
- playtest: surface claude stderr when a blank-slate seed fails (#94) (359fd77)
- resolve all CI workflow failures (shellcheck, yamllint, markdownlint, tests) (cf099fa)
- story: unblock the Grimoire endgame and nested reveals (#103, #104) (#118) (6abf8ac)
- terminal emulator bugs + add logging framework (b31fd22)
- update default value for run_ai_tests in test-framework.yml to boolean type (8902317)
- viewer,tui,test: fix screenshot rendering, ls -F crash, and agent path nesting (31bd0a6)
- web: remove phantom scriptorium/observatory rooms; make map generative (#60) (75c4dac)
- web: run encounters inside revealed rooms by their visible path (#98) (5d1761d)
Changed¶
- consolidate runtime boundaries and test infrastructure (2fb8980)
- harmonize entry points, config, deps, and testing (498891a)
- integrate help system into src/ with shared YAML data layer (d4211b8)
- reduce to terminal-core + web flagship — Practice Arcade, Reference mode, lean MCP playtest (v3.1.0) (#66) (fdc9329)
- reset: streamline re-hiding logic and enhance duplicate handling (9b6a4ff)
- test: migrate to walkthrough-driven integration suite (f6a7228)
- unify contract validation and dev automation across runtimes (83271e6)
Miscellaneous¶
[Unreleased]¶
Added¶
- A first run like a game's. A title screen (Continue with hero · rank · room, New game / New hero behind a confirm, How to play, Options; ↑↓/Enter/Esc and a menu cursor), hero creation in five steps (a name with a ⚄ roll, a path — Wanderer, Scribe, Rogue or Sage — that picks the starting door, a look in four palettes, the preferences, a summary), a three-page intro, and a guided tour of the live page (coach marks over the prompt, the quest, the room, the status bar and the doors; stops that are off screen are skipped; the last one types
pwdfor you). The brand reopens the title screen; the header gains the hero (name · rank → the profile: rename, look, path, the sheet of rank/XP/health/quests/badges/rooms/spells, a confirmed new game) and ⚙ Options (theme, sound, effects, screen shake, text speed, text size, CRT, replay the intro, take the tour, reset the HUD). The hero lives underbashcrawl-web-hero-v1and the options underbashcrawl-web-settings-v1, both apart from the save; a save from before heroes existed continues as Adventurer. - A story to follow, and a Journal to keep it. The dungeon now has a Chronicle: a prologue when the hero is made, a chapter for each of the eight main quests, a chapter for every hidden hall the first time it is entered, and an epilogue when the main road is walked — told in an RPG dialogue box under the log (the hero's portrait, a typewriter at the text-speed option, Enter or a click turns the page) and kept in the Journal (
Alt+J, the 📖 button, or typingjournal): Chronicle · Quests (with objectives and hints) · Lore (every scroll read, with Read again; every hall found, with Go there) · Bestiary · Badges. An objective tracker sits in the stage's corner with the active quest and its spell. Escape with nothing open is a pause menu (Continue · Journal · Hero · Options · How to play · Title screen);Alt+H/O/Mand the prompt wordshero,options,menu,titleopen the same screens. The party bar leads with the hero's portrait, name, level and rank; things in the Location pane are clickable (a door is walked through, a scroll read, an encounter run). - Smoother everywhere. Doors slide in behind the pixel wipe instead of swapping; panels fold through an animated track; the party bar and the prompt dock slide in; the Arcade's floor and trials slide. Every
titleis now a styled tooltip that appears after a short hover (at once while moving between controls, and on keyboard focus) instead of the browser's slow bubble. - The hero at 2×. The sprite is drawn through an edge-aware upscale (EPX), so diagonals slope and corners round while one-pixel details such as the eyes stay square; the face gains a nose and a mouth; the HUD figure is a size larger.
- A real pixel-art hero. The seven coloured blocks are replaced by a 16×28 character with outline and shading, composed from layered parts — six skin tones, four eye colours, six hair styles in eight colours, seven kinds of headgear, five outfits in ten dyes with six trims, seven weapons, a cape in any dye, and six companions (cat, bat, slime, owl, frog). The eyes blink, the weapon thrusts on a quest clear, a companion shifts its weight; the mood tints and sparkles carry over. Creation gains a wardrobe step (every part as a row of swatches and chips, ⚄ Random, and a preset per path — picking a path dresses the hero until you touch the wardrobe) and the profile opens the same wardrobe later; the summary reads the look back ("copper-haired, in a linen tunic, tome in hand, a slime at heel"). The header shows the hero's bust. A hero saved with one of the four old palettes keeps its dye.
- Title cards for the big moments: a room entered for the first time, a quest cleared (with its name and the XP), a rank gained, a passage opened, a lesson done — queued one at a time; a click skips.
- The reader layer.
cat/less/head/tailoutput cascades in line by line and a scroll taller than the log opens at its title instead of landing you at its end. The scrolls' own conventions render as structure and syntax colour — rules, titles, labels,$ cmd # commentexamples, command/purpose tables, box panels, atmosphere, emphasis,code, Markdown READMEs, shell scripts — without rewriting a byte of them (markers are kept, hidden by CSS; the test round-trips every scroll). Every recognised command is castable by a click, in the log and in thelesspager; a "▼ more" cue shows while unread lines sit below; the clip band glides open and closed instead of snapping the log shorter. - The web trainer is rewritten in React 19 + Vite + TypeScript (
web/src/) in a 16-bit dungeon-RPG skin, over the same classic-script engine the terminal hosts run —web/index.htmlstill loads the vendored TermForge core,runtime.js, the plugins and the presenters as classic scripts in their fixed order, then the app module; the engine is never bundled, so the files the browser runs are the onestermforge/testand the node hosts load. The app is strict TypeScript, Tailwind 4 over--fleet-*design tokens (web/src/styles/tokens.css, the only file allowed a colour literal), state in smalluseSyncExternalStorestores, and components overBashcrawlHud's models. It ships the fleet's core components: a skip link and one<main id="main-content">, labelled landmarks, light/dark/auto theme with a pre-paint script, one toast region, a?shortcuts dialog, an error boundary and a real 404 route. Keys and saves are unchanged, so progress carries over. Tests: vitest + Testing Library (npm run test:web), withweb/src/test/engine.tsloading the real engine into jsdom so component tests play the actual game. - A game-feel effects layer (
web/src/fx/): one event → effect table turns what a command changed into XP orbs flying from the log to the gauge, sparks and a ring on a cleared quest, confetti and a golden bloom on a rank-up, a red edge flash and trauma-model screen shake on damage, embers on a heal, glints on loot, a pixel-dissolve wipe of the stage on a room change, pane pulses, hero moods, and the engine's ASCII Motion command clips in the band under the log. Particles are a typed-array pool on one canvas whose loop runs only while something is alive; everything is gated onprefers-reduced-motion. - Chiptune sound effects synthesized on the Web Audio API (no files;
web/src/audio/): a phrase per event and a key click per command, off by default with a header toggle that is also the unlocking gesture, remembered underbashcrawl-web-sound-v1. - A 16-bit HUD: a party status bar (rank with a segmented XP gauge toward the next rank and a rolling number, HP gauge, quests, badges, live streak — each a button that runs its command), bevelled corner-notched panels with nameplates, the pixel hero with moods, a title screen whose logo materialises out of static, and a Panels overlay on small screens.
make web-install,make web-dev,make web-bundle;make web-previewnow serves the production build;make web-testalso runs ESLint, vitest and the Vite build.bin/bashcrawl webservesweb/dist. CI runs the web gates on Node 24 (vitest and jsdom need ≥ 22);pages.ymldeploysweb/dist. The hub's reusablestandard-cijob is called with Node 24 too: its default Node 20 ships npm 10, which crashes resolving the always-latest ranges (Cannot read properties of null (reading 'edgesOut')) where npm 11 resolves them.- A learning platform on every surface (browser,
tty, telnet). It's three brand-neutral TermForge plugins, and any TermForge app can install them: learn/lesson/lab(termforge/core/curriculum.js): courses of lessons whose objectives the game checks as you type real commands, each course with a writable lab under/lab/<id>/.skills/review(termforge/core/mastery.js): a skill map grown by every command you run (uses, distinct flags, failures), plus a Leitner-box spaced-repetition review of your weakest, most-due skills.explain LINE(termforge/core/explain.js): an offline, deterministic breakdown of any command line covering stages, decoded flags, what each argument resolves to, pipes, redirects, typo suggestions and destructive-command warnings. Plainexplainexplains the line you just ran.- Five courses in
courses/(25 lessons, 70 objectives): Finding Your Way, Reading the Runes, The Pipeline Forge, The Artificer's Workshop, and Words of Power. Lessons are Markdown files with YAML frontmatter (docs/authoring-courses.md), compiled byscripts/course_loader.pyintoweb/data/courses.json.termforge/test/courses.test.jsplays every course from a fresh lab using only the authored solutions. - Platform services in TermForge core:
- typed events (
core/events.js, the bashOSevents.pycontract) - declarative rules (
core/rules.js) - feature plugins (
core/plugin.js,shell.use(plugin)) - a
promptLabelhook - schemas in
docs/schemas/{events,rules,plugin}.v1.md bin/bashcrawl: one dispatch table forplay,tty,serve,hub,web,courses,lab,doctorandreset. It's plain bash and compatible with macOS bash 3.2.doctor(alsomake doctor) prints a verdict-style[ OK ]/[WARN]/[CRIT]line per check.lab IDcopies a course's lab to~/.bashcrawl/labs/IDand never deletes learner work.- Telnet hub mode (
--hub,make telnet-hub,bashcrawl hub) addswho,say,emote,shout,nameandtopacross sessions, plus announcements of badges, lessons, ranks and room arrivals. Chat is sanitized of control and escape characters and rate-limited. It's opt-in, and the default server stays isolated. - App registry (
termforge/apps/registry.js): hosts resolve--appthrough it, and--app listprints it. - HUD
lessonandskillspanes on the web and terminal sidebars, withlesson/objective/namedskillevents (toasts in the terminal, panel flashes on the web) and command chips on the web. - Four learning badges: Student, Polymath, Keeper of Cards and Graduate.
- Learn mode in the browser (🎓 tab,
Alt+2, a door on the landing card): a lesson reader beside the same story terminal. The lesson renders from Markdown (anycodedrops into the prompt on click), the objectives tick off as you type, a hint and lab chips sit under them, and the course catalogue shows every course as a card with its progress. The sidebar keeps the lab's files, your skills and the hero; the dungeon panes step aside while a course runs.web/src/learn/LessonReader.tsxover the Markdown renderer inweb/assets/js/learn.js. - Ambient ASCII Motion (
web/assets/js/ambient.js): the six room vignettes are now multi-frame.asciimtnloops that play in the Location panel (torches flicker, the cellar drips, mist drifts, gems glint, the rift breathes, a bat crosses the deep) and crossfade on a room change; the landing logo materialises out of static. Clips inherit the theme colour and carry only their highlights; a hidden tab pauses them andprefers-reduced-motiongets a still. - Two stage clips:
unroll(a scroll unrolls —lesson,banner,figlet, and a completed lesson) andlore(an open book, a page turns —help,man,hint,learn,commands). - Mode switches, the landing card, the reader and met objectives animate (all gated on
prefers-reduced-motion). - Web: a hero status strip under the header — rank with a bar toward the next rank on the
progression.yamlladder (and the XP still needed), health, main quests, badges and a live daily streak — each a button that runs the command behind it (profile,xp,status,quest,achievements,daily). The rank used to appear nowhere in the page exceptprofile.Hud.statusModelinweb/assets/js/hud.js, so the terminal HUD can draw the same line. - Web: next-step chips above the prompt (
Hud.suggestionsModel): the active quest's own command when it can run from the current room (the objective's quoted command, checked against the room's files and the quest'slocation), the room's encounters (./treasure), itsessential_commands, and a running lesson's lab and hint. Tapping a chip fills the prompt rather than running it, so the learner still types Enter; the leading suggestion is also the input's placeholder. Both models are covered bytermforge/test/hud.test.js. - Web: Reference ▶ buttons drop any cheatsheet command into the Story prompt (
tryCommandinweb/src/terminal/actions.ts, placeholders like<file>trimmed); the sidebar's concept-spotlight cheats do the same on click. The docs drawer now follows the game: its room and quest cards update as you play. - Web: a Panels overlay on small screens. Under 900px the story sidebar no longer eats a third of the screen: it opens from a ☰ Panels button in the status strip as an overlay over the log, closes on Escape or when a chip is used, and the prompt label shortens to the room's name (
cellar $) so the input keeps its width.
Changed¶
- The game runtime is now plugins over data. The arena, pathfind, daily, achievements, progress and bestiary moved from the
runtime.jsmonolith intoweb/assets/js/plugins/. Ranks, achievements (now rules instead of lambdas), the bestiary, the arena trials, the skill map and review cards live insrc/help/data/progression.yaml, which the content contracts validate. The golden transcripts were unchanged by the split itself. - The save shape gains
learnandmasteryslices at the end. The change is additive: older saves load with defaults, and the plugins sanitize both slices on load. helpand thecommandsdeck advertise the learning platform.- Mode shortcuts are
Alt+1Story,Alt+2Learn,Alt+3Arcade,Alt+4Reference; the web welcome text points new players at Learn. - Lesson text in the terminal drops
*emphasis*markers (outside code spans;*.txtin backticks stays as typed). - Web sidebar order and defaults. The quest leads, then the room, pack, lesson and map; Skills, Hero and This Room Teaches start folded so the first screen is not eight open panels.
Hud.defaultLayouttakes a surface'sorderandcollapsedoverrides; a saved layout keeps its own fold and visibility flags, and the terminal HUD's defaults are unchanged. - Web log: command blocks. Each echoed
/path $ commandline is marked after paint, so CSS draws a rule above every command and colours the prompt and the command — a long scroll reads as blocks instead of one unbroken column. No change to the terminal protocol or the golden transcripts. - The web welcome text is three lines instead of five; the
titletooltips on the header buttons say what HUD, Docs and CRT do. - Light theme accents are darker: the dark palette's neon green/blue/purple/amber sat at roughly 1.6:1 on parchment, which made the prompt, footer links, mode tabs and
kind-infooutput hard to read. Each hue now clears WCAG AA for text, and the glows are dropped in light mode (web/src/styles/tokens.css). web/assets/js/learn.jsis trimmed to the Markdown renderer (renderMarkdown,inlineHtml); the reader isweb/src/learn/LessonReader.tsx.web/assets/js/arcade.jskeeps the games (GAMES,CHEAT_LINES,BLOCKED_IN_GAME,scopedRuntime); the flow isweb/src/arcade/arcade-store.ts.hud.js: a complete saved HUD layout keeps its pane order, sohud moveand the menu's reorder survive the commit.-
The root
package.jsoncarries the web app's dependencies ("*"ranges, no lockfile,engines.node >= 22.22) beside the engine'snode --testscript;vite.config.mtsandeslint.config.mjsare ESM by extension because the manifest must never declare"type": "module". -
The header's Theme and CRT buttons moved into ⚙ Options; the Hero pane shows the hero's name, path and look.
Removed¶
- The framework-free web renderers
web/assets/js/{game,shell,reference,docs}.jsandweb/assets/css/{theme,terminal}.css, replaced byweb/src/.ArcadeManagerandLearnViewgo with them (their behaviour lives in the React stores and components, their tests in vitest). -
The first-visit landing card (
Landing.tsx); the title screen, hero creation and the intro take its place. -
Relicensed from MIT to GPL-3.0-only. Bashcrawl is a derivative of Seth Kenlon's original bashcrawl, which is distributed under the GNU GPL v3 (no "or later" grant), so the whole repository now uses the same terms.
LICENSEis the unmodified GPLv3 text from gnu.org; a newNOTICEfile credits the upstream author and contributors, records the derivation, and reproduces the MIT notices of the bundled third-party code (simplex-noise, ASCII Motion).package.json,pyproject.tomland the README badge/sections now sayGPL-3.0-only.
Fixed¶
- Hub:
whosanitizes directories. A room a player created withmkdirreached every other terminal raw throughwho, escape sequences included; it now passes the same filter as chat. Renames spend a chat token like a shout, room moves have their own rate-limit lane (past a burst of eight they go unannounced;whostill tells the truth), and a member whose connection keeps failing deliveries is reported through the hub'sonErrorand dropped instead of being kept silently. - Courses:
lesson skipdefers, it does not forgive. Skipping every lesson used to complete the course, pay its bonus XP, unlock the Graduate badge and trigger a rank-up. A skipped lesson now comes back once the others are earned, a lesson already earned is never served again, and a course completes only when every lesson has been; a save claiming completion without the lessons to show for it is corrected on load. - Courses: resuming or typing
labno longer re-seeds the lab. Both re-created every file the learner had removed or renamed, which silently undidrm/mvwork and made the workshop's remove junk.old objective unmeetable until it was deleted again. Onlylab resetandlearn restartrewrite the lab now. - Rules: a list on any string head means any of (
output_includes: [a, b],option: [n, r],file_exists: […],file_contains: […]). The validator accepted such lists while the evaluator coerced them to one string, so an objective written that way passed CI and could never be met. Command heads (command,arg,args_contains,option,piped,ok,output_includes) are now unknown rather than false where no command ran, sonot: {command: cd}cannot be met for free on the curriculum's per-line pass;notover state and filesystem heads still decides. - Plugins: a failed
setuprolls back instead of leaving half-wired handlers, hooks and sinks behind an "already installed" error, anduninstall()now unmounts a plugin's VFS providers too (vfs.removeProvider), so a reinstall does not stack mounts. mvrefuses a read-only mount as its destination, likecpand>already did.- Course loader:
orderand coursexpare validated. A quotedorder: "2"crashed the export with aTypeErrorthat named no file; a non-numeric coursexpreached the runtime asNaNand silently paid nothing. Both are authoring errors naming the file now, and YAMLtrueno longer passes as the integer 1. - The HUD's skill toast reads the level names from the mastery plugin's copy deck instead of keeping its own copy.
- The emulator now counts lines like real tools. A file's final newline used to count as an extra empty line, so
wc -lwas off by one,sortemitted a blank first line, andtail -n 2lost a real line. These commands now match bash:head,tail,wc,grep,sort,uniq,cut,sed,nlandrev. cp file dirandmv x dirnow land inside the directory (cp used to replace the directory with a file), a moved directory takes its contents with it, andfind /absandfind subprint paths from the start argument likefind(1).- The arena no longer crashes when no trials are loaded. A save whose arena run points past the loaded trials is dropped.
- On phones the header no longer overlaps the sidebar: it is pinned, the mode tabs take a row of their own, and the actions shrink.
Alt+1–4mode shortcuts now work on macOS, where Alt+digit types a symbol (¡): the handler reads the physical key.- The title banner and the landing logo spelled Bashcarel / Bashcrml; both ASCII Motion clips are regenerated from figlet's
slantface (motion/art/banner.asciimtn,motion/art/landing-brand.asciimtn), and the one golden transcript that recorded the banner is re-recorded. .gitignoreno longer ignores everyworkshop/directory, only the dungeon's player-created ones.- Web trainer: encounters in revealed rooms now run. After a reveal (e.g.
the cellar amulet opening
chapel/),file <encounter>reportedASCII art / scrolland./<encounter>failed withNo runnable scriptfor every encounter underchapel/,vault/andrift/. The encounter lookups inruntime.js(execDispatch,runScript) and thefilecommand intermforge/core/packs/posix.jsnow translate the visible path through the VFS'sactual()before indexingworld.encounters. Themain-quest-rungolden transcript is re-recorded:./padlockand./gobletnow succeed (#96).
[3.2.0] - 2026-08-01 — TermForge: the emulator becomes a framework¶
The in-browser bash emulator is extracted into TermForge (termforge/), a universal, zero-dependency terminal framework: one environment-agnostic kernel (parser, VFS, Shell, Line protocol, TerminalView) now powers the browser game, real terminal sessions, a lightweight telnet server, and custom dev/monitoring tools. The web game is byte-identical (golden-transcript proven), saves are compatible, and the terminal-core bash game is untouched.
Added¶
termforge/core/— the framework kernel as dual-mode files (classic<script>+ CJS, no build step):parser,vfs(with NEW read-only providers for live-data files),shell(hook spine: preExecute / interceptLine / postExecute / observePipeline / beforeCommand / execDispatch / postCommand; injectable clock/rng/base64),packs/posix+packs/flavour,protocol(the versioned Line contract,docs/schemas/terminal-protocol.v1.md),view+sinks/dom+sinks/ansi(one TerminalView replacing the duplicated story/arcade renderers), andinput(shared history/completion helpers + a LineEditor and byte decoder for stream hosts).- Node hosts (
termforge/node/):host-tty.js(play in a real terminal —make tty-demo) andhost-telnet.js+telnet-codec.js(a minimal RFC 854 subset with NAWS, session caps, idle kick, and an nc-friendly--rawmode —make telnet-demo; loopback-bound by default, seedocs/termforge/telnet-host.md). - Apps (
termforge/apps/):bashcrawl.js(the game as an App descriptor) andprocwatch/(the custom-tool reference: livenode:osmetrics mounted as read-only VFS provider files, browsable with the ordinary posix toolkit;demo.htmlruns it in a browser fromfile://). - JS test suite (
make test-js,node --test, zero npm deps): 62 tests — golden transcripts recorded against the pre-refactor emulator and replayed byte-identically under a pinned vm clock/rng, save-shape + legacy-save round-trips, kernel/pack/view/input units, telnet codec units and a real loopback integration. CI runs it (setup-node 20) plusmake lint-js(node --checkover every tracked JS file). - Vendor pipeline:
termforge/core/is mirrored file-for-file intoweb/assets/js/vendor/termforge/bymake web-build(scripts/vendor_termforge.py), byte-verified bidirectionally byvalidate_static_web.py, pytest, andmake web-test. agentwatch(termforge/apps/agentwatch/,make agentwatch) — an AI-agent task dashboard on the framework: a TaskSource interface projected asboard/agent <id>/feedcommands AND live read-only VFS files (cat agents/forge,grep -r failed .), over any host. Ships a deterministic demo fleet (state ticks once per read — no clock/randomness) and a JSONL adapter that turns the repo's real agent-playtest telemetry (logs/sessions/**) into a live board (make agentwatch ARGS="--data-dir logs/sessions").- uiText copy deck — the framework/content boundary made mechanical:
every brandable string a core pack emits routes through
Shell#text()/DEFAULT_UI_TEXTwith neutral defaults; the game's entire voice (legacy error strings, fortune deck, banner art, figlet default) moved intoGAME_UI_TEXTinruntime.js. A newcontent-separation.test.jsfails the build if game vocabulary appears anywhere undertermforge/core/.
Changed¶
web/assets/js/runtime.js(1852 → ~930 lines) is now the game assembly:class Runtime extends TermForge.Shellwith the full 74-entry handlers literal (still thevalidate_runtime_commands.pycontract — the validator is untouched) andinstallGameHooks()for quests, achievements, daily, trainer, pathfind, and encounters.game.js/arcade.jsshare one TerminalView + DomSink (the twin log renderers and fourescapeHtmlcopies collapse into one);arcade.jspasses{ bare: true }instead of poking the instance.defaultState()now declares two previously-implicit fields (prevCwd,stats.lastPipedIn); persisted-save key order shifts accordingly (additive; legacy saves load unchanged — fixture-proven).- Host CLI parsing now uses node's standard
util.parseArgs(allowNegativefor--no-color; engines floor is node >= 20.16); VFS provider mounts now list in their parent directory as file or directory according to the mount root's own type.
Fixed¶
- Committed
web/data/world.jsonwas stale after the #75 markdown unwrap (freshness test red from a clean checkout).
[3.1.0] - 2026-07-06 — The Great Reduction + Web Flagship¶
The repo is reduced to two player surfaces plus one harness: the pure-bash terminal game (played with real cd/cat — no launcher) and a static browser trainer generated from the same content, plus a lean MCP playtest harness that drives the real bash game. Net: ~350 files and ~75k lines removed.
Added¶
- Web mode router (
web/assets/js/shell.js): top-nav Story · Arcade · Reference, first-visit landing overlay, hash routing (#/story…), Alt+½/3 shortcuts, XP bridge, toasts. - Practice Arcade (
web/assets/js/arcade.js): mini-game framework over the shared bash emulator — each game is (seed world + goal predicate + scoring) on a scopedRuntime. Four games: Path Navigator (navigate the real dungeon), grep/find Hunt (find the sigil-bearing file), Pipe Puzzle (transform INPUT into TARGET), Command Flash (drill decks generated fromcommands.yaml/tutorials.yaml+ curated decks). Scores persist; wins feed story XP. - Reference mode + concept spotlight (
web/assets/js/reference.js): searchable cheatsheet library from the command registries, a story-sidebar card showing what the current room teaches, and inline syntax hints while typing. - Bash-emulator kernel upgrades (
web/assets/js/runtime.js): output redirection (>,>>), glob expansion (*,?, quote-aware), multi-file +-r/-l/-n/-c/-wand real-regexgrep,sort -u,uniq -c/-d, and newcut,tr,sed,nl,revcommands. - Arcade content registry (
src/help/data/arcade.yaml) exported toweb/data/arcade.jsonbyexport_static_web.py(validated byvalidate_static_web.py). - Lean playtest harness (
src/playtest/): FastMCP server (bashcrawl_start/observe/command/report_gap) driving a persistent PTY bash session in a sandbox copy of the dungeon; JSONL recorder; scorer with rooms/scrolls gates. Smoke-tested bytest/integration/test_mcp_server.py.
Removed¶
- Python Textual TUI + old MCP/agent harness (
src/terminal-illness/), Flask log viewer (src/viewer/),screenshots/(167 SVGs),main.shlauncher, Docker/devcontainer tooling,.archives/, and the launcher-onlylib/scripts (emulator,state,ui,quests,room_loader, …).lib/retainscolors.sh,log.sh,yaml_reader.sh,reset.sh. - TUI/agent/viewer test suites (
test/ai/,test/demo/,test/analysis/, and theti.*unit/integration tests) and their CI workflows (test-framework,code-quality,release).
Changed¶
- CI/CD redesigned (5 workflows → 3):
ci.ymlis now the single PR/push gate with three jobs — consolidatedlint(one runner for shellcheck/yamllint/ markdownlint/ruff),test(the full pytest suite now runs in CI, closing a gap where 175 tests ran nowhere, plusmake validate-contractsand junit artifacts), andmacos-smoke(real gameplay on stock macOS bash 3.2, replacing the Windows matrix the unix-only suite couldn't run).game-tests.ymldeleted — its unique checks (shebangs, boilerplate, unlock targets, main-path scroll depth) moved intovalidate_content_contracts.pyso they run locally too.dependency-update.ymldeleted — redundant with Dependabot, and itspip freezerewrite would have destroyed the commented requirements files.pages.ymlgains pip caching and usesmake web-test;blank-slate-audit.ymlnow writes the scorer verdict to the run summary.make validate-contractsadditionally runs the content-index check. - Terminal play is launcher-free:
./setup.sh && cd entrance && cat scroll. - Python deps reduced to
pyyaml+mcp(dev:pytest,pytest-timeout,jsonschema,ruff). validate_runtime_commands.pyvalidates the single remaining runtime (the web emulator) againstruntime_commands.yaml.scripts/playtest.shtargetsplaytest.mcp_serverand gates on median rooms-visited / scrolls-read (BLANK_SLATE_GATE_ROOMS/_SCROLLS).- Makefile, CI workflows,
.mcp.json,.vscode/, docs, README, and CLAUDE.md rewritten for the two-surface architecture.
[Unreleased] - 2026-03-04¶
Added¶
- Walkthrough-driven test model (
test/datasets/walkthrough.json,test/fixtures/walkthrough.py) - Introduced a single source of truth for rooms, encounters, and progression steps
-
Added new integration suites for classic walkthrough coverage and encounter validation
-
Viewer walkthrough/templates expansion (
src/viewer/templates/walkthrough/,src/viewer/templates/tests/) -
Added new test/walkthrough-facing template pages and related routing support
-
Offline TUI screenshot test (
test/ai/test_offline_screenshots.py) - Integration test (
@pytest.mark.integration) that replays a scripted command sequence through the real Textual TUI agent - Generates SVG screenshots and JSONL session logs without requiring
ANTHROPIC_API_KEY -
Accessible through the Flask viewer for visual regression review
-
AI-driven TUI screenshot test (
test/ai/test_agent_screenshots.py) - Two-phase approach: Claude (
TestAgent) +NonInteractiveEnginegenerates a command sequence, then replays throughti.agentsubprocess to capture real SVG screenshots -
Marked
@pytest.mark.ai(requiresANTHROPIC_API_KEY); skipped in default CI run -
Lightweight SVG renderer fixture (
test/fixtures/svg_renderer.py) - Renders game state (command, output, location, inventory, HP) as dark-terminal SVGs
-
Used by offline screenshot tests as a lightweight alternative to the full Textual TUI
-
.env.example— template documentingANTHROPIC_API_KEYand other required environment variables -
Bashcrawl Observatory viewer documentation (
docs/viewer.md,src/viewer/README.md) - Full reference for the Flask log viewer: installation, all pages, JSON API, configuration, troubleshooting
docs/log-viewer-reference.md: Quick-reference card for API endpoints and configuration keys-
Replaced the design-intent
docs/log-viewer-plan.mdwith accurate operational docs -
AI agent test documentation (
docs/getting-started.md,docs/advanced.md) - Step-by-step guide for running agent-mode playtests and interpreting screenshots
-
Advanced section covering test suite markers (
unit,integration,ai,demo) andANTHROPIC_API_KEYsetup -
no-screenshot.svgplaceholder (src/viewer/static/img/no-screenshot.svg) -
Dark-background SVG placeholder shown in gallery/index when an image fails to load
-
Merlin AI Chat Guide (
src/terminal-illness/ti/) ai_chat.py:AIChatService— wraps Anthropic Claude (claude-sonnet-4-20250514) with async streaming, rolling 20-turn conversation history, proactive nudge strings, and static fallback whenANTHROPIC_API_KEYis absentchat_context.py:GameContextBuilder— assembles game context snapshots (room, inventory, HP, quest, recent commands, scroll excerpt) for prompt injection;detect_stuck()identifies repetitive command patterns (threshold: 3)chat_panel.py: TextualChatPanelwidget — toggleable right-side panel with streaming token display, proactive nudges, and styled user/Merlin bubbleschat_cli.py: CLI bridge — letsbash help.sh merlininvoke Claude as a standalone Python process-
data/merlin_prompt.txt: Merlin wizard persona, Socratic teaching rules, and context placeholder template (7 injected fields) -
F3 Key Binding in Textual TUI (
src/terminal-illness/ti/app.py) - Toggles Merlin chat panel open/closed without leaving the game terminal
merlin <question>command opens panel and submits question in one step- Proactive nudges fired on: room change, HP < 20, quest complete, stuck detection
-
@work(thread=True, exit_on_error=False)— API errors display in chat panel instead of closing the session; fulltry/exceptwithself.log.error()fallback -
help merlin/help asksubcommands (src/help/bashcrawl_help.sh,src/help.sh) bash help.sh merlin "<question>"calls the Python AI bridge for terminal-only players-
Falls back to existing
ai_engine.shstatic hints when Python or API key unavailable -
VS Code Debug Configurations (
.vscode/launch.json) 🧙 Debug TUI — Merlin Chat: Full Textual game withTEXTUAL_LOG=/tmp/textual_debug.log🧙 Debug Merlin CLI: Single-turn CLI bridge for step-through debugging🧙 Debug AI Chat Tests: pytest runner fortest/unit/test_ai_chat.py🧙 Debug TUI — Break on Exception:justMyCode: falsefor worker-thread crashes-
🧪 Debug All Unit Tests: Full unit suite runner -
Unit Tests (
test/unit/test_ai_chat.py) — 28 tests covering: GameContextBuilder.build()anddetect_stuck()(6 cases)GameContext.as_dict()placeholder formatting-
AIChatServiceAPI availability detection, fallback responses, nudge strings, history trimming, system prompt rendering, Claude mock integration -
Log Viewer Flask Web App (
src/viewer/) - Full Flask web application for browsing JSONL session logs and analytics
- Routes: session list/detail, feedback list/detail, screenshots gallery, dungeon map, analytics dashboard, live agent view
- Live agent monitoring page (
/live/agent) with real-time event stream via SSE - REST API endpoints (
/api/) for sessions, screenshots, feedback, and live agent status - Static assets: themed CSS (
theme.css,components.css,gallery.css,map.css), JavaScript modules for map rendering, gallery, analytics, and live agent feed - Configurable via
src/viewer/config.py; launchable withpython3 -m src.viewer --port 5000 -
See docs/log-viewer-plan.md for design rationale
-
Live Agent Session Logging (
test/ai/live_logger.py) - Real-time JSONL logger that writes agent events during AI test runs to
logs/live_agent.jsonl -
Feeds the live agent monitoring page in the log viewer
-
Hidden Study Room (
entrance/.chapel/courtyard/aviary/hall/library/.study/) - New deeply-nested hidden area with
scroll(teaches advanced grep/search) andgrimoireencounter -
Unlocked after completing the library section
-
Log Cleanup Utility (
lib/clean_logs.sh) - New utility script to prune old session logs and screenshots by age or count
-
Dry-run mode (
--dry) for safe preview before deletion -
Help System Scroll (
src/help/scroll) -
Standalone scroll for the help system directory, documenting available help commands
-
Workflow Prompts (
.github/prompts/) -
test-doc-commit-push.prompt.md: Complete release pipeline prompt for Copilot -
tomegame object (entrance/.chapel/courtyard/aviary/hall/library/tome) -
New interactive encounter in the library teaching advanced text processing
-
Expanded help data (
src/help/data/) map.yaml: Additional dungeon areas and connectionsquests.yaml: 3 new quest definitions for advanced areas-
rooms.yaml: 45 lines of new room metadata for hidden areas -
AI test infrastructure improvements (
test/ai/) agent.py: 144 lines added — enhancedTestAgentwith live logging, retry logic, and structured outputsession_runner.py: 86 lines added — session management with log capture and timing metrics-
All AI test files updated to use improved agent and session runner APIs
-
Walkthrough documentation (docs/walkthrough.md)
-
Complete step-by-step walkthrough with SVG screenshot references for every command
-
Agent Mode for AI Assistants (
--agentflag) - Headless Textual TUI mode driven via stdin/stdout protocol
- SVG screenshot capture after every command using Textual's
save_screenshot() SCREENSHOT,STATUS, andEXITmeta-commandsREADY>sentinel for synchronization with programmatic callers--screenshot-dirflag to control screenshot output location-
See docs/agent-protocol.md for full specification
-
Bash Agent REPL (
--agent-bashflag) - Lightweight bash-only agent mode (no Python dependency)
- Same
READY>/CMD>protocol for consistent integration -
Automatic fallback when Python/Textual is unavailable
-
TerminalEngine programmatic API
execute(cmd_line)method for dispatching commands without interactive REPLget_completions(text)method for programmatic tab completionoutput_callbackparameter to route output to Textual widgets-
on_quest_completecallback for quest event handling -
Agent playtest report (docs/agent-playtest-report.md)
- Comprehensive playtest findings from AI-agent-driven session
- 15 recommendations across content, architecture, TUI, and testing
-
Priority matrix for implementation ordering
-
Agent protocol documentation (docs/agent-protocol.md)
- Full stdin/stdout protocol specification
- CLI flag reference for both
main.shandpython3 -m ti.agent -
Integration guide for AI assistants
-
Test suite for agent mode (
test/unit/test_agent.py,test/integration/test_agent_mode.py) - Unit tests for TerminalEngine
execute(),get_completions(), and constructor - Integration tests for the full agent pipeline via subprocess
- Screenshot generation and SVG validation tests
Changed¶
- Integration test structure refresh (
test/integration/) - Replaced older
test_game_scripts.py,test_game_progression.py, andtest_combat.pywith consolidated walkthrough/encounter-focused suites -
Updated test fixtures and log/screenshot plumbing to align with walkthrough manifests
-
Help and room metadata updates (
src/help/bashcrawl_help.sh,src/help/data/rooms.yaml) -
Expanded room/help data wiring to match the updated walkthrough-driven model
-
Viewer analytics/session processing updates (
src/viewer/) -
Updated screenshot/session loaders, analytics engine routes, and gallery/dashboard templates
-
test/conftest.py: Automatically loads.envfrom repo root viapython-dotenv;ANTHROPIC_API_KEYis now picked up without manualexport -
test/requirements.txt: Addedpython-dotenv>=1.0dependency -
Refactored CI workflows (
.github/workflows/) - Consolidated ShellCheck, yamllint, and markdownlint into single
ci.yml— removed duplicates fromcode-quality.ymlandgame-tests.yml - Removed redundant Python sanity-check job from
ci.yml(covered bytest-framework.yml) - Removed
lint-and-formatjob fromcode-quality.yml(now only CodeQL security scan + quality metrics) - Removed inline ShellCheck step from
game-tests.yml(centralized inci.yml) - Dropped
masterbranch references across all workflows (repo only usesmain) - Upgraded
dependency-update.ymlPython version from 3.11 to 3.12 dependency-update.ymlnow updates bothtest/requirements.txtandsrc/terminal-illness/requirements.txt- Replaced inline
pip install yamllintwithibiqlik/action-yamllint@v3action inci.yml -
Cleaned trailing whitespace in
release.yml -
docs/index.md: Added viewer and AI agent test links in the navigation section docs/getting-started.md: Added Observatory viewer quick-start and AI agent test sectiondocs/advanced.md: Expanded with full Observatory viewer and AI test workflow sections-
docs/log-viewer-plan.md: Replaced bydocs/viewer.mdanddocs/log-viewer-reference.md(deleted) -
src/terminal-illness/ti/agent.py— enhanced with improved output handling and protocol robustness src/terminal-illness/ti/filesystem.py— minor fixes for cross-platform path handlingsrc/terminal-illness/ti/terminal_engine.py— 18 lines updated for improved command dispatchdocs/agent-protocol.md— expanded with additional protocol details and exampleslogs/README.md— restructured and simplified documentation for the logs directory.github/copilot-instructions.md— updated with viewer, live logger, and hidden area documentationsetup.sh— minor fix for macOS compatibility (sed -i.bakpath handling)main.shhelp text updated with agent mode flags and examplesmain.shargument parser extended to handle--agent,--agent-bash,--screenshot-dirflags- All SVG screenshots in
screenshots/regenerated with updated TUI rendering
Fixed¶
- Interactive executable stdin handling in TUI engine (
src/terminal-illness/ti/filesystem.py) -
run_script()now accepts optionalstdin_inputand defaults to multiple responses, preventing EOF on scripts with multiplereadprompts (for example statue/monster/ghost) -
Encounter tests for multi-prompt scripts (
test/integration/test_encounters.py,test/integration/test_native_walkthrough.py) - Updated scripted stdin payloads so y/n + follow-up prompts are consumed correctly
-
Added assertions for expected statue reward output when sword path is taken
-
test/ai/session_runner.py:_cmd_letresult now correctly wrapped in aCommandResultobject; previously the raw tuple was returned, causing downstream attribute errors -
main.shline 865: Added# shellcheck disable=SC2163—export -f "$func_name"intentionally exports the function named by the variable, not the variable itself -
lib/native_state.sh: Added# shellcheck disable=SC2317—exit 1afterreturn 1 2>/dev/nullis reachable when the file is executed outside a function context -
CI failures across all workflows
- Fixed
dependency-update.ymlbroken YAML: malformedbodyblock with spuriousbranch:key mid-string - Fixed
test-framework.ymlsetup crash: addedTERM: dumbenv and--quickflag tosetup.shcalls (preventsclearcommand failure in headless CI runners) - Added 10 ShellCheck disable rules to
.shellcheckrc(SC2155, SC2126, SC2010, SC2012, SC2143, SC2043, SC2046, SC2181, SC2295, SC2329) — all style/info-level warnings in helper scripts that were blocking CI - Updated
.yamllint.yml: addedtruthy: check-keys: false(for GH Actionson:key),indentation: indent-sequences: whatever(for standard GH Actions formatting) -
Excluded
.venv/from ShellCheck file discovery inci.yml -
Screenshot gallery rendering (
src/viewer/loaders/screenshots.py, gallery/index templates) _abs_to_rel()converts absolute manifest paths to URL-relative paths using.resolve()_load_manifest()parsesmanifest.jsonand emitsScreenshotobjects with correct paths_parse_screenshot_dir()rewritten with 3-strategy fallback: top-level manifest → subdir manifest →rglob("*.svg")- Stub SVG filter: files < 200 bytes (test fixture stubs) excluded; sessions with only stubs skipped
ScreenshotStore.load_all()passesscreenshots_dirto_parse_screenshot_dirfor path resolution-
Templates updated: all image
srcattributes now usesc.path/sc.screenshots[0].pathinstead of broken string concatenation -
Room visit statistics (
src/viewer/loaders/sessions.py) -
Sessions loader now extracts
roomfromcommandevents (real data format) rather than looking forroom_enterevents that didn't exist; rooms went from 0 → 39 entries across 11 sessions -
Feedback page content (
src/viewer/loaders/feedback.py) - Fixed metrics regex from
(.+?)to([^|\n]+?)to prevent matching across pipe|and newline boundaries -
Added
FeedbackStore.refresh()method for reloading feedback files without restarting the server -
Analytics/feedback API refresh (
src/viewer/routes/api.py) - Added
POST /api/analytics/refreshendpoint (callsstore.refresh()+engine.invalidate_cache()) -
Added
POST /api/feedback/refreshendpoint (callsFeedbackStore.refresh()) -
ls -Fcrash in TUI terminal engine (src/terminal-illness/ti/terminal_engine.py) _cmd_ls(args)now separates flags (strings starting with-) from optional path argument- Flag chars collected into a set;
show_hidden = "a" in flagspassed tofs.ls() -
Fixes
NotADirectoryError: Not a directory: -Fthat appeared in agent session screenshots -
Hidden files in TUI filesystem (
src/terminal-illness/ti/filesystem.py) fs.ls(cwd, path="", show_hidden=False)— newshow_hiddenparameter-
Dotfiles (
.chapel/,.vault/,.rift/,.scrap/) hidden by default; shown withls -a/ls -la/ls -aF -
Merlin AI guide visibility (
src/terminal-illness/ti/chat_context.py) -
GameContextBuilder.build()now callsfs.ls(cwd, "", show_hidden=True)so Merlin can see and mention hidden rooms when guiding players -
Agent screenshot path nesting (
src/terminal-illness/ti/agent.py) - Removed the extra
<timestamp>_agent_session/subdirectory layer; all SVGs andmanifest.jsonnow written directly to--screenshot-dir - Fixes 15 previously failing integration tests in
TestAgentScreenshotsandTestTuiCriticalPath/UIElements/EdgeCaseswhere tests expected flatshot_dir/<name>.svgbut agent wrote to a nested subdir -
Viewer screenshot loader strategy-1 (top-level
manifest.json) now resolves immediately for all new sessions -
textualdependency added totest/requirements.txt— unit tests forBashcrawlAppagent mode previously failed withModuleNotFoundError: No module named 'textual' lib/reset.shexpanded to clean additional stray files from TUI sessions and new game areaslogs/screenshots/.gitkeepremoved — screenshots directory is now created dynamically- TerminalEngine constructor now accepts
output_callbackandon_quest_completeparameters thatBashcrawlAppwas already passing (previously causedTypeError) - BashcrawlApp modal screens (Welcome/Load) no longer block headless operation
when
agent_mode=True action_submit()async handling — properly awaited in Textual 8.0+ to avoidRuntimeWarning: coroutine never awaited
[3.2.0] - 2026-08-01 — TermForge: the emulator becomes a framework¶
The in-browser bash emulator is extracted into TermForge (termforge/), a universal, zero-dependency terminal framework: one environment-agnostic kernel (parser, VFS, Shell, Line protocol, TerminalView) now powers the browser game, real terminal sessions, a lightweight telnet server, and custom dev/monitoring tools. The web game is byte-identical (golden-transcript proven), saves are compatible, and the terminal-core bash game is untouched.
Added¶
termforge/core/— the framework kernel as dual-mode files (classic<script>+ CJS, no build step):parser,vfs(with NEW read-only providers for live-data files),shell(hook spine: preExecute / interceptLine / postExecute / observePipeline / beforeCommand / execDispatch / postCommand; injectable clock/rng/base64),packs/posix+packs/flavour,protocol(the versioned Line contract,docs/schemas/terminal-protocol.v1.md),view+sinks/dom+sinks/ansi(one TerminalView replacing the duplicated story/arcade renderers), andinput(shared history/completion helpers + a LineEditor and byte decoder for stream hosts).- Node hosts (
termforge/node/):host-tty.js(play in a real terminal —make tty-demo) andhost-telnet.js+telnet-codec.js(a minimal RFC 854 subset with NAWS, session caps, idle kick, and an nc-friendly--rawmode —make telnet-demo; loopback-bound by default, seedocs/termforge/telnet-host.md). - Apps (
termforge/apps/):bashcrawl.js(the game as an App descriptor) andprocwatch/(the custom-tool reference: livenode:osmetrics mounted as read-only VFS provider files, browsable with the ordinary posix toolkit;demo.htmlruns it in a browser fromfile://). - JS test suite (
make test-js,node --test, zero npm deps): 62 tests — golden transcripts recorded against the pre-refactor emulator and replayed byte-identically under a pinned vm clock/rng, save-shape + legacy-save round-trips, kernel/pack/view/input units, telnet codec units and a real loopback integration. CI runs it (setup-node 20) plusmake lint-js(node --checkover every tracked JS file). - Vendor pipeline:
termforge/core/is mirrored file-for-file intoweb/assets/js/vendor/termforge/bymake web-build(scripts/vendor_termforge.py), byte-verified bidirectionally byvalidate_static_web.py, pytest, andmake web-test. agentwatch(termforge/apps/agentwatch/,make agentwatch) — an AI-agent task dashboard on the framework: a TaskSource interface projected asboard/agent <id>/feedcommands AND live read-only VFS files (cat agents/forge,grep -r failed .), over any host. Ships a deterministic demo fleet (state ticks once per read — no clock/randomness) and a JSONL adapter that turns the repo's real agent-playtest telemetry (logs/sessions/**) into a live board (make agentwatch ARGS="--data-dir logs/sessions").- uiText copy deck — the framework/content boundary made mechanical:
every brandable string a core pack emits routes through
Shell#text()/DEFAULT_UI_TEXTwith neutral defaults; the game's entire voice (legacy error strings, fortune deck, banner art, figlet default) moved intoGAME_UI_TEXTinruntime.js. A newcontent-separation.test.jsfails the build if game vocabulary appears anywhere undertermforge/core/.
Changed¶
web/assets/js/runtime.js(1852 → ~930 lines) is now the game assembly:class Runtime extends TermForge.Shellwith the full 74-entry handlers literal (still thevalidate_runtime_commands.pycontract — the validator is untouched) andinstallGameHooks()for quests, achievements, daily, trainer, pathfind, and encounters.game.js/arcade.jsshare one TerminalView + DomSink (the twin log renderers and fourescapeHtmlcopies collapse into one);arcade.jspasses{ bare: true }instead of poking the instance.defaultState()now declares two previously-implicit fields (prevCwd,stats.lastPipedIn); persisted-save key order shifts accordingly (additive; legacy saves load unchanged — fixture-proven).- Host CLI parsing now uses node's standard
util.parseArgs(allowNegativefor--no-color; engines floor is node >= 20.16); VFS provider mounts now list in their parent directory as file or directory according to the mount root's own type.
Fixed¶
- Committed
web/data/world.jsonwas stale after the #75 markdown unwrap (freshness test red from a clean checkout).
[3.1.0] - 2026-07-06 — The Great Reduction + Web Flagship¶
The repo is reduced to two player surfaces plus one harness: the pure-bash terminal game (played with real cd/cat — no launcher) and a static browser trainer generated from the same content, plus a lean MCP playtest harness that drives the real bash game. Net: ~350 files and ~75k lines removed.
Added¶
- Web mode router (
web/assets/js/shell.js): top-nav Story · Arcade · Reference, first-visit landing overlay, hash routing (#/story…), Alt+½/3 shortcuts, XP bridge, toasts. - Practice Arcade (
web/assets/js/arcade.js): mini-game framework over the shared bash emulator — each game is (seed world + goal predicate + scoring) on a scopedRuntime. Four games: Path Navigator (navigate the real dungeon), grep/find Hunt (find the sigil-bearing file), Pipe Puzzle (transform INPUT into TARGET), Command Flash (drill decks generated fromcommands.yaml/tutorials.yaml+ curated decks). Scores persist; wins feed story XP. - Reference mode + concept spotlight (
web/assets/js/reference.js): searchable cheatsheet library from the command registries, a story-sidebar card showing what the current room teaches, and inline syntax hints while typing. - Bash-emulator kernel upgrades (
web/assets/js/runtime.js): output redirection (>,>>), glob expansion (*,?, quote-aware), multi-file +-r/-l/-n/-c/-wand real-regexgrep,sort -u,uniq -c/-d, and newcut,tr,sed,nl,revcommands. - Arcade content registry (
src/help/data/arcade.yaml) exported toweb/data/arcade.jsonbyexport_static_web.py(validated byvalidate_static_web.py). - Lean playtest harness (
src/playtest/): FastMCP server (bashcrawl_start/observe/command/report_gap) driving a persistent PTY bash session in a sandbox copy of the dungeon; JSONL recorder; scorer with rooms/scrolls gates. Smoke-tested bytest/integration/test_mcp_server.py.
Removed¶
- Python Textual TUI + old MCP/agent harness (
src/terminal-illness/), Flask log viewer (src/viewer/),screenshots/(167 SVGs),main.shlauncher, Docker/devcontainer tooling,.archives/, and the launcher-onlylib/scripts (emulator,state,ui,quests,room_loader, …).lib/retainscolors.sh,log.sh,yaml_reader.sh,reset.sh. - TUI/agent/viewer test suites (
test/ai/,test/demo/,test/analysis/, and theti.*unit/integration tests) and their CI workflows (test-framework,code-quality,release).
Changed¶
- CI/CD redesigned (5 workflows → 3):
ci.ymlis now the single PR/push gate with three jobs — consolidatedlint(one runner for shellcheck/yamllint/ markdownlint/ruff),test(the full pytest suite now runs in CI, closing a gap where 175 tests ran nowhere, plusmake validate-contractsand junit artifacts), andmacos-smoke(real gameplay on stock macOS bash 3.2, replacing the Windows matrix the unix-only suite couldn't run).game-tests.ymldeleted — its unique checks (shebangs, boilerplate, unlock targets, main-path scroll depth) moved intovalidate_content_contracts.pyso they run locally too.dependency-update.ymldeleted — redundant with Dependabot, and itspip freezerewrite would have destroyed the commented requirements files.pages.ymlgains pip caching and usesmake web-test;blank-slate-audit.ymlnow writes the scorer verdict to the run summary.make validate-contractsadditionally runs the content-index check. - Terminal play is launcher-free:
./setup.sh && cd entrance && cat scroll. - Python deps reduced to
pyyaml+mcp(dev:pytest,pytest-timeout,jsonschema,ruff). validate_runtime_commands.pyvalidates the single remaining runtime (the web emulator) againstruntime_commands.yaml.scripts/playtest.shtargetsplaytest.mcp_serverand gates on median rooms-visited / scrolls-read (BLANK_SLATE_GATE_ROOMS/_SCROLLS).- Makefile, CI workflows,
.mcp.json,.vscode/, docs, README, and CLAUDE.md rewritten for the two-surface architecture.