Show HN: Branching-story-kit – 207-line zero-dep story-state kernel (MIT) Ouba Studio released branching-story-kit, a 207-line, zero-dependency MIT-licensed story-state kernel for branching interactive fiction that runs in Node ≥ 18 and modern browsers with `dependencies: {}`. The kit provides a JSON story graph with explicit state, relationship and flag tracking, a persistent memory log via `engine.remember()`, `{{state}}` prose interpolation, free-text steering through `set()` and `jump()`, save/restore via `exportSave()` and `StoryEngine.importSave()`, plus a static validator and JSON Schema, and is published on npm as @ouba-studio/branching-story-kit and on JSR. A four-scene rivals-to-lovers demo, "The Midnight Bookshop," runs on the engine via GitHub Pages, itch.io, IFDB and a Hugging Face Space mirror. Zero-dependency branching narrative engine for interactive fiction, visual novels, and romance story apps — story-graph state tracking, gated choices, a persistent memory log, save/restore, a static validator, and a JSON Schema. Native ESM, TypeScript declarations, MIT. Built in the open by Ouba Studio https://www.ouba.art/ — the team behind Ouba https://www.ouba.art/ , free reader-first interactive fiction on web, iOS, and Android , and the 2026 AI Story Apps Benchmark https://www.ouba.art/i-tested-ai-story-apps open data on CERN Zenodo https://doi.org/10.5281/zenodo.24511974 , Harvard Dataverse https://doi.org/10.7910/DVN/YEBHQR , and Figshare https://doi.org/10.6084/m9.figshare.35110510.v1 . A four-scene rivals-to-lovers branching romance with relationship meters, an inventory item, a trust-gated choice, a free-text steering moment, and four endings. It is a plain JSON manifest played by the real engine — no framework, no build step. | Where | Link | |---|---| | GitHub Pages live, runs on this engine | https://ouba-studio.github.io/branching-story-kit/ https://ouba-studio.github.io/branching-story-kit/ | | itch.io HTML5 build | https://ouba-art.itch.io/the-midnight-bookshop https://ouba-art.itch.io/the-midnight-bookshop | | IFDB — Interactive Fiction Database | https://ifdb.org/viewgame?id=ku32o1jvi5fnb95q https://ifdb.org/viewgame?id=ku32o1jvi5fnb95q | | Hugging Face Space mirror | https://huggingface.co/spaces/oubaapp/the-midnight-bookshop https://huggingface.co/spaces/oubaapp/the-midnight-bookshop | | Headless in your terminal | node examples/run.mjs --all | Want full-length stories where your choices and typed lines carry across 20+ turns with real memory? Read free on Ouba https://www.ouba.art/ — web, iOS, and Android. Most "interactive story" tooling is either a full game engine or a blank chat box. This kit is the small, boring, reliable layer in between: a JSON story graph with explicit state , so that what a reader did in turn 2 is still true in turn 15. - Zero dependencies — one .mjs file, pure ESM, runs in Node ≥ 18 and every modern browser. dependencies: {} . - Relationship & flag state — numeric effects add , everything else assigns ; requires gates choices behind thresholds. - Persistent memory log — engine.remember "My cat's name is Marmalade." records reader-planted facts with turn numbers so long sessions don't drift. - {{state}} interpolation in prose, with unknown placeholders left intact. - Free-text steering — set + jump let typed input branch the plot without leaving the manifest. - Save / restore — exportSave → StoryEngine.importSave round-trips cursor, state, history, and memory. - Static validator + JSON Schema — catch broken next links before you publish; validate manifests in your editor or CI. - TypeScript declarations shipped in the box. npm install @ouba-studio/branching-story-kit pnpm add @ouba-studio/branching-story-kit or yarn add @ouba-studio/branching-story-kit JSR Deno / Bun / Node with jsr: specifiers — no node modules , no build step: python deno add jsr:@ouba-studio/branching-story-kit or import it directly: import { StoryEngine, validateStory } from "jsr:@ouba-studio/branching-story-kit@1"; Package page: https://jsr.io/@ouba-studio/branching-story-kit https://jsr.io/@ouba-studio/branching-story-kit One file, zero dependencies — drop it straight into a