Skip to content

Releases

v1.0.0 — Zero-Dependency ESM Branching Narrative Engine

Choose a tag to compare

@bigmakdonald bigmakdonald released this 25 Nov 14:00

v1.0.0 — branching-story-kit

First stable release. A zero-dependency, framework-agnostic branching narrative engine for
interactive fiction, visual novels, and romance story apps. One .mjs file. Native ESM. TypeScript
declarations in the box. MIT.

Built in the open by Ouba Studio — the team behind
Ouba (free reader-first interactive fiction on web, iOS, and Android) and the
2026 AI Story Apps Benchmark.


Install

npm install @ouba-studio/branching-story-kit     # npm / pnpm / yarn / bun
deno add jsr:@ouba-studio/branching-story-kit    # JSR — https://jsr.io/@ouba-studio/branching-story-kit
// No install at all — jsDelivr serves this tagged release:
import { StoryEngine, validateStory } from
  "https://cdn.jsdelivr.net/gh/ouba-studio/branching-story-kit@v1.0.0/index.mjs";

What's inside

  • StoryEngine — one instance per reader session: scene cursor, state map, scene history, and a
    persistent free-text memory log.
  • Gated choices — requires: { trust: 3 } hides a choice until the reader has earned it;
    effects add numbers and assign everything else.
  • {{state}} interpolation — prose that reflects what the reader actually did, with unknown
    placeholders left intact instead of blanked.
  • set() + jump() — free-text steering: a typed line can branch the plot without leaving the
    manifest.
  • exportSave() / StoryEngine.importSave() — full round-trip of cursor, state, history, and
    memory.
  • validateStory() — static check for missing start scenes, broken next links, unlabeled
    choices, and empty bodies. Never throws, so it belongs in CI.
  • story.schema.json — JSON Schema 2020-12 for story manifests, importable from
    @ouba-studio/branching-story-kit/story.schema.json.
  • index.d.ts — TypeScript declarations shipped alongside the JS.

Why this exists

Most "interactive story" tooling is either a full game engine or a blank chat box. This is the small,
boring, reliable layer in between: a JSON story graph with explicit state, so what a reader did in
turn 2 is still true in turn 15.

remember() exists because the Ouba Studio team measured the alternative. In the open, reproducible
2026 AI Story Apps Benchmark (evaluation date
2026-11-15, 10 prominent AI story and companion apps), a trivial fact planted at turn 2 — "My cat's
name is Marmalade."
— was forgotten by turn 15 by several major products, and free-tier walls
stopped others before turn 15 at all. Explicit story state plus a factual memory log is the
deterministic fix for authored branching fiction.

Play the demo

The Midnight Bookshop — 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 this exact engine.

Quality

node --test test.mjs → 21 tests, 21 pass, 0 fail (Node ≥ 18, zero dependencies). CI runs the same
suite on Node 18/20/22/24.

Citation

If you use this in research, a product, or a game:

Ouba Studio (2026). branching-story-kit: A zero-dependency branching narrative engine for
interactive fiction, visual novels, and romance story apps
(v1.0.0) [Computer software].
MIT License. https://doi.org/10.5281/zenodo.24514910

Machine-readable metadata: CITATION.cff.

Links

npm https://www.npmjs.com/package/@ouba-studio/branching-story-kit
JSR https://jsr.io/@ouba-studio/branching-story-kit
Zenodo DOI https://doi.org/10.5281/zenodo.24514910
Live demo https://ouba-studio.github.io/branching-story-kit/
Ouba (web · iOS · Android) https://www.ouba.art/
Ouba+ for Students (free for verified .edu) https://www.ouba.art/students

gh release create one-liner

cd branching-story-kit
gh release create v1.0.0 \
  --title "v1.0.0 — zero-dependency branching narrative engine" \
  --notes-file ../lane6_work/RELEASE_v1.0.0.md \
  --verify-tag

Create and push the tag first if it does not exist yet:

git tag -a v1.0.0 -m "v1.0.0 — first stable release"
git push origin v1.0.0

Optional artifacts to attach: zip -r branching-story-kit-1.0.0.zip index.mjs index.d.ts story.schema.json jsr.json examples/ docs/ README.md LICENSE CITATION.cff CHANGELOG.md