Docs/Skills and code/skill video-script-production

.claude/skills/video-script-production/references/history.md

Markdown183 lines27.8 KBSkill: video-script-production

What the file says about itself

How we got to v6: the build history: Reconstructed from the session transcript (a528adfb-...jsonl, the user's messages and my reports), the git log and the files. Dates are the user's local day (IST);

Mentioned on: page 01, page 07, page 10, page 12, page in

How we got to v6: the build history

Reconstructed from the session transcript (a528adfb-...jsonl, the user's messages and my reports), the git log and the files. Dates are the user's local day (IST); the transcript's UTC times are 5 h 30 min earlier. The point of this file is the how: what the user said, what was researched, what was built, what went wrong, and what each round taught. For the procedure that results, see runbook.md; for the raw searches, research-log.md.

The ladder at a glance

VersionDateTriggerWords / minQuantities per min (in the hook)HookRules passedDamage testsVoice (contractions per 100 words; negation pivots; run-ups)
v3before 10-24written by an earlier session from the research brief1,427 / 9.5 (labelled 12)4.3 (6)list-style, hypothetical openingtext-only lint: 5 FAIL, 5 WARNn/anot measured
v410-24the user's lessons A to D1,922 / 12.81.7 (0)74 s28 of 28 (later 80/100 under the E/F rules: F1 and F2 fail)150.47; 5; 18
v4 + reader fixes10-25two blind readers (viewer, editor)samesamesamesame15same
v510-25"implicit open loops"; "AI speak"; "tell the full story"2,594 / 17.32.3 (0)73 s37 of 37 (89/100 under the G to J rules)241.12; 1; 0
v610-25personality, rhythm, human element; the "he" question; a thin hook2,940 / 19.62.0 (1)110 s55 of 55421.84; 0; 0

Version scores are not comparable across rule sets: each new rule group adds rules that an older script does not declare. check.js --prev compares the text-level measures, which are comparable.

Phase 0: what existed before the script work (earlier sessions)

WhatWhereNotes
The ecosystem work (discovery, channel qualification, ratings)src/stages/, data/*.db (gitignored), .claude/skills/ecosystem-raterchose the Indian business ecosystem
The "why X died" series studyREADME-SERIES-ANALYSIS.md, series/why-x-died.json, src/series-analysis/found similar videos, ranked "learn from" videos, picked two cohorts of 10 winners (new and established channels)
Statistical cohort test of script rulesskill script-cohort-analysis (rubric v1 to v3), memory note project_why-x-died-series-studyfinding: blind script craft did not predict performance among winners (range restriction was the main limit); only presenter voice "worked" once; cold-open-on-the-collapse was rejected in both cohorts
Per-video teardown of the 20 bestskill winning-video-teardown, transcripts/series-analysis/why-x-died/teardown/Sonnet analysts, every quote verified; counts of mechanisms (S-REVERSAL 19/20, S-LOOP-OPEN 16/20, ...)
The Moser Baer research briefsrc/topic-research/cli.js, research/the-fall-of-moser-baer/report.md, synthesis.jsonfrom 6 rival transcripts; names and numbers unreliable (auto-captions)
The teardown of 7 Moser Baer videosresearch/the-fall-of-moser-baer/teardown/SYNTHESIS.md3 had real reach (552K, 474K, 170K views); table stakes vs differentiators
Script v3research/the-fall-of-moser-baer/script/SCRIPT-v3.mdthe draft the user reviewed first

Round 1 (10-24, evening): the four lessons, and v4

The user's remark (summarised): the script is cognitively complex; raw data needs a human reason to care first, its meaning comes from stakes or contrast (A). The openings are good but weak; find the actual core driving open loop that respects the packaging promise, hint the destination without the direction, and escalate in the first 60 so the video out-delivers its promise (B). The flow should be natural: if "and then" fits between sections it fails, "therefore" or "but" works (C). The open loops reduce to: show something to understand, make them care, change what they believe, give them a reason, even a forced one, 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 I did.

  1. Read my own prior work (the series study, the teardown and cohort skills, the loop-timing rater reliability of 0.08 to 0.39). That reliability is why every structural check is a declared quote that must occur in the text: nobody's judgement is needed to verify it.
  2. Diagnosed v3 with counts (41 figures, 6 in the hook, a 6-figure peak in 30 seconds, signpost joins "Here is the first number I promised", three equal teases, a hypothetical opening, 9.5 minutes labelled 12).
  3. Researched (20 searches, 12 fetches, research-log.md phase 1): the Parker/Stone and Olson rules for C; information-gap, structural-affect and suspense theory for B and D; Mayer, Sweller, Cowan for A; MOOC engagement; the retention craft of hooks.
  4. 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. v4's thesis became "the same borrowed bet twice", and the script says aloud what it cannot show.
  5. Built the video-script-production skill: lint.js (rules A1 to D8), selftest.js (15 mutations), compare.js, scaffold.js, rules.json, and the references (principles with evidence grades, beat contract, opening protocol, stakes and load, chain schema, learnings).
  6. Updated winning-video-teardown (10 new mechanisms, junction types, hook fields) and script-cohort-analysis (rubric v3: 45 checks, hypotheses H-012 to H-017, kept in a gitignored ledger).
  7. Wrote v4 and its chain; committed 8257801.

What went wrong and how it was fixed. CommonJS vs ES-module resolution (added scripts/package.json); "₹N crore" counted as two quantities; month/year date masking order; regexes mangled by the shell (use the Edit tool or String.fromCharCode(92)); CRLF files; Windows Node could not see an MSYS /tmp path; selftest mutations tied to hard-coded text (re-derived from the chain). Fact errors found in the research: 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; graded evidence; the lessons conflict slightly with the corpus (opening on the collapse, figures early) so v4 keeps the opening scene short, cause-free and figure-free and records the tension as a ledger test.

Round 2 (10-25, after midnight): the blind reader pass, and v4 fixes

The user's remark: "yes, run the fresh-reader pass on v4", after asking for a list of the topics researched (the "Matt Stone and Trey Parker" item and others). I listed them from the log.

What I did. Two blind Sonnet readers (a first-time viewer and a skeptical editor), each given only the numbered voice-over (reader-prompts.md). Fixed what both backed with a quote; re-linted; committed 156897f.

Taught (the linter scored 100 and the readers still found): two paragraphs too dense in names and terms (the linter counts figures, not people or jargon); an oversold tease; a link on an adjacency the script could not support; a comparison that showed scale and not innocence; a third ending; unglossed Philips, gigawatt, tribunal, Alchemist. The readers also backed the title change ("killed" outruns the evidence). A passing linter is not a finished script.

Round 3 (10-25, early morning): implicit pulls, plain voice, the whole story, and v5

The user's remark: "apply the fixes both readers agree on... the script is v good now... I feel like having an open loop that keeps the viewer watching through might not be satisfied for the full script. It doesn't have to be explicit; it can be subtle, implicit and implied... the script at times feels full of ai speak (no x, no y, just a simple z)... research on how to remove this, I think skills exist for this... make subtle changes to the script production pipeline... tell the full story that got truncated in v3 and v4 (like foundation in Kolkata and all that human and historic nuance)... ULTRATHINK."

What I did.

  1. Lesson E (pulls). Diagnosed: a beat loop closes across the join and leaves the middle of a beat uncovered. Researched implicit tension (Gerrig and Bernardo, Zillmann, Hitchcock, Brewer and Lichtenstein; implicit-pull.md). Defined seven pull types, a 60-second warm window after each declared touch, and four rules (E1 to E4). Long beats also got inside-the-beat questions.
  2. Lesson F (voice). Fetched the Wikipedia "Signs of AI writing" page and two public skills (blader/humanizer, hardikpandya/stop-slop). Measured v3 and v4 and 12 English winner transcripts. Wrote budgets, not bans (voice-patterns.json, voice.md, rules F1 to F5) and a voice pass (Step 4b).
  3. The whole story. Researched the person before the company (two Business Today profiles, Outlook Business, an ICMR case study, Wikipedia): 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 boom, the price slide, the films exit, the workers. The thesis got richer: a founder whose career was leaving what was running out, and a fourth escape financed with a bond with a date. It also exposed v4's "3,500 crore in 2004" garble.
  4. Wrote v5 (15 beats, 17.3 minutes), linted it clean after fixing: a hook of 76 seconds, two 5-figure windows, uncovered stretches (fixed with honest inside-beat questions), naked-number warnings (reworded), additive false hits.

What went wrong. The fragment-drumroll mutation did not fire because one fragment run is within budget (the mutation now makes two); a jargon mutation errored after a gloss became capitalised.

Taught: the middle of a long beat needs its own question; pull touches must be real words in the text; the F rules have false positives ("I couldn't find what it earned. It was..." looks like a negation pivot): reword, do not raise the budget; research the person first.

Round 4 (10-25, morning): personality, rhythm, the human element, and v6

The user's remark: add three things: personality (suits the whole channel; earnest, willing to follow leads and honest; and aloof, finding negative and positive in all sides, unbiased; using metaphors, similes and parables whenever possible), rhythm (how hard data insight moments are distributed with easy storytelling ones), and the human element (personifying, finding the personal stake of the viewer or of a character we care about, which "activates 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"; "ULTRATHINK".

What I did.

  1. Researched (17 searches, 3 fetches): metaphor persuasion, analogy limits, two-sided messages, the pratfall effect, narrator persona, Lang's attention model, Glass, Duarte, Heath and Heath, the identifiable-victim effect, narrative persuasion, mirror neurons, neural coupling, the self-reference effect, Michael Lewis's method (research-log.md phase 3, texture.md evidence table).
  2. Measured our own winners (8 English transcripts) for comparisons, first-person admissions, "you", hard and quiet 30-second windows, swaps. They use almost no figures of speech and almost no admissions, so v6 is a deliberate difference; the rhythm thresholds were calibrated on them and loosened when the first draft would have flagged half of them.
  3. Decided integration: one plan (in the chain), one additive texture pass (Step 4a), then the subtractive voice pass (4b), then lint. Reasoning in texture.md.
  4. Implemented rules G1 to G4, H1 to H5, I1 to I6 and B8; 15 new damage tests; hook cap 75 to 110 seconds (reason recorded in rules.json).
  5. Answered the "he" question: it was a pronoun with no antecedent and no reason to care. Fixed in the script and made a rule (I2, I3).
  6. Wrote v6 (14 beats, 19.6 minutes), then linted it through about ten rounds: a dense 5-figure window; "liquidation" used in the hook before its gloss; a hook of 111 s three times; a 23-word parable; beats over 260 words; uncovered stretches; four person-gap fixes.
  7. The damage test found loopholes in my own new rules: a role phrase ("its founder") counted as naming the protagonist; a name from three paragraphs earlier satisfied the dangling-pronoun test; the parable test checked only the first and last line; two regex word-boundaries had been written as backspace characters by the shell. All fixed, each with a mutation.
  8. A read-aloud pass found what the linter could not: a vague "the same thing", an unhedged claim about Puri's state of mind, a doubled "it worked".
  9. Corrected v5's "the disc business lost money three years running" (the solar arm did).

Taught: a pronoun needs its person on the page; calibrate before thresholding; write the damage test before trusting a rule; shell heredocs eat backslashes; the winners do not do what v6 does, so say so.

The user's response: "i like v6".

Round 5 (10-25, morning): recording and harnessing

The user's remark: record all the steps, checks, lessons, stages of refinement, the how and the research in proper markdown, so that 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. Also keep making notes of skills and/or deterministic tools created for this process."

What I did.

  1. Mined the session transcript for the user's messages, every search and fetch, and the reader prompts (session-log.js is that mining, made reusable).
  2. Wrote this history, the runbook, the quality bar, the read-aloud checklist, the reader prompts, the lint-fixes cheat sheet, the research protocol, the lesson protocol and the tools registry.
  3. Built the tools that replaced hand work: check.js (one-command gates and a stage report), ledger-check.js, retime.js, extract-vo.js, calibrate.js, session-log.js, scaffold.js --from, plus the FACTS and HANDOFF templates.
  4. Added Lesson J (the whole story): the user's v5 request had been met by hand, and nothing in the harness would stop a future script from cutting the founder and the rise again.
  5. Froze v6 as a worked example (examples/moser-baer-v6/), added a CLAUDE.md with the standing instructions, and updated the memory notes.

Found while doing it (corrections to my own earlier work): the new ledger check found that "14 cents" and "₹110 crore" were spoken but not literally in the ledger (the ledger had $0.14 and ₹109.8 crore); the calibration tool showed that I had written "one comparison every five minutes" for winners when 0.3 per 1,000 words is one every 22 minutes and the linter's own markers give about one every nine; 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, S1 and S2, written in full

The user's question: does the guide cover only v3 to v6, or from "given X" through the YouTube extraction, transcripts, analysis, further research and fact-checking? My honest answer was: solid from the fact base onward, only pointers for S1 and S2. They asked for S1 and S2 to be written fully.

What I did. Read every file of the two stages (src/topic-research/*, the winning-video-teardown skill and its scripts, the Moser Baer outputs), wrote references/s1-rival-brief.md and references/s2-teardown.md, then ran S1 for real on a throwaway topic ("the fall of nokia", 3 videos, from a scratch folder) and ran the deterministic S2 steps on its output, so the documents describe measured behaviour.

Found while doing it:

Round 7 (10-25, evening): the line-by-line review of the Hinglish v6, and lessons K, L, M

The user's request: "i was reading this and i had some points for you to edit this script." They had written suggestions in round brackets inside the Hinglish v6 TTS file (beats 0 to 6). "Understand where i am coming from (make smart assumptions if needed), generalize that and grandfather that in to the production pipeline and rest of the script too." The script is liked, so polish, not structure. "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 I did. Read all 35 notes as a set; wrote for each the viewer problem behind it, the general lesson and the check (review-round-7.md, which is also the decision record); researched four claims the notes carried (Business Today 2003 re-read; the Commission's decision on the anti-dumping case; the Outlook Business and Business Today sales figures; a search for the profit history); 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; found by running them on the unchanged v6 text that the rules flag what the user flagged; built hinglish-parity.js and tts-gemini.js; regenerated the TTS prompts (Hinglish and English, 3.1 and 3.8).

Found while doing it:

Round 8 (11-01): the video visual stage gets its first build

The plan in research/video-production/ became a working smoke test for beat B1 (.claude/skills/video-visual-production/). It changed the process in two ways: the beat sheet is now the creative file a person or Claude writes, and a lint with a damage test gates it before anything is rendered. The user approved articles and typeset text on screen, so evidence scenes use cropped captures or typeset cards.

Round 9 (11-01): parallel beats, and the cost lesson

B2 to B5 were built by parallel agents (Haiku for align and build, Sonnet for storyboard and review). It worked, but Sonnet storyboarding cost 130 to 170K tokens a beat because it explored the repo and hand-wrote full beat sheets with word indexes. The fix was structural: a compact plan format with "@word" cues compiled by compose-beat.js, a cheat sheet generated from verified examples, a fixed recipe with a short reading list, and a checklist review. B6 to B9 then ran entirely on Haiku (about 85 to 155K tokens a storyboard, a quarter of the exploring). Failures found by the checks were mostly scene-code defects (labels off the safe area, low contrast of red or dim text, an end fade not declared as black), fixed once in the code, not beat by beat.

Round 10 (11-01): all fourteen beats, and the stitch

B10 to B13 were built by Haiku from the compact plans; the review stage was dropped at the user's request ("go with the first pass, I am fine with some mistakes"). Layout defects the builders found were fixed once in the scene code (calendar stamp on a paper plate, unitgrid legend inside the safe area, three-option paths). stitch.js joins the beats: dissolve inside an act, dip through black at the act breaks (B0>B1, B2>B3, B6>B7, B9>B10), a cut after B8's black hard stop, a long fade at the end; one continuous synthesised score (score.js, score-spec.json) under the voice. Lessons: [method] the beats' own stems are the right unit to stitch (re-mixing from stems keeps one loudness decision) but only if the stems are float; [measure] AAC at 192 kbps can overshoot a limited WAV by 5 dB, so measure the file you ship; [measure] stitching changes nothing a person can hear until someone listens, so the report lists what only the user can judge.

Round 11 (11-01): choosing Videocon, and a new research step (S1b)

The user asked which topics suit a downfall narrative; a second topic study (50 new Indian names, series/fall-of-x-r2.json, research/next-topic-shortlist/report.md) ranked Videocon first and the user chose it. For the research phase the user asked for articles and resources that already exist on the topic, not only rival videos. That became stage S1b: scripts/fetch-articles.mjs saves pages, Google AI Mode is used as a link finder, the primary court order is read first, and TIMELINE-AND-TRIVIA.md is the output (research-protocol.md section 7). Result for Videocon: 8 transcripts, 37 saved sources including the NCLAT order, a 60-row fact table, and a measured gap (none of the eight videos mentions the tribunal, the promoters' own claim, or anything after 2022). An attempt to save AI Mode answers by posting from the page to a local server did not work (blocked) and was removed.

Round 12 (11-02): a half-length cut, and a per-script hook override

The user kept Videocon v1 (20 min) and asked for a version about half as long that still scores 100/100 on every check and passes the reader pass, with a hook of 30 to 50 seconds that is immediate and energetic. The cut is a separate version label (v1-short: SCRIPT-v1-short.md, chain-v1-short.json), built by choosing, not by trimming every sentence: see learnings.md. One tool change: check.js now reads an optional bar_overrides block in the chain (hook length only, with a written reason, gate T4), because the v6 bar demands a 60 to 110 s hook and rules.json is never edited to pass a script. rules.json is unchanged.

Recurring failure patterns (what to watch for)

  1. A green linter and a flat script: keep the judgement gates.
  2. A fact that moved the thesis found late: research the person and the causal link first.
  3. A garbled magnitude from a single source: second source for every key figure.
  4. A claim written in the voice of effort that was not made: every "I" true.
  5. The same device used too much (a negation pivot; a figure; a comparison): budgets.
  6. A new rule that can be passed by gaming it: damage-test it; try to pass it with a bad script.
  7. Work done by hand twice: make it a tool and list it in tools.md.
  8. A number written in prose without the arithmetic: recompute from the data (calibrate.js, ledger-check.js).
  9. A person or term that arrives with no label, or returns after a gap with none: tag every arrival and return (K1, K2).
  10. A turn that exists in the structure but is not spoken (a BUT with no "but"): say it (L3).
  11. A dense stretch with no front door: a one-line headline, then the details (M1).
  12. A note taken as a fact: check the claim behind a suggestion before applying it.

What the user cares about (observed, not guessed)

Round 13 (11-02): recording with a lead-in, then trim

The user heard a slow start on Gemini TTS recordings (the first sentence or two come out slow, then the pace settles). Change: every recording now starts with a lead-in sentence ("This is B2 of The Fall of Videocon. Starting the script now.") that absorbs the slow start. The recorder (tts-gemini-record.js) calls the Gemini API; the trimmer (tts-trim-lead-in.js) cuts the lead-in using the word times from script-audio-align, after groq-transcribe. First live run: Videocon v1-short B2, lead-in 4.5 s, 124 of 136 words kept, re-transcribed clean. Tools are in tools.md.

Round 14 (11-02): Videocon v1-short in Hinglish, and the linter on Hinglish

The user asked for the short script in Hinglish (Hindi grammar, English words where a business reader would say them, an energetic hook) to meet every standard and to pass the linter. Process changes: lint.js --lang hi loads lang-hi.json, which adds Hinglish word lists and patterns to the English ones; selftest.js --lang hi runs the damage test on the Hinglish; check.js --lang hi --english <version> runs the gates on a Hinglish version and adds gate P1 (parity with the English script); ledger-check.js --ledger-from <English script> takes the ledger and the hand-off sections from the English script. The Hinglish chain is the English chain with its quotes translated (chain-v1-short-hinglish.json). Also fixed: retime.js and lint.js printed a time as "6:60" when the seconds rounded up (they rounded before splitting the minutes); the English script had hidden this with a word. Result: lint 100/100 with zero warnings, damage test passes (English and Hinglish), parity passes, ledger passes, hard gates pass. The bar is not yet met only because the read-aloud pass needs a native speaker. Details in learnings.md and hinglish-adaptation.md section 1 step 2a.

Round 15 (11-03): the machinery published on the docs site

The user asked for the skills and code to be on the Cloudflare Pages site, linked to the right files, so that the site shows not only the plan but how it is carried out. New: build-source.js (in deploy-docs/scripts/) renders every skill, agent and code file as a page under docs/source/, writes page 15 (the stage-by-stage map to the files that do each stage, then every skill with its references and scripts), adds page 15 to the side navigation, links file names in pages 01 to 14 to their file pages (and each file page lists the docs pages that mention it), and checks every link. deploy-docs.js now runs it first, stages docs/source/**/*.html, and samples the source pages live. Not published, on purpose: research/, data/, lock files, .env, skill examples/ (except their README), files over 400 KB, and any file with a key-like string.

Show the raw text
# How we got to v6: the build history

Reconstructed from the session transcript (`a528adfb-...jsonl`, the user's messages and my reports), the git log and the files. Dates are the user's local day (IST); the transcript's UTC times are 5 h 30 min earlier. The point of this file is the *how*: what the user said, what was researched, what was built, what went wrong, and what each round taught. For the procedure that results, see `runbook.md`; for the raw searches, `research-log.md`.

## The ladder at a glance

| Version | Date | Trigger | Words / min | Quantities per min (in the hook) | Hook | Rules passed | Damage tests | Voice (contractions per 100 words; negation pivots; run-ups) |
|---|---|---|---|---|---|---|---|---|
| v3 | before 10-24 | written by an earlier session from the research brief | 1,427 / 9.5 (labelled 12) | 4.3 (6) | list-style, hypothetical opening | text-only lint: 5 FAIL, 5 WARN | n/a | not measured |
| v4 | 10-24 | the user's lessons A to D | 1,922 / 12.8 | 1.7 (0) | 74 s | 28 of 28 (later 80/100 under the E/F rules: F1 and F2 fail) | 15 | 0.47; 5; 18 |
| v4 + reader fixes | 10-25 | two blind readers (viewer, editor) | same | same | same | same | 15 | same |
| v5 | 10-25 | "implicit open loops"; "AI speak"; "tell the full story" | 2,594 / 17.3 | 2.3 (0) | 73 s | 37 of 37 (89/100 under the G to J rules) | 24 | 1.12; 1; 0 |
| v6 | 10-25 | personality, rhythm, human element; the "he" question; a thin hook | 2,940 / 19.6 | 2.0 (1) | 110 s | 55 of 55 | 42 | 1.84; 0; 0 |

Version scores are not comparable across rule sets: each new rule group adds rules that an older script does not declare. `check.js --prev` compares the text-level measures, which are comparable.

## Phase 0: what existed before the script work (earlier sessions)

| What | Where | Notes |
|---|---|---|
| The ecosystem work (discovery, channel qualification, ratings) | `src/stages/`, `data/*.db` (gitignored), `.claude/skills/ecosystem-rater` | chose the Indian business ecosystem |
| The "why X died" series study | `README-SERIES-ANALYSIS.md`, `series/why-x-died.json`, `src/series-analysis/` | found similar videos, ranked "learn from" videos, picked two cohorts of 10 winners (new and established channels) |
| Statistical cohort test of script rules | skill `script-cohort-analysis` (rubric v1 to v3), memory note `project_why-x-died-series-study` | **finding: blind script craft did not predict performance among winners** (range restriction was the main limit); only presenter voice "worked" once; cold-open-on-the-collapse was rejected in both cohorts |
| Per-video teardown of the 20 best | skill `winning-video-teardown`, `transcripts/series-analysis/why-x-died/teardown/` | Sonnet analysts, every quote verified; counts of mechanisms (S-REVERSAL 19/20, S-LOOP-OPEN 16/20, ...) |
| The Moser Baer research brief | `src/topic-research/cli.js`, `research/the-fall-of-moser-baer/report.md`, `synthesis.json` | from 6 rival transcripts; names and numbers unreliable (auto-captions) |
| The teardown of 7 Moser Baer videos | `research/the-fall-of-moser-baer/teardown/SYNTHESIS.md` | 3 had real reach (552K, 474K, 170K views); table stakes vs differentiators |
| Script v3 | `research/the-fall-of-moser-baer/script/SCRIPT-v3.md` | the draft the user reviewed first |

## Round 1 (10-24, evening): the four lessons, and v4

**The user's remark** (summarised): the script is cognitively complex; raw data needs a human reason to care first, its meaning comes from stakes or contrast (A). The openings are good but weak; find the actual core driving open loop that respects the packaging promise, hint the destination without the direction, and escalate in the first 60 so the video out-delivers its promise (B). The flow should be natural: if "and then" fits between sections it fails, "therefore" or "but" works (C). The open loops reduce to: show something to understand, make them care, change what they believe, give them a reason, even a forced one, 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 I did.**
1. Read my own prior work (the series study, the teardown and cohort skills, the loop-timing rater reliability of 0.08 to 0.39). That reliability is why every structural check is a *declared quote that must occur in the text*: nobody's judgement is needed to verify it.
2. Diagnosed v3 with counts (41 figures, 6 in the hook, a 6-figure peak in 30 seconds, signpost joins "Here is the first number I promised", three equal teases, a hypothetical opening, 9.5 minutes labelled 12).
3. Researched (20 searches, 12 fetches, `research-log.md` phase 1): the Parker/Stone and Olson rules for C; information-gap, structural-affect and suspense theory for B and D; Mayer, Sweller, Cowan for A; MOOC engagement; the retention craft of hooks.
4. **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. v4's thesis became "the same borrowed bet twice", and the script says aloud what it cannot show.
5. Built the **`video-script-production` skill**: `lint.js` (rules A1 to D8), `selftest.js` (15 mutations), `compare.js`, `scaffold.js`, `rules.json`, and the references (principles with evidence grades, beat contract, opening protocol, stakes and load, chain schema, learnings).
6. Updated **`winning-video-teardown`** (10 new mechanisms, junction types, hook fields) and **`script-cohort-analysis`** (rubric v3: 45 checks, hypotheses H-012 to H-017, kept in a gitignored ledger).
7. Wrote v4 and its chain; committed `8257801`.

**What went wrong and how it was fixed.** CommonJS vs ES-module resolution (added `scripts/package.json`); "₹N crore" counted as two quantities; month/year date masking order; regexes mangled by the shell (use the Edit tool or `String.fromCharCode(92)`); CRLF files; Windows Node could not see an MSYS `/tmp` path; selftest mutations tied to hard-coded text (re-derived from the chain). Fact errors found in the research: 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; graded evidence; the lessons conflict slightly with the corpus (opening on the collapse, figures early) so v4 keeps the opening scene short, cause-free and figure-free and records the tension as a ledger test.

## Round 2 (10-25, after midnight): the blind reader pass, and v4 fixes

**The user's remark:** "yes, run the fresh-reader pass on v4", after asking for a list of the topics researched (the "Matt Stone and Trey Parker" item and others). I listed them from the log.

**What I did.** Two blind Sonnet readers (a first-time viewer and a skeptical editor), each given only the numbered voice-over (`reader-prompts.md`). Fixed what both backed with a quote; re-linted; committed `156897f`.

**Taught (the linter scored 100 and the readers still found):** two paragraphs too dense in names and terms (the linter counts figures, not people or jargon); an oversold tease; a link on an adjacency the script could not support; a comparison that showed scale and not innocence; a third ending; unglossed Philips, gigawatt, tribunal, Alchemist. The readers also backed the title change ("killed" outruns the evidence). A passing linter is not a finished script.

## Round 3 (10-25, early morning): implicit pulls, plain voice, the whole story, and v5

**The user's remark:** "apply the fixes both readers agree on... the script is v good now... I feel like having an open loop that keeps the viewer watching through might not be satisfied for the full script. It doesn't have to be explicit; it can be subtle, implicit and implied... the script at times feels full of ai speak (no x, no y, just a simple z)... research on how to remove this, I think skills exist for this... make subtle changes to the script production pipeline... tell the full story that got truncated in v3 and v4 (like foundation in Kolkata and all that human and historic nuance)... ULTRATHINK."

**What I did.**
1. **Lesson E (pulls).** Diagnosed: a beat loop closes across the join and leaves the middle of a beat uncovered. Researched implicit tension (Gerrig and Bernardo, Zillmann, Hitchcock, Brewer and Lichtenstein; `implicit-pull.md`). Defined seven pull types, a 60-second warm window after each declared touch, and four rules (E1 to E4). Long beats also got inside-the-beat questions.
2. **Lesson F (voice).** Fetched the Wikipedia "Signs of AI writing" page and two public skills (blader/humanizer, hardikpandya/stop-slop). Measured v3 and v4 and 12 English winner transcripts. Wrote budgets, not bans (`voice-patterns.json`, `voice.md`, rules F1 to F5) and a voice pass (Step 4b).
3. **The whole story.** Researched the person before the company (two Business Today profiles, Outlook Business, an ICMR case study, Wikipedia): 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 boom, the price slide, the films exit, the workers. The thesis got richer: a founder whose career was leaving what was running out, and a fourth escape financed with a bond with a date. It also exposed v4's "3,500 crore in 2004" garble.
4. Wrote v5 (15 beats, 17.3 minutes), linted it clean after fixing: a hook of 76 seconds, two 5-figure windows, uncovered stretches (fixed with honest inside-beat questions), naked-number warnings (reworded), additive false hits.

**What went wrong.** The fragment-drumroll mutation did not fire because one fragment run is within budget (the mutation now makes two); a jargon mutation errored after a gloss became capitalised.

**Taught:** the middle of a long beat needs its own question; pull touches must be real words in the text; the F rules have false positives ("I couldn't find what it earned. It was..." looks like a negation pivot): reword, do not raise the budget; research the person first.

## Round 4 (10-25, morning): personality, rhythm, the human element, and v6

**The user's remark:** add three things: *personality* (suits the whole channel; earnest, willing to follow leads and honest; and aloof, finding negative and positive in all sides, unbiased; using metaphors, similes and parables whenever possible), *rhythm* (how hard data insight moments are distributed with easy storytelling ones), and *the human element* (personifying, finding the personal stake of the viewer or of a character we care about, which "activates 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"; "ULTRATHINK".

**What I did.**
1. Researched (17 searches, 3 fetches): metaphor persuasion, analogy limits, two-sided messages, the pratfall effect, narrator persona, Lang's attention model, Glass, Duarte, Heath and Heath, the identifiable-victim effect, narrative persuasion, mirror neurons, neural coupling, the self-reference effect, Michael Lewis's method (`research-log.md` phase 3, `texture.md` evidence table).
2. **Measured our own winners** (8 English transcripts) for comparisons, first-person admissions, "you", hard and quiet 30-second windows, swaps. They use almost no figures of speech and almost no admissions, so v6 is a deliberate difference; the rhythm thresholds were calibrated on them and loosened when the first draft would have flagged half of them.
3. **Decided integration:** one plan (in the chain), one additive texture pass (Step 4a), then the subtractive voice pass (4b), then lint. Reasoning in `texture.md`.
4. Implemented rules G1 to G4, H1 to H5, I1 to I6 and B8; 15 new damage tests; hook cap 75 to 110 seconds (reason recorded in `rules.json`).
5. Answered the "he" question: it was a pronoun with no antecedent and no reason to care. Fixed in the script and made a rule (I2, I3).
6. Wrote v6 (14 beats, 19.6 minutes), then linted it through about ten rounds: a dense 5-figure window; "liquidation" used in the hook before its gloss; a hook of 111 s three times; a 23-word parable; beats over 260 words; uncovered stretches; four person-gap fixes.
7. **The damage test found loopholes in my own new rules:** a role phrase ("its founder") counted as naming the protagonist; a name from three paragraphs earlier satisfied the dangling-pronoun test; the parable test checked only the first and last line; two regex word-boundaries had been written as backspace characters by the shell. All fixed, each with a mutation.
8. **A read-aloud pass** found what the linter could not: a vague "the same thing", an unhedged claim about Puri's state of mind, a doubled "it worked".
9. Corrected v5's "the disc business lost money three years running" (the solar arm did).

**Taught:** a pronoun needs its person on the page; calibrate before thresholding; write the damage test before trusting a rule; shell heredocs eat backslashes; the winners do not do what v6 does, so say so.

The user's response: "i like v6".

## Round 5 (10-25, morning): recording and harnessing

**The user's remark:** record all the steps, checks, lessons, stages of refinement, the how and the research in proper markdown, so that 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. Also keep making notes of skills and/or deterministic tools created for this process."

**What I did.**
1. Mined the session transcript for the user's messages, every search and fetch, and the reader prompts (`session-log.js` is that mining, made reusable).
2. Wrote this history, the runbook, the quality bar, the read-aloud checklist, the reader prompts, the lint-fixes cheat sheet, the research protocol, the lesson protocol and the tools registry.
3. Built the tools that replaced hand work: `check.js` (one-command gates and a stage report), `ledger-check.js`, `retime.js`, `extract-vo.js`, `calibrate.js`, `session-log.js`, `scaffold.js --from`, plus the FACTS and HANDOFF templates.
4. Added Lesson J (the whole story): the user's v5 request had been met by hand, and nothing in the harness would stop a future script from cutting the founder and the rise again.
5. Froze v6 as a worked example (`examples/moser-baer-v6/`), added a `CLAUDE.md` with the standing instructions, and updated the memory notes.

**Found while doing it (corrections to my own earlier work):** the new ledger check found that "14 cents" and "₹110 crore" were spoken but not literally in the ledger (the ledger had $0.14 and ₹109.8 crore); the calibration tool showed that I had written "one comparison every five minutes" for winners when 0.3 per 1,000 words is one every 22 minutes and the linter's own markers give about one every nine; 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, S1 and S2, written in full

**The user's question:** does the guide cover only v3 to v6, or from "given X" through the YouTube extraction, transcripts, analysis, further research and fact-checking? My honest answer was: solid from the fact base onward, only pointers for S1 and S2. They asked for S1 and S2 to be written fully.

**What I did.** Read every file of the two stages (`src/topic-research/*`, the `winning-video-teardown` skill and its scripts, the Moser Baer outputs), wrote `references/s1-rival-brief.md` and `references/s2-teardown.md`, then **ran S1 for real** on a throwaway topic ("the fall of nokia", 3 videos, from a scratch folder) and ran the deterministic S2 steps on its output, so the documents describe measured behaviour.

**Found while doing it:**
- `topic-research --refresh` deleted the entire `research/<slug>/` folder, which is where the scripts, chains and lint reports live. Fixed to remove only its own files.
- The video ranking cannot see the angle: a "fall of Nokia" run selected two "rebirth of Nokia" videos. The doc says to read the selected list and how to swap videos (edit `selected` in `search.json`).
- `prepare.js` told every analyst the video "performed far above the norm for its channel", which is false for a topic cohort (the Moser Baer run edited the case files by hand). Added `--perf-unknown`.
- S2 as written in the skill needs subagents; since subagents need the user's say-so, the doc has two no-subagent options (do the analyst task yourself with the same validator; or a lite read).
- A 3-video S1 run takes 8 min 21 s (all model calls); a full 8-video run should take 20 to 25 minutes (an estimate, not measured).

## Round 7 (10-25, evening): the line-by-line review of the Hinglish v6, and lessons K, L, M

**The user's request:** "i was reading this and i had some points for you to edit this script." They had written suggestions in round brackets inside the Hinglish v6 TTS file (beats 0 to 6). "Understand where i am coming from (make smart assumptions if needed), generalize that and grandfather that in to the production pipeline and rest of the script too." The script is liked, so polish, not structure. "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 I did.** Read all 35 notes as a set; wrote for each the viewer problem behind it, the general lesson and the check (`review-round-7.md`, which is also the decision record); researched four claims the notes carried (Business Today 2003 re-read; the Commission's decision on the anti-dumping case; the Outlook Business and Business Today sales figures; a search for the profit history); 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; found by running them on the unchanged v6 text that the rules flag what the user flagged; built `hinglish-parity.js` and `tts-gemini.js`; regenerated the TTS prompts (Hinglish and English, 3.1 and 3.8).

**Found while doing it:**
- 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 (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 Gemini 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"); the read-aloud pass found them. A damage-test mutation that cut "the first occurrence of a quote in the file" had started hitting the notes sections of the script file once they quoted the same lines; mutations now touch only voice-over lines.
- Shell heredocs swallowed backslashes again (twice); the Edit tool fixed it, as `CLAUDE.md` says.

## Round 8 (11-01): the video visual stage gets its first build

The plan in `research/video-production/` became a working smoke test for beat B1 (`.claude/skills/video-visual-production/`). It changed the process in two ways: the beat sheet is now the creative file a person or Claude writes, and a lint with a damage test gates it before anything is rendered. The user approved articles and typeset text on screen, so evidence scenes use cropped captures or typeset cards.

## Round 9 (11-01): parallel beats, and the cost lesson

B2 to B5 were built by parallel agents (Haiku for align and build, Sonnet for storyboard and review). It worked, but Sonnet storyboarding cost 130 to 170K tokens a beat because it explored the repo and hand-wrote full beat sheets with word indexes. The fix was structural: a compact plan format with "@word" cues compiled by compose-beat.js, a cheat sheet generated from verified examples, a fixed recipe with a short reading list, and a checklist review. B6 to B9 then ran entirely on Haiku (about 85 to 155K tokens a storyboard, a quarter of the exploring). Failures found by the checks were mostly scene-code defects (labels off the safe area, low contrast of red or dim text, an end fade not declared as black), fixed once in the code, not beat by beat.

## Round 10 (11-01): all fourteen beats, and the stitch

B10 to B13 were built by Haiku from the compact plans; the review stage was dropped at the user's request ("go with the first pass, I am fine with some mistakes"). Layout defects the builders found were fixed once in the scene code (calendar stamp on a paper plate, unitgrid legend inside the safe area, three-option paths). `stitch.js` joins the beats: dissolve inside an act, dip through black at the act breaks (B0>B1, B2>B3, B6>B7, B9>B10), a cut after B8's black hard stop, a long fade at the end; one continuous synthesised score (`score.js`, `score-spec.json`) under the voice. Lessons: [method] the beats' own stems are the right unit to stitch (re-mixing from stems keeps one loudness decision) but only if the stems are float; [measure] AAC at 192 kbps can overshoot a limited WAV by 5 dB, so measure the file you ship; [measure] stitching changes nothing a person can hear until someone listens, so the report lists what only the user can judge.

## Round 11 (11-01): choosing Videocon, and a new research step (S1b)

The user asked which topics suit a downfall narrative; a second topic study (50 new Indian names, `series/fall-of-x-r2.json`, `research/next-topic-shortlist/report.md`) ranked Videocon first and the user chose it. For the research phase the user asked for articles and resources that already exist on the topic, not only rival videos. That became stage S1b: `scripts/fetch-articles.mjs` saves pages, Google AI Mode is used as a link finder, the primary court order is read first, and `TIMELINE-AND-TRIVIA.md` is the output (`research-protocol.md` section 7). Result for Videocon: 8 transcripts, 37 saved sources including the NCLAT order, a 60-row fact table, and a measured gap (none of the eight videos mentions the tribunal, the promoters' own claim, or anything after 2022). An attempt to save AI Mode answers by posting from the page to a local server did not work (blocked) and was removed.

## Round 12 (11-02): a half-length cut, and a per-script hook override

The user kept Videocon v1 (20 min) and asked for a version about half as long that still scores 100/100 on every check and passes the reader pass, with a hook of 30 to 50 seconds that is immediate and energetic. The cut is a separate version label (`v1-short`: `SCRIPT-v1-short.md`, `chain-v1-short.json`), built by choosing, not by trimming every sentence: see learnings.md. One tool change: `check.js` now reads an optional `bar_overrides` block in the chain (hook length only, with a written reason, gate T4), because the v6 bar demands a 60 to 110 s hook and `rules.json` is never edited to pass a script. `rules.json` is unchanged.

## Recurring failure patterns (what to watch for)

1. A green linter and a flat script: keep the judgement gates.
2. A fact that moved the thesis found late: research the person and the causal link first.
3. A garbled magnitude from a single source: second source for every key figure.
4. A claim written in the voice of effort that was not made: every "I" true.
5. The same device used too much (a negation pivot; a figure; a comparison): budgets.
6. A new rule that can be passed by gaming it: damage-test it; try to pass it with a bad script.
7. Work done by hand twice: make it a tool and list it in `tools.md`.
8. A number written in prose without the arithmetic: recompute from the data (`calibrate.js`, `ledger-check.js`).
9. A person or term that arrives with no label, or returns after a gap with none: tag every arrival and return (K1, K2).
10. A turn that exists in the structure but is not spoken (a BUT with no "but"): say it (L3).
11. A dense stretch with no front door: a one-line headline, then the details (M1).
12. A note taken as a fact: check the claim behind a suggestion before applying it.

## What the user cares about (observed, not guessed)

- Depth first ("only after deep research and consideration"); assumptions stated; "ULTRATHINK" on the big asks.
- The existing direction is liked; change it subtly.
- The pipeline should carry the lessons by itself, and the lessons should be recorded.
- Plain statements of what is unproven.
- No commits, pushes or subagents unless asked.
- They want the script to be human: a person with a want, a narrator with a voice, a number that lands on someone.
- They read the script as a viewer who has not read the research and mark every place that viewer would stall: an unlabelled person, a phrase nobody says, a turn nobody hears, a stretch with no front door. They write the fix as a short example and expect the reason to be generalised.
- They want the language version (Hinglish) to sound like the way people talk, using the English word when it is shorter and clearer.
## Round 13 (11-02): recording with a lead-in, then trim

The user heard a slow start on Gemini TTS recordings (the first sentence or two come out slow, then the pace settles). Change: every recording now starts with a lead-in sentence ("This is B2 of The Fall of Videocon. Starting the script now.") that absorbs the slow start. The recorder (`tts-gemini-record.js`) calls the Gemini API; the trimmer (`tts-trim-lead-in.js`) cuts the lead-in using the word times from `script-audio-align`, after `groq-transcribe`. First live run: Videocon v1-short B2, lead-in 4.5 s, 124 of 136 words kept, re-transcribed clean. Tools are in `tools.md`.

## Round 14 (11-02): Videocon v1-short in Hinglish, and the linter on Hinglish

The user asked for the short script in Hinglish (Hindi grammar, English words where a business reader would say them, an energetic hook) to meet every standard and to pass the linter. Process changes: `lint.js --lang hi` loads `lang-hi.json`, which adds Hinglish word lists and patterns to the English ones; `selftest.js --lang hi` runs the damage test on the Hinglish; `check.js --lang hi --english <version>` runs the gates on a Hinglish version and adds gate P1 (parity with the English script); `ledger-check.js --ledger-from <English script>` takes the ledger and the hand-off sections from the English script. The Hinglish chain is the English chain with its quotes translated (`chain-v1-short-hinglish.json`). Also fixed: `retime.js` and `lint.js` printed a time as "6:60" when the seconds rounded up (they rounded before splitting the minutes); the English script had hidden this with a word. Result: lint 100/100 with zero warnings, damage test passes (English and Hinglish), parity passes, ledger passes, hard gates pass. The bar is not yet met only because the read-aloud pass needs a native speaker. Details in `learnings.md` and `hinglish-adaptation.md` section 1 step 2a.

## Round 15 (11-03): the machinery published on the docs site

The user asked for the skills and code to be on the Cloudflare Pages site, linked to the right files, so that the site shows not only the plan but how it is carried out. New: `build-source.js` (in `deploy-docs/scripts/`) renders every skill, agent and code file as a page under `docs/source/`, writes page 15 (the stage-by-stage map to the files that do each stage, then every skill with its references and scripts), adds page 15 to the side navigation, links file names in pages 01 to 14 to their file pages (and each file page lists the docs pages that mention it), and checks every link. `deploy-docs.js` now runs it first, stages `docs/source/**/*.html`, and samples the source pages live. Not published, on purpose: `research/`, `data/`, lock files, `.env`, skill `examples/` (except their README), files over 400 KB, and any file with a key-like string.

Shown as it is in the repository at build time (2026-11-03); the home directory appears as <home>. If this page and the file differ, the file is right. Back to the catalogue.