Docs/Skills and code/skill script-cohort-analysis

.claude/skills/script-cohort-analysis/scripts/features.js

Code55 lines4.2 KBSkill: script-cohort-analysis

What the file says about itself

The default pre-registered feature set (rubric v3). direction: +1 = higher predicts better performance, -1 = lower predicts better, 0 = exploratory (two-sided, can never count as "explains"; only as a lead for a future hypothesis).

// The default pre-registered feature set (rubric v3). direction: +1 = higher predicts better
// performance, -1 = lower predicts better, 0 = exploratory (two-sided, can never count as
// "explains"; only as a lead for a future hypothesis).
//
// source:
//   det   - computed deterministically from the transcript text (prepare.js)
//   ext   - computed from the rater's structured extraction (raterFeatures.js)
//   chk   - share of a dimension's yes/no checks that pass (checklist.js)
//   item  - one yes/no check (exploratory; shown in the rule scorecard)
//   pair  - win share in blind pairwise craft comparisons (pair-prompt.md)
//   topic - win share in blind pairwise TOPIC comparisons on neutral topic cards (topic-prompt.md)
//   hol   - rater's holistic prediction
//   pkg   - title-only packaging rater
//   cov   - covariate / confound, never a script explanation
const { DIMS, ITEM_IDS } = require('./checklist');

const FEATURES = [
  { id: 'det_question_rate', source: 'det', direction: 1, desc: 'question sentences per 100 words' },
  { id: 'det_second_person_rate', source: 'det', direction: 1, desc: 'second-person pronouns + verb forms per 100 words' },
  { id: 'det_number_rate', source: 'det', direction: 1, desc: 'digits/magnitude terms per 100 words (specificity proxy)' },
  { id: 'det_contrast_rate', source: 'det', direction: 0, desc: '"but"-type connectives per 100 words (exploratory: also counts plot reversals)' },
  { id: 'det_causal_rate', source: 'det', direction: 1, desc: '"therefore"-type connectives per 100 words' },
  { id: 'det_additive_rate', source: 'det', direction: -1, desc: '"and then"-type connectives per 100 words' },
  { id: 'det_hook_questions', source: 'det', direction: 1, desc: 'question sentences in first 60s' },
  { id: 'det_hook_numbers', source: 'det', direction: 1, desc: 'numbers/magnitudes in first 60s' },
  { id: 'det_imagine_rate', source: 'det', direction: 1, desc: '"imagine/suppose" scene-setting per 1000 words' },
  { id: 'det_sentence_len_cv', source: 'det', direction: 1, desc: 'coefficient of variation of sentence length' },
  { id: 'det_wpm', source: 'det', direction: 0, desc: 'words per minute' },
  { id: 'det_ttr', source: 'det', direction: 0, desc: 'type-token ratio on first 1500 tokens' },

  { id: 'ext_dependency_density', source: 'ext', direction: 1, desc: 'share of sections that depend on an earlier section' },
  { id: 'ext_forward_refs', source: 'ext', direction: -1, desc: 'things referenced before being introduced (structure breaks)' },
  { id: 'ext_filler_ratio', source: 'ext', direction: -1, desc: 'share of runtime in filler/repetition sections' },
  { id: 'ext_interest_mean', source: 'ext', direction: 1, desc: 'runtime-weighted mean section interest (1-5)' },
  { id: 'ext_interest_trend', source: 'ext', direction: 1, desc: 'second-half minus first-half interest' },
  { id: 'ext_time_to_promise_sec', source: 'ext', direction: -1, desc: 'seconds until the core promise is stated' },
  { id: 'ext_major_loops_per_10min', source: 'ext', direction: 1, desc: 'major curiosity loops opened per 10 min' },

  ...DIMS.map((d) => ({ id: `chk_${d}`, source: 'chk', direction: 1, desc: `share of ${d} checks passed` })),
  { id: 'chk_composite', source: 'chk', direction: 1, desc: 'mean of the 11 checklist dimensions' },
  ...ITEM_IDS.map((id) => ({ id: `item_${id}`, source: 'item', direction: 0, desc: `check ${id}` })),

  { id: 'pair_overall', source: 'pair', direction: 1, desc: 'win share in blind pairwise overall-script comparisons' },
  ...DIMS.map((d) => ({ id: `pair_${d}`, source: 'pair', direction: 0, desc: `pairwise win share on ${d} (convergent check for chk_${d})` })),

  { id: 'topic_pair', source: 'topic', direction: 1, desc: 'win share in blind pairwise topic-appeal comparisons (topic cards only)' },

  { id: 'hol_rater_percentile', source: 'hol', direction: 1, desc: 'rater guess of script-quality percentile' },
  { id: 'pkg_title_score', source: 'pkg', direction: 1, desc: 'title-only packaging score (1-5)' },
  { id: 'cov_duration_min', source: 'cov', direction: 0, desc: 'duration in minutes' },
  { id: 'cov_age_days', source: 'cov', direction: 0, desc: 'days since publish' },
];

module.exports = { FEATURES, DIMS };

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.