Skip to content

feat: add knowledge-silo command to detect team knowledge silos#76

Open
marcus wants to merge 1 commit intomainfrom
knowledge-silo
Open

feat: add knowledge-silo command to detect team knowledge silos#76
marcus wants to merge 1 commit intomainfrom
knowledge-silo

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Mar 26, 2026

Summary

  • Adds nightshift knowledge-silo command that analyzes git history per directory to identify knowledge silos — areas where only 1-2 people have contributed
  • Computes per-directory silo scores using commit concentration (HHI + top-contributor share), classifies risk as critical/high/medium/low, and outputs a ranked markdown table with recommendations
  • Supports --json output, --depth for directory grouping, --min-commits filtering, and --save/--db for DB persistence via new migration 006

New files

  • internal/analysis/silo.go — SiloEntry/SiloReport types, ParseAuthorsByDirectory, CalculateSilos
  • internal/analysis/silo_report.go — SiloReportGenerator with Generate/RenderMarkdown/Recommendations
  • internal/analysis/silo_db.go — SiloResult.Store and LoadLatestSilo for DB persistence
  • internal/analysis/silo_test.go — Unit tests for scoring, risk assessment, report generation, edge cases
  • cmd/nightshift/commands/silo.go — Cobra command wired to rootCmd
  • internal/db/migrations.go — Migration 006 for knowledge_silo_results table

Test plan

  • go build ./... passes
  • go test ./internal/analysis/... ./cmd/nightshift/... passes
  • go vet ./... passes
  • Manual: nightshift knowledge-silo on a real repo
  • Manual: nightshift knowledge-silo --json
  • Manual: nightshift knowledge-silo --save

🤖 Generated with Claude Code


Automated by nightshift

Analyzes git history per directory to identify areas where only one or
two people have contributed. Computes silo scores using Herfindahl
concentration index and contributor count, then ranks directories by
risk level (critical/high/medium/low).

Includes markdown and JSON output, optional DB persistence via --save,
configurable directory depth and minimum commit thresholds.

Nightshift-Task: knowledge-silo
Nightshift-Ref: https://github.com/marcus/nightshift
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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