Skip to content

feat: add ownership boundary suggester#74

Open
marcus wants to merge 1 commit intomainfrom
ownership-boundary
Open

feat: add ownership boundary suggester#74
marcus wants to merge 1 commit intomainfrom
ownership-boundary

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Mar 25, 2026

Summary

  • Add nightshift ownership CLI command that analyzes git history per directory to identify dominant code owners, detect co-change cohesion, and suggest ownership boundaries
  • New internal/analysis/ownership.go module with ParseDirectoryOwnership, DetectCohesion, SuggestBoundaries, FindUnclearOwnership, GenerateCODEOWNERS, and RenderOwnershipMarkdown
  • Enhanced TaskOwnershipBoundary description with detailed agent instructions for autonomous execution

CLI Flags

  • --depth (default 2): directory depth to analyze
  • --min-commits (default 10): minimum commit threshold per directory
  • --codeowners: output GitHub CODEOWNERS format
  • --json: JSON output
  • --since / --until: date range filtering

Test plan

  • Unit tests for directoryAtDepth, SuggestBoundaries, FindUnclearOwnership, GenerateCODEOWNERS, RenderOwnershipMarkdown
  • go build ./... passes
  • go test ./internal/analysis/... ./cmd/nightshift/... passes
  • Smoke tested nightshift ownership, --codeowners, --json on this repo

🤖 Generated with Claude Code


Automated by nightshift

…logic

Add ownership boundary analysis that parses git history per directory to
identify dominant code owners, detects co-change cohesion between
directories, and suggests ownership boundaries. Includes:

- internal/analysis/ownership.go: ParseDirectoryOwnership, DetectCohesion,
  SuggestBoundaries, FindUnclearOwnership, GenerateCODEOWNERS, and
  RenderOwnershipMarkdown
- cmd/nightshift/commands/ownership.go: cobra command with --json, --since,
  --until, --depth, --min-commits, --codeowners flags
- Enhanced TaskOwnershipBoundary description for autonomous agent usage

Nightshift-Task: ownership-boundary
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