feat(cli): spar emit --format mermaid subcommand (v0.10.x M2)#222
Open
avrabe wants to merge 2 commits into
Open
feat(cli): spar emit --format mermaid subcommand (v0.10.x M2)#222avrabe wants to merge 2 commits into
avrabe wants to merge 2 commits into
Conversation
Add `spar emit` CLI subcommand that wraps spar_mermaid::emit_flowchart, exposing flowchart generation to users via the existing parse/lower/instantiate pipeline. Flags: --root (required), --format mermaid, --category, --max-depth, --no-connections, -o/--output. Two integration tests added. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
# Conflicts: # artifacts/requirements.yaml # artifacts/verification.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Mermaid M1 (#220) landed
spar-mermaidwithemit_flowchart. This PR (M2) exposes it to users via a newspar emitCLI subcommand, completing the user-visible half of the Mermaid flowchart pipeline.Scope
spar render(SVG via etch) — not combined with itChanges
crates/spar-cli/Cargo.toml— addsspar-mermaid.workspace = truecrates/spar-cli/src/main.rs— dispatch entry"emit",cmd_emitfunction,parse_categoryhelper, updatedprint_usage()crates/spar-cli/tests/emit_mermaid.rs— 2 integration tests (happy path + category filter)artifacts/requirements.yaml—REQ-MERMAID-CLI-001artifacts/verification.yaml—TEST-MERMAID-CLIExample invocations
Sample output (from integration test fixture)
Links
rivet validatepasses (99 pre-existing warnings, no new errors)cargo test -p spar --test emit_mermaid— 2/2 passingcargo clippy -p spar -- -D warnings— cleancargo fmt --check— clean🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com