Inspiration

On a film set, time is measured in thousands of dollars per minute. Feature films and episodic productions are shot completely out of chronological order: Scene 84 might be shot in the morning, Scene 3 at midday, and Scene 85 three weeks later in a different city. In this chaotic environment, the script supervisor and assistant directors must track thousands of tiny physical details—from whether a character’s watch was on their left or right wrist, to whether an injury has healed, to where a prop was left two scenes ago.

When mistakes slip through, they lead to expensive emergency reshoots, awkward narrative plot holes, or costly post-production VFX paint-outs.

We asked ourselves: Why are filmmakers still relying on paper binders, chaotic group chats, and human memory to catch continuity errors across 120-page scripts?

We were inspired to build Continuity Guardian—not as another generic conversational chatbot, but as an autonomous, agentic AI production assistant that maintains the persistent "ground-truth state of the movie", actively reasons across multi-scene timelines, flags contradictions before the cameras roll, and executes approved fixes in real time.

What it does

Continuity Guardian is a full-stack, AI-powered continuity management system that acts as a virtual co-pilot for script supervisors, directors, and production managers.

Persistent Movie State Engine: Maintains a structured, scene-by-scene knowledge graph of every character (wardrobe, injuries/condition, location, known facts), prop (custody, location, state), location, weather, and timeline chronology.

8-Dimensional Continuity Sentinel: Whenever new scenes or scripts are added or edited, the engine automatically runs checks across 8 distinct dimensions:

  • Wardrobe Continuity: Flags unexplained costume swaps (e.g., leather jacket switching to a red bomber jacket without a costume change).
  • Prop Teleportation: Flags items appearing in someone's hand when they were last stashed in a locked vehicle or different room.
  • Location Transitions: Detects impossible character movements with zero transit or elapsed travel time.
  • Physical State & Injuries: Identifies vanishing wounds or sudden miraculous healings without medical treatment.
  • Timeline & Chronology: Detects inverted time sequences unless explicitly designated as intentional flashbacks.
  • Weather & Environment: Flags abrupt weather anomalies between consecutive scenes at the same exterior location.
  • Dialogue & Factual Consistency: Surfaces contradictory factual claims spoken across scenes. -Character Knowledge Leaks: Detects characters citing secret information before that secret was discovered in the story.

How we built it

We built Continuity Guardian with a modern, decoupled architecture designed for high performance and low latency:

Backend & API: Built with Python and FastAPI, implementing asynchronous REST endpoints, lifecycle database seeding, and modular domain services. Agentic Reasoning & Intelligence: Powered by Google Gemini 2.5 / 1.5 via the google-genai SDK, configured with native function calling and structured tool definitions. An autonomous fallback reasoning engine ensures high reliability even during offline demonstrations. Relational State Layer: SQLAlchemy with PostgreSQL (and SQLite auto-switch for zero-configuration local runs) to maintain ACID guarantees over relational movie entities (Scenes, Characters, SceneCharacters, Props, SceneProps, Issues, and Notes). Analytical & Audit Event Layer: ClickHouse integration via clickhouse-connect, with columnar tables for production_events and continuity_analytics_log. We also implemented an embedded in-memory columnar fallback engine to guarantee seamless execution anywhere. Frontend: Built with React 19, TypeScript, Tailwind CSS, Lucide Icons, and Vite, featuring a cinematic dark dashboard, interactive timelines, state comparison cards, and real-time toast notifications. Containerization: Complete orchestration via docker-compose.yml defining PostgreSQL, ClickHouse, Backend, and Frontend containers.

Challenges we ran into

Parsing Flexible Screenplay Formats: Screenplays are written in diverse styles—ranging from industry-standard Fountain and Final Draft sluglines (INT. CAFÉ - NIGHT) to human-written production breakdowns (Scene 12\nLocation: Café\nCharacters: Rahul...). We re-architected our parser into a multi-format regex and NLP engine that can segment scenes, extract characters, identify wardrobe phrases, and capture prop interactions across any text layout. Distinguishing Stylistic Choices from Errors: Not every non-linear scene is a mistake—flashbacks, smash cuts, and stylistic costume shifts are common in filmmaking. We solved this by designing the engine to allow intentional exceptions and flashbacks, while presenting suggested fixes rather than forcing automated overwrites. State Synchronization Between Relational & Columnar Stores: Ensuring that relational updates (e.g., updating a character's wardrobe in PostgreSQL) immediately trigger an immutable audit event in ClickHouse and update the frontend health score in real time required careful transaction lifecycle handling.

Accomplishments that we're proud of

True Agentic Workflow: Continuity Guardian does not just talk—it inspects state, identifies multi-dimensional contradictions, recommends fixes, and mutates production state upon user approval. 0 to 1 Continuity Scan in Milliseconds: The continuity engine evaluates an entire 14-scene production across 8 dimensions in under 150ms. Zero-Friction Demo Experience: Shipped with a complete built-in feature project ("Midnight at Platform 7") with 14 filmed scenes, 5 characters, 8 hero props, and 6 intentional continuity bugs that demonstrate every feature out of the box. Universal Script Ingestion: Users can paste their own custom scripts in any format or create brand-new isolated film projects with instant continuity checks. 100% Test Coverage: All 7 automated unit tests pass cleanly, verifying database seeding, rule evaluation, agent tool invocations, and ClickHouse telemetry.

What we learned

How to design LLM systems with executable function calling tools so the model acts as an analytical coordinator rather than an ungrounded text generator. The power of dual-store architecture: using relational tables for application state and columnar stores like ClickHouse for high-volume audit event streaming and aggregations. The intricate realities of film production continuity and how structured state modeling can eliminate cognitive fatigue on set.

What's next for Continuity Guardian

Multimodal Dailies Video Analysis: Integrating Gemini Multimodal vision to ingest raw video takes directly from camera cards and compare on-screen actor wardrobe against the shooting script. Direct Final Draft & Fountain Live Sync: Real-time webhooks that automatically re-run continuity checks whenever the writers' room updates a scene. Call Sheet & Script Supervisor Tablet App: A dedicated offline-first tablet interface optimized for harsh on-set filming conditions.

Built With

Share this project:

Updates

Submission history