Start here

The map of the project, how to resume work in a new chat, and the rules every session follows.

TL;DR

This repository builds a YouTube production pipeline. Phase 1 is a channel in the Indian business niche with a series called The fall of X (also Why X died), in the style of the HinExp channel. The pipeline runs from "which niche" down to "a narrated, timed video", and it checks its own work with deterministic tools wherever it can.

  • Done: six niche databases and a niche scorecard; a series study (1,326 channels found, a 20-video teardown, a blind script study); a topic study of 103 subjects; a script pipeline with 70 lint rules that took Moser Baer from v3 to v7 (BAR MET) and wrote Cafe Coffee Day v1 (BAR MET on the rules of that morning; the later K, L, M rules add warnings to it); a Hinglish v7, Gemini voice-over for all 14 Moser Baer beats, word timing for 2 of them, and a video plan.
  • Not proven: that any of the script lessons raises views or retention. No viewer has seen a script from this pipeline. The user's reviews are the evidence, and the rules are design constraints.
  • State: everything since commit 156897f (Moser Baer v4) is uncommitted, on branch research/moser-baer. Nothing is pushed.
  • If you only read three pages: The script pipeline, Lessons A to M, Status and open items.

What this repository is

A single creator is building a YouTube channel and wants the production process written down and automated, so that a new topic can be taken from an idea to a finished script (and then a voice-over and a video) with the same quality each time, without the author in the room. The code does the parts that have a right answer (searching, counting, checking quotes, linting). Language models do the parts that need reading (extracting claims from transcripts, analysing a video). The human decides what only a human can: the topic, the title, whether to name a private person, whether to run extra readers, and whether to commit.

The work happened in this order, and the docs follow it:

A

Ecosystem intelligence

Find and rank channels in a niche; rate niches against each other.

Page 02

B

Series research

For the series "Why X died": find similar videos, rank the ones worth learning from, study two cohorts of winners, tear down the best 20.

Page 03

C

Topic selection

Score which subjects (companies, people) draw views; check a chosen topic before writing.

Page 04

D

Sources and independent research

Mine rival videos for leads, tear them down, then build a verified fact base from outside YouTube.

Page 05

E

Writing the script

Thesis, chain, draft, two passes, gate loop, read-aloud, readers, hand-off. Thirteen lessons enforced by a linter.

Pages 06 to 09

F

Language, voice and video

Hinglish version, Gemini text-to-speech, word timing, and a plan for music, sound and visuals.

Page 11

The pages

The three marked core in the side list are the ones the user asked to be most thorough: how a series is researched, how a topic is chosen, and how a script is written and checked.

01 The project

Read first if you know nothing.

Goal, phases, the user's preferences, what exists on disk.

02 Ecosystem intelligence

Read to understand why Indian business, or to add a niche.

Stages 01 to 33, the five queues, the niche scorecard.

03 Researching a series

Read before starting a new series.

Series spec, ranking, cohorts, teardown, what the studies found.

04 Choosing a topic

Read before picking the next video.

The topic study, its numbers, and a checklist of gates.

05 Mining and verifying sources

Read before S1 to S3 of any script.

Rival-video brief, teardown, fact base, source rules.

06 The script pipeline

Read before writing or resuming a script.

S0 to S11 with commands and exit tests.

07 Lessons A to M

Read when a rule fires and you ask why.

Origin, enforcement and evidence grade of each lesson.

08 Anatomy of a script

Read when drafting a chain or a hook.

Beat contract, hook, ladder, pulls, texture, voice.

09 Checks and balances

Read when a gate fails or before a hand-off.

Every gate and what it can and cannot prove.

10 How we got here

Read to see why a rule exists.

Dated history, v3 to v7, the failures that recur.

11 Hinglish, voice, video

Read once the English script is done.

Hinglish rules, TTS prompts, timing, video plan.

12 Tools and files

Read to find a tool or a file.

Registry, folder map, commands, git status.

13 Status and open items

Read last, and before you act.

Where things stand and what waits on the user.

Which pages to read, by job

