Dev.to AI 🤖 Ai 👁 0 📖 2 min read

I distilled 65 viral short dramas into a "writing DNA" and built an AI pipeline that re-skins them beat by beat

Vertical short dramas (ReelShort, DramaBox…) are a multi-billion-dollar market built on a simple observation: hits aren't luck. They're structure. A hit episode opens with a visual hook in 3 seconds, stacks an informati

Vertical short dramas (ReelShort, DramaBox…) are a multi-billion-dollar market
built on a simple observation: hits aren't luck. They're structure.

A hit episode opens with a visual hook in 3 seconds, stacks an information hook
in 30, drops a "golden hook" in 60, and ends on a cliffhanger that makes you
pay. The industry calls this craft. I wanted to know if it could be
engineered.

So I distilled 65 overseas vertical dramas — about 3,420 episodes and 55,000
lines of dialogue — into a writing methodology ("writing DNA"), then built
Drama Forge, an open-source pipeline that turns one proven hit into a
complete, production-ready re-skin.

What it does

Upload a hit sample, and the pipeline:

  1. Deconstructs it into a six-dimension report plus a per-episode beat map: what each beat does (humiliation / restraint / reversal / face-slap), its emotional intensity, where the paywall sits.
  2. Re-skins it into 10 concept variants. The core promise ("contract marriage → real love", "hidden identity revenge") stays locked; only the surface genre swaps — mafia, werewolf, billionaire, royal.
  3. Produces a full script package per concept: direction card, character bios, season outline, a coherent block of opening episodes, and two ad-creative episodes. After final review, it keeps writing to the season finale in resumable background batches.
  4. Grades everything with an editor-in-chief review pass.

The key discipline is beat-level mirroring: each new episode mirrors the
original's beat functions and emotional curve, but every event, scene, and
line of dialogue is rewritten. You copy the skeleton of what converts, never
the words.

The engineering that made it survivable

A 60-episode script package is 10+ long LLM calls. Naive implementations die
to proxy timeouts. What worked:

  • Streamed structured output everywhere (streamObject + a 15-minute undici agent). Non-streaming calls get killed by intermediaries after ~10 minutes of silence.
  • tRPC with JSONL heartbeats (pingMs: 4000) so long requests never go quiet.
  • Async jobs with server-side checkpoints: the browser submits and polls; every batch is persisted, so a restart resumes from the exact missing episodes. Idempotent merges by episode number make retries free.
  • Missing-episode self-healing: LLMs sometimes return 4 episodes when asked for 5. Each batch retries up to 3 rounds and refuses to advance the pipeline until the set is complete.

Stack: React 19 + Hono + tRPC 11 + Drizzle + MySQL, all TypeScript.

What I learned about AI writing

The model doesn't need to be "creative". It needs rails: a beat map to mirror,
an outline to stay on, per-episode volume targets (scene count / dialogue
lines), and a checklist of hard rules (5.5 words per dialogue line, VO ratio
by audience gender, cliffhanger taxonomy). Creativity is what you get when
the constraints are good.

Try it / break it

Repo (Apache-2.0): https://github.com/epongzhao-sketch/drama-forge

The corpus-distilled DNA ships in the repo. A newer rule pack, corrected
against live ad-delivery data, is what I use in production — happy to talk
about it in the comments or Issues.

If you work in short-drama production and want to see what a full package
looks like, open an issue — I'll show you one.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.