feat(cli): spar emit --format mermaid subcommand (v0.10.x M2)#222
Merged
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
Rivet verification gate✅ 14/14 passed
Filter: Failed artifacts(none) Updated automatically by |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced May 18, 2026
avrabe
added a commit
that referenced
this pull request
May 20, 2026
v0.10.0 ships: **Mermaid emission (M1 + M2 + M3)** - spar-mermaid foundation crate with `emit_flowchart` (#220) - `spar emit --format mermaid` CLI subcommand (#222) - `emit_class_diagram` + `emit_requirement_diagram` + matching CLI flags `--format mermaid-class` / `mermaid-req` (#228) **Soundness deepening** - Lean 4 sorry-free proofs of end-to-end latency monotonicity and ARINC 653 partition isolation, alongside the pre-existing RTA / EDF / Network Calculus proofs (#223) - Kani BMC harnesses on generated-code AADL contract preservation (thread Period, port Direction, bus access right) — spar's Logika-equivalent strategy for verified codegen (#224) **Safety analysis** - EMV2 error-propagation traversal across the AADL connection graph (closes the #1 gap vs OSATE/HAMR in safety-case reviews) (#225) **Verification infrastructure** - Rivet-driven verification gate that executes every artifact's `fields.steps[].run` commands and posts a sticky PR comment with pass/fail counts and failed artifact IDs (#221) - Workflow tuning: gate timeout 30→60 min for future Mathlib-heavy workloads; TEST-PROOF-* stay on sorry-grep until lake cache lands (#227, #229, #230) **Chore** - Pruned stale dev artifacts (.playwright-mcp logs + dashboard-render PNGs) and tightened gitignore (#226) Bumps Cargo.toml + vscode-spar/package.json from 0.9.3 → 0.10.0. The release workflow's `check-versions` job enforces tag/Cargo/vsix agreement, so these must move together with the v0.10.0 tag push. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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