You were asked toRead in this order
Write or revise a scriptCLAUDE.md, 06, 07, 09, 08, then 13 for the current state. Run check.js before anything else.
Produce the next video in the series04, 05, then 06. The launch prompt for a fresh session is .claude/skills/video-script-production/references/launch-prompt.md.
Research a new series03, 02 (if the niche is new), then 04.
Choose a topic04, then the S1 and S2 parts of 05.
Make a Hinglish version, a voice-over or a video11, then 13 for what is unproven.
Review the project or decide what to do next01, 13, 10.
Change a rule or add a lesson07 (the ten-step protocol at the end), 09, 12.

Resuming in a new chat window

  1. Read CLAUDE.md at the repo root. It is loaded automatically in Claude Code and holds the standing rules.
  2. Find where a script stands. From the repo root:
    node .claude/skills/video-script-production/scripts/check.js --dir research/the-fall-of-moser-baer/script --version v7 --no-selftest
    It prints one of HARD GATES FAILING, HARD GATES PASS, BAR NOT YET MET or BAR MET, names the stage the files show, and says what to do next. It also writes STATUS-vN.md.
  3. Read Status and open items and the script's HANDOFF-vN.md for the decisions that are waiting.
  4. Check git status and git log. Most work is uncommitted; do not assume a clean tree.
  5. Do not guess a procedure. The runbook is .claude/skills/video-script-production/references/runbook.md; this site summarises it and links to it.

Standing rules from the user

Glossary

Ecosystem / niche
A subject area on YouTube, such as Indian business. Each has its own SQLite database in data/.
Series
A repeatable video format, defined by a spec in series/<id>.json. Here: Why X died and The fall of X.
Topic
One subject for one video, such as Moser Baer or Cafe Coffee Day. Its folder is research/the-fall-of-<slug>/.
Cohort
A fixed set of transcripts picked by a rule, to be studied together. Here: 10 new and 10 established "Why X died" winners.
Teardown
A close reading of a video: what it does, how, with a quoted moment for each claim. Done by language-model analysts and checked by a validator.
Beat
One section of the script, 40 to 105 seconds. B0 is the hook; the last beat is the close. Each follows Understand, Care, Change, Compel.
Hook
Beat B0, the first 60 to 110 seconds.
CDL
Core driving loop: the one question the video exists to answer.
Chain
chain-vN.json: the script's structure declared as quotes that must occur in the text, so a linter can check it.
Hero number
A figure the argument turns on. At most 7 per video, each with a stake line before it and a landing after it.
Pull
Something the viewer is waiting for without being asked a question: a clock, a person at risk, a gap, a motif.
Ledger
The section of the script file listing every figure with its source and status.
[V], [V-search], [CHECK]
Fact status. [V] a non-YouTube page was opened and read. [V-search] seen only in a search summary. [CHECK] unverified. Also derived (with arithmetic) and analysis (reasoning the voice-over must flag).
Gate
A check a script must pass. Hard gates decide the exit code; bar gates decide BAR MET.
Damage test
selftest.js: breaks a script one property at a time and checks the matching lint rule fires. It tests the linter, not the script.
S0 to S11
The eleven stages of the runbook, from setting up a folder to the hand-off.
v6 bar
The quality bar set from Moser Baer v6, the script the user approved ("i like v6").
Hinglish
Hindi grammar with English words, written in Roman script.
TTS
Text to speech. Here: Google Gemini TTS, one audio file per beat.
HinExp
A YouTube channel the series is modelled on; it is the reference channel in the series spec.

Keeping these pages current

These pages are static HTML with a shared stylesheet at assets/docs.css. The side list is copied into every page, so adding a page means adding one list item to each. The existing Markdown files in this folder (SCRIPT-PIPELINE.md, PROMPT-cafe-coffee-day.md, google_ai_search_automation_thread.md) are older and stay as they are. The single source of truth for the script pipeline is the skill folder; when you change a rule, a threshold or a stage there, update 06, 07 or 09 in the same session, in the way CLAUDE.md already asks for tools.md.

Every number on these pages was read from a repository file on 2026-10-27. Numbers that come from a plan or an estimate are labelled as such. Where the repository does not record something (for example why the Indian business niche was chosen), the page says so instead of filling the gap.

Written 2026-10-27 from the repository files and the project memory notes. If a page and a file disagree, the file is right: fix the page.