Spolvero
spolvero turns docs-as-code diagrams into a Visio handoff package with preserved source, normalized IR, SVG/PNG previews, Data Visualizer workbooks for Mermaid flowcharts and topology inputs, QA reports, and explicit editability declarations.
The package treats source diagrams as canonical unless a project deliberately moves to a Visio-first workflow. Native Visio generation is intentionally conservative: the Data Visualizer workbook is the default cross-platform path, the vsdx-template engine produces a real .vsdx when the [vsdx] extra is installed, and visio-com currently probes Windows/Visio availability before cascading to downstream engines. Every engine records fallback downgrades in the manifest; native is reserved for future COM-created shapes/connectors.
See docs/using-the-package.md for what to do with the handoff folder once it has been generated.
Status: pre-1.0. The manifest and IR schemas are versioned, but the CLI and Python API may still change between minor releases. The visio-com engine does not create native COM shapes yet; it delegates to the engines below it.
Install
Requires Python 3.11 or later.
pip install spolvero
The core install is stdlib-only. Each extra unlocks one optional engine or input format and is feature-detected at runtime so it never blocks the default path.
pip install 'spolvero[vsdx]' # vsdx-template engine (cross-platform)
pip install 'spolvero[topology]' # YAML topology inputs (PyYAML)
pip install 'spolvero[com]' # visio-com engine (Windows + Visio Plan 2)
A Mermaid CLI (mmdc) on PATH is auto-detected for higher-fidelity Mermaid previews. Set SPOLVERO_DISABLE_MMDC=1 to force the built-in renderer.
Quick Start
spolvero build input.md --out ./handoff --target data-visualizer
For an input with one supported Mermaid flowchart, the output folder looks like this (<id> is the diagram id, such as diagram-001):
handoff/
├── manifest.json # everything that was built, plus warnings
├── README.md # auto-generated package overview
├── source/ # original input + per-diagram extracted source
├── normalized/<id>.ir.json # validated intermediate representation
├── preview/<id>.svg, <id>.png # always generated
├── visio/<id>-data-visualizer.xlsx
└── qa/<id>-qa.md, <id>-conversion-log.json
The workbook appears only for supported flowcharts and topology inputs; other diagrams are packaged as previews with reference editability. Open manifest.json for the summary and qa/<id>-qa.md for per-diagram warnings. The handoff guide walks through each file.
From a checkout without installation:
uv run spolvero build tests/fixtures/sample.md --out .tmp/sample-output --target data-visualizer
Python usage:
from pathlib import Path
from spolvero import build_package
build_package(Path("input.md"), Path("handoff"), "data-visualizer", title="Review")
Repository Layout
src/spolvero/: neutral Python library and CLI.src/spolvero/schemas/: versioned manifest and IR schemas.skills/codex/spolvero/: Codex-installable skill bundle generated from canonical docs and wrappers.skills/codex/spolvero-roundtrip/: Codex skill bundle for processing a reviewed.vsdx(coverage, layout patch, drift report).skills/codex/diagram-spec/: drawing rules and spec template for one-question approval diagrams drawn from a model view.skills/codex/visio-draw-polish/: draw a spec with the visio-local MCP, apply a temporary pywin32 polish (spec 06), validate, export and review.adapters/: Claude Code, GitHub Copilot, and generic agent install notes/instruction files.tests/: pytest coverage for extraction, Mermaid parsing, schemas, artifacts, adapters, and CLI smoke builds.
Validation
uv run pytest
uv run python -m compileall src tests
uv run spolvero build tests/fixtures/sample.md --out .tmp/ci-smoke --target data-visualizer
Generated packages are intentionally ignored by git.
Operating hygiene checks are also available:
uv run spolvero hygiene --report .tmp/operating-hygiene.md
uv run spolvero inspect-vsdx src/spolvero/templates/minimal_flowchart.vsdx --report .tmp/minimal-flowchart-vsdx.md
uv run spolvero sanitize-vsdx src/spolvero/templates/minimal_flowchart.vsdx --out .tmp/minimal-flowchart-sanitized.vsdx --report .tmp/minimal-flowchart-sanitized.md
See docs/declaratus-migration.md for post-import operating guidance.
Targets and Editability
| Target | Engine | Flowchart editability | Notes |
|---|---|---|---|
package-only |
internal_preview |
vector_reference |
Skips workbook generation. Even Mermaid flowcharts and topology IRs are downgraded to a vector reference because no Visio handoff artifact is produced. |
data-visualizer |
data_visualizer_xlsx |
semi_native |
Default semi-native path. Generates a Visio Data Visualizer workbook for supported Mermaid flowcharts and topology IRs with recognized nodes. Empty/failed topology parses are downgraded to reference previews with no empty workbook. |
vsdx-template |
vsdx_template_mutation |
semi_native (real .vsdx) |
Mutates a template via the [vsdx] extra to produce a real .vsdx for supported flowchart and topology IRs. Use --template PATH to override the bundled template. Unsupported inputs and missing extras/templates cascade with clear warnings. |
visio-com |
visio_com_automation |
delegated output editability | Probes Visio Plan 2 / Professional via COM (Windows + [com] extra), then currently delegates through vsdx-template and data-visualizer. A future true COM-native path will be the only source of native output. |
The manifest always records both requested_engine and actual_engine so engine fallbacks are visible without parsing warning strings.
The VSDX template stamp contract is documented in docs/vsdx-template-contract.md. The bundled template is intentionally minimal; richer templates can provide preferred flowchart, topology, and container stamp names while remaining synthetic and organization-agnostic.
Round-trip Review
When a vsdx-template file comes back from review in Visio, Spolvero keeps the reviewer's layout without editing your source. Every generated shape is stamped with its source id, so the reviewed file can be read back. Requires the [vsdx] extra.
# Capture reviewer positions, connector routes, and container bounds as a layout patch.
# --annotations-out also keeps shapes the reviewer added (callouts, notes) as a sidecar.
spolvero extract-layout reviewed.vsdx --out diagram-001.layout.yml \
--annotations-out diagram-001.annotations.yml
# Check what changed against the source: deleted or relabelled shapes,
# re-pointed connectors, stale source, or a file paired with the wrong diagram.
spolvero detect-drift handoff/normalized/diagram-001.ir.json reviewed.vsdx \
--source input.md --report drift.md
detect-drift exits 1 on high-severity drift. Stop there and review drift.md before rebuilding; only continue once the drift is understood or accepted.
# Rebuild with the reviewer's layout and annotations. Both flags are repeatable
# and matched to diagrams by id in multi-diagram packages.
spolvero build input.md --out handoff --target vsdx-template \
--layout-patch diagram-001.layout.yml --annotations diagram-001.annotations.yml
Routes keep endpoints, not waypoints, and annotations keep geometry and text only. See docs/round-trip-workflow.md for the full workflow and limits, and the spolvero-roundtrip agent skill for a scripted review run.
Inputs
- Mermaid flowchart (
.mmd, fenced```mermaidin Markdown) — primary input; full IR + workbook. - Mermaid sequence diagrams, PlantUML, Graphviz DOT, SVG, PNG, JPG, PDF — packaged as references with previews.
- Topology:
*.topology.yaml,*.topology.yml,*.topology.json, or fenced```topologyblocks. Raw source accepts node-levelcontainerandcontainers[].members; normalized IR resolves memberships into nodecontainer. Stencil kinds:router,switch,firewall,load_balancer,server,database,storage,client,cloud,internet,application,service,actor,datastore,external_system. Container kinds:subnet,zone,region,environment,vpc,system,boundary.
The name
Spolvero (Italian, spol-VEH-roh) is the Renaissance pouncing technique: an artist pricks holes along the lines of a finished drawing, then dusts pigment through them to transfer the design onto a wall or panel. The pricked cartoon is a deliberate intermediate — made for transfer, distinct from the original. This tool works the same way: it produces a transfer-ready rendering of a source diagram for the Visio surface, while the source stays canonical.
Security and License
Report vulnerabilities as described in SECURITY.md.
Spolvero is released under the MIT License. The bundled minimal_flowchart.vsdx template is redistributed under the BSD 3-Clause License; see src/spolvero/templates/LICENSE.txt.
Metadata
Release files for spolvero 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spolvero-0.7.1.tar.gz | 83.8 kB | With provenance | Details for spolvero-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spolvero-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for spolvero-0.7.1-py3-none-any.whl |
Total release size: 181.0 kB
Release files / spolvero-0.7.1.tar.gz
| Download URL | spolvero-0.7.1.tar.gz |
|---|---|
| Size | 83.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f10e2b68956c8c53c849468aaffe822f4ca09bbb3fd4ea1afb1915ea7b6d68d7
|
|
BLAKE2b-256 checksum How to use checksums |
11ef20046fbfe2723208ab2d51976d0411215cd302693eb0a7e48714c544244a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / spolvero-0.7.1-py3-none-any.whl
| Download URL | spolvero-0.7.1-py3-none-any.whl |
|---|---|
| Size | 97.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e25c0d75d4399d99022680ed65a40886942f4d1abc0cab058246ee26b84002d
|
|
BLAKE2b-256 checksum How to use checksums |
047ded770498d915f769fa612e431251d1e3c301e99c6f6bd91cefca1402f1a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for spolvero 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spolvero-0.7.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.