gograph_coupling
Analyze Go package coupling with afferent/efferent dependency ratios and instability metrics to evaluate modularity and stability.
Instructions
Assess structural coupling and dependency ratios (Afferent vs Efferent coupling) for Go packages. BEHAVIOR & SAFETY: This is a 100% local, read-only static analysis tool. It has no side effects, requires no authorization or credentials, has no rate limits, and performs zero destructive modifications. USAGE GUIDELINES: Call this tool to evaluate package isolation, modularity strength, and stability indexes. Do NOT use for single function analysis (use gograph_complexity instead). COMPLETENESS: Returns afferent coupling (Ca), efferent coupling (Ce), and instability ratio (I) per package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_stdlib | No | Include standard-library packages in the report. Default false — users asking 'how coupled is my code?' rarely care about stdlib coupling. | |
| internal_only | No | Restrict the report to the project's own packages (anything starting with the module path from go.mod). Strictly stronger than excluding stdlib — also excludes third-party deps. | |
| package | No | Optional package name substring to filter results |