Skip to content

feat(cli): add concore graph to export a workflow as Mermaid or dot - #693

Merged
pradeeban merged 2 commits into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-graph
Nov 27, 2026
Merged

pradeeban merged 2 commits into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-graph

Conversation

@yadavchiragg

Copy link
Copy Markdown

Why

Workflows only exist as .graphml (yEd) files, so they can't be shown in a README, an issue or the docs without a screenshot. concore inspect gives counts, not the structure.

What

concore graph <workflow.graphml> [-f mermaid|dot] [-o file]

  • Mermaid (default) pastes straight into GitHub markdown
  • dot works with Graphviz (dot -Tsvg)
  • node labels and edge labels are shown; port-only nodes (IN:) display as IN
  • quotes in labels are escaped; edges pointing to unknown nodes are skipped
  • output goes through plain stdout, so it is not affected by rich markup/wrapping

Testing

  • tests/test_graph_command.py (7 tests)
  • ran it on all 129 bundled .graphml files; every Mermaid output renders with mmdc and every dot output passes dot -Tsvg
  • existing CLI tests unchanged, ruff clean

Docs

Added concore graph to concore_cli/README.md

Prints the workflow as a Mermaid flowchart or Graphviz dot graph (or writes it to a file) so it can be pasted into docs. Output verified with mmdc and dot on every bundled workflow. Tests and docs included.
@pradeeban

Copy link
Copy Markdown
Member

Merge conflicts. Pls check @yadavchiragg.

@pradeeban
pradeeban marked this pull request as draft November 27, 2026 03:13
@pradeeban
pradeeban marked this pull request as ready for review November 27, 2026 03:57
@pradeeban
pradeeban merged commit 416a0c4 into ControlCore-Project:dev Nov 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants