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
- Narrative Theory as Code - Convert Aristotle, Propp, Todorov into executable tests
- Psychological Depth - Characters with DSM-IV-inspired profiles
- Full Traceability - Every generation attempt tracked in PostgreSQL
- Flexible LLM - Support for
llmCLI and self-hosted LiteLLM
Technical Stack
- LLM:
llmCLI (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
- Narrative Theory as Code - Narrative Theory as Code
- Multi-Stage Story Generation with Validation - Multi-Stage Story Generation