Skip to main content

gitnexus://repo//clusters

Resource URI

string
required
Repository name from gitnexus://repos

Description

Returns all functional areas (clusters/modules) detected in the repository using the Leiden community detection algorithm. Clusters group related code symbols that work together. Clusters represent functional boundaries in your codebase — authentication, database access, API handlers, etc.

Returns

array
List of detected functional areas (top 20)

When to Use

  • Understanding architecture: See how code is organized
  • Finding related code: Identify which symbols work together
  • Planning changes: Understand functional boundaries
  • Exploring unfamiliar codebases: Quick architectural overview

Example Response

With Clusters

No Clusters

Cohesion Scores

Cohesion indicates how tightly related the symbols within a cluster are:
  • 80-100%: Very tight coupling, likely a well-defined module
  • 60-79%: Good cohesion, functional area is clear
  • 40-59%: Moderate cohesion, may contain mixed responsibilities
  • < 40%: Low cohesion, cluster may be too broad

gitnexus://repo//cluster/

Resource URI

string
required
Repository name from gitnexus://repos
string
required
Cluster name from the clusters resource

Description

Returns detailed information about a specific cluster, including all member symbols with their types and file locations. Use this to deep-dive into a functional area and see exactly what code belongs to it.

Returns

string
Cluster name
number
Total member count
string
Internal cohesion percentage
array
List of symbols in this cluster (top 20)

When to Use

  • After reading clusters: Get details on interesting areas
  • Understanding module scope: See all symbols in a functional area
  • Impact analysis: Know what files are part of a module
  • Refactoring planning: Identify module boundaries

Example Response

Error Response

Workflow

Typical cluster exploration workflow:
1

List All Clusters

Read gitnexus://repo/{name}/clusters to see available modules
2

Identify Interesting Areas

Look at cluster names and cohesion scores
3

Deep Dive

Read gitnexus://repo/{name}/cluster/{clusterName} for specific modules
4

Analyze Symbols

Use the context tool on specific symbols to understand their relationships

Next Steps

Context Tool

Get 360-degree view of specific symbols

Processes Resource

View execution flows