Autonomous rights clearance and chain-of-title investigation for film and television.
Live Demo β’ The Problem β’ Architecture β’ Dual-Chain Rights β’ Guarantees β’ Quick Start β’ Documentation
| Service | Endpoint / Access |
|---|---|
| Web Workspace | https://clearframe-web-690834564732.us-central1.run.app |
| Demo Access | Register a workspace at /register (or see private hackathon testing instructions) |
| API Base URL | https://clearframe-api-690834564732.us-central1.run.app |
| Infrastructure | Serverless Google Cloud Run (us-central1) + Google Cloud SQL + Cloud Storage (GCS) |
No film or television production reaches an audience without clearance. Every song, visible brand, artwork, depicted real person, and archival clip must be traced to whoever controls the rights today. A distributor will not accept delivery without Errors & Omissions (E&O) insurance, and underwriters will not issue a policy without an exhaustive, auditable clearance report.
A standard 110-page feature screenplay routinely yields 200 to 400 distinct clearable items.
Today, this process is broken:
- The Manual Grind: Handled via spreadsheets, clearance coordinators, and weeks of paralegal hours.
- Instant Obsolescence: The moment the director issues a revision (e.g. from shooting draft to blue revision), the clearance spreadsheet is immediately out of date.
- Post-Signoff Blindness: If a music catalog is acquired or an estate lawsuit is filed after sign-off, the production remains blind until hit with a cease-and-desist.
A single song represents two separate legal properties with independent chains of title:
- The Master Recording (controlled by a record label).
- The Underlying Composition (controlled by publishers, songwriters, or fractured estates).
Licensing one clears nothing. A standard database lookup finds the label. Only a live investigation uncovers the probate dispute or unadministered catalog split sitting on the composition.
ClearFrame is built around four decoupled planes. The API never invokes an LLM directly; instead, it writes a job to a durable PostgreSQL queue (FOR UPDATE SKIP LOCKED) and returns in milliseconds. Background workers execute the multi-stage research pipeline, and live updates travel back through PostgreSQL LISTEN/NOTIFY into Server-Sent Events (SSE).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXPERIENCE PLANE React 19 Β· Vite Β· Server-Sent Events (SSE) β
β Producer β Coordinator β Legal Counsel β Underwriting Reviewer β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β REST + JWT
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONTROL PLANE Fastify API Β· Zod Validation Β· RBAC Gates β
β β
β β
THE API NEVER CALLS A MODEL DIRECTLY β
β
β Validates input β INSERTS job to queue β Returns in milliseconds β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β PostgreSQL Job Queue (SKIP LOCKED)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXECUTION PLANE Worker Daemon Β· Resumable Step Pipeline β
β β
β Breakdown βββΊ Recon βββΊ Synthesis βββΊ Verify βββΊ Trace βββΊ Assess β
ββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββ ββββββββββββββββββββββββββ
β GEMINI (Vertex) β β PARALLEL AI β
β Reasons & Judges. β β Retrieves & Scrapes. β
β Never retrieves. β β Never reasons. β
ββββββββββ¬ββββββββββββ ββββββββββββββ¬ββββββββββββ
β β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MEMORY PLANE PostgreSQL 16 (14 Tables) Β· Cloud Storage (GCS) β
β Findings Β· Evidence Citations Β· SHA-256 Ledger Β· Cost Events Β· Audits β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β PostgreSQL LISTEN / NOTIFY
ββββββββββββΊ SSE Stream βββΊ Back to UI
When a screenplay PDF is uploaded, ClearFrame executes an orchestrated sequence across specialized autonomous agents:
- Breakdown Agent (
gemini-2.5-pro): Extracts all clearable cues anchored to scene slugline, page number, context, and prominence (hero,featured,background). - Recon & Retrieval (
parallel-web): Queries live-web registries and archives, capturing HTML crawl snapshots. - Continuity Verifier Agent (
gemini-2.5-pro): Adversarially red-teams findingsβchallenging stale sources (>24 months) and conflicting registry claims before risk scoring. - Studio Risk Counsel Agent (
gemini-2.5-pro): Maps findings to E&O underwriting standards (GREEN,AMBER,RED) with costed mitigations. - Outreach Drafting Agent (
gemini-2.5-flash): Auto-drafts sync license inquiries held strictly behind human legal counsel authorization.
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Scene 42 β "Midnight City" (Cover Version) β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
ββββββββββββββββββββββββ΄ββββββββββββββββββββββββ
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β MASTER CHAIN β β β COMPOSITION CHAIN Β© β
β (This Performance) β β (The Written Work) β
βββββββββββ€ββββββββββββ βββββββββββ€ββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Indie Label Roster β β Original Publisher β
βββββββββββ¬ββββββββββββ βββββββββββ¬ββββββββββββ
β β
β βΌ
β βββββββββββββββββββββββ
β β Catalog Acquisition β
β β (2023 Transfer) β
β βββββββββββ¬ββββββββββββ
β β
β βΌ
β βββββββββββββββββββββββ
β β ESTATE LITIGATION β
β β (Disputed Split) β
β βββββββββββ¬ββββββββββββ
βΌ βΌ
βββββββββββββββββββββββ βββββββββββββββββββββββ
β Status: CLEAR β β Status: CONTESTED β
βββββββββββ¬ββββββββββββ βββββββββββ¬ββββββββββββ
β β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
βΌ
βββββββββββββββββββββββββββββ
β Clearable βΊ ALL Chains β
β Resolve Clear. β
β β
β β FLAGGED FOR COUNSEL β
βββββββββββββββββββββββββββββ
ClearFrame enforces a mathematical rule: clearance is a conjunction, not an average. If the master is 100% clear but the composition is disputed, the item is strictly flagged for human counsel resolution.
When a director submits a revised screenplay cut (Pass
- Unchanged Items: Carried forward with full evidence and counsel decisions intact ($0.00 compute spend).
- Modified Items: Re-queued and re-investigated in context.
- Deleted Items: Marked
withdrawnβnever deleted from the audit ledger.
The One Rule: Every finding, source URL, spend penny, risk score, and report originates from a real user action or live pipeline execution. Where data does not exist, the UI renders an empty state rather than inventing placeholder content.
| Guarantee | Enforcement Mechanism | Code Location |
|---|---|---|
| Zero Hallucinated Citations | Model-emitted URLs not present in the live Parallel retrieval pool are dropped at the gateway | services/api/src/pipeline/stages.ts |
| Tamper-Proof Audit History | SHA-256 hash-chained ledger; PostgreSQL trigger unconditionally rejects UPDATE and untagged DELETE |
services/api/src/core/ledger.ts |
| No Floating Point Money | 64-bit integer micro-dollars (bigint); token counts and retrieval units deduct atomically in the same statement |
services/api/src/core/db.ts |
| Authority is Server-Side | Only authenticated legal counsel can resolve findings, release outreach, or sign reports | services/api/src/core/auth.ts |
| No Rogue Outbound Messages | System contains zero email-sending mechanisms; licensing inquiries are draft-only | services/api/src/pipeline/stages.ts |
Every finding lifecycle event, adversarial challenge, counsel decision, and spend record appends to an immutable SHA-256 hash chain:
Underwriters can verify mathematical chain integrity at any time via GET /api/productions/:id/integrity or by clicking "Verify Chain" in the workspace.
# 1. Clone and configure environment
cp .env.example .env
# Configure your keys in .env:
# - GOOGLE_CLOUD_PROJECT
# - PARALLEL_API_KEY
# - DATABASE_URL=postgres://clearframe:clearframe@localhost:5433/clearframe
# 2. Boot PostgreSQL, API, Worker, and Web
make up
# 3. Verify provider connectivity
make smoke# Install all workspace dependencies
make install
# Initialize database
createdb clearframe
make migrate
# Start API, Worker, and React Web concurrently
make dev- Web Workspace:
http://localhost:3000 - API Server:
http://localhost:8080
make typecheck # Strict TypeScript across all workspaces (noUncheckedIndexedAccess)
make test # 22 integration tests against a live PostgreSQL instance
make smoke # Live round-trip connectivity test to Vertex AI & Parallel AImake test covers SHA-256 hash chaining, adversarial tamper detection, PostgreSQL trigger immutability, concurrent advisory locking under 10 parallel workers, queue stall reaping, integer money attribution, and citation pool containment.
| Role | Permissions | Restricted Actions |
|---|---|---|
| Producer | Upload cuts, start passes, raise budgets, read all findings | Cannot resolve findings, release outreach, or sign reports |
| Coordinator | Correct item metadata, prioritize items, view all findings | Cannot resolve findings, release outreach, or sign reports |
| Counsel | Full access + approve/license findings, authorize outreach, sign E&O reports | Cannot delete ledger history (nobody can) |
| Reviewer | Read-only access to register, evidence snapshots, and reports | Cannot modify any production state |
ClearFrame runs serverlessly on Google Cloud Platform in us-central1:
- Google Cloud Run:
clearframe-web(SPA),clearframe-api(Fastify REST/SSE), andclearframe-worker(Background Daemon). - Google Cloud SQL: Managed PostgreSQL 16 database with advisory locks and row-level security triggers.
- Google Cloud Storage (GCS): Secure bucket storage for screenplay PDFs, signed PDF reports, and immutable HTML crawl snapshots.
- Google Cloud Scheduler: Automated cron triggering periodic job sweeps and Sentinel watch schedules.
Comprehensive technical guides and specifications are available in the docs/ directory:
- π System Architecture β The Four Planes, multi-stage pipelines, SSE streaming, and GCP topology.
- ποΈ Data Model & Schema β Complete 14-table PostgreSQL schema, integer micro-dollars, and state machines.
- π REST API & SSE Reference β Endpoints, request/response schemas, error codes, and HMAC webhooks.
- π οΈ Operations & Deployment β Cloud Run deployment guide, environment variables, and runbooks.
- π Security & Cryptographic Ledger β SHA-256 chaining, PostgreSQL triggers, and anti-tamper proofs.
- π€ Autonomous Agent Playbooks β Playbooks, prompts, tools, and guardrails for all 11 autonomous agents.
- π Architecture Diagrams β High-resolution rendered PNGs and Mermaid source files.
Licensed under the Apache-2.0 License. See NOTICE, SECURITY.md, and CONTRIBUTING.md.




