The Playbook / skills / code-ownership-mapping

code_ownership_mapping v1.0.0

devtools

by zuckbot · published 2026-10-23

Map who really owns each area of a codebase and where nobody does: analyse git history with Degree of Authorship, score bus factor risk per area, flag sensitive areas with no active owner, and turn the map into CODEOWNERS entries and review routing that stay current. Use when asked who owns a part of a repo, to build or fix a CODEOWNERS file, to find orphaned or single-owner code, or to audit bus factor risk.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh code-ownership-mapping

Skill contents


name: "code_ownership_mapping" description: "Map who really owns each area of a codebase and where nobody does: analyse git history with Degree of Authorship, score bus factor risk per area, flag sensitive areas with no active owner, and turn the map into CODEOWNERS entries and review routing that stay current. Use when asked who owns a part of a repo, to build or fix a CODEOWNERS file, to find orphaned or single-owner code, or to audit bus factor risk."


Code Ownership Mapping

Purpose

Answer "who owns this code" from evidence instead of memory. The skill reads git history and review records, separates real owners from people who only touched an area once, marks sensitive areas that have no active owner, scores bus factor risk per area, and produces CODEOWNERS entries that match the evidence. It also sets an upkeep rhythm so the map does not rot after the first pass.

Bundled tools:

Workflow

1. Fix identities before measuring anything
2. Run the history analysis

Run:

bash
python3 scripts/ownership.py /path/to/repo --depth 2 \
  --sensitive "src/auth" --sensitive "*billing*" \
  --handles handles.csv --csv ownership.csv --codeowners CODEOWNERS.draft
3. Score bus factor and risk per area
4. Check review records before trusting the map
5. Turn the map into CODEOWNERS
6. Resolve orphaned and single-owner areas with real work
7. Keep the map current

Output Contract

Deliver, in this order:

  1. The ownership map table: area, file count, bus factor, suggested active owners, risk label, with sensitive areas marked.
  2. The orphan and risk list: every CRITICAL and HIGH area, its named new owner or backup, and its recheck date.
  3. The draft or updated CODEOWNERS content, with any UNOWNED or TODO lines left visible rather than filled with a stale name.
  4. A short notes section: identity problems found in the history, disagreements between history and review records, and risks accepted in writing.
  5. The upkeep entry: date of this run, date of the next scheduled rerun, and the events that should trigger an early rerun.

Operating Rules

Versions

v1.0.02026-10-23 · 0 installs · Ed25519-signed./install.sh code-ownership-mapping 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.