feat(mermaid): classDiagram + requirementDiagram emitters + CLI flags (v0.10.x M3)#228
Merged
Merged
Conversation
… (v0.10.x M3) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Rivet verification gate✅ 19/19 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
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.
Summary
emit_class_diagram(instance, opts)tospar-mermaid: one Mermaidclassblock per distinct AADL component type, with category stereotypes (<<system>>,<<thread>>, etc.) and feature attributes (+in data port foo). Respectscategories/max_depthfilters fromMermaidOptions.emit_requirement_diagram(yaml_path)tospar-mermaid: line-oriented parser (no new deps — mirrors the pattern inspar-sysml2) reads rivetrequirements.yamland emits MermaidrequirementDiagramblocks withsatisfies/verifies/derivesedges. Non-requirement types (e.g.design-decision) are silently skipped.spar emit --formatto acceptmermaid(default, flowchart, unchanged),mermaid-class(callsemit_class_diagram), andmermaid-req(callsemit_requirement_diagramagainstartifacts/requirements.yaml— no AADL files or--rootneeded).REQ-MERMAID-CLASS-001,REQ-MERMAID-REQ-001,TEST-MERMAID-CLASS,TEST-MERMAID-REQartifacts;rivet validateclean.Sample emitted Mermaid
classDiagram (
spar emit --format mermaid-class --root Emit_Test::TestSys.Impl):requirementDiagram (
spar emit --format mermaid-req, excerpt):Test plan
cargo test -p spar-mermaid— 12 tests pass (6 original + 6 new)cargo test -p spar --test emit_mermaid— 4 tests pass (2 original + 2 new)cargo clippy --workspace -- -D warnings— cleancargo fmt --check— cleanrivet validate— no errors (pre-existing WARNs only, unchanged)Follow-on to #220 / #222 (M3 milestone).
🤖 Generated with Claude Code