taxonomic-shift-detection

Detect interest migration in categorized content timelines using Jensen-Shannon Divergence and change point detection.

13|2|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/aaddrick/written-voice-replication --skill taxonomic-shift-detection-aaddrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: taxonomic-shift-detection
Source: https://github.com/aaddrick/written-voice-replication/tree/main/.claude/skills/taxonomic-shift-detection
Command: npx skills add https://github.com/aaddrick/written-voice-replication --skill taxonomic-shift-detection-aaddrick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, ruptures.

What problem does it solve? When analyzing a person's writing or content history over months or years, their interests change — but it is hard to tell whether a change is a genuine migration, gradual drift, or just temporary exploration. This Skill turns a timestamped, category-labeled corpus into a quantitative timeline of interest shifts, identifying when shifts happened, how large they were, and which era best represents the current voice. ## Core Features & Use Cases - Adaptive temporal windowing: Builds windows based on item counts rather than fixed calendar periods so every window has a stable category distribution. - Divergence-based shift detection: Computes Jensen-Shannon Divergence between adjacent windows and cumulative drift from baseline, then applies PELT change point detection via the ruptures library. - Shift validation and era segmentation: Classifies each shift as permanent, transient, or minor fluctuation using magnitude, duration, and reversion checks, then characterizes each era with dominant categories and Shannon entropy. - Use Case: Given two years of categorized Reddit posts, detect that the author migrated from gaming content to personal finance around a specific month, confirm the shift was permanent, and produce a report identifying the current voice era for downstream voice modeling. ## Quick Start Analyze my categorized post history for interest shifts over time and write the findings to docs/analysis/13-taxonomic-shift-detection.md.

Frequently Asked Questions about taxonomic-shift-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect topic shifts in a user's content over time?

Window the timestamped corpus adaptively by item count, compute category distributions per window, then measure Jensen-Shannon Divergence between adjacent windows. Apply change point detection (PELT via the ruptures library) on the divergence series to locate shifts.

What is Jensen-Shannon Divergence and why use it for distribution comparison?

Jensen-Shannon Divergence is a symmetric, bounded [0,1] measure of distance between probability distributions that handles zero-probability categories gracefully. Unlike KL divergence, it is always defined and symmetric, making it suitable for comparing category distributions across time windows.

How much data do I need for longitudinal shift detection?

You need at least 3 months of timeline span and 50 or more categorized items, with 100+ items preferred for robust windowing. Corpora below these thresholds should only receive a static single-period profile, not shift detection.

How do I tell a permanent interest shift from temporary exploration?

Validate each candidate shift on three criteria: magnitude (JSD above 0.15), duration (the new era persists 3+ windows), and reversion (the following era does not return to the pre-shift distribution). Shifts failing these checks are classified as transient or minor fluctuations.

Why does change point detection find too many shifts in my data?

The PELT penalty parameter is likely too low, causing over-detection. Start with pen=1.0 and increase it; detecting more than one change point per three windows usually indicates over-sensitivity rather than genuine shifts.

Can this method detect gradual drift instead of sudden changes?

Yes. Compute cumulative JSD from the baseline (first) window alongside adjacent-window JSD. Monotonically increasing cumulative divergence over three or more consecutive windows indicates gradual drift that sharp-break detection alone would miss.