Inspiration

Professional script coverage — the structured feedback a screenplay gets before a producer, agent, or competition takes it seriously — typically costs $100–$300 and takes several days to come back. For most screenwriters, especially indie and first-time writers, that cost and turnaround simply isn't accessible. Scripts go out with fixable, obvious problems still in them — a bloated first act, a character whose voice drifts, dialogue that tells instead of shows — and writers don't find out until a rejection arrives with no explanation attached.

I wanted to build something that gave any screenwriter a real, structural read on their work instantly, for free, using the same categories of feedback a paid consultant would give.

What it does

AI Script Doctor is a web app where a screenwriter pastes a script and receives an instant, structured report. Four coordinated agents, all powered by Gemini, each handle one narrow piece of the analysis:

  • Structure agent — maps the script to three-act form and flags pacing issues
  • Character consistency agent — tracks each character's established voice and flags scenes where they drift out of character
  • Dialogue quality agent — scores naturalness 1–10 and flags on-the-nose lines
  • Notes compiler agent — merges the three analyses into one clear, prioritized, scene-by-scene report

How I built it

I started with the problem, not the tech — deciding what each agent should own before writing any code, so the analysis would stay focused instead of one prompt trying to do everything at once.

From there, I built and deployed the entire app using Replit Agent: describing the app in plain language and letting it scaffold the Flask backend, the four Gemini-powered agent functions, and a manuscript-styled frontend. Gemini is wired in through the google-genai / ADK SDKs, with each agent issuing its own focused prompt and returning structured JSON that the compiler agent merges into the final report. The app is published directly on Replit and the code lives in a public GitHub repository under an MIT license.

Challenges I ran into

The biggest challenge wasn't the AI logic — it was production reliability. Early on, the live app started returning 500 errors under real use. Digging into the deployment logs, I traced it to a WORKER TIMEOUT: the app makes four sequential Gemini calls per request, and the default 30-second server timeout wasn't enough time for all four to complete, especially when the requested Gemini model occasionally fell back to an alternate one. I found the exact production run command inside the deployment's artifact.toml, and fixed it by extending the gunicorn worker timeout to 120 seconds — enough headroom for all four agents to finish cleanly.

Getting the code from Replit onto a properly public GitHub repository with a visible open-source license also took more care than expected — repo visibility, Git provider connections, and license detection all needed to be handled deliberately rather than assumed to happen automatically.

What I learned

Coordinating four narrow, single-purpose agents produced noticeably more focused and useful notes than one broad prompt trying to do everything at once — each agent's output was sharper because its job was smaller. I also learned that shipping an agentic app is as much about production reliability (timeouts, deployment configs, logs) as it is about prompt design — the AI worked correctly from early on; making it reliably reachable under real requests was the harder problem.

What's next

Genre-specific feedback modes, exportable PDF coverage reports, and support for longer, full-length scripts beyond single scenes.

Built With

Share this project:

Updates

Submission history