coupling

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

@index 모듈 간 결합도 분석. 커뮤니티 경계를 넘는 엣지를 집계하여 아키텍처 결합 강도를 측정한다.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CouplingPair

type CouplingPair struct {
	FromCommunity string
	ToCommunity   string
	EdgeCount     int64
	Strength      float64
}

CouplingPair represents coupling strength between two communities. @intent expose cross-community dependency counts in a normalized form

type Result

type Result struct {
	Items      []CouplingPair
	Pagination paging.Page
}

Result carries one bounded page of coupling pairs plus pagination metadata. @intent expose paged architecture-coupling results so MCP handlers stop slicing unbounded slices in memory.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service analyzes architectural coupling from graph edges. @intent measure dependency strength between detected communities

func New

func New(db *gorm.DB) *Service

New creates a coupling analysis service. @intent construct a service for cross-community dependency queries

func (*Service) Analyze

func (s *Service) Analyze(ctx context.Context) ([]CouplingPair, error)

Analyze measures coupling strength between communities. Used by MCP get_architecture_overview tool and architecture_map prompt.

@return pairs of communities with cross-community edge counts and strength @intent detect tightly coupled modules for architecture improvement @domainRule strength equals edge count divided by maximum edge count across all pairs @domainRule only cross-community edges are counted

func (*Service) AnalyzePage

func (s *Service) AnalyzePage(ctx context.Context, req paging.Request) (Result, error)

AnalyzePage returns one bounded page of coupling pairs. @intent bound handler response size and database aggregation work to one requested coupling window. @domainRule strength uses the maximum cross-community edge count across all pairs, but returned pair rows are paged in SQL. @domainRule pairs are sorted by descending strength, then descending edge count, then from/to community for stable pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL