Module shares
Expand description
Decayed-knowledge materialization: knowledge_shares and doe_scores
temporary tables consumed by every WS-B analysis.
§Knowledge share model
Each developer’s knowledge of a file decays exponentially with time since their last contribution. The decay constant (220 days, halving ≈ 5 months) comes from Jabrayilzade et al., ICSE-SEIP 2022 (arXiv 2202.01523 §3.1).
Contribution weight is scaled by AI attribution:
- Human commit → weight 1.0
- AI-assisted commit → weight 0.7 (heuristic motivated by arXiv 2507.08160, which shows GenAI-heavy commits distort expertise models)
- AI-authored commit → weight 0.3 (same source)
Reviewer credit: commits carrying Co-Authored-By: or Reviewed-By:
trailers award each reviewer W_REVIEWER (0.5) of the author weight per
Jabrayilzade 2022 (reviewers = ½ author weight) and Rigby & Bird,
ESEC/FSE 2013 (review transfers 66–150% of authorship knowledge). Commits
touching more than 10 files are excluded from reviewer credit (Rigby &
Bird’s >10-file exclusion rule: large sweeping commits do not meaningfully
transfer file-level knowledge to reviewers).
§DOE (Degree of Expertise) model
DOE per author×file is computed from the linear model by Cury & Avelino, SBES’24 (arXiv 2408.08733):
doe = 5.28223
+ 0.23173 × ln(1 + adds)
+ 0.36151 × fa
− 0.19421 × ln(1 + num_days)
− 0.28761 × ln(size.max(1))Where:
adds= lifetimeSUM(loc_added)by this author for this pathfa= 1.0 if this author created the file (change_type = 'added'), 0.0 otherwisenum_days= days since this author’s last touch of the file, measured against the repo’s newest commit (recency, per the DOE definition)size= HEADSUM(sloc)fromcomplexity_metrics(clamped ≥ 1; the formula hasln(size)without a +1 guard, so clamping prevents ln(0))
Expert threshold: doe >= 1.0 AND doe >= 0.75 × max_doe_for_file.
This normalization convention is adopted from Avelino’s DOA work; the
DOE paper itself leaves the threshold unstated.
Constants§
- DECAY_
DAYS - Exponential decay constant in days. Source: Jabrayilzade et al., ICSE-SEIP 2022 (arXiv 2202.01523 §3.1).
- W_
AI_ ASSISTED - AI-assisted commit knowledge weight (same source as
W_AI_AUTHORED). - W_
AI_ AUTHORED - AI-authored commit knowledge weight.
Heuristic motivated by arXiv 2507.08160 (
GenAIdistorts expertise models). See alsoW_AI_ASSISTED. - W_
REVIEWER - Reviewer knowledge weight relative to author. Sources: Jabrayilzade et al. 2022 (reviewers = ½ author weight); Rigby & Bird, ESEC/FSE 2013 (review transfers 66–150% of authorship).
Functions§
- materialize_
knowledge_ shares - Materialises two temporary tables into
db: