💡 Inspiration

Every time I watch a movie and spot an inconsistency, I wonder how it slipped through. Screenwriting is a distributed problem — you're building a world across hundreds of pages, and the mental overhead of tracking every fact you've ever established is enormous.

Agentic Cinema Hackathon provided me with a platform to explore this problem and work on a solution. I wanted to build something that works like a real script supervisor: the person on set whose entire job is remembering what everything looked like in the last shot.


🎬 What It Does

Script Supervisor reads a screenplay scene by scene, builds a structured memory of the story world, and checks each new scene against everything that came before it. When it finds something suspicious, it shows you the evidence — which earlier scene established the conflict and how confident it is.

For dialogue that makes real-world claims, it pulls live web sources through the Parallel API and has Gemini evaluate them. Writers review every finding and their decisions get remembered, feeding into every future analysis.


🔧 How I Built It

The application is built around a persistent story memory rather than treating each scene as an isolated LLM prompt. The core workflow is:

$$ \text{Screenplay} \to \text{Scene Understanding} \to \text{Story Memory} \to \text{Context Retrieval} \to \text{Reasoning} \to \text{Findings} \to \text{Writer Decision} \to \text{Persistent Memory} $$

Layer Technology Role
Frontend Next.js + React + TypeScript Screenplay workspace and Supervisor interface
Backend FastAPI + Python Analysis pipeline and orchestration
LLM Gemini Scene understanding, classification, reasoning, research evaluation
Web Research Parallel Real-world source retrieval for fact-checking
Database CockroachDB Story state, issues, research, world rules, writer decisions
Data Layer SQLAlchemy + Pydantic Backend models and service layer
Hosting Vercel + Google Cloud Run Frontend and containerised backend
Secrets Google Cloud Secret Manager Production credentials kept out of the application

😤 Challenges I Ran Into

  • Getting entity extraction consistent was the hardest part — the same character appearing under slightly different names across scenes would break continuity checks downstream.
  • False positives were the other ongoing fight; getting the system to respect fictional world rules and past writer decisions is what made it usable rather than just noisy.

🏆 Accomplishments I'm Proud Of

  • The research pipeline being genuinely grounded in real sources with actual URLs, rather than Gemini guessing from training data, is something I'm proud of getting right.
  • The writer decision memory actually works the way I hoped — once you dismiss something as intentional, the system stops raising it in every subsequent scene.
  • Designed and developed the entire application in a span of 10 days. This is my first time doing so, and it was an enriching experience.

🚀 What's Next for Script Supervisor

Multi-draft comparison — track how the story changes between revisions and flag continuity regressions introduced by edits, not just within a single draft.

Collaborative review — right now it's a solo tool; adding multi-user support so a writing room or script editor can review and annotate findings together is the obvious next step.

Richer timeline visualisation — the plot timeline exists, but there's a lot more that could be shown: character arcs overlaid, relationship changes plotted across scenes, location threads.

Built With

Share this project:

Updates

Submission history