Skip to main content

Module code_familiarity

Module code_familiarity 

Expand description

code-familiarity analysis — what fraction of SLOC is actively known by the team’s current contributors.

Familiarity score = Σ_f sloc_f · (Σ_{d ∈ active} k_norm(d,f)) / Σ_f sloc_f × 100

where “active” means any author with ≥1 commit in the trailing opts.window_days window (anchored to MAX(date) for reproducibility). Knowledge shares are computed by materialize_knowledge_shares, which applies exponential decay (Jabrayilzade et al., ICSE-SEIP 2022) and reviewer credit (Rigby & Bird, ESEC/FSE 2013).

Islands score = % of SLOC where the top k_norm author ≥ 0.8 AND the second author’s k_norm < 0.2 (or the file has only one contributor). A file is an “island” when one person holds dominant, essentially unchallenged knowledge of it.

Verdict: "good" when familiarity_pct ≥ threshold (default 70.0; overridden by [gates] code_familiarity_min in .codelore-thresholds.toml).

Structs§

CodeFamiliarityRow
One-row summary of code familiarity for the repository.

Functions§

run_code_familiarity
Run the code-familiarity analysis.