Skip to content

v0.7.0 Release Notes

Release Date: 2026-07-19

Summary

Native SVG renderer for capability stacks, enabling portable marketecture diagrams with two layout options: layered stack (for comprehensive architecture documentation) and hexagonal hub-and-spoke (for executive summaries and smaller stacks).

What's New

Native SVG Renderer

A pure Go SVG renderer (render.RenderSVG) that generates production-ready diagrams from the canonical CapabilityStack IR.

Features: - Two layout modes: stack (layered marketecture) and hub (hexagonal hub-and-spoke) - Themeable colors, accents, and typography - Per-layer accent color cycling - Smart capability cell wrapping with configurable node density - Extracted tooling display on hub nodes with fallback to capability count - Zero external dependencies (stdlib + xml.EscapeText for safe markup)

Stack Layout: - Horizontal bands per layer - Capability cells with wrapping - Applications band on top - Substrate band on bottom - Per-layer accent stripe for visual hierarchy

Hub Layout: - Central hexagon (hub) for the core entity - One node per layer arranged on a ring - Spokes connecting layers to center - Substrate band at the bottom - Best for 4-8 layer stacks

CLI Integration

Added svg format to capstack render command:

capstack render stack.json -f svg --layout stack -o stack.svg
capstack render stack.json -f svg --layout hub --substrate "Go · K8s · Providers" -o hub.svg

New Flags: - --layout (stack|hub): Select diagram layout (default: stack) - --substrate: Text for the substrate/foundation band

Output files with .svg extension auto-detect to SVG format.

Testing

Comprehensive test coverage for both layouts: - Stack layout text wrapping and band layout - Hub layout node positioning and tooling aggregation - Tooling fallback to capability count when tooling is empty - Error handling for unknown layout values

Commits

  • cbc54d3 feat(render): add native SVG renderer for capability stacks
  • 010b027 test(render): add SVG renderer tests
  • 5ca5cfc feat(cli): add svg format to render command

Use Cases

Documentation

Generate portable SVG diagrams for README files, wikis, and blog posts:

capstack render capabilities.json -f svg --substrate "Go · Kubernetes · OpenTelemetry" -o architecture.svg

Executive Presentations

Create clean hexagonal hub-and-spoke diagrams for presentations:

capstack render capabilities.json -f svg --layout hub \
  --substrate "Built on Go with 15+ provider integrations" -o platform.svg

Website Integration

Embed SVG in website documentation and blogs (as used in PlexusOne's platform architecture documentation).

Custom Rendering Pipelines

Use the render.SVG* types and functions in Go programs for programmatic diagram generation:

import "github.com/grokify/prism-capability/render"

doc, _ := capstack.LoadFromFile("stack.json")
opts := render.DefaultSVGOptions()
opts.Layout = render.SVGLayoutHub
opts.Substrate = "Cloud-Native Infrastructure"

svg, _ := render.RenderSVGString(doc, opts)

Themeing

All colors are customizable via SVGTheme:

opts := render.DefaultSVGOptions()
opts.Theme = render.SVGTheme{
  Background: "#0a0e1a",
  Surface: "#1e293b",
  Text: "#f1f5f9",
  TextMuted: "#94a3b8",
  CellText: "#cbd5e1",
  Accents: []string{"#06b6d4", "#8b5cf6", "#ec4899"},
  HubGradient: []string{"#06b6d4", "#8b5cf6", "#ec4899"},
}

Dependencies

No new external dependencies. The renderer uses only: - Go standard library (encoding/json, encoding/xml, fmt, io, math, sort, strings) - Existing prism-capability types and interfaces

Breaking Changes

None. This is a pure feature addition with backward compatibility.

Migration Guide

No migration required. Existing users can opt-in to SVG rendering:

# Old way (D2 → SVG via D2 CLI)
capstack render stack.json | d2 - stack.svg

# New way (direct SVG)
capstack render stack.json -f svg -o stack.svg

Direct SVG rendering eliminates the D2 CLI dependency for portability.

Known Limitations

  1. Hub layout is recommended for stacks with 4-8 layers. Stacks with >10 layers may have overlapping nodes.
  2. Stack layout capability cell text may wrap or truncate if cell names are very long (>50 characters).
  3. SVG is rendered as a single static image; interactive drill-down is available via the HTML/Lit renderers.

Next Steps

Potential enhancements for future releases: - Interactive SVG with embedded JavaScript (hover tooltips, click drill-down) - SVG animation and transitions - Customizable node shapes and geometry for hub layout - Advanced font metrics for more accurate text wrapping