Skip to content

Feature Request: Export context graph to Mermaid.js / Graphviz DOT format for visual inspection #1287

Closed

Description

@Neelr1912

Is your feature request related to a problem? Please describe.

Currently, while the tool effectively maps out the code context and relationships, there is no quick, native way to visualize the generated graph. For large codebases, reading raw context data or JSON/text outputs can be overwhelming for developers trying to understand architectural boundaries or dependencies.

Describe the solution you'd like

I propose adding an export flag (e.g., --export-format=mermaid or --export-format=dot) that allows users to output the context graph into a standard visualization format.

  • Mermaid.js: Would allow users to paste the output directly into GitHub Markdown or Notion to visualize the context.
  • Graphviz DOT: Would allow for complex, locally rendered graph images.

Describe alternatives you've considered

Currently, users have to write custom parsers to translate the standard output of CodeGraphContext into a visual graph, which disrupts the workflow.

Additional context

This feature would make the tool much more accessible for onboarding new developers to a codebase, as they could instantly generate an architecture map based on the parsed context.

Activity

  1. github-actions commented on Jun 19, 2026

    @github-actions
    Contributor

    Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

  2. Neelr1912 commented on Jun 19, 2026

    @Neelr1912
    Author

    /assign gssoc

  3. m13v commented on Jun 24, 2026

    @m13v

    mermaid vs dot isn't really what decides whether this helps onboarding. a graph you export once and paste into a readme is accurate until the next refactor, then it quietly lies to the new contributor it was meant to help. the axis that actually matters is regeneration cadence, not render format. a static architecture map from three sprints ago onboards people into a codebase that no longer exists, and they trust it precisely because it looks authoritative. whatever export you ship, the value lives in how cheaply it re-runs as the graph drifts.

  4. Neelr1912 commented on Jun 24, 2026

    @Neelr1912
    Author

    That's a fair point. A stale architecture diagram can definitely become misleading if it's treated as documentation rather than a generated artifact.

    My intention with this feature isn't to encourage maintaining static diagrams manually, but to make the existing context graph easier to inspect and consume. Mermaid/DOT would simply be export targets for the graph that CodeGraphContext already generates.

    I agree that regeneration cadence is the more important factor for onboarding. Ideally, exported diagrams would be generated on demand (or even as part of CI/docs workflows) so they stay aligned with the current codebase rather than becoming a snapshot that slowly drifts.

    From that perspective, I see visualization and freshness as complementary concerns:

    • Export formats improve accessibility and understanding.
    • Automated regeneration ensures the visualization remains trustworthy.

    The feature request is mainly focused on lowering the friction of turning the generated graph into something developers can quickly explore, while keeping graph generation as the source of truth.

  5. moved this from Backlog tasks to In progress in CGC Progress Boardon Aug 19, 2026
  6. moved this from In progress to Done in CGC Progress Boardon Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions