community

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 Builder

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

Builder rebuilds communities from graph data. @intent persist directory-based module boundaries into community tables

func New

func New(db *gorm.DB) *Builder

New creates a community builder. @intent construct a builder that writes detected communities to the database

func (*Builder) Rebuild

func (b *Builder) Rebuild(ctx context.Context, cfg Config) ([]Stats, error)

Rebuild creates communities by grouping nodes by directory path. Used by MCP run_postprocess tool and architecture_map prompt.

@return community stats with node count, internal/external edges, cohesion score @intent partition codebase into logical modules for architecture analysis @domainRule groups nodes by file path directory up to configured depth @domainRule cohesion equals internal edges divided by total edges @sideEffect deletes all existing communities and memberships before rebuilding @mutates Community CommunityMembership tables

type Config

type Config struct {
	BaseDir string
	Depth   int
}

Config controls directory-based community grouping. @intent define how file paths are collapsed into module community keys

type Stats

type Stats struct {
	Community     model.Community
	NodeCount     int64
	InternalEdges int64
	ExternalEdges int64
	Cohesion      float64
}

Stats summarizes one rebuilt community. @intent report membership and cohesion metrics for a detected community

Jump to

Keyboard shortcuts

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