get_cohesion_metrics
Analyzes class and module cohesion using LCOM4 and internal-import ratio. Identifies classes with low cohesion that may benefit from splitting.
Instructions
Analyze class and module cohesion. Reports LCOM4 (Lack of Cohesion of Methods) for each class and internal-import ratio for each package. Classes with LCOM4 > 1 may be candidates for splitting. Modules with low cohesion ratio rely heavily on external imports.
No prior indexing required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| top_n | No | Number of top results to return (1-100, default: 20) | |
| exclude_tests | No | Exclude test files from analysis (default: true) |