Ecosystem intelligence

The upstream work: finding channels, qualifying them, ranking ecosystems, and how the Indian business niche was scored.

TL;DR

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-*.js to 33-*.js, run through npm run <name>. One database per niche, picked by the config.js in use.
  • Output you will use later: the Indian business database (data/indian-business-ecosystem.db) feeds the series study; ecosystem-ratings/scorecard.md is 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.

Check which niche is active

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.

Stagenpm scriptWhat it does
01discoverSearches 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.5enrichClassifies channels and videos against the niche (rule-based first pass; --force, --channel-url).
02channel-metadataFetches channel descriptions and subscriber counts.
03 / 04profile:channels, profile:videosWrites observations of what each channel and video is about.
05expand:discoveryUses the concepts found so far to search for more.
06seed:reference, video-signalsImports the optional human reference channels; backfills per-video signals. Reference channels never bypass qualification.
07 / 08analyze:corpus, normalize:temporalCorpus analysis report with greedy nearest-neighbour clusters; turns "3 months ago" text into dates.
09 to 12vocabulary:build, vocabulary:review, features:build, videos:embedBuilds a controlled vocabulary of editorial features, a feature matrix and title embeddings.
13 / 14priorities:build, priorities:reportClusters and prioritises channels (default similarity threshold 0.70, minimum cluster size 3).
15, 16video-metadata, dates:repairFills missing video metadata; repairs date normalisation.
17, 18queues:rate, rating:auditRates channels into the five queues; audits the evidence behind ratings.
19metrics:snapshotStores a dated snapshot of video metrics. One snapshot cannot give velocity; a second one 14 or more days later can.
20, 22, 23catalogue:expand, channel-metrics:audit, catalogue:mineWalks a channel's whole upload catalogue (bounded, throttled, resumable), audits the metrics, mines catalogues for within-channel ratios.
21, 25qualify:missing, qualification:llmAsks 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.
24queues:tables:migrateSchema migration for queue tables.
26 to 30discovery:v2, :report, :enrich, :score, enrichment:reportSecond discovery phase: corpus-led routes and config-led seeds, no human channel seeds needed. LLM query ideas are opt-in with --llm.
31, 32within-channel:analyze, :reportWithin-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.
33transcripts:sampleMines 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.

QueuePurpose
Best channels to learn fromFocused editorial identity, repeatable performance, plausible transferability.
Breaking out / growth potentialStrong performance relative to scale in the captured catalogue. A static proxy unless repeated snapshots show momentum.
Durable exemplarsA substantial output history and repeated performance, not one outlier.
Unexplored nichesUnderrepresented subjects or approaches worth investigating. Novelty is a discovery signal, not proof of demand.
Reference / inspirationUseful 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.

DimensionMetrics
Demandsearch views (median of top-10 results over queries), channel ceiling (subscribers of the 10th-largest core channel), top-100 views
Roomconcentration of the top 10, small-channel reach (views per subscriber for 1K to 100K channels), young success
Evergreenshare of search results older than 2 years, share under 1 month, back-catalogue ratio, view growth on old videos
Pressuremedian uploads per month in the top 100 (lower is better)
Monetizationshare 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:

NicheDemandRoomEvergreenPressureMoneyCompositeChannels foundCore
crochet344353.75641438
science434353.751,073437
art2.534553.63734156
Indian business422212.381,546461
cricket331.5122.25793448
geopolitics312.5142.25657149

How to read the Indian business row

What the scorecard does not decide

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

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.