cos_graph_dead_code
Identify dead-code candidates by listing in-repo symbols with zero non-test inbound references. Filter by function, method, or class to focus cleanup.
Instructions
List in-repo symbols with zero non-test inbound references (dead-code candidates).
Surfaces functions / methods / classes that nothing (outside tests) calls, constructs, subclasses, or type-references — the inverse of centrality. Candidates only: dynamic-dispatch / CLI-registered / externally-called symbols may appear; verify with cos_graph_references before deleting.
Args: kind: Optional filter — function | method | class. Empty = all three. top: Max candidates returned (default 50, max 500). include_tests: Count test-sourced edges + include test files (default False).
Returns:
JSON envelope with dead (list) + total_count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| kind | No | ||
| include_tests | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |