Skip to content

feat: add service-advisor for package boundary analysis#72

Open
marcus wants to merge 1 commit intomainfrom
service-advisor
Open

feat: add service-advisor for package boundary analysis#72
marcus wants to merge 1 commit intomainfrom
service-advisor

Conversation

@marcus
Copy link
Copy Markdown
Owner

@marcus marcus commented Mar 24, 2026

Summary

  • Adds service-advisor CLI command that analyzes Go package structure to identify service boundary opportunities
  • Computes per-package metrics: coupling (afferent/efferent), cohesion (internal refs vs exports), size (relative LOC), and change coupling (git co-change frequency)
  • Produces ranked recommendations (extract/merge/keep) with markdown and JSON output
  • Includes SQLite persistence (migration 006) following the bus-factor pattern, with --save flag support
  • Full unit test coverage for metrics, report generation, and DB round-trips

Test plan

  • go build ./... passes
  • go test ./... passes (all existing + new tests)
  • Pre-commit hooks pass (gofmt, go vet, go build)
  • Manual: nightshift service-advisor --path . produces expected markdown output
  • Manual: nightshift service-advisor --json produces valid JSON
  • Manual: nightshift service-advisor --save --db /tmp/test.db persists results

🤖 Generated with Claude Code


Automated by nightshift

Analyzes Go package structure to identify service boundary opportunities
by computing coupling, cohesion, size, and change-coupling metrics.
Produces ranked recommendations (extract/merge/keep) per package.

Nightshift-Task: service-advisor
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