Ecosystem intelligence
Before any series or script, the project built a database of YouTube channels for each of six niches, had a language model decide which channels truly belong to each niche, ranked channels in five "queues" (who to learn from, who is breaking out, and so on), and scored the niches against each other on demand, room for newcomers, evergreen value, upload pressure and money. The Indian business niche came out fourth of six (2.38 out of 5). The user went ahead with it anyway; the repository does not record why, so treat that as the user's decision.
- Code:
src/stages/01-*.jsto33-*.js, run throughnpm run <name>. One database per niche, picked by theconfig.jsin use. - Output you will use later: the Indian business database (
data/indian-business-ecosystem.db) feeds the series study;ecosystem-ratings/scorecard.mdis the cross-niche comparison. - Caveat that matters: every database is a biased sample (channels found by search, collected to different depths). The scorecard is built to survive that bias, and says where it cannot.
What this phase is for
The project started as "YouTube Ecosystem Intelligence": a configurable research pipeline for discovering channels, collecting evidence about them, profiling editorial patterns, qualifying channels against a target niche and ranking them. A niche is defined in one file, config.js (name, description, include and exclude terms, discovery seeds, and definitions of core, adjacent, unknown and irrelevant). Saved definitions sit beside it (config-art.js, config-cricket.js, config-geopolitics.js, config-indian-business.js, config-science.js, plus older copies); the root config.js is the active one and currently points at crochet. Copy the one you want over config.js before running stages.
config.js at the repo root currently sets dbPath to data/crochet-ecosystem.db. Running a stage without checking writes to that database. The Indian business definition is in config-indian-business.js.
The stages
Run order for a new niche, from README.md:
npm ci
npm run discover npm run enrich npm run channel-metadata
npm run profile:channels npm run profile:videos npm run video-signals
npm run analyze:corpus npm run normalize:temporal npm run vocabulary:build
npm run features:build npm run videos:embed npm run priorities:build
npm run qualification:llm npm run discovery:v2 npm run discovery:v2:enrich
npm run discovery:v2:score npm run queues:rate
Descriptions below come from the README, the script names and their arguments. The stage code was not audited line by line for this page.
| Stage | npm script | What it does |
|---|---|---|
| 01 | discover | Searches YouTube with the seed terms (seeds/topics.json, or the niche's include terms if the seed file is empty) and stores channels and videos. |
| 01.5 | enrich | Classifies channels and videos against the niche (rule-based first pass; --force, --channel-url). |
| 02 | channel-metadata | Fetches channel descriptions and subscriber counts. |
| 03 / 04 | profile:channels, profile:videos | Writes observations of what each channel and video is about. |
| 05 | expand:discovery | Uses the concepts found so far to search for more. |
| 06 | seed:reference, video-signals | Imports the optional human reference channels; backfills per-video signals. Reference channels never bypass qualification. |
| 07 / 08 | analyze:corpus, normalize:temporal | Corpus analysis report with greedy nearest-neighbour clusters; turns "3 months ago" text into dates. |
| 09 to 12 | vocabulary:build, vocabulary:review, features:build, videos:embed | Builds a controlled vocabulary of editorial features, a feature matrix and title embeddings. |
| 13 / 14 | priorities:build, priorities:report | Clusters and prioritises channels (default similarity threshold 0.70, minimum cluster size 3). |
| 15, 16 | video-metadata, dates:repair | Fills missing video metadata; repairs date normalisation. |
| 17, 18 | queues:rate, rating:audit | Rates channels into the five queues; audits the evidence behind ratings. |
| 19 | metrics:snapshot | Stores a dated snapshot of video metrics. One snapshot cannot give velocity; a second one 14 or more days later can. |
| 20, 22, 23 | catalogue:expand, channel-metrics:audit, catalogue:mine | Walks a channel's whole upload catalogue (bounded, throttled, resumable), audits the metrics, mines catalogues for within-channel ratios. |
| 21, 25 | qualify:missing, qualification:llm | Asks a language model whether each channel is core, adjacent, unknown or irrelevant, with evidence. A result is stored under the model that answered and ignored if the evidence or prompt changed. |
| 24 | queues:tables:migrate | Schema migration for queue tables. |
| 26 to 30 | discovery:v2, :report, :enrich, :score, enrichment:report | Second discovery phase: corpus-led routes and config-led seeds, no human channel seeds needed. LLM query ideas are opt-in with --llm. |
| 31, 32 | within-channel:analyze, :report | Within-channel performance: which of a channel's videos beat its own norm. Separates lifetime outliers from age-adjusted performance and marks small samples as insufficient. |
| 33 | transcripts:sample | Mines a channel, then saves transcripts of its 2 best, 2 median (random) and 2 worst videos with their stats. |
Tests: npm run test:all runs the 16 test files in tests/.
The five queues
From QUEUE-DEFINITIONS.md. A channel can appear in more than one.
| Queue | Purpose |
|---|---|
| Best channels to learn from | Focused editorial identity, repeatable performance, plausible transferability. |
| Breaking out / growth potential | Strong performance relative to scale in the captured catalogue. A static proxy unless repeated snapshots show momentum. |
| Durable exemplars | A substantial output history and repeated performance, not one outlier. |
| Unexplored niches | Underrepresented subjects or approaches worth investigating. Novelty is a discovery signal, not proof of demand. |
| Reference / inspiration | Useful expertise, source material or creative evidence, even if the operating model cannot be copied. |
Rules that apply to all five: confidence is separate from merit; missing evidence stays "unknown" and is never scored as zero (the scorer shrinks toward a neutral 50 in proportion to missing weight); human reference seeds never override a contradictory or missing qualification.
Catalogue acquisition
From catalogue-crawl-investigation-v1.md. Enumerating videos and enriching them are separate tasks. Snapshots are kept because one snapshot cannot establish velocity. Completeness is tracked explicitly (not_started, in_progress, complete, partial, blocked), and failed requests, parser failures and genuinely empty feeds are told apart. The code uses youtubei.js (YouTube's internal InnerTube interface), so it depends on a response format that can change; an official API may be preferable if credentials and quota are available. Before relying on a sort order, check that returned records satisfy it.
The niche scorecard (ecosystem-rater)
The skill .claude/skills/ecosystem-rater/ compares niches. Each database is a biased sample, so raw counts measure discovery depth, not the niche. The signals are built to survive that: YouTube's own ranking for a fixed query set, fixed-size slices (the top 100 core channels), and ratios within a channel. Scores map raw values to 1 to 5 through fixed thresholds (bands.json, version ecosystem-rater-bands-v1), not ranks among the niches, so adding a seventh niche never moves the other six.
| Dimension | Metrics |
|---|---|
| Demand | search views (median of top-10 results over queries), channel ceiling (subscribers of the 10th-largest core channel), top-100 views |
| Room | concentration of the top 10, small-channel reach (views per subscriber for 1K to 100K channels), young success |
| Evergreen | share of search results older than 2 years, share under 1 month, back-catalogue ratio, view growth on old videos |
| Pressure | median uploads per month in the top 100 (lower is better) |
| Monetization | share of top-100 channels based in high-CPM countries (creator location, a proxy) |
Weights: demand 1, room 1, evergreen 1, pressure 0.5, monetization 0.5. Result as written on 2026-10-24:
| Niche | Demand | Room | Evergreen | Pressure | Money | Composite | Channels found | Core |
|---|---|---|---|---|---|---|---|---|
| crochet | 3 | 4 | 4 | 3 | 5 | 3.75 | 641 | 438 |
| science | 4 | 3 | 4 | 3 | 5 | 3.75 | 1,073 | 437 |
| art | 2.5 | 3 | 4 | 5 | 5 | 3.63 | 734 | 156 |
| Indian business | 4 | 2 | 2 | 2 | 1 | 2.38 | 1,546 | 461 |
| cricket | 3 | 3 | 1.5 | 1 | 2 | 2.25 | 793 | 448 |
| geopolitics | 3 | 1 | 2.5 | 1 | 4 | 2.25 | 657 | 149 |
How to read the Indian business row
- Demand 4: the 10th-largest core channel has about 4.16 million subscribers, and the top-100 median per-channel views are about 31,000. Search-result demand is lower (median about 85,000 views, scored 2).
- Room 2: the top 10 hold about 82% of top-100 views; only 29% of channels under three years old reached 10K subscribers.
- Evergreen 2: about 23% of top search results are over two years old and about 21% are under a month old, so the niche is more news-driven than science or art.
- Pressure 2: the top 100 upload about 6.6 times a month.
- Monetization 1: only about 1% of top-100 channels are based in high-CPM countries. This is creator location, not audience location, so it is a proxy; it nevertheless reflects an Indian audience and Indian ad rates.
- Unstandardized: the scorecard flags that search metrics came from discovery seeds, not the frozen 30-query probe the skill recommends. Comparable demand and evergreen numbers need that probe, and the skill says not to run it without the user's go-ahead.
The skill says a composite is a summary for sorting, not a decision. It does not measure visual-asset availability, copyright risk, ad suitability (war, disasters, religion), effort per video, or the creator's own edge. The Indian business niche scores lowest on money and highest on demand. The repository holds no note that records the user's reason for choosing it, so do not invent one; ask.
Studying one channel
The skill within-channel-study works out what separates one channel's best, median and worst videos. It first checks that the catalogue is mined (npm run catalogue:mine) and the six sample transcripts exist (npm run transcripts:sample); if not, it prints the command and stops (it never runs the slow network jobs itself). It then builds a dossier, asks for 6 to 10 practical observations each with evidence for and against and a strength label (strong, moderate, tentative), checks each against the catalogue titles, and writes transcripts/<channel>/_study/report.md. The usage example in the sampler's header names HinExp, the series' reference channel. The skill is listed as "not used in the script work" in tools.md. Treat six videos as leads, not proof.
How this phase feeds the rest
- The Indian business database is the
researchDbthe series study mines for on-series videos (page 03). - The channel qualification and the queues tell you which channels are worth learning from, but the script work relies on the series study and the topic study instead.
- Nothing in the script pipeline depends on this phase at run time. If you only write a script, skip this page.
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.