Skip to content

BeSpoke Engine 0.1.0

Choose a tag to compare

@aedmark aedmark released this 17 Nov 12:10
· 137 commits to main since this release

Changelog

User-visible changes to the BeSpoke Engine, newest first.

Unreleased

0.1.0 - 2026-11-16

  • Published the first versioned BeSpoke Engine release (P37-03). bespoke --version, bespoke-proofs --version, and build.zig.zon report 0.1.0; zig build version-check runs both CLIs and rejects a mismatch before a release is tagged.

  • The engine builds with Zig 0.17.1 (P37-01), and a game made by bespoke init asks for it too. Functions that read files or the clock take an io: std.Io argument as they take an allocator, and main receives both from std.process.Init (D-104); docs/AUTHORING.md shows the new signatures. The SDL2 headers come through the build's translate-C step instead of @cImport. Every transcript, render, browser, and audio golden is unchanged.

  • Typed commands work in the browser (P34-04): The Larkspur Observatory plays on the showcase, where Enter opens the command bar and a line such as "go to the archive" walks Ines there, and the page made by bespoke init has the bar too. No proof is desktop-only any more.

  • The Castle Fire Escape plays in the browser (P34-03): the showcase has a Fire Escape tab, where USE on the trough fills the bucket, USE on the torch lights the tapestry, and [S] plays the next step.

  • Sound on the showcase, the proof pages, and the page bespoke init makes now plays through an AudioWorklet instead of the deprecated ScriptProcessorNode (P34-05), opened from a file or a server alike.

  • site/saltmarket.html plays The Saltmarket on its own page. In the browser the three ways in now work as on desktop: no gate is locked until you choose, Tamsin walks only through the open gate, a click on a locked one says "That way is blocked.", and taking the logbook runs the way you chose (D-052, D-053).

  • The old flags --gk3, --dott, --darko, --loom, and --atlantis are gone (P35-10); use --borrowed-beard, --three-tides, --weathercock, --bell-tower, and --saltmarket. No third-party name is left in the code, site, or manual, and the docs check fails if one returns.

  • Algiers: Three Paths is now The Saltmarket (--saltmarket, P35-09): Tamsin gets Pilot Ashe's lost logbook out of Broker Quince's stall by Cunning, Muscle, or Crew, and the way she chooses locks the other two. --atlantis still works.

  • The Bell Tower runs with --bell-tower (P35-08), and its bell-keeper is now Maren. --loom still works. The draft, weave, and distaff keywords stay as they are (D-102).

  • site/weathercock.html plays The Copper Weathercock on its own page, with how to play and a hidden walkthrough. The browser deck can now be played by hand: Take and Use work on the crank, the note, and the weathercock; the attic stairs and the Customs House's street door and hill road lead between the scenes, in the window too, where they replace the 1, 2, 3 scene keys; Hester Quill takes the note only once Wren has it from the post box; and the borrowed month's countdown shows at the top of the stage, in the window too.

  • The Middlesex Anomaly is now The Copper Weathercock (--weathercock, P35-07): the Customs House weathercock falls through Wren's attic 28 days early and the world splits into a borrowed month. Wren opens the Customs House sluice, gets a note to Hester Quill on Beacon Hill, and carries the weathercock into the fog whirl before the countdown runs out; if it runs out, the month tears away and she rewinds. --darko still works.

  • The Well of Three Tides plays the same in the desktop window as in the browser: the window sends every verb, item, and dialogue choice to the script, its props sit on the stage where they can be clicked, and dropping something down a Tide Well says it comes up in Ossie's bucket in 1712.

  • site/tides.html plays The Well of Three Tides on its own page: buttons under the stage switch between Ossie, Nell, and Juno, and items dropped down a Tide Well come up in another century. The whole puzzle can now be played by hand in the browser.

  • Scripts may quote a name to use characters a word cannot hold, such as scene: "Brine's Boarding House" (D-101).

  • The Tentacle Trio is now The Well of Three Tides (--three-tides, P35-06): Ossie in 1712, Nell in 1912, and Juno in 2112 pass things through Doctor Brine's Tide Wells, age port into vinegar in a cornerstone box, and free Juno from a tree that Founder Gale fells two centuries earlier. --dott still works.

  • A long line in the message log wraps onto the next row instead of shrinking to tiny text and being cut off (D-099), on desktop and in the browser. In The Donkey of Lamp Point, catching Cudgel's rope no longer also says the "too early" line.

  • site/donkey.html plays The Donkey of Lamp Point on its own page, with how to play and a hidden walkthrough. In the browser, the room change now moves Tamsin into the cellar and back, and one click on the hatch gets her shoved once, not twice.

  • The Lochmarne Goat is now The Donkey of Lamp Point (--lamp-point, P35-05): Tamsin gets past Cudgel, the lighthouse keeper's donkey, to the wreckers' cellar by hauling an old anchor into his rope line while he ambles back to his post. Keys L and W change scenes. --goat still works.

  • Story lines and hints show in a three-line log under the playfield, newest brightest, on desktop and in the browser; lines no longer hang forever or vanish before they are read (D-099). Speakers read as words ("Judge Marrow:").

  • Walking onto a doorway changes rooms on desktop and in the browser alike (D-100): Brackwater Barbs gains doorways from the Tidewalk to Vell's Fencing Yard and the Drowned Lantern, and the Borrowed Beard's office lane is on screen. The Barbs fencers start spread along the Tidewalk, names no longer print over each other, and scenes with more than three marks or props keep them all on the stage.

  • The browser's state inspector (I) is now the desktop State tab, drawn in the drawer's place, and the standalone pages forward its keys (D-098).

  • The browser and the desktop window now draw the same frame (D-097): the standalone pages and the showcase show each proof's desktop scenery, verb bar, item tray, dialogue panel, and banners at 1280x720, and the desktop draws through the same canvas. The browser keeps its own keys, item rules, exits, page buttons, and state inspector.

  • The Pip-Spitting Green in the browser shows the wind: "WIND: CALM" under the title, and a tailwind line with arrows across the field while the breeze blows (D-096).

  • site/pips.html has a Spit button (P) that spits from where Tamsin stands (D-095), so a breeze is not lost to the walk over to the judge.

  • Two more standalone pages to share (D-094): site/pips.html plays The Pip-Spitting Green and site/beard.html plays The Borrowed Beard, each with how to play and a hidden walkthrough. The browser now has an item tray: click an item to use it, or to take it in hand and use it on a person, a prop, another item, or yourself. Walking onto the Beard's stairs, yard path, or doors changes rooms; talking to Judge Marrow offers the spit. A silent action now says what happened, and the Green's weather no longer stands on the chalk line as a person.

  • The item tray fits the window: when carried items would run off the right edge, their labels shrink, then are cut short, and every item stays clickable where it is drawn. In The Borrowed Beard, making the grey beard uses up the dog fur and the honey, so they leave the tray.

  • Names on screen read as words (D-093): marks, props, items, and action sentences show "Dog Bed", "Watering Can", "Room 7" instead of "DogBed", "WateringCan", "Room7", in the window and the browser. A mark shows "[Walk to ...]" only when a click would walk there, and the label goes away once you arrive; before, it stayed after every walk and showed over people whatever verb was selected. In the window, the person under the mouse now gets a ring and the action a click would take, such as "[Take Bramble]", and only the thing a click would act on lights up; before, people never lit up. Bramble is drawn so he no longer looks like a mark.

  • The player now walks to whoever or whatever it acts on before acting (D-092), in every proof's window and in the browser: TALK, TAKE, USE, and an item used on a person or prop walk the player to the mark beside the target, then act. LOOK still works from where the player stands. A walk that cannot reach the target says so instead of acting.

  • In The Borrowed Beard, Captain Rook now guards his coat while he stands at his door: Tamsin can borrow his papers only while he paces at the stairs, and says "Not with Rook standing right there. I'll wait till he's off down the landing." otherwise. The step keys and the browser's [S] wait for him to leave.

  • Using an item on Rook's Door in The Borrowed Beard, or on the Pegs in The Pip-Spitting Green, now has no effect instead of acting like TAKE or USE on them; only the verb or the step key does that.

  • The Cat Moustache proof is now The Borrowed Beard, an original (P35-04). Tamsin needs the last berth on the packet boat, held for the grey-bearded Captain Ansel Rook. She takes charcoal, sail tape, and honey from her washstand, borrows Rook's sailing papers and draws a beard on his portrait, tapes the gap under the net-loft gate and soaks Bramble the dog through it for a tuft of grey fur, and wears the beard to Purser Wick. Run it with --borrowed-beard; --gk3 and --cat-moustache still work. I, Y, and O change scenes. The combining chain, scenes, dialogue pruning, and rewind are unchanged; the browser deck, gallery, and manual follow.

  • Footer hints in the window wrap onto two lines instead of running off the edge, the timeline label is larger and centred in its bar and never shows a last tick below the current one, and banners no longer cover the timeline (D-091). The third-party lint now also counts names written in capitals; its baseline rose from 2,444 to 2,517 terms, all real leftovers it had missed.

  • Banners in the window now stay up long enough to read (D-090): at least two seconds plus a little per character, timed by the clock instead of by redrawn frames, which made them flash by on high-refresh displays. In The Pip-Spitting Green, spoken lines wait for a click and hold the clock, the judge stays at the Harbour Wall for the whole 45-second distraction, and the narrator announces a sea breeze that comes every 65 seconds and lasts 20. The judge now works the crowd with real lines in passing banners; he used to say his script's own stage notes. Using the treacle cider from the inventory now works.

  • The Spitting Contest proof is now The Pip-Spitting Green, an original (P35-03). Tamsin enters the cherry-pit spitting contest at the Brackwater Harvest Fair. She blows a conch so Judge Marrow looks for the herring fleet, moves the distance pegs, drinks a thick treacle cider, and waits for a sea breeze. The keys are now C (conch), D (drink), P (pegs), and S (spit); in this proof they replace the console, debug, and save-drawer keys, which `, F1, and F2 still open. The rules, checks, and --spitting-contest flag are unchanged; the browser deck, gallery, and manual follow.

  • Every proof has longer music (D-089, P34-08). Each of the eleven tracks plays eight written sections in an arrangement, with intros, a chorus, a bridge, key changes, and parts dropping out, and runs more than two minutes before repeating; each keeps its old loop as its main theme. In the engine, audio.Music takes sections and an arrangement of SectionPlay passes that can transpose and mute parts; tracks without one play as before.

  • Brackwater Barbs plays like a duel now (D-078). Whoever wins a round attacks next. When you miss, your opponent presses on with a new barb instead of answering his own, and a lost duel ends with his victory line. You learn a comeback by hearing an opponent use it against your barb: Bosun Pike and Old Gannet each know half, and Mistress Vell always attacks. Press G to duel Old Gannet. In the engine, Duel.resolve_round now teaches each fighter what it hears, and Duel.answer gives a computer-controlled opponent's reply.

  • Dialogue is readable now (D-077). The window and the browser show the open dialogue in a panel along the bottom of the stage: the speaker's name on its own row, the line wrapped, and numbered choices that wrap. Before, the desktop balloon ran text past its edge and the browser crammed choices into a one-line banner without the question. Speaker names read as words (BosunPike shows as Bosun Pike), the browser answers a click on a choice, and its banner wraps over two rows instead of cutting off at 96 characters.

  • Fixed the duel proof in the window and the browser: each round now shows the barb you are answering, a lost round shows the comeback that beat you, and the opponent throws a new barb every round. Before, the opponent repeated one barb, so a single learned comeback won every round. In the window, clicking a mark now walks Tamsin there. duel.Duel gains challenge_text, reply_text, and next_challenge.

  • In the browser, a click on a person now lands on the circle you see (D-088): people sharing a spot fan out with their names on separate rows, and pointing at one rings it in gold and names the action, such as "TALK Old Gannet".

  • site/barbs.html is a standalone Brackwater Barbs page to share (D-086): one file, the duel alone, with every fencer reachable by talking to them or pressing [S]. The release export includes it.

  • The third-party name lint no longer treats < and > in code as an HTML tag (D-087); it had hidden about 250 names, and its baseline now starts from the true count of 2,612.

  • Each Tidewalk fencer now has three stumped lines of its own (D-085), spoken in rotation when it has no comeback for Tamsin's barb.

  • The dialogue panel is centred and as wide as its text (D-084), wraps lines at 60 characters, and shows a scroll bar past six choices in place of the scroll hint.

  • Duel offers and attacks are drawn at random each turn (D-083): a player who knows more than eight barbs sees a different handful each turn, a comeback that counters the barb is always offered, and every fencer, Mistress Vell included, throws its barbs in a new order each encounter. Rewind replays the same draws.

  • Brackwater Barbs has a third Tidewalk fencer, Dory Quill (D-082), and each launch deals the fencers different barbs and comebacks, some known to one fencer only. While attacking, Tamsin can flub with a joke to hand the fencer the round and hear a new barb.

  • Tamsin can answer any barb with a joke (D-081): every defence offers two after her known comebacks, rotating through eight lines, five of them new from the maintainer. A joke always loses the round.

  • Results now show one message at a time in the dialogue panel (D-080), each waiting for a click, Enter, or Space before the next. In Brackwater Barbs a round is up to four messages: Tamsin's chosen line in her voice, the opponent's reply, the outcome, and the points, and the next choices appear once all are read. Desktop and browser both.

  • Duel rounds now score points (D-079): the round's winner gains a point and the loser keeps theirs, so a parry is never undone, and the first to three wins. In Brackwater Barbs each barb can be thrown once per duel. Tamsin now beats Old Gannet and, with more practice, Bosun Pike. The Tidewalk fencers also patrol in the desktop window.

  • The Insult Sword Fighting proof is now Brackwater Barbs, an original (P35-02): Tamsin learns comebacks by losing to barbs on the Tidewalk, matches Mistress Vell's own versions of the barbs in her Fencing Yard, and wears out the Drowned Lantern's barkeep with questions about Harbourmaster Odell. The mechanics, the checks, and the --sword-fighting flag are unchanged; the browser deck and the showcase's dialogue samples follow.

  • A duel may now list several fallback lines (D-076). A fighter who knows no comeback gets one per fumbled round, in order; the count is a fact, so it rewinds with the world. Packages are format version 14; older packages load as before.

  • Added tools/check_third_party.py (P35-01, D-075), run by check_docs.py: it counts the commercial titles, characters, places, and lines the proofs borrow, and fails if any count rises. Today's baseline is 2,699 terms in 41 files; Phase 35 brings it to zero.

  • The showcase's Manual link now points to docs/manual.html beside the page, where the published site serves it (Q-007). Opening site/index.html from a checkout no longer reaches the manual through that link; open docs/manual.html directly.

  • tools/deploy_site.py only exports now (D-074): python3 tools/deploy_site.py export still writes dist/site/ with sharing metadata and an offline cache, and you upload it yourself. The upload command and its Neocities API key handling are gone.

  • where guards on on cue handlers now work (D-072). on cue Steal(Cat, victim) where CharmedBy(victim, _) and Carries(victim, loot): runs only when the cue's victim is charmed and carries something; otherwise the cue goes to the next, less specific handler, such as on cue Steal(thief, victim):, or does nothing. Before, the guard was accepted and ignored. Packages are format version 13; older packages load as before. Inside the handler body, lowercase parameters are still read as names, not bound.

  • The time-branch helpers do what their names say (D-073). The Novikov check now rejects an action whose declared consequences lead to the paradox (it used to ignore the action), the dependency chain search stops on a cycle instead of running forever, the branch closure no longer looks for the proof-specific VortexReady fact, and existence decay is reported in whole per mille instead of a float. validate_novikov_consistency takes the consequences as a new argument.

  • The package loader rejects pattern variable indexes of 8 or more in reactive rules; a crafted package could crash it before.

  • Added Phase 35 to the roadmap: rewriting the proofs that borrow from commercial games and a film as originals.

  • Corrected front-facing claims after a sanity pass (2026-11-13). Snapshots copy the fact columns and name tables as raw bytes with a checksum; they were described as a single memcpy. Facts store an expiry tick, not a counting-down TTL. The showcase's Insult Sword Fighting dialogue sample used keywords the language does not have (strike, yield); both dialogue samples are now excerpts of the proof's real script. The README no longer lists finished work (script-declared societies, the engine/proof purge) as planned, says which proofs lack a rewind check (Algiers), and names what has not been tested (macOS, Windows, several desktop windows). The manual no longer claims any-OS builds or sub-microsecond pathfinding, and its time-branch entry describes the code instead of film terms. AGENTS.md now names SDL2 and the 1 Hz default tick instead of Raylib/Sokol and 20 or 60 Hz.

  • Added docs/GLOSSARY.md: the project's terms in plain language and the word to use in user-facing copy (for example "expiry tick", not TTL; "branch world", not tangent universe; "routine", not fiber). The README, showcase, and gallery now use those words, and the gallery lists the browser decks in key order.

  • The showcase now plays eleven proofs in the browser, with sound (P30-01, D-071). Insult Sword Fighting (answer insults with the number keys), Algiers (pick a path), The Middlesex Anomaly (a tangent universe on a countdown, which the timeline can rewind), and The Bell Tower (play notes with C to B) join the seven, each running its own script. Turn on AUDIO to hear the engine's own synthesizer: scores, scene music, and effects as on desktop; bespoke init web builds get a Sound button too.

  • The browser has the state inspector (P30-04, D-070). Press I on the showcase or in a bespoke init web build: the game pauses and the stage shows the world as a graph of facts around one entity, with its values, the open dialogue's options (pruned ones in red), and what expires next. Arrows select, Enter centres, Backspace goes back, Home resets, F filters, and clicking a node centres on it, as on the desktop.

  • The showcase's seven decks now run their proofs' real scripts in the browser (P30-05, D-069). Pick a verb and click people and props to trigger the scripts' own handlers and dialogue, answer with the number keys, and press [S] (now Solve Step) to play the desktop proof's solution one step at a time. The Living Village runs the real society engine. The stage shows only the current scene, scaled to fit.

  • The showcase now has a gallery of all thirteen proofs (P30-03, D-068): each card plays its deck in the viewport or names its desktop command, and View script shows the proof's real script, highlighted with line numbers, in a viewer that follows the active deck. A new How It Works section draws the engine's architecture, the path from a player's action to a story beat, and the build from one script to every platform. The hand-written code snippets that had drifted from the proofs are gone.

  • The showcase is ready to publish (P30-02, D-067). Its WebAssembly module shrank from 1.28 MB to 97 KB (the page from 1.78 MB to 200 KB) by no longer shipping the runtime's empty state. python3 tools/deploy_site.py export --site-url https://NAME.neocities.org/ writes dist/site/ with sharing metadata and an offline cache, and NEOCITIES_API_KEY=... python3 tools/deploy_site.py upload --yes uploads only the files that changed (without --yes it lists them).

  • bespoke init projects are now a full starter template (P29-03, D-066). zig build -Dbundle produces a single executable with the compiled script inside. zig build web builds the game for a browser (the engine's WebAssembly runtime now runs scripts: speech and choices in the banner, number keys answer). node web/smoke.js checks the browser build, and .github/workflows/build.yml is written to build and test on Linux, macOS, and Windows on GitHub (it has not run yet). The engine's zig build test-template checks the template end to end. The engine's static library is now libbespoke-core.a.

  • People listed in a scene's cast: now start on that scene's first mark in bespoke run, bespoke init projects, and any host that calls host.place_cast (D-065). Before, someone with no routine was never placed, so they could not be seen, named, or talked to. Routine actors that are in a cast now start in their own scene instead of on the script's first mark. .bspk packages are format version 12; older packages still load and place nobody.

  • Added the authoring guide, docs/AUTHORING.md (P29-02, D-064): start a project, the model, walkthroughs for a scene, a dialogue, and a reactive puzzle, testing, the host API, and known limits. zig build test compiles every script in it and plays the walkthroughs. The manual gains an Authoring Games section.

  • bespoke run (and every bespoke init project) is now playable: click a dialogue option or press its number to answer, press Enter to type commands such as talk to pilot or use match on lantern, and read each spoken line in the banner. The window acts for the actor of the script's first routine. Headless runs now print speech, scene changes, and offered choices with their tick.

  • bespoke check, bespoke compile, and bespoke run now print compile error messages from memory the check result owns. The text was read after the parser that held it had returned, so it could print garbage. CheckResult.diagnostic is now a method, and CheckResult.message() returns the text.

  • Fixed whole-line comments. A line that starts with # or ~ (after any indentation) is now ignored entirely; before, its text was read as code, so a comment mentioning a keyword such as when, score, or play failed to compile.

  • Added bespoke init <name> (P29-01, D-063). It creates a standalone game project: a build.zig that depends on this engine checkout, a host that runs scripts/main.bespoke in a window or headless, a starter lighthouse story with an agenda, dialogue, and music, and tests you run with zig build test. --engine <dir> points the project at another checkout.

  • Completed Phase 28: scripts compose and direct their own music (P28-03, D-062). Declare score Name: with lead, bass, chords, and drums MML lines and scene lines (or the one-line score Name: "t120 o4 l8 cdef e2"); a scene plays its score, and play score Chase / stop score in any routine, cue, or when rule override it. Music choice is saved and rewound with the world. bespoke run now plays a script's scores and, headless, prints each change of music; try scenarios/night_watch.bespoke. Packages are format version 11.

  • MML scores now play (P28-02, D-061). A soundtrack Music can carry an MmlScore of four parts (lead, bass, chords, percussion) instead of a grid pattern. Parts share one tempo, loop together from their L once every part has finished, and support eight @ envelopes (grid, organ, pluck, long fade, swell, staccato, tremolo, soft pad) and v volume. Grid tracks sound exactly as before.

  • Started Phase 28 with an MML parser (P28-01, D-060). bespoke.mml.parse reads one track of Music Macro Language, such as "t120 o4 l8 cdef e2", into timed note, rest, drum, tempo, volume, and envelope events, with ties, [ ]n repeats, and an L loop point; percussion tracks use k, s, and h. Scripts cannot play scores yet (P28-02, P28-03).

  • Completed Phase 27 with state inspector navigation (P27-03, D-059). In the State tab, Left and Right select a connected entity, Enter or a click centres on it, Backspace goes back (up to eight steps), and Home returns to the default view. F cycles a filter: all facts, beliefs only, then each relation in the frame; the footer names the active filter.

  • Added dialogue and causality detail to the state inspector (P27-02, D-058). An open scripted choice set now shows every source option in order, marks offered choices green, marks pruned choices red with their first failed guard, and preserves that evidence through save and rewind. A "Next to Happen" list orders the next six captured fact expirations by tick without running the simulation ahead. Generated and older dialogue sets remain inspectable as all-active choices.

  • Added the state inspector (P27-01, D-058). Press P, then Tab to the new State tab: the selected entity sits in the centre with its connected entities around it, each fact drawn as a labelled arrow, beliefs in purple, and colours showing how long each fact has left (white permanent, green, amber, red, grey for just expired). Values and states are listed beside the graph. The window now copies up to 128 facts per frame.

  • Completed Phase 26 with the command bar (P26-03, D-057). Windows that enable it show a bar above the verb row: Enter focuses it and every key then types, Esc leaves, Up and Down recall the last eight lines, and Tab completes from the words in scope. The Larkspur Observatory turns it on: type "go to the archive", "take the slip", or "ask the rival about the slip", and an ambiguous "examine the telescope" asks which you mean.

  • Typed commands now run (P26-02, D-057). host.run_command turns a line such as "pour grog into mug" into the script's cue, walks for "go to the hatch", asks "Which do you mean: the brass key or the iron key?" when a noun is ambiguous and accepts a one-word answer, and replies "I don't know the word", "I don't understand that.", "You don't see that here.", or "Nothing happens." The command bar in the window follows in P26-03.

  • Added the vocabulary for typed commands (P26-01, D-057). Scripts declare sentence shapes with command Pours: "pour <thing> into <thing>" and extra noun words with alias ExposureSlip: "slip", "receipt"; the engine supplies shapes for looking, using, talking, and walking. Nouns resolve only against what the actor's room shows and what the actor carries, and two matches are reported as ambiguous. Parsing a typed line into a cue and the command bar follow in P26-02 and P26-03. .bspk packages are now format version 10.

  • Completed Phase 33 with The Larkspur Observatory (P33-03, --observatory). Ines investigates a missing comet plate while three staff go about their routines: the director comes to steer her out of the darkroom, a rival astronomer plants an alibi if she reads the log before finding the exposure slip, and the night porter warns her away from the generator shed. Evidence she carries changes how each encounter ends, and the first night can be rewound and replayed informed.

  • NPCs with an agenda now chase and intercept (P33-02, D-056). A pursuing actor walks to its target, re-planning when the target moves on, and waits until both stand still on the same mark; then the script's on cue Intercepts(Actor, Target, Agenda): handler runs, where a choice block can hold the conversation. While pursuing, the actor carries Pursuing, and emergent-society routines leave its movement alone.

  • Added agendas, the first part of proactive social agency (P33-01, D-038, D-056). An agenda declaration names an actor, a target, a priority, an optional cooldown or once, and requires/unless trigger lines, so an NPC can react to what the player did or failed to do. The engine keeps each agenda's Idle/Pursuing/Done stage and cooldown as World facts, picks one pursuer per target by priority and route distance, and runs through host.tick. Pursuit and interception follow in P33-02. .bspk packages are now format version 9.

  • Completed Phase 25 with The Castle Fire Escape (P25-03, --grid). Wren burns a gallery tapestry to find a hidden door, then throws a bucket of trough water on the door before the fire reaches it; the water floods back and douses the corridor. Walking into the fire scorches her and a burned door collapses into rubble; both are undone by rewind. The window draws each grid cell's fire, smoke, water, and rubble.

  • Added grid cellular automata (P25-02, D-055). Grid declarations take burn, spread, dissipate, and flow rates and burning and smoke cells. Fire spreads to flammable dry neighbours and burns out, smoke lingers then clears, liquid floods around blocking cells and douses fire, and actors standing in hazards carry InBurningCell, InSmokeCell, or InLiquidCell states that when rules can react to. Everything runs through host.tick and rewinds with the World. .bspk packages are now format version 8 and still load version 7 grids with no rules.

  • Added a discrete grid overlay for rooms (P25-01, D-054). A grid <Name> in <Room>: declaration sets size, cell size, origin, flammable, liquid, and blocking cells or rectangles, and place <Mark> x y to put a mark on a cell. Cell attributes are World facts, so saves and rewinds restore them; world-aware walks plan around blocking cells. .bspk packages are now format version 7 and still load versions 1 through 6.

  • Completed Phase 24 with The Fate of Atlantis: Algiers (P24-03, --atlantis). Three stageplay paths (Wits, Fists, Team) lock rival bazaar gates, prune Omar's dialogue to the selected approach, and run only their own solution routine. A generated dialogue selects the route in the native window, and the headless proof exercises all three solutions and their transcript golden.

  • Added dynamic route topology and dialogue mutation (P24-02, D-053): path initializers can assert WaypointBlocked(Mark) facts, and scripted walks use SpatialSystem.walk_to_with_world to plan around those waypoints without mutating the graph. Path-asserted Trapped and PortalBlocked facts feed portal access, and PathActive-guarded choices prune NPC repertoires. Locks apply when a walk is planned; an in-flight walk keeps its path.

  • Added stageplay path declarations (P24-01, D-052): path Wits: blocks own fact assertions and routines. VM.select_path records PathActive(Name) in World facts, runs the path initializer on the next tick, and refuses a second route with PathAlreadyChosen; path-owned routines halt when their route is inactive. The existing package routine table carries path initializers without a format bump.

  • Added generic, script-declared container degradation (P23-01, D-050). Stable vessel entities now carry fact-backed contents, volume, damage stage, exposure deadline, and terminal failure waypoint; host.tick advances the lifecycle so snapshots and rewinds restore it completely. .bspk format version 5 carries degradation profiles and still loads versions 1 through 4.

  • Added atomic compatible-vessel pouring and movement spill (P23-02, D-051). Pours conserve exact volume, preserve both vessels' damage, restart only the destination deadline, and fail without partial mutation. Empty vessels stop degrading; spill N follows a carried vessel's moving holder. .bspk format version 6 stores spill rates and still loads v5 profiles.

  • Completed Phase 23 with the Caustic Grog vertical slice (P23-03, --grog): Mara carries corrosive grog through three script-declared cups, pours A to B to C before each cup fails, and must deliver four measures to Ivo's cell lock. The proof demonstrates terminal failure, rewind, a full World/Spatial/VM save round-trip, exact volume accounting, and a procedural sizzle effect; the script owns the vessels, capacities, stages, spill rate, cues, and dialogue. A carried vessel's terminal failure location now resolves through its Carries holder.

  • The browser showcase now includes Caustic Grog (P23-03), bringing the embedded bespoke-proofs.wasm to seven decks. [S] pours A to B and then B to C; the deck's own after-tick rule spills while Mara walks and advances the same stage ladder. The browser deck is a stage-level demonstration; the desktop proof remains the full save and rewind verification.

  • Temporal sessions now route VM execution, dialogue, display state, and gameplay actions through the active hypervisor branch (P31-05, D-049), returning to primary after resolution or expiry. Darko's interactive flood, letter, inventory, and vortex actions now satisfy the same branch loop-closure check used by the hypervisor.

  • Temporal hypervisor state now saves and restores atomically with the world (P31-04, D-048). .sav version 2 adds a length-delimited branch envelope carrying the branch world, countdown, collapse state, teleology, and dream residue; version 1 saves stay readable by non-temporal loaders. Darko's scrub, rewind, quick-save, and load use the temporal session, so the countdown and active branch cannot desynchronize from the primary world.

  • The public showcase site now runs the real embedded bespoke-proofs.wasm (P30-01 partial). tools/build_site.py embeds the module and tools/site_simulator.js drives the proof decks through the wasm_* exports, with the same pointer, key, timeline, catalyst, and pause controls as the desktop proofs. The page remains a single self-contained file; its old JavaScript decks, fact list, action bank, and event stream are gone. Audio and the remaining three decks are open.

  • Removed the embedded WebAssembly simulator deck and base64 payload from docs/manual.html in favor of the standalone interactive viewport on site/index.html (D-047). Rebuilding docs/manual.html no longer requires zig build wasm-proofs, and the manual's payload size is reduced from 1.8 MB to ~204 KB.

  • Insult Sword Fighting is playable in the window (P32-23): D and C start duels against Pirate Bob and Carla, 1 through 5 answer the round's generated reply set, T exercises inquiry fatigue on the barkeep, and W advances 50 ticks. The script declares win 3, active rounds survive rewinds, and the headless golden is unchanged.

  • Interactive dialogue can now run from script choice blocks (P32-30, D-046): the VM records the pruned options as World facts, suspends the fiber, and resumes at the selected body. Hosts can open the same lifecycle for runtime-generated choices with VM.open_generated_dialogue and resolve them with VM.choose; RenderFrame.dialogue and Session.choose_dialogue carry it to a window. Dialogue state survives snapshots and rewinds, and the GK3 Buthane conversation now runs through its script's choices with an unchanged golden.

  • Scripts can declare complete emergent societies and dialogue duels (P32-22, P32-24, D-045). society blocks configure needs, rosters, roles, routines, places, friendships, and vocabulary; duel blocks configure challenge/reply pairs, tier variants and assignments, and inquiry-fatigue stages. The Living Village and Insult Sword Fighting now consume their script declarations instead of Zig configuration tables, with unchanged goldens.

  • .bspk packages are now format version 4 and carry compiled society and duel declarations. Versions 1 through 3 still load with empty declaration tables (D-045).

Fixed

  • The Larkspur Observatory and Castle Fire Escape windows now show what characters say on the banner; before, script speech was spoken but never drawn. Pressing an observatory key in the wrong place says where it works, [4] confronts Pell when he is on Ines's mark or the next one (he walks his rounds, so clicking his sprite was unreliable), and every staff member answers when spoken to.
  • SpatialSystem.walk_to now turns an in-flight actor back toward the waypoint it just left and raises the normal arrival edge there (P32-25).
  • The Spitting Contest and GK3 proof runners now send player intent through their DSL cue handlers instead of writing puzzle facts from Zig; their transcripts use the dialogue the scripts emit (P32-26).
  • The WebAssembly module no longer faults on its first call, wasm_init: it now has an 8 MB stack, where its 1.2 MB runtime overflowed the default 1 MB (D-042).

Added

  • tools/wasm_smoke.js: runs both WebAssembly modules in Node through every deck.
  • DisplayWindow.init_offscreen, frame_hash, and save_frame_bmp (P32-02a): a window that draws into memory with SDL's software rasterizer, for tests and for looking at a frame without a display.
  • Added arrival rules to the BeSpoke DSL (P32-18, D-036): when <Actor> arrives at <Mark>: fires once when the actor completes a walk at that mark, in the tick the walk ends, and interrupts the actor's routine like other when rules. Resting on a mark, passing through it, and being placed there do not fire. An undeclared mark or a missing at is a compile error with line and column. The Lochmarne Goat proof now keeps its dig, plough, and ladder rules in its script.
  • Completed Phase 22 with The Bell Tower (P22-03, --loom): an original two-scene slice where Wren learns drafts by observing a lantern, ivy, and a tuning fork, must play Bind backwards to free the bell, gains the high notes when the fork extends the distaff's reach, and tolls the bell, whose handler weaves Kindle on the beacon through host re-dispatch. Includes backdrops for both scenes, a bell_tower music track, and headless verification with rewind.
  • Added the distaff (P22-02, D-030): note audio at C4..B4 through AudioEvent.play_note, weave_success and weave_fizzle stingers, a DistaffInput phrase buffer with a reach limit, and a staff HUD panel with clickable note buttons. While the distaff is enabled, the keys C D E F G A B play notes and Backspace clears the phrase.
  • Added musical draft spellcraft to the BeSpoke DSL (P22-01, D-029): draft <Name>(n1, n2, n3, n4) [reverse <Inverse>] declarations over the notes C D E F G A B, weave <Draft> on <Target> statements, the weave opcode, VM.weave_notes for player note input, VM.dispatch_pending_weaves for in-script weaves, and Weave(caster, draft, target) cue handlers. Ambiguous or malformed drafts are compile errors with line and column. Unmatched weaves record a WeaveFizzled cue.
  • Completed Phase 31 (Cinematic Temporal Hypervisors, The Roberta Sparrow Model, and Pre-Cognitive Vector Conduits): implemented the ephemeral Tangent Universe hypervisor with countdown tick budgets and black hole singularity collapse (src/hypervisor.zig), pre-cognitive Fourth-Dimensional vector conduits with deterministic A* path extrusion and fluid tendril rendering in DisplayBridge and renderer, backward-chaining teleological Horn clause goal resolution, hyper-temporal execution fibers (the "Manipulated Dead"), concurrent bitemporal transceivers (Frequency model), Novikov self-fulfilling loop validation (12 Monkeys model), and "The Middlesex Anomaly" vertical slice scenario in src/darko_puzzle.zig (P31-01 through P31-03, D-001, D-008, D-011, D-027).
  • Implemented TemporalHypervisor in src/hypervisor.zig and World.clone in src/world.zig: copy-on-write fork_tangent and collapse_tangent arenas, strict discrete tick countdown budget (collapse_budget_ticks), catastrophic black hole singularity collapse fail-state upon budget expiration without loop closure, backward-chaining teleological Horn clause goal solver (is_teleologically_justified), hyper-temporal execution fibers (spawn_hyper_temporal_routine) delivering priority-255 guidance across timeline boundaries, and clean causal loop closure committing the Artifact of Metal into the Primary Universe at $T_0$ with dream-residue memory injection (P31-01, D-001, D-027).
  • Implemented pre-cognitive Fourth-Dimensional vector conduits and cinematic temporal mechanics in src/spatial.zig: VectorConduit, compute_vector_conduit, and get_agent_vector_conduit projecting deterministic A* path trajectories from actor origin coordinates to destinations, follow_conduit guidance, BitemporalTransceiver synchronizing physical prop mutations across dual eras in real time (Frequency desk carving), validate_novikov_consistency rejecting paradox-inducing contradictions (12 Monkeys), and CausalDecayTracker computing asynchronous existence probability decay (Back to the Future photograph fading) (P31-02, D-001, D-027).
  • Implemented "The Middlesex Anomaly" vertical slice scenario in src/darko_puzzle.zig (--darko, --donnie-darko, --scenario darko): Donnie Darko (Living Receiver), Frank (Manipulated Dead), Gretchen Ross, and Roberta Sparrow ("Grandma Death") across three scenes (Suburban Bedroom, Middlesex High School, and Tangent Vortex Ridge), fluid vector conduit rendering, Tangent Collapse countdown HUD banner (TANGENT COLLAPSE: DD:HH:MM:SS), black hole singularity modal, and dual headless/interactive verification with time-travel rewind (P31-03, D-001, D-008, D-011, D-027).

Changed

  • The browser runtime takes its scenes from a host Deck table (P32-04, D-042). zig build wasm now builds bespoke.wasm with one neutral demo deck; the new zig build wasm-proofs builds bespoke-proofs.wasm with the six proof decks. Both export the same wasm_* functions. WasmRuntime.init takes a deck table and index, and WasmScenario and load_scenario are replaced by load_deck.
  • Proof status, the portal guard rule, and save thumbnails no longer live in the engine (P32-03, D-041). A host passes its own status to its theme through RenderFrame.host_status_bytes and DisplayBridge.set_status_hook, draws HUD elements and overlays with Theme.hud and Theme.overlay, colours save thumbnails with a ThumbnailPainter, and names its player with set_active_character or set_party. A guarded actor reaches a portal through Guarded and PassesGuard facts. Removed: RenderFrame's scenario fields, DisplayBridge.set_tangent_countdown, and set_singularity_collapsed. A save made with no scene now has an empty scene name instead of Tavern.
  • Sound is supplied by the host (P32-02d, D-040): a Soundtrack of music tracks, sound effects as SfxPatch data, and a scene-to-track rule, registered with AudioBridge.set_soundtrack or a display Theme. The engine keeps only its interface and distaff sounds. MusicTrackKind is removed and tracks are referred to by index. A program without a soundtrack, including bespoke run, plays no music where it used to play the tavern theme; the proofs sound the same.
  • Game keys are registered by the host (P32-02c, D-039): Theme.keys binds SDL keycodes to actions returned as UserAction.custom, checked before the engine's own letters. The engine no longer defines spitting-contest or conduit actions or binds [S], [H], [G], [F], and [V] itself. In the GK3 and Lochmarne Goat proofs a held key now acts once per press instead of every frame, and the goat proof's [C] no longer also opens the REPL.
  • Presentation is now supplied by the host (P32-02b, D-039): a Theme of callbacks registered with DisplayWindow.set_theme draws backdrops, props, actor tokens, walkways, and footer hints, and the engine draws neutral defaults for anything a theme declines. A program that opens a window without a theme now gets a plain framed stage where it used to get the tavern backdrop. The proofs look the same; their art moved to proofs/art.zig.
  • Cue dispatch no longer falls back to an unrelated handler (P32-27, D-037): a cue with no handler for its actor and target does nothing, where it used to run the first handler with that cue name. A handler parameter written in lowercase (on cue Greets(visitor, Warden):) matches any entity, on cue X(Actor): is that actor's default, and on cue X(): is a compile error. Recompile .bspk packages that use variable parameters.
  • Proof hygiene (P32-19): the Spitting Contest's placement is decided by its script (on cue Spits(Guybrush):); a spit now takes one tick. In the Day of the Tentacle and Middlesex Anomaly proofs, looking at something with no description of its own gives the active character's "Nothing unusual to see here." line; before, it repeated the first description in the script.
  • .bspk packages are now format version 3, which adds the arrival edge to reactive rules; versions 1 and 2 still load (D-036).
  • In the interactive Lochmarne Goat proof, a knocked-down George walks back to the fall mark instead of snapping there, clicking the ladder while standing on it climbs out, and George no longer drops back into the crypt on the tick after climbing out.
  • Dialogue duels and inquiry fatigue are now an engine module, src/duel.zig (P32-17, D-035): a host supplies challenge/reply pairs with optional tier variants and a ladder of mood stages; Duel offers a fighter's known lines as fact-guarded dialogue choices, resolves rounds, teaches replies on a failed answer, and tracks advantage and wins; InquiryFatigue counts inquiries per speaker and NPC and asserts moods that decay with the tick clock. Insult Sword Fighting is now a client of it with an unchanged headless transcript. Pestering one NPC no longer tires every other NPC.
  • Emergent society simulation is now an engine module, src/society.zig (P32-05, D-034): a host configures any roster, list of needs (each met by resting at a place or trading with a merchant, with theft past a critical value), data roles (merchant, broadcaster, enforcer), routines, and places, and Society.step runs drives, witnesses, rumors, and justice over World facts. The Living Village is now a client of it with an unchanged headless transcript. In the interactive village, grudges now expire after 60 and 50 ticks as intended (previously later), the Gossip and Drifter return to Socializing after a meal, and an arrest after a tip-off without a theft no longer claims to recover bread.
  • Added the host kit src/host.zig (P32-16, D-033): shared tick and weave dispatch, speech collection, top-level statement runner, timeline, and interactive session for any program driving the engine. Every proof now uses it. Interactive time travel works the same in every proof (scrub keeps the future until the clock advances); DOTT, The Middlesex Anomaly, and Insult Sword Fighting gain shared save actions; Insult Sword Fighting now ticks at the standard interval instead of every frame. Fixed speech readers that dropped scripted dialogue after the first line of a run.
  • Corrected front-facing claims in README.md, site/index.html, and the 3x manual: rendering is SDL2 or a WebAssembly canvas (not Raylib/Sokol), the simulation clock is a discrete tick at a 1 Hz base rate (display at 60 Hz), the README and site Tavern Heist samples are now the runnable scenarios/tavern_heist.bespoke, the site playground is described as a JavaScript model of the engine, and the proofs of concept, known limitations, and current ID ranges are listed. Emergent society simulation is presented as an engine mechanic with The Living Village as its proof (D-032, P32-05).
  • Separated the engine from its proofs of concept (P32-01, D-031): the nine vertical slices moved to proofs/ and build as bespoke-proofs (zig build proofs, zig build run-proof -- --<proof>). bespoke is now engine-only (run, compile, check); bespoke --dott and similar flags print a pointer to bespoke-proofs. The engine is exported as the bespoke module, and zig build test-engine / test-proofs run each side alone.
  • .bspk packages are now format version 2 and carry the draft table; version 1 packages still load. Saving while weaves await dispatch returns error.PendingWeavesNotDispatched (D-029).
  • Centralized simulation clock master timing frequency to a deliberate 1.0 Hz (1000ms / tick) canonical base rate defined in src/vm.zig (DEFAULT_TICK_INTERVAL_MS = 1000, MIN_TICK_INTERVAL_MS = 100, MAX_TICK_INTERVAL_MS = 3000), replacing disparate hardcoded 150-250ms constants and frame-counting loops across all scenario runners (src/main.zig, src/dott_puzzle.zig, src/darko_puzzle.zig, src/goat_puzzle.zig, src/gk3_moustache.zig, src/spitting_contest.zig, src/runner.zig, and src/village.zig). Added runtime speed controls ([-] / [NumPad-] slower, [+] / [=] / [NumPad+] faster) and live HUD pacing feedback ([RUNNING 1.0s] ([-]/[+] speed) or [PAUSED] (Space to run, N to step)), providing deliberate narrative pacing and granular runtime speed adjustment while keeping peripheral 60 Hz display rendering strictly decoupled (D-001, D-028).
  • Completed Phase 21 (Multi-Character Party Coordination, Generalized Item Transfer, and Temporal Epistemic Dialogue — "Day of the Tentacle Trio"): implemented multi-protagonist party management with active player switching, generalized party inventory transfer (transfer_item), epistemological dialogue belief evaluation, forward-propagating temporal causality cascades across 400 years, and the Day of the Tentacle three-era milestone scenario in src/dott_puzzle.zig (P21-01 through P21-03, D-001, D-008, D-009, D-010, D-014, D-015, D-017, D-025).
  • Implemented multi-character party coordination and generalized item transfer in src/world.zig, src/spatial.zig, and src/display.zig: World.transfer_item(item, from, to) executing an atomic relational swap forgetting prior ownership before remembering new ownership to enforce strict matter conservation, SpatialSystem.can_transfer_item supporting remote and colocated transfer policies, active character switching (switch_actor, keys [1]-[4]), and top HUD party member portrait buttons with gold borders and item give sentences (P21-01, D-001, D-008, D-009, D-025).
  • Implemented epistemological dialogue belief evaluation and forward temporal causality cascades in src/vm.zig: evaluates_belief(subject, proposition) checking Believes, Knows, and Rejects facts where explicit rejection facts dynamically prune persuasive dialogue choices until physical evidence is established, and strict unidirectional DAG causality projecting past physical modifications into future scenes without retrocausal paradox loops (P21-02, D-003, D-010, D-014, D-015, D-017, D-025).
  • Implemented the Day of the Tentacle three-era milestone scenario in src/dott_puzzle.zig across 1790 (Colonial Workshop), 1993 (Motel Lobby), and 2193 (Dystopian Guard Post), featuring full party cast (Bernard, Hoagie, Laverne) and historical NPCs (George Washington, Betsy Ross, Purple Tentacle), parallel puzzle DAG (aging vintage wine into vinegar in the time capsule, super battery generation, painting cherry tree to induce Washington to chop it down and free Laverne, and altering Betsy Ross's flag design to produce a tentacle disguise), procedural chiptune march music (.tentacle) and action SFX (toilet_flush, wood_chop, snip_shears) in src/audio.zig, CLI flags --dott, --tentacle in src/main.zig, 6th scenario in WebAssembly runtime and manual simulator, and headless verification with clean time-travel rewind (P21-03, D-001, D-008, D-011, D-019, D-025).
  • Completed Phase 20 (The Broken Sword Lochmarne Goat Puzzle Scenario): implemented the complete Broken Sword: The Shadow of the Templars Lochmarne Goat vertical slice in src/goat_puzzle.zig, authentic 1996 threat-radius reactive interrupt, 30-tick retreat action window, plough dragging, rope tangling, multi-scene Templar crypt descent, visual backdrops, and procedural Celtic whistle audio (P20-01 through P20-03, D-001, D-004, D-008, D-010, D-012, D-014, D-019, D-023).
  • Implemented the full Broken Sword Lochmarne Goat puzzle script in BeSpoke DSL (src/goat_puzzle.zig) across two partitioned scenes (Lochmarne Castle Courtyard, Templar Crypt), modeling the authentic 1996 threat-radius reactive interrupt when approaching Peagram's excavation pit, goat charge and knockback (KnockedDown(George, true) for 15 ticks), 30-tick retreat recovery window (GoatRetreating(BillyGoat, true) for 30 ticks), farm plough dragging to intercept the tether line (PloughMoved, TangledWith), and cellar pit descent into the Templar crypt (P20-01, D-001, D-004, D-010, D-012, D-023).
  • Implemented visual backdrops for Lochmarne Castle Courtyard (emerald Irish turf, crumbling stone ruins tower, Peagram's excavation pit, heavy iron farm plough, stout tether stake, and dynamic rope line wrapping around the plough) and Subterranean Templar Dig Crypt (Gothic stone arches, flaming torch sconces, carved stone chalice altar, and crimson Knights Templar cross mural), with custom actor tokens for George Stobbart and Billy Goat in src/display/renderer.zig (P20-02, D-008, D-012, D-014, D-023).
  • Implemented procedural Celtic whistle melody (.lochmarne) and action SFX (goat_bleat, thud) in src/audio.zig, CLI flags --goat, --broken-sword, --goat-puzzle in src/main.zig, 5th vertical slice scenario in WebAssembly runtime (src/wasm.zig) and interactive manual simulator (tools/manual.py), end-to-end deterministic verification with time-travel rewind, and 3x documentation entry in scheme/bespoke.manual.json and docs/manual.html (P20-03, D-001, D-011, D-019, D-023).
  • Adapted latest The Manifold repository memory framework upgrades:
    • Updated tools/check_docs.py to enforce invisible and bidirectional Unicode control character rejection (U+180E, U+200B..200F, U+202A..202E, U+2060..206F, U+FEFF), validate T-NNN held tension numbering, ordering, and cross-references, and support flexible Q-NNN definitions.
    • Enhanced AGENTS.md with sovereign Zone boundaries and untrusted context isolation, hermeneutic circle rules (part-whole loopback, code resistance inquiry triggers, Chesterton's fence question reconstruction, and eliminating silent assumptions), end-of-phase consolidation passes, and maintainer writing/inquiry preferences.
    • Added Held Tensions (T-NNN) schema and pre-existing choice recording guidance to docs/DECISIONS.md.
    • Added live session ownership tracking to docs/HANDOFF.md (**Session owner:**).
    • Added Dependencies, State and Caches, Failure Modes and Observability, and Claims vs. Code sections to docs/ARCHITECTURE.md.
    • Expanded docs/README.md with Optional Documents and Style and Evidence conventions.
    • Expanded docs/SECURITY.md with retrieved doc scan boundaries, secure development rules, verification layers, and incident response runbooks.
    • Expanded docs/TESTING.md with Adding a Check, Runs That Vary, Change-to-Check matrix, manual check procedures, and mutation check rules.
    • Expanded docs/CONTRIBUTING.md with fore-conceptions awareness, scope re-scoping triggers, submission, and compatibility/migration standards.
  • Completed Phase 19 (WebAssembly & HTML5 Canvas Browser Target): implemented zero-dependency wasm32-freestanding build target and RGBA8888 runtime harness (src/wasm.zig, zig build wasm), browser mouse/keyboard/touch event bridge, and interactive embedded HTML5 Canvas simulator inside docs/manual.html (P19-01 through P19-03, D-001, D-008, D-011, D-022).
  • Implemented WasmCanvas (640x360 RGBA8888 linear-memory software framebuffer) and WasmRuntime in src/wasm.zig backed by a 2 MiB FixedBufferAllocator and 64-slot binary World snapshot ring buffer, exposing freestanding C-ABI exports (wasm_init, wasm_load_scenario, wasm_step_tick, wasm_render_frame, wasm_framebuffer_ptr, wasm_framebuffer_len, wasm_scrub_to_tick) and compiling via zig build wasm to zig-out/bin/bespoke.wasm (P19-01, D-001, D-022).
  • Implemented browser input event bridge (BrowserInputEvent, WasmRuntime.dispatch_event, wasm_on_pointer_down, wasm_on_pointer_move, wasm_on_right_click, wasm_on_key_down, wasm_on_touch) normalizing mouse clicks, right-click and two-finger touch verb cycling, keyboard hotkeys ([1-4], [S], [Space], [N], [R]), and timeline scrubber clicks into BeSpoke motor intents and simulation controls (P19-02, D-008, D-022).
  • Embedded the interactive BeSpoke Browser Simulator (Wasm32 / HTML5 Canvas) deck (#live-simulator) into docs/manual.html via tools/manual.py, hosting all 4 vertical slices (The Tavern Heist, Booty Island Spitting Contest, GK3 Cat Moustache, and The Living Village) with live relational fact inspection, timeline scrubbing, and REPL command execution (P19-03, D-001, D-011, D-022).
  • Completed Phase 18 (Systemic Emergent Simulation Sandbox — "The Living Village"): implemented autonomous NPC physiological drives, social graph relationships, witness detection, rumor propagation, property theft, autonomous Sheriff warrant/arrest cascades, and multi-building settlement visualization (P18-01 through P18-03, D-003, D-004, D-005, D-007, D-008, D-010, D-011, D-021).
  • Implemented the Living Village relational schema and autonomous NPC drive metabolism in src/village.zig (VillageSimulation, VillagerActivity), modeling continuous scalar properties (Hunger, Energy, Gold, Activity, Mood) alongside social and ownership sets (Friend, Rival, Grudge with TTL, Owns, Carries) across 6 autonomous villagers (Sheriff, Baker, Farmer, Innkeeper, Gossip, Drifter) (P18-01, D-003, D-007, D-010, D-021).
  • Implemented systemic emergence engine in src/village.zig (step_drives, evaluate_witnesses, propagate_rumors, evaluate_justice_cascade): desperation property theft when Hunger >= 80 and Gold < 5 (StolenFrom(Drifter, Baker)), co-located crime-scene witness detection (Witnessed, Grudge), 1-hop-per-tick rumor propagation across Friend and Gossip links (KnowsRumor), and high-priority Sheriff patrol preemption (WarrantFor), pursuit, arrest (Arrested), property recovery, and jail escort (P18-02, D-004, D-010, D-021).
  • Implemented 6-building village settlement topology (Bakery, Farm, TownSquare, Cottages, Tavern, SheriffsPost), inspectable hotspots, RenderVillagerDrive and RenderSocialEdge frame capture in src/display.zig, and graphical settlement visualization with live Villager Drives Panel and Emergence & Social Graph HUD in src/display/renderer.zig, runnable via --village / --living-village (P18-03, D-005, D-008, D-011, D-021).
  • Completed Phase 17 (Persistent Save/Load Disk Storage & Slot Management): implemented CRC32-checksummed .sav binary format, slot management with .sav.bak corruption recovery, 16x12 RGB332 miniature graphical frame thumbnails, and in-engine Pause & Save/Load Drawer overlay (P17-01 through P17-03, D-001, D-003, D-008, D-011, D-020).
  • Implemented file-backed persistent save state format (.sav) in src/save.zig with 4-byte magic (BSAV), schema version (1), full payload CRC32 integrity verification, rich slot metadata (SaveMetadata: slot ID, simulation tick, playtime in seconds, Unix timestamp, fact/entity counts, active scene name, description, actor coordinate previews, and 16x12 RGB332 miniature scene thumbnail), and complete state serialization/restoration across World, SpatialSystem (including in-flight MotorAgent A* paths), and VM (current_scene, cooperative fiber stacks, wait states, interrupt call stacks, and reactive rule edge flags) (P17-01, D-001, D-003, D-020).
  • Implemented SaveManager slot management API in src/save.zig supporting 8 numbered save slots (slot_1.sav .. slot_8.sav), dedicated Quick-Save/Quick-Load (slot 0, quicksave.sav), slot directory scanning (refresh_slots), slot deletion, and automatic corrupted save recovery via .sav.bak backup fallback and self-healing file repair (P17-02, D-003, D-020).
  • Integrated in-engine Pause & Save/Load Drawer overlay into DisplayWindow (src/display/renderer.zig), toggled via [P], [F2] (Save mode), or [F3] (Load mode), with direct [F5] Quick-Save and [F9] Quick-Load hotkeys across all interactive scenario loops (src/main.zig, src/spitting_contest.zig, src/gk3_moustache.zig, src/sword_fighting.zig, src/runner.zig) (P17-03, D-008, D-011, D-020).
  • Completed Phase 16 (Peripheral Audio Subsystem & Procedural Sound Synthesizer): implemented decoupled pure Zig audio engine in src/audio.zig, action sound effects, scene background musical accompaniment, and SDL2 peripheral callback integration (P16-01 through P16-03, D-001, D-014, D-019).
  • Implemented decoupled, thread-safe AudioBridge buffer in src/audio.zig and src/display.zig consuming audio cue events asynchronously from discrete simulation ticks via ring buffer queueing, with automatic scene theme detection (process_scene_and_cues), master/SFX/BGM volume controls, and graceful headless fallback for test suites and CI (P16-01, D-001, D-019).
  • Implemented procedural chiptune synthesizer in pure Zig (src/audio.zig) with zero audio asset files (no external WAV/MP3 dependencies), borrowing integer phase accumulation and waveform generation from Whimsy Machine: precomputed 44.1 kHz MIDI phase increment lookup table, variable-duty pulse (12.5%, 25%, 50%, 75%), linear triangle, sawtooth, LCG pseudo-random noise generator, attack/decay envelopes, pitch sweeps, polyphonic voice stealing, and 10 procedural action SFX (footstep, pickup, combine, horn, splash, sword_clash, alert, dialogue_blip, click, whistle) (P16-02, D-001, D-019).
  • Implemented 4-channel procedural step sequencer (Bass, Lead, Pad/Chords, Percussion) in src/audio.zig providing 32-step musical accompaniment patterns across 8 narrative scenes (.tavern, .cellar, .spitting_contest, .high_road, .sanctuary, .scumm_bar, .courtyard, .bike_shop) with smooth crossfade transitions on scene changes (P16-03, D-001, D-014, D-019).
  • Integrated SDL2 audio device callback (c.SDL_OpenAudio, c.SDL_PauseAudio) in src/display/renderer.zig for 60 Hz interactive play across all scenarios (bespoke, --spitting-contest, --gk3, --sword-fighting, bespoke run), triggering procedural action audio on verb cycling, timeline scrubbing, waypoint navigation, item crafting, horn blowing, dialogue selection, and sword clashes (P16-01, P16-02, P16-03, D-001, D-019).
  • Completed Phase 15 (Standalone Script File Execution & Compiler CLI): implemented external .bespoke scenario runner (bespoke run), binary asset packager (bespoke compile), and line/column diagnostic validation tooling (bespoke check) (P15-01 through P15-03, D-001, D-002, D-018).
  • Implemented standalone CLI runner in src/runner.zig and src/main.zig supporting bespoke run <script.bespoke | game.bspk> in both headless simulation clock mode (--headless, --ticks N) and full interactive 60 Hz SDL2 graphical mode with verb bar, waypoints, live REPL drawer, and timeline scrubber (P15-01, D-001, D-018).
  • Implemented standalone binary asset format specification (.bspk) and asset loader in src/package.zig with 4-byte magic (BSPB), versioning (1), CRC32 payload checksum verification, entity/relation dictionary tables, spatial waypoints/hotspots, and compiled bytecode chunks (P15-02, D-002, D-018).
  • Implemented compiler diagnostics and syntax validation tooling in src/compiler/parser.zig, src/compiler.zig, and src/runner.zig (Diagnostic, CheckResult, check_source, check_file), reporting file, line, and column error diagnostics in standard Unix format (file:line:col: error: message) and providing the bespoke check <script.bespoke> command (P15-03, D-002, D-018).
  • Completed Phase 14 (The Gabriel Knight 3 Cat Moustache Scenario): implemented the complete Rennes-le-Château Cat Moustache vertical slice in src/gk3_moustache.zig, authentic visual renderer backdrops and actor tokens, and dual headless/interactive CLI modes with time-travel rewind (P14-01 through P14-03, D-001, D-008, D-009, D-011, D-012, D-013, D-014, D-015, D-016).
  • Implemented the full Gabriel Knight 3 puzzle script in BeSpoke DSL (src/gk3_moustache.zig) across three partitioned scenes (Hotel Corridor, Hotel Garden, Bike Rental Shop), ambient routines (MoselyPacing, CatNapping), item-on-item combining (Uses(Gabriel, CatHair, Syrup)), and dynamic fact-guarded dialogue choice validation with Madame Buthane (P14-01, D-001, D-012, D-013, D-015, D-016).
  • Implemented visual renderer backdrops and custom actor tokens in src/display/renderer.zig for French provincial locales: Burgundy damask wallpaper and room doors 25/33 (Hotel Corridor), stone wall and picket fence with taped hole (Hotel Garden), timber beams, motorcycle display, and Languedoc map (Bike Rental Shop), plus custom tokens for Gabriel Knight (trench coat, blonde hair, dark shades, and cat moustache when disguised), Franklin Mosely, Madame Buthane, and the stray cat (P14-02, D-008, D-009, D-012, D-014, D-016).
  • Added CLI option --gk3 / --cat-moustache in src/main.zig with 13-step deterministic headless simulation verification and interactive 60 Hz playability featuring scene navigation hotkeys ([H], [G], [B]), puzzle progression hotkeys ([1]..[8]), and instantaneous time-travel state rewind (P14-03, D-001, D-008, D-011, D-016).
  • Completed Phase 13 (Relational Dialogue Trees & Dynamic Choice Pruning): implemented first-class conditionally guarded dialogue choices, runtime choice pruning, dynamic balloon scaling, scrolling, and keyboard hotkeys (P13-01 through P13-03, D-002, D-003, D-004, D-008, D-009, D-015).
  • Added compiler grammar and AST representation for choice blocks (kw_choice, DialogueChoice, Stmt.choice_block), supporting relational condition guards (choice "..." if HasFact(...), choice "..." if not HasFact(...), choice "..." if Carries(...)) (P13-01, D-002, D-009, D-015).
  • Implemented VM runtime evaluation and dynamic branch pruning (VM.has_fact_pattern, VM.eval_expr, VM.prune_dialogue_choices, PrunedChoice), filtering out unsatisfied dialogue choices against active relational facts in World before balloon spawn (P13-02, D-003, D-004, D-015).
  • Enhanced 2D display renderer (src/display/renderer.zig) with variable-length choice sets (up to 9 choices), dynamic balloon height scaling, scroll offset tracking with mouse wheel and arrow keys, and dual input selection via mouse clicks and keyboard hotkeys (1-9 / keypad 1-9) (P13-03, D-008, D-009, D-015).
  • Completed Phase 12 (Multi-Scene Transitions & Stage Director): implemented first-class multi-scene simulation support across compiler, VM, spatial system, and renderer (P12-01 through P12-03, D-001, D-002, D-004, D-005, D-008, D-014).
  • Added language grammar and bytecode instruction for scene transitions (transition to scene: <TargetScene>, Opcode.transition_scene, 0x44), updating vm.current_scene, pausing ambient routines of the departed scene, waking target scene routines, and emitting SceneTransition cues while continuously preserving all global relational facts in World (P12-01, D-001, D-002, D-004, D-014).
  • Implemented spatial graph partitioning by scene/room (SpatialGraph.count_waypoints_in_room, find_waypoint_in_room, get_first_waypoint_in_room, SpatialSystem.transition_actor, find_hotspot_at_in_room, count_hotspots_in_room), scoping waypoints and props to their narrative environments and seamlessly moving actors across room boundaries (P12-02, D-001, D-005, D-014).
  • Added display renderer dynamic scene backdrops and visual theme switching (RenderFrame.current_scene, get_current_scene), rendering dedicated visual backdrops for Spitting Competition, Wine Cellar subterranean vault, and Tavern common room based on active simulation scene events (P12-03, D-001, D-008, D-014).
  • Completed Phase 11 (Item-on-Item Inventory Combining & In-Hand Crafting): implemented ternary Uses(Actor, ItemA, ItemB) cue signatures with commutative permutation matching, active inventory tray selection, and in-hand cursor indicator (P11-01 through P11-03, D-002, D-004, D-008, D-009, D-013).
  • Completed Phase 10 (The Booty Island Spitting Contest Scenario & Extended Narrative DSL): implemented high-level stageplay taxonomy syntax (scene:, cast:, props:, marks:), natural state assertions and query expressions (now X is [not] Y, X is [not] Y in the scene), reactive falling-edge (when X stops being Y:) and fact TTL expiration hooks (when Entity forgets Relation:), and the complete multi-step Monkey Island 2 Booty Island Spitting Contest puzzle vertical slice (P10-01 through P10-03, D-001, D-002, D-004, D-008, D-009, D-010, D-012).
  • Extended compiler lexer (src/compiler/lexer.zig), parser (src/compiler/parser.zig), and code generator (src/compiler/codegen.zig) to parse stageplay taxonomy headers, automatic waypoint and hotspot registration for marks and props, square bracket fact patterns (Distracted[Organiser, Onlookers]), tilde comments (~), hyphenated animation clips (wind-blowing), and .animate / .resume_stmt execution (P10-01, D-012).
  • Implemented recently-expired fact tracking ring buffer in src/world.zig (recently_expired: [16]Fact, prune_expired, get_recently_expired) tracking facts purged by TTL without dynamic allocation (P10-02, D-012).
  • Extended VM reactive rule engine in src/vm.zig with ReactiveEdge (.rising, .falling, .on_expire) to continuously monitor rising condition transitions, falling condition transitions (when Condition stops being State:), and fact TTL expirations (when Entity forgets Relation:) (P10-02, D-010, D-012).
  • Implemented and verified the Booty Island Spitting Contest scenario in src/spitting_contest.zig with CLI support (--spitting-contest, --spit, --scenario spitting-contest), featuring crowd egging routine, wind gust cycling, ship horn distraction, flag tampering, thick spit green drink, wind-timed spit resolution, TTL expiration resumption, and time-travel rewind verification (P10-03, D-012).
  • Implemented 2D graphical display renderer for the Booty Island Spitting Contest (src/display/renderer.zig, src/spitting_contest.zig), rendering the Caribbean seaside contest field, track distance lines (Starting Line, 3rd, 2nd, Champion), animated tailwind gusts, dynamic distance flag tampering with ghost markers, Guybrush, Organiser, and Onlookers actor tokens with real-time status banners, interactive branching dialogue with the Organiser, and hotkey actions ([S] Spit, [H] Horn, [G] Drink, [F] Flags) (P10-03, D-001, D-008, D-012).
  • Completed Phase 9 (Interactive Time-Travel Debugger & REPL): implemented in-engine developer dashboard overlay, interactive time-travel timeline scrubber, and live REPL console drawer (P9-01 through P9-03, D-001, D-002, D-003, D-011).
  • Implemented in-engine relational world inspector overlay (src/display/renderer.zig, src/display.zig, toggle with [F1] or [D]) displaying active relational facts with remaining TTL, cooperative fiber call stacks with program counters and priorities, and entity spatial coordinates (P9-01, D-011).
  • Implemented interactive time-travel timeline scrubber (src/display/renderer.zig, src/main.zig) rendering historical timeline bar with click-to-scrub and [<] / [>] arrow navigation across serialized snapshot states with instantaneous live visual replay (P9-02, D-001, D-003, D-011).
  • Implemented live interactive REPL console drawer (src/repl.zig, src/display/renderer.zig, toggle with [Tab], [C], or [~]) allowing live simulation query and mutation via remember, forget, cue, walk, step, and facts with zero GUI dependencies in the core simulation spine (P9-03, D-001, D-002, D-011).
  • Completed Phase 8 (Reactive Simulation Rules): implemented multi-clause relational pattern matcher, VM continuous reactive when evaluation engine with edge-triggered preemption, and priority rule cascades for systemic AI (P8-01 through P8-03, D-002, D-003, D-004, D-006, D-007, D-010).
  • Implemented multi-clause relational pattern matcher in src/world.zig (PatternTerm, PatternClause, VariableBindings, find_first_match, has_multi_match, find_all_matches) supporting conjunctions (where A and B and C) and variable joins across active facts (P8-01, D-006, D-010).
  • Extended compiler parser (src/compiler/parser.zig) and code generator (src/compiler/codegen.zig) to compile multi-clause when rules (when Pattern1 and Pattern2:) into CompiledWhenRule structures with unified variable bindings (P8-01, P8-02, D-010).
  • Implemented VM continuous reactive rule evaluation engine in src/vm.zig (ReactiveRule, add_reactive_rule, evaluate_reactive_rules, load_compiled_rules) evaluating rules on tick boundaries and edge-triggering fiber interrupts on positive transition (false -> true) without polling boilerplate (P8-02, D-002, D-004, D-010).
  • Implemented priority-tiered interrupt stacks and rule cascades (active_priority, interrupt_entity_priority) enabling high-priority states (e.g. theft alerts) to preempt lower-priority states (e.g. charmed listening) and cleanly resume routines in sequence (P8-03, D-004, D-010).
  • Completed Phase 7 (Adventure Game Primitives): implemented scene hotspots, classic adventure verbs (WALK, LOOK, TALK, TAKE, USE), relational inventory, and branching dialogue trees with speech balloons (P7-01 through P7-04, D-001, D-002, D-003, D-007, D-009).
  • Implemented static scene hotspots in src/spatial.zig (Hotspot registration, bounds, examine text) and 2D prop rendering in src/display/renderer.zig for Tavern Fireplace with flame glow, Bar Counter, and Wine Cask (P7-01, D-009).
  • Added compiler language extensions for verbs and dialogue: verb Name(args) and say Speaker: "text" in lexer (src/compiler/lexer.zig), parser (src/compiler/parser.zig), and bytecode lowering via emit_cue in codegen (src/compiler/codegen.zig) (P7-02, P7-04, D-002, D-009).
  • Implemented interactive 5-verb UI bar (WALK, LOOK, TALK, TAKE, USE) with active highlight, right-click verb cycling, actor hit testing, and prop interaction (P7-02, D-009).
  • Added multi-fact relational query iterator (World.query) and relational inventory system capturing InInventory and Carries facts into RenderFrame.inventory and rendering the inventory tray (P7-03, D-003, D-007).
  • Implemented branching dialogue trees and parchment speech balloon renderer with speaker headers, dialog text, and interactive choice selection in src/display/renderer.zig (P7-04, D-009).
  • Completed Phase 6 (Peripheral Graphics Window): implemented native SDL2 2D graphical display consumer in src/display/renderer.zig and built-in 5x7 bitmap pixel font in src/display/font.zig (P6-01 through P6-04, D-001, D-008).
  • Implemented real-time 60 Hz 2D rendering loop with double-buffered DisplayBridge consumer decoupled from simulation ticks (P6-01, D-001).
  • Implemented 2D scene visualization rendering room backdrops (Tavern & Cellar), waypoint nodes, corridor paths, and animated actor tokens with held items and status indicators (P6-02, D-005, D-008).
  • Implemented point-and-click mouse input handling: left-clicking any room waypoint issues an asynchronous walk_to motor intent directing the Cat (player character) along the A* waypoint path (P6-03, D-005, D-008).
  • Implemented interactive visual HUD: top simulation status bar, bottom hotkey legend, floating cue announcements, spacebar pause/resume, and instant time-travel rewind hotkey [R] (P6-04, D-001, D-008).
  • Completed Phase 5 (Display Bridge & Vertical Slice): implemented src/display.zig featuring double-buffered DisplayBridge, read-only RenderFrame captures, and terminal visualization (P5-01, D-001).
  • Executed the complete 20-line Tavern Heist vertical slice in src/main.zig with live tick-by-tick simulation, Bard charm preemption, Cat theft, and time-travel rewind to pre-heist state (P5-02).
  • Completed Phase 4 (Language Front-End & Compiler): implemented hand-written compiler front-end in src/compiler.zig, featuring indentation-aware lexer (src/compiler/lexer.zig), AST parser (src/compiler/parser.zig), and direct bytecode code generator (src/compiler/codegen.zig) (P4-01 through P4-03, D-002).
  • Added compile_source high-level entry point compiling raw BeSpoke DSL scripts directly to VM bytecode chunks.
  • Completed Phase 3 (Spatial Topology & Motor Subsystem): implemented src/spatial.zig featuring discrete 2D integer waypoints, rooms, and A* graph pathfinding (P3-01, D-005).
  • Implemented multi-tick motor stepping (SpatialSystem.walk_to) integrated with VM fiber suspension via Opcode.walk_to and waiting_motor state (P3-02, D-001, D-004).
  • Completed Phase 2 (Bytecode VM & Fiber Scheduler): implemented src/bytecode.zig and src/vm.zig with compact instruction set, fiber scheduler, temporal waits, and interrupt preemption (P2-01 through P2-04).
  • Implemented wait_ticks and wait_until condition block evaluation (P2-03, D-004).
  • Implemented interrupt_entity and resume_routine stack preemption for priority event handling (P2-04, D-004).
  • Implemented tabletop dice rolling primitive (roll_dice, e.g. 2d6) and peripheral cue emissions (emit_cue) (D-001, D-002).
  • Completed Phase 1 (Foundations): implemented Zig World relational database in src/world.zig using contiguous arena and MultiArrayList(Fact) Structure-of-Arrays layout (P1-01).
  • Dynamic string interner for Entities and Relations with human-readable lookup (D-007).
  • Declarative remember and forget with automatic TTL expiration tick pruning (expires_at_tick = current_tick + ttl) and functional property auto-overwrites (P1-02).
  • Sub-microsecond pattern matching queries (has_fact, find_first, get_property) with wildcard support (P1-03, D-006).
  • Deterministic memory snapshot save/restore with CRC32 integrity verification and time-travel rewind demo (P1-04, D-001).
  • Initial specification of the BeSpoke Engine architecture (Engine-as-Spine, D-001).
  • Decision records for Custom Zig Bytecode VM (D-002), Flat Relational Fact Model (D-003), Fiber Temporal Primitives (D-004), Room/Waypoint Graph Spatial Topology (D-005), Linear Scan Baseline (D-006), and Unified Ternary Facts (D-007).
  • The Manifold repository memory framework adoption and self-verification test suite via tools/check_docs.py.
  • Formal 5-phase engineering roadmap spanning core world store, bytecode VM, spatial topology, compiler front-end, and display bridge.