Skip to content

Case study · Open source

Narrative AI

A local-first tool that maps a manuscript's structure: what happens, the order the reader meets it in, who changes, and where the tension rises.

Role
Author
When
2026
Stack
Next.js, TypeScript, IndexedDB, Ollama

Version 0.1.0 is public on GitHub under the MIT licence, and the analysis runs in the browser with no account.

Problem

A manuscript does not show its own structure. Fiction writers, editors and researchers need to see the order events happen in, the fabula, against the order the reader meets them, the syuzhet, along with how each character changes and where the tension rises and falls.

Approach

Paste or upload a manuscript. Narrative AI splits it into scenes, extracts the events with a free local model through Ollama, with OpenAI, or with plain heuristics and no model at all, and builds a causal graph of the plot. From that graph it projects the telling order, tracks each character scene by scene, draws the tension curve against Freytag and three-act targets, and checks for plot holes and continuity breaks. Structure is validated symbolically before any neural critic runs, and the psychological readings, adapted from my EgoQuest work, only show above a confidence threshold.

Outcomes

  • Version 0.1.0 public on GitHub, MIT licence
  • Analysis stays in the browser, in IndexedDB; no account needed
  • Runs with a free local model, with OpenAI, or with no model
  • Tested on bundled samples, including a Creole version of my play Red Ants

Proof