Infer CODEOWNERS from git history with confidence scoring, knowledge graphs, expertise decay detection, bus factor analysis, and team topology inference. CI-native.
Project description
checkowners
Infer CODEOWNERS from git history with confidence scoring, a knowledge graph, expertise decay detection, bus factor analysis, team topology inference, review load balancing, and onboarding paths. Pure git, no LLMs. CI-native: structured JSON output, GITHUB_OUTPUT integration, composite GitHub Action.
Ownership is not binary. checkOwners is the first CODEOWNERS tool that treats it as a confidence-scored spectrum and surfaces the second-order risks (bus factor, expertise decay, team topology) that come with it.
How it works
checkowners analyze reads git log and git blame (in parallel, only over paths that can actually produce owners; a 24k-commit monorepo analyzes in under two minutes) into a confidence-scored ownership map cached per repo under ~/.checkowners/. Commit emails resolve to GitHub @handles (noreply emails locally with no token, the rest via the GitHub API), and same-person identities merge so bus factors count people, not email addresses. From that map, generate writes a CODEOWNERS file with uniform directories consolidated into dir/ rules, and drift compares the committed file against inference using real CODEOWNERS pattern matching (directory rules, globs, last-match-wins). bus-factor, decay, topology, balance, onboard, and trends emit their own reports. In CI, the composite GitHub Action runs the same flow, writes structured GITHUB_OUTPUT, and maintains a single up-to-date PR comment. See docs/USAGE.md for the full pipeline and a diagram.
Installation
pip install checkowners # core CLI (pure git, zero API deps)
pip install "checkowners[graph]" # + networkx-backed graph / topology / onboard
pip install "checkowners[github]" # + GitHub API handle/team/review resolution
pip install "checkowners[all]" # everything
Quick start
# Confidence-scored ownership inference
checkowners analyze
# Write CODEOWNERS with owners ranked by expertise confidence
# (refuses to overwrite a hand-written file unless you pass --force)
checkowners generate
# Compare inferred vs current CODEOWNERS, ranked by confidence delta
checkowners drift
# Validate syntax (no git access)
checkowners validate
All commands accept --json (except graph, which exports DOT via --export dot) and persist their results per repo under ~/.checkowners/ so downstream commands can reuse the analysis.
Commands
| Command | What it does |
|---|---|
checkowners analyze |
Infer ownership with confidence scores, bus factor, decay warnings |
checkowners generate |
Write CODEOWNERS, ordered by confidence; optional inline annotations |
checkowners print |
Print inferred ownership to stdout |
checkowners validate |
Validate existing CODEOWNERS syntax |
checkowners drift |
Compare inferred vs current; severity + max confidence delta |
checkowners notify |
POST drift to a webhook gated by severity_threshold |
checkowners sync |
Generate CODEOWNERS and commit the result |
checkowners expertise <path> |
Per-path expertise ranking |
checkowners decay |
Detect dormant owners; recommend transfers |
checkowners graph [--export dot] |
Render the contributor / file / team graph |
checkowners bus-factor [<path>] [--all] |
Per-path bus factor with backup-reviewer suggestions |
checkowners topology |
Infer team boundaries from commit co-occurrence |
checkowners balance |
Detect overloaded reviewers and propose rebalancing |
checkowners onboard <path> |
Generate a learning path from broad-ownership to deep-expertise files |
checkowners trends [--periods N] [--period-days D] |
Show how ownership confidence and bus factor have evolved over time |
checkowners github-action |
Run the full CI flow and write GITHUB_OUTPUT; used by the composite Action |
Documentation
- docs/USAGE.md: full configuration reference, confidence scoring formula, drift severity tiers, GitHub Actions integration, comparison table.
- docs/FAQ.md: identity (usernames vs emails, teams + subteams), GitHub API access, file locations, tuning, troubleshooting.
- docs/CONTRIBUTING.md: dev setup, commands, conventional commits, code conventions, PR workflow.
- docs/CHANGELOG.md: release history.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file checkowners-0.5.0.tar.gz.
File metadata
- Download URL: checkowners-0.5.0.tar.gz
- Upload date:
- Size: 95.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9103b550155a43aee1a42ccefb2fcbc8d8848f886fcec696349e5112012b9c52
|
|
| MD5 |
10cfb67fddee9d33581b88d8caebb901
|
|
| BLAKE2b-256 |
df0a1d43addbfe409c6e023019f7167e58d76121d014ba9d91b5d6c07e2b9060
|
Provenance
The following attestation bundles were made for checkowners-0.5.0.tar.gz:
Publisher:
publish.yml on fortyOneTech/checkOwners
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checkowners-0.5.0.tar.gz -
Subject digest:
9103b550155a43aee1a42ccefb2fcbc8d8848f886fcec696349e5112012b9c52 - Sigstore transparency entry: 2065464882
- Sigstore integration time:
-
Permalink:
fortyOneTech/checkOwners@4d50c1731a083e96ac06150b25c65cabac8d2138 -
Branch / Tag:
- Owner: https://github.com/fortyOneTech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d50c1731a083e96ac06150b25c65cabac8d2138 -
Trigger Event:
release
-
Statement type:
File details
Details for the file checkowners-0.5.0-py3-none-any.whl.
File metadata
- Download URL: checkowners-0.5.0-py3-none-any.whl
- Upload date:
- Size: 54.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cf7d9ebba7c15e2835c472fa424c97a385d8f191c4af6748385412c10f8fd29
|
|
| MD5 |
08ea177afaefd45bad4c6f445c65de7f
|
|
| BLAKE2b-256 |
310242a344ea0d159d3e62387059436df537cde71e06dd6e4733433493afd99d
|
Provenance
The following attestation bundles were made for checkowners-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on fortyOneTech/checkOwners
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checkowners-0.5.0-py3-none-any.whl -
Subject digest:
4cf7d9ebba7c15e2835c472fa424c97a385d8f191c4af6748385412c10f8fd29 - Sigstore transparency entry: 2065465122
- Sigstore integration time:
-
Permalink:
fortyOneTech/checkOwners@4d50c1731a083e96ac06150b25c65cabac8d2138 -
Branch / Tag:
- Owner: https://github.com/fortyOneTech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d50c1731a083e96ac06150b25c65cabac8d2138 -
Trigger Event:
release
-
Statement type: