Skip to content

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

Open
yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-graph
Open

yadavchiragg wants to merge 1 commit 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.
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.

1 participant