File tree Expand file tree Collapse file tree
internal/analysis/coupling Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ func New(db *gorm.DB) *Service {
3030 return & Service {db : db }
3131}
3232
33+ // pairRow holds one cross-community edge aggregation row.
34+ // @intent transport GROUP BY join results from Analyze into post-processing.
35+ type pairRow struct {
36+ FromCommID uint
37+ ToCommID uint
38+ EdgeCount int64
39+ }
40+
3341// Analyze measures coupling strength between communities.
3442// Used by MCP get_architecture_overview tool and architecture_map prompt.
3543//
@@ -39,12 +47,6 @@ func New(db *gorm.DB) *Service {
3947// @domainRule only cross-community edges are counted
4048func (s * Service ) Analyze (ctx context.Context ) ([]CouplingPair , error ) {
4149 ns := ctxns .FromContext (ctx )
42-
43- type pairRow struct {
44- FromCommID uint
45- ToCommID uint
46- EdgeCount int64
47- }
4850 var rows []pairRow
4951 q := s .db .WithContext (ctx ).
5052 Model (& model.Edge {}).
You can’t perform that action at this time.
0 commit comments