vnvspec
V&V-grade specifications for engineered systems — AI, optimization, simulation, and physics.
Overview
vnvspec lets you write machine-readable V&V specifications for any engineered system and automatically assess models against them. It produces traceable evidence reports that map to international standards (ISO/PAS 8800, ISO 21448, UL 4600, EU AI Act, and more).
Key features
- Typed spec language — Pydantic-based
Spec,Requirement,IOContract,ODD,Hazard,Evidencemodels - INCOSE GtWR quality checker — catch vague, ambiguous, or unverifiable requirements early, with configurable profiles (formal, web-app, embedded)
- Traceability graphs — link requirements ↔ hazards ↔ evidence ↔ standards clauses, plus auto-trace scanning
- Standards registries — built-in clause databases for ISO/PAS 8800, ISO 21448, UL 4600, EU AI Act, NIST AI RMF
- Compliance matrix — auditor-grade XLSX/CSV/HTML exports with gap analysis against any standard
- Best-practices catalogs — pre-written requirements for PyTorch, HuggingFace, FastAPI, SQLAlchemy, Pyomo; composable via
Spec.extend() - Pluggable adapters — wrap any model (PyTorch, HuggingFace, scikit-learn, ONNX, Pyomo, FMI)
- EvidenceCollector — ergonomic context manager for building evidence from assertions and JUnit XML
- pytest plugin —
pytest-vnvspeccaptures evidence directly from test results - Multi-format specs — define specs in Python, YAML, or TOML; lossless round-trips
- CI integrations — GitHub Actions composite action, V&V badge SVG, report diff for regression detection
- Rich exports — HTML reports, Markdown, GSN assurance cases (Mermaid), EU AI Act Annex IV tech docs
Installation
pip install vnvspec
With PyTorch adapter:
pip install vnvspec[torch]
Quick start
from vnvspec import Requirement, Spec
req = Requirement(
id="REQ-001",
statement="The classifier shall produce probabilities in [0, 1].",
rationale="Probability outputs must be valid for downstream calibration.",
verification_method="test",
acceptance_criteria=["All output probabilities are between 0.0 and 1.0 inclusive."],
)
spec = Spec(name="image-classifier-v1", requirements=[req])
violations = req.check_quality()
print(f"Quality issues: {len(violations)}")
Development
# Install all dev dependencies
just install
# Run all checks (lint, typecheck, test with coverage)
just check
License
Apache-2.0. See LICENSE.
Metadata
Release files for vnvspec 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vnvspec-0.3.2.tar.gz | 453.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vnvspec-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 584.6 kB
Release files / vnvspec-0.3.2.tar.gz
| Download URL | vnvspec-0.3.2.tar.gz |
|---|---|
| Size | 453.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d936106966138c2f08e1da784f66dc193d26799d6f6f7c5b81e4c39837cdb39
|
|
BLAKE2b-256 checksum How to use checksums |
82bab6aadb38b53588675fc78ae75131475adf5d01196cfb83d4eed2aedd18b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 17, 2026.
Transparency logRelease files / vnvspec-0.3.2-py3-none-any.whl
| Download URL | vnvspec-0.3.2-py3-none-any.whl |
|---|---|
| Size | 131.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
375787f8cd8866d59bf6912a360cab7b98e1b1cc2a45c1dc94c26f0a28064a1e
|
|
BLAKE2b-256 checksum How to use checksums |
fe3076944f6b5756926a12b298879903b3c62e70993791ec3940475e1e36df8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 17, 2026.
Transparency log