Skip to content

feat(busfactor): per-directory breakdown and knowledge silo detection#166

Open
marcus wants to merge 2 commits into
mainfrom
codex/busfactor-per-directory
Open

feat(busfactor): per-directory breakdown and knowledge silo detection#166
marcus wants to merge 2 commits into
mainfrom
codex/busfactor-per-directory

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented May 15, 2026

Summary

  • Added --per-directory (and --roots, defaulting to cmd,internal) to nightshift busfactor. When set, the command walks each immediate subdirectory of the configured roots and computes ownership metrics scoped to that component's git history.
  • Components with a bus factor of 1 are flagged as knowledge silos in both the markdown table and the JSON component_breakdown field, sorted with the riskiest entries first.
  • Implementation lives in internal/analysis (new ListComponentPaths, ComponentMetrics, AnalyzeComponents) and internal/analysis/report.go (new ## Per-Component Bus Factor table); only emitted when the breakdown is populated.

Test plan

  • go vet ./...
  • go build ./...
  • go test ./internal/analysis/... ./cmd/nightshift/...
  • go run ./cmd/nightshift busfactor --per-directory . — confirms 23 silos in this repo
  • go run ./cmd/nightshift busfactor --per-directory --json . — confirms component_breakdown is populated

Automated by nightshift

marcus added 2 commits April 22, 2026 02:19
Nightshift-Task: release-notes
Nightshift-Ref: https://github.com/marcus/nightshift
Adds --per-directory and --roots flags to `nightshift busfactor` that compute
per-component ownership metrics (top-level subdirectories of cmd/ and internal/)
and flag any component with bus factor 1 as a knowledge silo. The breakdown is
rendered as a markdown table and emitted in JSON output, surfacing where
single-contributor risk is hiding inside an otherwise healthy-looking repo.

Nightshift-Task: bus-factor
Nightshift-Ref: https://github.com/marcus/nightshift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant