A Prolog system that tracks narrative state and catches plot holes during story writing.
◇ What is Fabula?
Fabula keeps track of what's happening in a story: where characters are, what they know, what items have been introduced, what's been resolved and what hasn't. You write the story (or an LLM does, or you take turns), and the LLM interfaces with Fabula to check consistency as scenes are written. Built in Prolog using a metainterpreter pattern.
◇ Current status
The core metainterpreter handles spatial consistency, knowledge tracking, and loose thread detection. Currently working on the integration layer for going from prose to narrative operations that Fabula can reason about.
Read the full write-up for the motivation and technical details.