How we got here
The pipeline was not designed in advance. It was built across seven review rounds on one video, Moser Baer, between 2026-10-24 and 2026-10-25. Each round began with a remark by the user; each remark became a lesson, a set of lint rules, a damage test and a documented step. The script grew from 9.5 minutes and no chain (v3) to 20.2 minutes with 70 passing rules (v7). Cafe Coffee Day v1 was the first run on a new topic.
- Why read this: to see why a rule exists before changing it, and to avoid repeating the 12 failure patterns at the end.
- Source:
references/history.md(reconstructed from the session transcript, the git log and the files),references/learnings.md,references/review-round-7.md. - Dates are the user's local day (IST); transcripts store UTC, 5 h 30 min earlier.
The version ladder (Moser Baer)
| v3 | v4 | v5 | v6 | v7 | |
|---|---|---|---|---|---|
| Length | 9.5 min (labelled 12) | 12.8 min | 17.3 min | 19.6 min | 20.2 min |
| Words | 1,427 | 1,922 | 2,594 | 2,940 | 3,029 |
| Rules passed | no chain (text-only: 5 FAIL, 5 WARN) | 28 | 37 | 55 | 70 |
| Damage tests | n/a | 15 | 24 | 42 | 56 |
| Quantities per minute (in the hook) | 4.3 (6) | 1.7 (0) | 2.3 (0) | 2.0 (1) | 2.0 (1) |
| Contractions per 100 words | n/a | 0.47 | 1.12 | 1.84 | 1.65 |
| Hook | list-style, hypothetical opening | 74 s | 73 s | 110 s, carries a person, the rise, the fall | 107 s, 24-word tease, 13-word takeaway |
| What was added | stakes, one loop, a chain, a beat contract | pulls, plain voice, the whole story | personality, rhythm, the human element | cast tags, a defined idea, spoken turns, headlines (a polish, not a rebuild) |
Version scores are not comparable across rule sets: each new rule group adds rules an older script does not declare. Under later rules v5 scores 89 and v4 scores 80. check.js --prev compares the text-level measures, which are comparable.
Phase 0: what existed before the script work
| What | Where | Notes |
|---|---|---|
| Ecosystem work (discovery, qualification, ratings) | src/stages/, data/*.db, ecosystem-rater | Chose the Indian business ecosystem for phase 1. |
| The "why X died" series study | README-SERIES-ANALYSIS.md, series/why-x-died.json | Found similar videos, ranked learn-from videos, picked two cohorts of 10 winners. |
| Statistical cohort test of script rules | skill script-cohort-analysis | Finding: blind script craft did not predict performance among winners; cold open on the collapse rejected in both cohorts. |
| Per-video teardown of the 20 best | skill winning-video-teardown | Counts of mechanisms: reversal 19 of 20 (inflated by the genre), loops 16 of 20. |
| The Moser Baer research brief | src/topic-research/cli.js, research/the-fall-of-moser-baer/report.md | From 6 rival transcripts; names and numbers unreliable (auto-captions). |
| Teardown of 7 Moser Baer videos | research/the-fall-of-moser-baer/teardown/SYNTHESIS.md | 3 with real reach (552K, 474K, 170K views). |
| Script v3 | SCRIPT-v3.md | Written by an earlier session; the draft the user reviewed first. |
Round 1 (10-24 evening): lessons A to D, and v4
The user said the script is cognitively complex (A); the openings are good but weak, find the core driving loop and hint the destination, not the direction, and escalate in the first 60 (B); the flow should be BUT or THEREFORE, never "and then" (C); show, make them care, change what they believe, give them a reason to continue (D). They asked for the script updated and the pipeline that produced it, so "future scripts automatically carry the lessons". "Dont stop until my requirements are fulfilled. ULTRATHINK."
What was done. Read the earlier work (loop-timing rater agreement was only 0.08 to 0.39, which is why every structural check is a declared quote that must occur in the text). Diagnosed v3 with counts (41 figures, 6 in the hook, a 6-figure window, signpost joins, three equal teases, a hypothetical opening, 9.5 minutes labelled 12). Researched (20 searches, 12 fetches). Verified the thesis, which changed it: v3 said the solar bond turned decline into debt; the sources said the debt was already there and no source says where the bond's money went. Built the video-script-production skill (lint rules A1 to D8, damage test with 15 mutations, scaffold, compare, principles), updated the teardown and cohort skills, wrote v4. Commit 8257801.
What went wrong. CommonJS against ES-module resolution; "₹N crore" counted as two quantities; month and year date masking; regexes mangled by the shell; CRLF files; Windows Node could not see an MSYS path; mutations tied to hard-coded text. Fact errors found: the bond-funded-solar claim had no source; v3's "barely moved" sales were down 5 percent; worker counts and the lockout date differ between sources.
Taught. Declare structure and check it mechanically; verify the causal link; grade the evidence; the lessons conflict slightly with the corpus, so keep the opening scene short, cause-free and figure-free and record the tension.
Round 2 (10-25 after midnight): the blind reader pass
The user: "yes, run the fresh-reader pass on v4". Two blind Sonnet readers (a first-time viewer and a skeptical editor) saw only the numbered voice-over. Fixes both backed with a quote were applied; commit 156897f, the last commit to date. The linter scored 100 and the readers still found: two paragraphs too dense in names and terms; an oversold tease; a link on an unsupported adjacency; a comparison that showed scale not innocence; a third ending; unglossed Philips, gigawatt, tribunal and Alchemist; and that the title's "Killed" outran the evidence. A passing linter is not a finished script.
Round 3 (10-25 early): lessons E, F, J, and v5
The user said the open loop might not hold for the full script and can be implicit; the script is "full of ai speak (no x, no y, just a simple z)"; research how to remove this; make subtle changes; tell the full story that was truncated, "like foundation in Kolkata and all that human and historic nuance". ULTRATHINK.
What was done. Lesson E: defined seven pull types and a 60-second warm window; researched implicit tension. Lesson F: fetched Wikipedia's "Signs of AI writing" and two public skills, measured v3, v4 and 12 English winners, wrote budgets (not bans) and a voice pass. The whole story: researched the person before the company (two Business Today profiles, Outlook Business, an ICMR case study): Calcutta 1962 to 1983, the Swiss partner, the cocktail party, floppy disks in a country that thought it a bad idea, a late CD-R entry won on cost. The thesis grew richer ("a founder whose career was leaving what was running out"). It also exposed v4's "3,500 crore in 2004" garble. Wrote v5 (15 beats, 17.3 minutes). The fragment-drumroll mutation initially did not fire and was fixed.
Taught. The middle of a long beat needs its own question; pull touches must be real words; F rules have false positives (reword, do not raise the budget); research the person first.
Round 4 (10-25 morning): lessons G, H, I, and v6
The user said to add personality (earnest, aloof, using metaphors, similes and parables), rhythm (hard data moments distributed with easy storytelling ones) and the human element (personifying, the personal stake, "mirror neurons"). "Reason about whether to integrate wholesale or keep these stages one after the other." Also: "'So let's start with the city he left.' where does this come from, who is he and why do I care"; the hook "has to be a little bit longer... as it's too thin".
What was done. Researched metaphor persuasion, narrator persona, attention models, the identifiable-victim effect and mirror neurons (17 searches, 3 fetches). Measured our own winners: they use almost no figures of speech or admissions, so v6 is a deliberate difference; rhythm thresholds were loosened when the first draft would have flagged half the winners. Decided integration: one plan in the chain, one additive texture pass, then the subtractive voice pass. Implemented G1 to G4, H1 to H5, I1 to I6 and B8; hook cap 75 to 110 seconds. Answered the "he" question (a pronoun with no antecedent and no reason to care). Wrote v6 (14 beats, 19.6 minutes) and linted it through about ten rounds. The damage test found loopholes in the new rules (a role phrase counted as naming; an earlier name satisfied the pronoun test; the parable test checked only the first and last line; two word-boundaries were written as backspace characters by the shell). A read-aloud pass found a vague "the same thing", an unhedged claim about Puri's state of mind and a doubled "it worked". v5's "the disc business lost money three years running" was corrected (the solar arm did).
The user's response: "i like v6".
Round 5 (10-25 morning): recording and harnessing
The user said to record all steps, checks, lessons, refinement stages, the how and the research in Markdown, so other videos can be produced "with similar consistency easily without needing manual intervention... good enough to reach the stage of v6 in the future in a go... it can produce intermediate results, but the one it stops at should be of the quality and calibre of v6", and to keep notes of skills and tools created.
What was done. Mined the session transcript for the user's messages, searches, fetches and reader prompts (session-log.js is that mining made reusable). Wrote the history, runbook, quality bar, read-aloud checklist, reader prompts, lint-fixes cheat sheet, research protocol, lesson protocol and tools registry. Built check.js, ledger-check.js, retime.js, extract-vo.js, calibrate.js, session-log.js, scaffold.js --from. Added Lesson J. Froze v6 as a worked example and added CLAUDE.md.
Found. The ledger check found that "14 cents" and "₹110 crore" were spoken but not in the ledger as spoken. The calibration tool showed an earlier note had said "one comparison every five minutes" when 0.3 per 1,000 words is one every 22 minutes. The dates on the v6 notes said 10-26 when the work was done on 10-25.
Round 6 (10-25 morning): the front of the pipeline in full
The user asked whether the guide covers only v3 to v6 or from "given X" through extraction, transcripts, analysis, research and fact-checking. The honest answer was: solid from the fact base onward, pointers only for S1 and S2. They asked for both written in full.
What was done. Read every file of the two stages, wrote s1-rival-brief.md and s2-teardown.md, then ran S1 for real on a throwaway topic ("the fall of nokia", 3 videos, a scratch folder) so the documents describe measured behaviour.
Found. topic-research --refresh deleted the whole research/<slug>/ folder, including script/ (fixed). The ranking cannot see the angle (a "fall of Nokia" run selected two rebirth videos). prepare.js told every analyst the video outperformed its channel, false for a topic cohort (--perf-unknown added). S2 as written needed subagents, so options B and C were added.
Round 7 (10-25 evening): the line-by-line review, lessons K, L, M, and v7
The user wrote 35 suggestions in round brackets inside the Hinglish v6 text (beats 0 to 6) and said: understand where I am coming from, make smart assumptions, generalise, and grandfather that into the pipeline and the rest of the script. The script is liked, so polish. "Sometimes the script can become too dense. A strategy there can be to give summary of the events to follow in one small line... then use the following lines to fill in the details, close loops, make ppl care for the human story and stakes." Produce updated English and Hinglish clips. "For any new info claim, check with research."
What was done. Clustered the 35 notes into ten pieces of intent; for each wrote the viewer problem, the general lesson and the check (review-round-7.md). Researched four claims the notes carried. Wrote v7 English then Hinglish from the English. Added fifteen lint rules (K1 to K8, L1 to L4, M1 to M3) and fourteen damage-test mutations. Verified by running the new rules on the unchanged v6 text that they flag what the user flagged. Built hinglish-parity.js and tts-gemini.js.
Found.
- Xidex has no documented link to Moser Baer, so the note's suggested fix (say Xidex partnered with Puri) was unsupported; the name was cut.
- "Sales doubled between 2002 and 2004" had two sources whose bases do not reconcile; softened.
- The anti-dumping win is real (the Commission: "no dumping for Moser Baer India Ltd"), but a parallel anti-subsidy case ended in a duty; the script claims only the anti-dumping wins.
- The TTS prompt generator had been a scratch script and was lost, so the v6 files could not be regenerated; it is now
tts-gemini.js. - My own edits created two defects the linter could not see (a "This pattern" with no antecedent; a doubled "too"). A mutation that cut "the first occurrence of a quote in the file" had begun hitting the notes sections; mutations now touch only voice-over lines.
- Shell heredocs swallowed backslashes (twice more).
After v7: Cafe Coffee Day v1, Hinglish, voice and video
- Cafe Coffee Day v1 (2026-10-25 morning): the first run of the whole runbook on a new topic, from the launch prompt in
docs/PROMPT-cafe-coffee-day.md, with no subagents. 13 beats plus hook, 1,876 words, 12.5 minutes, hook about 90 seconds. S1 selection needed three swaps. The thesis was rebuilt on what the pages said, not on the causal story the videos told.BAR METon the rules of that morning. What it taught is inlearnings.mdunder "Cafe Coffee Day v1". - Hinglish v6 then v7 (10-25): a paragraph-for-paragraph version, the user's notes on it, then the v7 Hinglish.
- Gemini TTS (10-25 and later): research on tags, line breaks and Roman script; per-beat prompts for 3.1 and 3.8; the user generated all 14 beat WAVs (files dated 10-25 16:05).
- Video stage (10-25): Whisper-based word timing built and run on B1 and B2; a plan for music, sound effects and visuals written; nothing rendered.
Details: page 11.
Recurring failure patterns (what to watch for)
- A green linter and a flat script. Keep the judgement gates.
- A fact that moved the thesis found late. Research the person and the causal link first.
- A garbled magnitude from a single source. A second source for every key figure.
- A claim in the voice of effort that was not made. Every "I" true.
- The same device used too much (a negation pivot, a figure, a comparison). Budgets.
- A new rule that can be passed by gaming it. Damage-test it; try to pass it with a bad script.
- Work done by hand twice. Make it a tool and list it in
tools.md. - A number written in prose without the arithmetic. Recompute from the data.
- A person or term that arrives with no label, or returns after a gap with none. Tag every arrival and return (K1, K2).
- A turn that exists in the structure but is not spoken. Say it (L3).
- A dense stretch with no front door. A one-line headline, then the details (M1).
- A note taken as a fact. Check the claim behind a suggestion before applying it.
Learnings by tag
references/learnings.md is read before every script and appended after. [method] is how to run the process; [measure] is what the linter and readers can and cannot do; [content] is hypotheses about what makes scripts work, untested until confirmed blind on a cohort. Highlights:
- [method] Verify the causal link before building a thesis on it (Moser Baer v4). Use the title as a claim to audit. Build the chain before the prose and write the hook last. Research the person before the company. Resolve each conflicting figure by its date and basis before choosing (Cafe Coffee Day). A search summary is not a fact basis. Run the stage you are documenting. A tool's "refresh" flag is a data-loss risk if outputs share a folder. A note is a request for an effect on the viewer, not a source.
- [measure] The first quantity counter double-counted "₹354 crore". Heuristic rules are warnings. A declared beat loop covers little; pulls cover the middle. Calibrate a new threshold on winners before using it. My own rules had loopholes the damage test found. The damage test requires the named rule to fire. A rule that needs a declaration should warn when it is missing and fail only when it is wrong.
- [content] A prediction followed by its test makes numbers land. A contradiction between two things the subject said six months apart is a stronger mid-video reveal than any single figure. An unannounced bonus makes the video feel larger without clickbait. The winners do not do what v6 does. A named, sourced person in the plant gives the jeopardy pull something to hold. The edge a protagonist had must come from a source.
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.