Problem
Mermaid is ideal for GitHub-native rendering but limited for high-fidelity output (precise
layout, SVG/PNG export, richer styling). This builds on the shipped Mermaid rendering to add
a more robust render engine for high-fidelity SVG/PNG, using crucible's render engine as a
reference (crucible/cmd/crucible/internal/render emits source under a Theme and renders
to SVG).
Why this is cheap to add
The emit layer is pluggable from issue 2: the robust engine is another Emitter behind
the same interface, consuming the same view model and the same Theme (issue 5). No
view-model or command rework is required - only a new emitter and a new --format value.
This is the payoff of building the seam up front, and the Mermaid path is already shipped.
Engine choice
Evaluate candidate approaches and select one during implementation; no maintainer
pre-decision is required. Evaluate crucible's approach and its alternatives when the work is
picked up, and record the choice in the PR. This does not commit to graphviz up front.
MVP-first structure
- Land an MVP high-fidelity render behind a new
Emitter and a new --format value,
selectable alongside the shipped Mermaid path.
- Confirm the MVP against golden fixtures and document it.
- Extend the MVP to full high fidelity (precise layout, richer styling, PNG export) after
the MVP is confirmed.
Scope
- A second
Emitter producing the high-fidelity format, selected via a new --format
value wired into issue 3's validation.
- Reuse the existing
Theme.
Tests (TDD)
- The MVP emitter is selectable via
--format and produces valid output for the same
fixtures used by the Mermaid goldens, covered by golden/unit tests.
- The Mermaid path is unaffected (regression guard on existing goldens).
- The high-fidelity extension is covered by golden/unit tests once the MVP is confirmed.
Acceptance
- An MVP high-fidelity render is selectable via
--format, additive to Mermaid, with no
change to the view model or command structure, and is covered by golden/unit tests and
documented.
- The full high-fidelity extension follows after the MVP is confirmed, under the same seam.
Dependencies
#301 (the pluggable emitter). Builds on the shipped Mermaid rendering.
Problem
Mermaid is ideal for GitHub-native rendering but limited for high-fidelity output (precise
layout, SVG/PNG export, richer styling). This builds on the shipped Mermaid rendering to add
a more robust render engine for high-fidelity SVG/PNG, using crucible's render engine as a
reference (
crucible/cmd/crucible/internal/renderemits source under aThemeand rendersto SVG).
Why this is cheap to add
The emit layer is pluggable from issue 2: the robust engine is another
Emitterbehindthe same interface, consuming the same view model and the same
Theme(issue 5). Noview-model or command rework is required - only a new emitter and a new
--formatvalue.This is the payoff of building the seam up front, and the Mermaid path is already shipped.
Engine choice
Evaluate candidate approaches and select one during implementation; no maintainer
pre-decision is required. Evaluate crucible's approach and its alternatives when the work is
picked up, and record the choice in the PR. This does not commit to graphviz up front.
MVP-first structure
Emitterand a new--formatvalue,selectable alongside the shipped Mermaid path.
the MVP is confirmed.
Scope
Emitterproducing the high-fidelity format, selected via a new--formatvalue wired into issue 3's validation.
Theme.Tests (TDD)
--formatand produces valid output for the samefixtures used by the Mermaid goldens, covered by golden/unit tests.
Acceptance
--format, additive to Mermaid, with nochange to the view model or command structure, and is covered by golden/unit tests and
documented.
Dependencies
#301 (the pluggable emitter). Builds on the shipped Mermaid rendering.