Skip to main content

Module authors

Module authors 

Expand description

authors analysis — number of distinct authors per file (modernised).

§What this signal tells you

For each file in the repository, the analysis emits how many distinct authors have touched it. This is one of the most-cited findings in software-engineering empirical research: defect density correlates strongly with the number of distinct contributors to a module (Bird, Nagappan, Murphy, Devanbu, Zeller — “Don’t Touch My Code! Examining the Effects of Ownership on Software Quality”, FSE 2011).

Files touched by many authors are at higher risk of defects than files with a single dominant owner, even controlling for size, complexity, and churn.

§Why this is richer than code-maat’s version

Code-maat’s -a authors emits [entity, n-authors, n-revs] — three columns. CodeLore’s identity layers know more about each contributor: whose commits are .mailmap-canonicalised, who’s a bot (.codelorebots + heuristics), what fraction were AI-assisted vs AI-authored vs human. That intelligence is dead weight if the output schema doesn’t surface it. So the modern default columns are:

  • entity — the file path (or canonical-lineage entity under --use-canonical-lineage).
  • n_authors — total distinct canonical authors touching this file.
  • n_humans — distinct authors whose commits to this file were classified as human AND who aren’t flagged as bots.
  • n_bots — distinct authors flagged as bots in author_aliases OR whose every commit to this file was classified as ai-authored (the “wholly machine-generated commit” tier).
  • n_revs — distinct commits this file appears in.
  • last_author — most recent canonical author to touch this file.
  • last_modified — calendar date (YYYY-MM-DD) of the most recent commit affecting this file.

Under --code-maat-compat, only entity, n_authors, n_revs are emitted by the CSV writer so existing tooling that parses code-maat’s CSV continues to work under --code-maat-compat.

§Where the per-author leaderboard went

The previous behaviour of this analysis (one row per author, with a global commit count) is now exposed as the separate top-committers analysis with additional columns (LoC added/deleted, first/last commit dates). That’s a different question — “who commits the most overall” — and conflating it with code-maat’s authors was a silent migration trap.

Research basis: see docs/research-foundations.md entry “authors”.

Structs§

AuthorsRow

Functions§

run_authors