-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Context
Split from #33 (CLI meta-issue). This issue adds flow visualization export to the CLI established in #44.
What to do
1. ASCII visualization
chainweaver viz <flow_name> --format ascii produces terminal-friendly output:
Linear flows:
[double] → [add_ten] → [format_result]
DAG flows (when #10 is implemented):
┌─[branch_a]─┐
[start]──┤ ├──[merge]
└─[branch_b]─┘
2. DOT (Graphviz) export
chainweaver viz <flow_name> --format dot produces valid DOT output:
digraph double_add_format {
double -> add_ten;
add_ten -> format_result;
}This enables chainweaver viz flow --format dot | dot -Tpng -o flow.png without ChainWeaver depending on Graphviz.
3. Default format
--format ascii is the default.
Files to modify
chainweaver/cli.py— addvizsubcommandtests/test_cli.py— add visualization tests
Acceptance Criteria
-
chainweaver viz <flow> --format asciiproduces ASCII visualization for linear flows -
chainweaver viz <flow> --format dotproduces valid DOT graph output - ASCII output uses arrow notation (
→) for step connections - DOT output is syntactically valid (can be parsed by Graphviz)
- Exit codes: 0 = success, 1 = flow not found
- At least 3 test cases: ASCII output correctness, DOT output validity, missing flow error
Out of Scope
- Web-based visualization
- Interactive TUI
- DAG visualization (can be added when Design and implement DAG-based flow model with topological execution #10 lands — for now, linear flows only)
- SVG/PNG rendering (users pipe DOT output to Graphviz themselves)
Dependencies
- Implement CLI entry point with
inspectcommand #44 (CLI entry point must exist first) - Optional: Design and implement DAG-based flow model with topological execution #10 (DAG model) for non-linear visualization
Part of CLI split from #33. See also: #44 (CLI entry + inspect), #45 (validate + check).
Reactions are currently unavailable