cgis_suggest_packages
Suggest sub-package boundaries from dependency communities. Get modularity scores and split/consolidate verdicts to guide package restructuring.
Instructions
Suggest sub-package boundaries for a package from its dependency communities.
Returns JSON: modularity_q, divergence, direction (under/over/matched),
verdict (split/consolidate/aligned/leave/borderline/no_signal), the detected
communities (id + member files), the cross-community bridge edges (cost of
splitting), and the thresholds used. Default layer is IMPORTS; set
``with_calls`` for the combined import+call graph. Run ``cgis_ingest`` first.
A mis-rooted graph (import targets resolve to no internal file) returns
``no_signal`` with a diagnostic note rather than a silent clean verdict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min_q | No | Modularity threshold: at or above it, a package whose layout disagrees with its communities is flagged split (or consolidate, if over-split). | |
| prefix | No | FQN prefix of the package to analyse, e.g. cgis.query, matched on whole dot-segments. Needed in practice: without it the verdict is no_signal. | |
| db_path | No | SQLite graph built by cgis_ingest. A relative path resolves against the MCP server's working directory, not the agent's — prefer an absolute path. | graph.db |
| with_calls | No | Use the combined import + call graph instead of imports only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |