Skip to content

deps lacks DOT / JSON-Graph export and cycle-detection flag #1634

Description

@Widthdom

Summary

The deps tool returns a JSON edge list but offers no graph export format (DOT, GraphML, JSON-Graph) and no --cycles flag to surface dependency cycles. Visualization or cycle analysis requires post-processing in another tool. A native --format=dot|graphml|json-graph and --cycles aggregator would make the dependency tool usable end-to-end without glue code.

Where

  • src/CodeIndex/Mcp/McpToolHandlers.cs (deps handler — no format selector)
  • src/CodeIndex/Cli/QueryCommandRunner.cs (CLI surface for deps)

Suggested approach

(1) Add a --format flag with dot|graphml|json-graph|edgelist values (default = current edgelist). (2) Implement a Tarjan SCC pass and expose --cycles to print only cycle members. (3) Document graph format choice in the MCP tool description so clients can pick the right format for downstream tooling (D3, Cytoscape, Graphviz).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions