spolvero 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. spolvero-0.3.0/.gitattributes +2 -0
  2. spolvero-0.3.0/.github/copilot-instructions.md +8 -0
  3. spolvero-0.3.0/.github/instructions/spolvero.instructions.md +16 -0
  4. spolvero-0.3.0/.github/workflows/ci.yml +33 -0
  5. spolvero-0.3.0/.github/workflows/release.yml +69 -0
  6. spolvero-0.3.0/.gitignore +20 -0
  7. spolvero-0.3.0/AGENTS.md +34 -0
  8. spolvero-0.3.0/CLAUDE.md +6 -0
  9. spolvero-0.3.0/HANDOFF.md +29 -0
  10. spolvero-0.3.0/PKG-INFO +106 -0
  11. spolvero-0.3.0/README.md +90 -0
  12. spolvero-0.3.0/adapters/claude/.claude/skills/spolvero/SKILL.md +37 -0
  13. spolvero-0.3.0/adapters/claude/CLAUDE.md +12 -0
  14. spolvero-0.3.0/adapters/claude/INSTALL.md +21 -0
  15. spolvero-0.3.0/adapters/copilot/.github/copilot-instructions.md +8 -0
  16. spolvero-0.3.0/adapters/copilot/.github/instructions/spolvero.instructions.md +16 -0
  17. spolvero-0.3.0/adapters/copilot/INSTALL.md +11 -0
  18. spolvero-0.3.0/adapters/generic/AGENTS.md +19 -0
  19. spolvero-0.3.0/docs/agent-usage.md +17 -0
  20. spolvero-0.3.0/docs/agents/architecture.md +123 -0
  21. spolvero-0.3.0/docs/agents/extending.md +105 -0
  22. spolvero-0.3.0/docs/agents/glossary.md +24 -0
  23. spolvero-0.3.0/docs/agents/recipes.md +123 -0
  24. spolvero-0.3.0/docs/current-state.md +142 -0
  25. spolvero-0.3.0/docs/declaratus-migration.md +88 -0
  26. spolvero-0.3.0/docs/feature-expansion/template-testing-lessons.md +207 -0
  27. spolvero-0.3.0/docs/qa-findings-plan.md +101 -0
  28. spolvero-0.3.0/docs/support-matrix.md +85 -0
  29. spolvero-0.3.0/docs/topology-ir.md +105 -0
  30. spolvero-0.3.0/docs/using-the-package.md +123 -0
  31. spolvero-0.3.0/pyproject.toml +40 -0
  32. spolvero-0.3.0/skills/codex/spolvero/SKILL.md +85 -0
  33. spolvero-0.3.0/skills/codex/spolvero/agents/openai.yaml +4 -0
  34. spolvero-0.3.0/skills/codex/spolvero/references/support-matrix.md +85 -0
  35. spolvero-0.3.0/skills/codex/spolvero/scripts/spolvero_packager.py +25 -0
  36. spolvero-0.3.0/src/spolvero/__init__.py +7 -0
  37. spolvero-0.3.0/src/spolvero/builder.py +200 -0
  38. spolvero-0.3.0/src/spolvero/cli.py +118 -0
  39. spolvero-0.3.0/src/spolvero/constants.py +55 -0
  40. spolvero-0.3.0/src/spolvero/engines/__init__.py +102 -0
  41. spolvero-0.3.0/src/spolvero/engines/data_visualizer.py +56 -0
  42. spolvero-0.3.0/src/spolvero/engines/package_only.py +28 -0
  43. spolvero-0.3.0/src/spolvero/engines/visio_com.py +118 -0
  44. spolvero-0.3.0/src/spolvero/engines/vsdx_template.py +251 -0
  45. spolvero-0.3.0/src/spolvero/hygiene.py +205 -0
  46. spolvero-0.3.0/src/spolvero/inspection.py +222 -0
  47. spolvero-0.3.0/src/spolvero/ir.py +248 -0
  48. spolvero-0.3.0/src/spolvero/models.py +19 -0
  49. spolvero-0.3.0/src/spolvero/render.py +564 -0
  50. spolvero-0.3.0/src/spolvero/reports.py +180 -0
  51. spolvero-0.3.0/src/spolvero/schema.py +65 -0
  52. spolvero-0.3.0/src/spolvero/schemas/__init__.py +2 -0
  53. spolvero-0.3.0/src/spolvero/schemas/ir.schema.json +83 -0
  54. spolvero-0.3.0/src/spolvero/schemas/manifest.schema.json +74 -0
  55. spolvero-0.3.0/src/spolvero/schemas/topology.schema.json +85 -0
  56. spolvero-0.3.0/src/spolvero/source.py +160 -0
  57. spolvero-0.3.0/src/spolvero/templates/LICENSE.txt +42 -0
  58. spolvero-0.3.0/src/spolvero/templates/minimal_flowchart.vsdx +0 -0
  59. spolvero-0.3.0/src/spolvero/topology/__init__.py +27 -0
  60. spolvero-0.3.0/src/spolvero/topology/model.py +275 -0
  61. spolvero-0.3.0/src/spolvero/utils.py +57 -0
  62. spolvero-0.3.0/src/spolvero/workbook.py +200 -0
  63. spolvero-0.3.0/tests/__init__.py +2 -0
  64. spolvero-0.3.0/tests/_paths.py +12 -0
  65. spolvero-0.3.0/tests/fixtures/sample-network.topology.yaml +50 -0
  66. spolvero-0.3.0/tests/fixtures/sample-sequence.mmd +15 -0
  67. spolvero-0.3.0/tests/fixtures/sample-trd.topology.json +22 -0
  68. spolvero-0.3.0/tests/fixtures/sample.dot +12 -0
  69. spolvero-0.3.0/tests/fixtures/sample.md +34 -0
  70. spolvero-0.3.0/tests/fixtures/sample.png +0 -0
  71. spolvero-0.3.0/tests/fixtures/sample.puml +13 -0
  72. spolvero-0.3.0/tests/fixtures/sample.svg +76 -0
  73. spolvero-0.3.0/tests/fixtures/simple.mmd +4 -0
  74. spolvero-0.3.0/tests/fixtures/synthetic-rich.mmd +32 -0
  75. spolvero-0.3.0/tests/test_cli.py +125 -0
  76. spolvero-0.3.0/tests/test_engine_registry.py +112 -0
  77. spolvero-0.3.0/tests/test_extraction.py +30 -0
  78. spolvero-0.3.0/tests/test_hygiene.py +109 -0
  79. spolvero-0.3.0/tests/test_mermaid_ir.py +36 -0
  80. spolvero-0.3.0/tests/test_optional_tools.py +67 -0
  81. spolvero-0.3.0/tests/test_package_build.py +104 -0
  82. spolvero-0.3.0/tests/test_topology_ir.py +266 -0
  83. spolvero-0.3.0/tests/test_visio_com.py +104 -0
  84. spolvero-0.3.0/tests/test_vsdx_inspection.py +106 -0
  85. spolvero-0.3.0/tests/test_vsdx_template.py +143 -0
  86. spolvero-0.3.0/tests/test_workbook.py +83 -0
  87. spolvero-0.3.0/tests/validation/test_skill_adapters.py +53 -0
  88. spolvero-0.3.0/uv.lock +281 -0
@@ -0,0 +1,2 @@
1
+ * text=auto eol=lf
2
+
@@ -0,0 +1,8 @@
1
+ # Repository Instructions
2
+
3
+ For Visio handoff work, use the `spolvero` CLI or Python API. Preserve source diagrams, generate previews, produce Data Visualizer workbooks for supported Mermaid flowcharts, and keep QA reports with explicit warnings.
4
+
5
+ Do not claim native Visio fidelity unless the output is actually `native`. Use `semi_native`, `vector_reference`, or `raster_reference` when appropriate.
6
+
7
+ For any code change in this repo, start at [docs/agents/architecture.md](../docs/agents/architecture.md) and [docs/agents/recipes.md](../docs/agents/recipes.md). To add new engines or input types see [docs/agents/extending.md](../docs/agents/extending.md).
8
+
@@ -0,0 +1,16 @@
1
+ ---
2
+ applyTo: "**/*.{md,mmd,mermaid,puml,plantuml,dot,gv,svg,png,jpg,jpeg,pdf}"
3
+ ---
4
+
5
+ # Visio Handoff
6
+
7
+ Use:
8
+
9
+ ```bash
10
+ spolvero build INPUT --out DIR --target data-visualizer
11
+ ```
12
+
13
+ Expected outputs include `manifest.json`, `README.md`, `source/`, `normalized/`, `preview/`, `visio/`, and `qa/`.
14
+
15
+ For unsupported diagrams, still preserve the source and generate preview/reference artifacts with a clear `vector_reference` or `raster_reference` editability declaration.
16
+
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, windows-latest]
15
+ python-version: ["3.11", "3.13"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: astral-sh/setup-uv@v6
20
+ with:
21
+ enable-cache: true
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ - name: Compile
26
+ run: uv run python -m compileall src tests
27
+ - name: Test
28
+ run: uv run pytest
29
+ - name: CLI smoke
30
+ run: uv run spolvero build tests/fixtures/sample.md --out .tmp/ci-smoke --target data-visualizer --title "CI Smoke"
31
+ - name: Assert generated artifacts
32
+ run: uv run python -c "import json, pathlib, zipfile; root=pathlib.Path('.tmp/ci-smoke'); manifest=json.loads((root/'manifest.json').read_text()); assert manifest['schema_version']=='1.0.0'; assert len(manifest['diagrams'])==3; assert (root/'preview/diagram-001.png').read_bytes().startswith(b'\x89PNG\r\n\x1a\n'); assert zipfile.is_zipfile(root/'visio/diagram-001-data-visualizer.xlsx')"
33
+
@@ -0,0 +1,69 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ name: Build sdist + wheel
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+
17
+ - uses: actions/setup-python@v6
18
+ with:
19
+ python-version: "3.13"
20
+
21
+ - name: Install build tooling
22
+ run: python -m pip install --upgrade build twine
23
+
24
+ - name: Build distributions
25
+ run: python -m build
26
+
27
+ - name: Check distributions
28
+ run: python -m twine check dist/*
29
+
30
+ - uses: actions/upload-artifact@v7
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+ if-no-files-found: error
35
+
36
+ pypi-publish:
37
+ name: Publish to PyPI
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment:
41
+ name: pypi
42
+ url: https://pypi.org/p/spolvero
43
+ permissions:
44
+ id-token: write
45
+ steps:
46
+ - uses: actions/download-artifact@v8
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+
51
+ - uses: pypa/gh-action-pypi-publish@release/v1
52
+
53
+ github-release:
54
+ name: Create GitHub Release
55
+ needs: build
56
+ runs-on: ubuntu-latest
57
+ permissions:
58
+ contents: write
59
+ steps:
60
+ - uses: actions/download-artifact@v8
61
+ with:
62
+ name: dist
63
+ path: dist/
64
+
65
+ - uses: softprops/action-gh-release@v3
66
+ with:
67
+ files: dist/*
68
+ generate_release_notes: true
69
+ draft: false
@@ -0,0 +1,20 @@
1
+ .venv/
2
+ .pytest_cache/
3
+ pytest-cache-files-*/
4
+ .mypy_cache/
5
+ .ruff_cache/
6
+ .uv-cache/
7
+ .tmp/
8
+ build/
9
+ dist/
10
+ *.egg-info/
11
+ __pycache__/
12
+ *.py[cod]
13
+ *.log
14
+ *.bak-*
15
+ /spolvero/
16
+ /spolvero-*/
17
+ /sample-output/
18
+ /generated/
19
+ /packages/
20
+ .codex/
@@ -0,0 +1,34 @@
1
+ # Agent Instructions
2
+
3
+ Use the Python CLI first:
4
+
5
+ ```bash
6
+ spolvero build INPUT --out DIR --target package-only|data-visualizer|vsdx-template|visio-com --title TITLE
7
+ ```
8
+
9
+ For source checkouts, prefer `uv run spolvero ...` or `uv run python -m spolvero.cli ...`.
10
+
11
+ When producing Visio handoff packages:
12
+
13
+ - Preserve original source and extracted diagram source.
14
+ - Generate normalized IR where supported.
15
+ - Generate previews every time.
16
+ - Use Data Visualizer workbooks for supported flowcharts and topology/TRD inputs with recognized nodes.
17
+ - Declare editability honestly as `native`, `semi_native`, `vector_reference`, or `raster_reference`.
18
+ - Keep QA reports and conversion logs with explicit warnings.
19
+ - Treat Mermaid/Markdown source as canonical unless the user explicitly chooses a Visio-first lifecycle.
20
+
21
+ Do not promise perfect round-trip Visio conversion. `vsdx-template` produces a real `.vsdx` for supported flowcharts when the `[vsdx]` extra is installed and otherwise falls back with a clear warning. `visio-com` is hard-gated on Windows + Visio Plan 2 + the `[com]` extra, but the native COM body is not implemented yet; it cascades through `vsdx-template` then `data-visualizer` and must not relabel delegated output as `native`.
22
+
23
+ ## Coding-agent docs
24
+
25
+ When modifying this codebase, start with:
26
+
27
+ - [HANDOFF.md](HANDOFF.md) — latest queue, migration posture, and validation commands.
28
+ - [docs/agents/architecture.md](docs/agents/architecture.md) — module map, data flow, engine registry, conventions.
29
+ - [docs/agents/extending.md](docs/agents/extending.md) — how to add engines, source IRs, optional renderers, and stencil kinds.
30
+ - [docs/agents/recipes.md](docs/agents/recipes.md) — common workflows (smoke build, force engine, custom template, debug fallbacks).
31
+ - [docs/agents/glossary.md](docs/agents/glossary.md) — vocabulary.
32
+ - [docs/topology-ir.md](docs/topology-ir.md) — network / TRD IR reference.
33
+ - [docs/current-state.md](docs/current-state.md) — live status and roadmap.
34
+ - [docs/declaratus-migration.md](docs/declaratus-migration.md) — migration readiness checklist and feature split.
@@ -0,0 +1,6 @@
1
+ # Claude Code Instructions
2
+
3
+ Follow the shared repository guidance in `AGENTS.md`.
4
+
5
+ For Claude Code project skill installs, copy or symlink `adapters/claude/.claude/skills/spolvero/` into the target project and keep the CLI available with either an installed package or `uv run spolvero`.
6
+
@@ -0,0 +1,29 @@
1
+ # Handoff
2
+
3
+ Latest durable queue for `spolvero`.
4
+
5
+ ## Current State
6
+
7
+ - Core goal is unchanged: package docs-as-code diagrams into Visio-friendly handoff artifacts with honest editability declarations.
8
+ - `main` should remain ready for a fresh-history Declaratus import from the GitHub ZIP export.
9
+ - Generated package output, local smoke packages, and external review material belong under ignored `.tmp/` or another local-only path.
10
+ - The bundled `src/spolvero/templates/minimal_flowchart.vsdx` is the only approved tracked `.vsdx` template. It is derived from the BSD-licensed `vsdx` Python package fixture and documented in `src/spolvero/templates/LICENSE.txt`.
11
+
12
+ ## Migration Readiness Commands
13
+
14
+ ```bash
15
+ uv run spolvero hygiene --report .tmp/migration-hygiene.md
16
+ uv run spolvero inspect-vsdx src/spolvero/templates/minimal_flowchart.vsdx --report .tmp/minimal-flowchart-vsdx.md
17
+ uv run pytest -rs
18
+ uv run python -m compileall src tests
19
+ uv run spolvero build tests/fixtures/sample.md --out .tmp/ci-smoke --target data-visualizer
20
+ uv run spolvero build tests/fixtures/sample-trd.topology.json --out .tmp/topology-json-smoke --target data-visualizer --title "Topology JSON Smoke"
21
+ git diff --check
22
+ ```
23
+
24
+ ## Next Work Queue
25
+
26
+ 1. Keep the hygiene gate green as docs and fixtures change.
27
+ 2. Use `docs/declaratus-migration.md` as the readiness checklist before creating the Declaratus repo.
28
+ 3. Defer Declaratus-specific templates, stencils, branded scenarios, topology `.vsdx` generation, and true COM-native output until after migration.
29
+ 4. Recreate `.tmp` smoke packages in the new repo from committed fixtures instead of copying local outputs.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: spolvero
3
+ Version: 0.3.0
4
+ Summary: Package docs-as-code diagrams into Visio-friendly handoff artifacts.
5
+ Author: Spolvero maintainers
6
+ License: MIT
7
+ Keywords: data-visualizer,diagram,handoff,mermaid,visio
8
+ Requires-Python: >=3.11
9
+ Provides-Extra: com
10
+ Requires-Dist: pywin32>=306; (platform_system == 'Windows') and extra == 'com'
11
+ Provides-Extra: topology
12
+ Requires-Dist: pyyaml>=6.0; extra == 'topology'
13
+ Provides-Extra: vsdx
14
+ Requires-Dist: vsdx>=0.5; extra == 'vsdx'
15
+ Description-Content-Type: text/markdown
16
+
17
+ # Spolvero
18
+
19
+ `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.
20
+
21
+ 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.
22
+
23
+ See [docs/using-the-package.md](docs/using-the-package.md) for what to do with the handoff folder once it has been generated.
24
+
25
+ ## Quick Start
26
+
27
+ ```bash
28
+ spolvero build input.md --out ./handoff --target data-visualizer
29
+ ```
30
+
31
+ From a checkout without installation:
32
+
33
+ ```bash
34
+ uv run spolvero build tests/fixtures/sample.md --out .tmp/sample-output --target data-visualizer
35
+ ```
36
+
37
+ Python usage:
38
+
39
+ ```python
40
+ from pathlib import Path
41
+
42
+ from spolvero import build_package
43
+
44
+ build_package(Path("input.md"), Path("handoff"), "data-visualizer", title="Review")
45
+ ```
46
+
47
+ ## Repository Layout
48
+
49
+ - `src/spolvero/`: neutral Python library and CLI.
50
+ - `src/spolvero/schemas/`: versioned manifest and IR schemas.
51
+ - `skills/codex/spolvero/`: Codex-installable skill bundle generated from canonical docs and wrappers.
52
+ - `adapters/`: Claude Code, GitHub Copilot, and generic agent install notes/instruction files.
53
+ - `tests/`: pytest coverage for extraction, Mermaid parsing, schemas, artifacts, adapters, and CLI smoke builds.
54
+
55
+ ## Validation
56
+
57
+ ```bash
58
+ uv run pytest
59
+ uv run python -m compileall src tests
60
+ uv run spolvero build tests/fixtures/sample.md --out .tmp/ci-smoke --target data-visualizer
61
+ ```
62
+
63
+ Generated packages are intentionally ignored by git.
64
+
65
+ Migration hygiene checks are also available:
66
+
67
+ ```bash
68
+ uv run spolvero hygiene --report .tmp/migration-hygiene.md
69
+ uv run spolvero inspect-vsdx src/spolvero/templates/minimal_flowchart.vsdx --report .tmp/minimal-flowchart-vsdx.md
70
+ ```
71
+
72
+ See [docs/declaratus-migration.md](docs/declaratus-migration.md) for the fresh-history Declaratus import checklist.
73
+
74
+ ## Optional Extras
75
+
76
+ 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.
77
+
78
+ ```bash
79
+ pip install spolvero # stdlib-only default
80
+ pip install 'spolvero[vsdx]' # vsdx-template engine (cross-platform)
81
+ pip install 'spolvero[topology]' # YAML topology inputs (PyYAML)
82
+ pip install 'spolvero[com]' # visio-com engine (Windows + Visio Plan 2)
83
+ ```
84
+
85
+ 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.
86
+
87
+ ## Targets and Editability
88
+
89
+ | Target | Engine | Flowchart editability | Notes |
90
+ |---|---|---|---|
91
+ | `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. |
92
+ | `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. |
93
+ | `vsdx-template` | `vsdx_template_mutation` | `semi_native` (real `.vsdx`) | Mutates a template via the [`vsdx`] extra to produce a real `.vsdx` for supported flowcharts. Use `--template PATH` to override the bundled template. Unsupported inputs and missing extras/templates cascade with clear warnings. |
94
+ | `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. |
95
+
96
+ The manifest always records both `requested_engine` and `actual_engine` so engine fallbacks are visible without parsing warning strings.
97
+
98
+ ## Inputs
99
+
100
+ - Mermaid flowchart (`.mmd`, fenced ` ```mermaid ` in Markdown) — primary input; full IR + workbook.
101
+ - Mermaid sequence diagrams, PlantUML, Graphviz DOT, SVG, PNG, JPG, PDF — packaged as references with previews.
102
+ - Topology: `*.topology.yaml`, `*.topology.yml`, `*.topology.json`, or fenced ` ```topology ` blocks. Raw source accepts node-level `container` and `containers[].members`; normalized IR resolves memberships into node `container`. 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`.
103
+
104
+ ## The name
105
+
106
+ 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.
@@ -0,0 +1,90 @@
1
+ # Spolvero
2
+
3
+ `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.
4
+
5
+ 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.
6
+
7
+ See [docs/using-the-package.md](docs/using-the-package.md) for what to do with the handoff folder once it has been generated.
8
+
9
+ ## Quick Start
10
+
11
+ ```bash
12
+ spolvero build input.md --out ./handoff --target data-visualizer
13
+ ```
14
+
15
+ From a checkout without installation:
16
+
17
+ ```bash
18
+ uv run spolvero build tests/fixtures/sample.md --out .tmp/sample-output --target data-visualizer
19
+ ```
20
+
21
+ Python usage:
22
+
23
+ ```python
24
+ from pathlib import Path
25
+
26
+ from spolvero import build_package
27
+
28
+ build_package(Path("input.md"), Path("handoff"), "data-visualizer", title="Review")
29
+ ```
30
+
31
+ ## Repository Layout
32
+
33
+ - `src/spolvero/`: neutral Python library and CLI.
34
+ - `src/spolvero/schemas/`: versioned manifest and IR schemas.
35
+ - `skills/codex/spolvero/`: Codex-installable skill bundle generated from canonical docs and wrappers.
36
+ - `adapters/`: Claude Code, GitHub Copilot, and generic agent install notes/instruction files.
37
+ - `tests/`: pytest coverage for extraction, Mermaid parsing, schemas, artifacts, adapters, and CLI smoke builds.
38
+
39
+ ## Validation
40
+
41
+ ```bash
42
+ uv run pytest
43
+ uv run python -m compileall src tests
44
+ uv run spolvero build tests/fixtures/sample.md --out .tmp/ci-smoke --target data-visualizer
45
+ ```
46
+
47
+ Generated packages are intentionally ignored by git.
48
+
49
+ Migration hygiene checks are also available:
50
+
51
+ ```bash
52
+ uv run spolvero hygiene --report .tmp/migration-hygiene.md
53
+ uv run spolvero inspect-vsdx src/spolvero/templates/minimal_flowchart.vsdx --report .tmp/minimal-flowchart-vsdx.md
54
+ ```
55
+
56
+ See [docs/declaratus-migration.md](docs/declaratus-migration.md) for the fresh-history Declaratus import checklist.
57
+
58
+ ## Optional Extras
59
+
60
+ 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.
61
+
62
+ ```bash
63
+ pip install spolvero # stdlib-only default
64
+ pip install 'spolvero[vsdx]' # vsdx-template engine (cross-platform)
65
+ pip install 'spolvero[topology]' # YAML topology inputs (PyYAML)
66
+ pip install 'spolvero[com]' # visio-com engine (Windows + Visio Plan 2)
67
+ ```
68
+
69
+ 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.
70
+
71
+ ## Targets and Editability
72
+
73
+ | Target | Engine | Flowchart editability | Notes |
74
+ |---|---|---|---|
75
+ | `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. |
76
+ | `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. |
77
+ | `vsdx-template` | `vsdx_template_mutation` | `semi_native` (real `.vsdx`) | Mutates a template via the [`vsdx`] extra to produce a real `.vsdx` for supported flowcharts. Use `--template PATH` to override the bundled template. Unsupported inputs and missing extras/templates cascade with clear warnings. |
78
+ | `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. |
79
+
80
+ The manifest always records both `requested_engine` and `actual_engine` so engine fallbacks are visible without parsing warning strings.
81
+
82
+ ## Inputs
83
+
84
+ - Mermaid flowchart (`.mmd`, fenced ` ```mermaid ` in Markdown) — primary input; full IR + workbook.
85
+ - Mermaid sequence diagrams, PlantUML, Graphviz DOT, SVG, PNG, JPG, PDF — packaged as references with previews.
86
+ - Topology: `*.topology.yaml`, `*.topology.yml`, `*.topology.json`, or fenced ` ```topology ` blocks. Raw source accepts node-level `container` and `containers[].members`; normalized IR resolves memberships into node `container`. 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`.
87
+
88
+ ## The name
89
+
90
+ 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.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: spolvero
3
+ description: Build Visio handoff packages from Mermaid, Markdown diagram fences, PlantUML, Graphviz/DOT, or reference artifacts with source preservation, previews, normalized IR, Data Visualizer workbooks, QA reports, and editability declarations.
4
+ ---
5
+
6
+ # Spolvero
7
+
8
+ Use the neutral CLI:
9
+
10
+ ```bash
11
+ spolvero build input.md --out ./spolvero --target data-visualizer
12
+ ```
13
+
14
+ For source checkouts:
15
+
16
+ ```bash
17
+ uv run spolvero build input.md --out ./spolvero --target data-visualizer
18
+ ```
19
+
20
+ Core rules:
21
+
22
+ - Preserve the original input and extracted diagram source.
23
+ - Generate previews every time.
24
+ - Generate normalized IR where supported.
25
+ - Use Data Visualizer workbooks for Mermaid flowcharts and topology/TRD inputs with recognized nodes when semi-native Visio handoff is requested.
26
+ - Never promise perfect round-trip conversion.
27
+ - Declare editability as `native`, `semi_native`, `vector_reference`, or `raster_reference`.
28
+ - Tell the user which artifact to open first and whether durable edits belong in source or only in Visio.
29
+
30
+ Optional extras (default install is stdlib-only):
31
+
32
+ - `[vsdx]` enables the cross-platform `vsdx-template` engine (real `.vsdx` output).
33
+ - `[topology]` enables YAML topology / TRD inputs.
34
+ - `[com]` enables the Windows-only `visio-com` probe path; current output delegates downstream and preserves delegated editability.
35
+
36
+ The manifest always records `requested_engine` and `actual_engine`; report fallbacks honestly.
37
+
@@ -0,0 +1,12 @@
1
+ # Claude Code Project Instructions
2
+
3
+ Follow the shared agent guidance in `AGENTS.md` when present. For Visio handoff work, use the `spolvero` CLI and keep source diagrams canonical unless the user explicitly asks for a Visio-first lifecycle.
4
+
5
+ The supported command shape is:
6
+
7
+ ```bash
8
+ spolvero build INPUT --out DIR --target package-only|data-visualizer|vsdx-template|visio-com --title TITLE
9
+ ```
10
+
11
+ Declare editability as `native`, `semi_native`, `vector_reference`, or `raster_reference`, and call out any manual Visio review that remains.
12
+
@@ -0,0 +1,21 @@
1
+ # Claude Code Adapter Install
2
+
3
+ Copy or symlink this adapter into a project that uses Claude Code project skills:
4
+
5
+ ```bash
6
+ cp -R adapters/claude/.claude ./
7
+ cp adapters/claude/CLAUDE.md ./CLAUDE.md
8
+ ```
9
+
10
+ Keep the CLI available with an installed package:
11
+
12
+ ```bash
13
+ uv tool install .
14
+ ```
15
+
16
+ Or run from a checkout:
17
+
18
+ ```bash
19
+ uv run spolvero build input.md --out spolvero --target data-visualizer
20
+ ```
21
+
@@ -0,0 +1,8 @@
1
+ # Repository Instructions
2
+
3
+ For Visio handoff work, use the `spolvero` CLI or Python API. Preserve source diagrams, generate previews, produce Data Visualizer workbooks for supported Mermaid flowcharts, and keep QA reports with explicit warnings.
4
+
5
+ Do not claim native Visio fidelity unless the output is actually `native`. Use `semi_native`, `vector_reference`, or `raster_reference` when appropriate.
6
+
7
+ Optional extras unlock additional engines: `[vsdx]` for the cross-platform `vsdx-template` engine, `[topology]` for YAML topology / TRD inputs, and `[com]` for the Windows-only `visio-com` engine. The default install is stdlib-only and always works.
8
+
@@ -0,0 +1,16 @@
1
+ ---
2
+ applyTo: "**/*.{md,mmd,mermaid,puml,plantuml,dot,gv,svg,png,jpg,jpeg,pdf}"
3
+ ---
4
+
5
+ # Visio Handoff
6
+
7
+ Use:
8
+
9
+ ```bash
10
+ spolvero build INPUT --out DIR --target data-visualizer
11
+ ```
12
+
13
+ Expected outputs include `manifest.json`, `README.md`, `source/`, `normalized/`, `preview/`, `visio/`, and `qa/`.
14
+
15
+ For unsupported diagrams, still preserve the source and generate preview/reference artifacts with a clear `vector_reference` or `raster_reference` editability declaration.
16
+
@@ -0,0 +1,11 @@
1
+ # GitHub Copilot Adapter Install
2
+
3
+ Copy these files into a repository that should expose Visio handoff guidance to GitHub Copilot:
4
+
5
+ ```bash
6
+ cp adapters/copilot/.github/copilot-instructions.md .github/copilot-instructions.md
7
+ cp adapters/copilot/.github/instructions/spolvero.instructions.md .github/instructions/spolvero.instructions.md
8
+ ```
9
+
10
+ Keep `AGENTS.md` in the repository root for generic agent compatibility.
11
+
@@ -0,0 +1,19 @@
1
+ # Generic Agent Adapter
2
+
3
+ This adapter is CLI-first and product-neutral.
4
+
5
+ ```bash
6
+ spolvero build INPUT --out DIR --target package-only|data-visualizer|vsdx-template|visio-com --title TITLE
7
+ ```
8
+
9
+ Rules:
10
+
11
+ - Preserve original source and extracted source.
12
+ - Generate preview artifacts every time.
13
+ - Generate normalized IR for supported diagrams.
14
+ - Use Data Visualizer workbooks for supported Mermaid flowcharts and topology/TRD inputs with recognized nodes.
15
+ - Record warnings and manual review steps in QA output.
16
+ - Declare editability as `native`, `semi_native`, `vector_reference`, or `raster_reference`.
17
+ - Do not invent product-specific API integration without a concrete harness contract.
18
+
19
+ Optional extras (default install is stdlib-only): `[vsdx]` for the cross-platform `vsdx-template` engine, `[topology]` for YAML topology/TRD inputs, `[com]` for the Windows-only `visio-com` probe path. Current `visio-com` output delegates downstream and must preserve delegated editability.
@@ -0,0 +1,17 @@
1
+ # Agent Usage
2
+
3
+ This project is harness-neutral. The reliable contract is the CLI and Python entrypoint:
4
+
5
+ ```bash
6
+ spolvero build INPUT --out DIR --target data-visualizer --title "Package title"
7
+ ```
8
+
9
+ ```python
10
+ from spolvero import build_package
11
+
12
+ build_package("input.md", "spolvero", "data-visualizer", title="Package title")
13
+ ```
14
+
15
+ Adapters in `adapters/` provide thin instruction files for Codex, Claude Code, GitHub Copilot, and generic agents. No product-specific API integration is included until a concrete harness contract is available.
16
+
17
+ Always tell users which generated artifact to open first and whether durable edits should go back to source or live only in Visio.