seedling · updated 2025-10-19 13:49:50

Drama: AI-Powered Narrative Generation System

An experimental system for generating stories with validated dramatic arcs based on classical narrative theory.

Concept

Generate interactive dinner party experiences where 6-8 guests each experience their own Greek dramatic arc (peripeteia, anagnorisis, hamartia) while participating in a shared mystery narrative.

Think: “murder mystery dinner meets literary theory meets agentic AI.”

Architecture

Multi-stage generation with validation at each step:

Sketch → Validate → Spec → Validate → Full Text → Validate
  ↓         ↓        ↓         ↓          ↓          ↓
 DB        DB       DB        DB         DB         DB

Key Features

  1. Narrative Theory as Code - Convert Aristotle, Propp, Todorov into executable tests
  2. Psychological Depth - Characters with DSM-IV-inspired profiles
  3. Full Traceability - Every generation attempt tracked in PostgreSQL
  4. Flexible LLM - Support for llm CLI and self-hosted LiteLLM

Technical Stack

  • LLM: llm CLI (Simon Willison) + LiteLLM for APIs
  • Database: PostgreSQL with SQLAlchemy + Alembic
  • Models: Pydantic for domain objects
  • Validation: Structural (Pydantic) + Narrative theory + LLM judges

Current Status

Infrastructure complete. Core components implemented: - Database models and migrations - Domain models (Story, Character, Test, Context) - LLM client abstraction - Base generators and validators - Aristotelian validators (unity, peripeteia, anagnorisis)

Next: Pipeline executor, more validators (Propp, Todorov), experiments.

Philosophy

Convert narrative theory into executable code. Test-driven story development where literary theory provides the test suite.

Related Notes