Skip to content
Testing
Command

/polyviz

Render Polygraph verification artifacts as deterministic diagrams (SVG, optional PNG). Renders a fixed catalog — state-machine, invariants, counterexample, compat-gate, model-card — from a viz-model JSON or straight from a Polygraph/polyvers artifacts directory. Byte-identical

From plugin
polygraph
166 skills5 agents6 commands
> /plugin marketplace add cognitive-fab/polygraph
> /plugin install polygraph@polygraph

Command definition

polyviz.md
description: Render Polygraph verification artifacts as deterministic diagrams (SVG, optional PNG). Renders a fixed catalog — state-machine, invariants, counterexample, compat-gate, model-card — from a viz-model JSON or straight from a Polygraph/polyvers artifacts directory. Byte-identical output; no model call at render time.
argument-hint: render --in <dir|polyviz.json> --diagram <all|state-machine|invariants|counterexample|compat-gate|model-card> --out <dir> [--format svg,png] [--theme dark|light] [--tokens f.json] [--scale 2] — or — hash --in <...> --diagram <...> — or — schema
allowed-tools: Bash, Read, Write

Run polyviz over the arguments in `$ARGUMENTS`. polyviz is the VISUALIZATION side of the method: it turns the artifacts Polygraph/polyvers already produced into a fixed catalog of clean, brand-consistent diagrams. Rendering is a pure function `artifacts → SVG` — deterministic (byte-identical on repeat), no model call, no network. It does **not** run verification; it only visualizes.

This drives `${CLAUDE_PLUGIN_ROOT}/bin/polyviz.mjs`:

node ${CLAUDE_PLUGIN_ROOT}/bin/polyviz.mjs render --in <dir|polyviz.json> \
    --diagram <all|state-machine|invariants|counterexample|compat-gate|model-card> \
    --out <dir> [--format svg,png] [--theme dark|light] [--tokens f.json] [--scale 2]
node ${CLAUDE_PLUGIN_ROOT}/bin/polyviz.mjs hash --in <...> --diagram <...>
node ${CLAUDE_PLUGIN_ROOT}/bin/polyviz.mjs schema

Inputs:

  • **A viz-model JSON** (`*.polyviz.json`, the stable contract — `polyviz schema`

prints it): pure `viz-model → SVG`, executes no user code, no optional deps for SVG.

  • **A Polygraph/polyvers artifacts directory**: adapters derive the machine graph

(bounded BFS that **executes** the SAM/`next` module), read `invariants.mjs`, resolve a failing `findings.json` to its counterexample trace, and map `compat-report.json`. A `polyviz.annotations.json` in the dir supplies the narrative the raw artifacts don't carry.

Optional runtime components (mention when relevant): `state-machine`/`model-card` need `elkjs`; `--format png` needs `@resvg/resvg-js` (native/WASM). The SVG path for `invariants`/`counterexample`/`compat-gate` needs neither. Missing optional deps fail loud with the exact `npm i` to run.

Workflow:

1. Default to `--format svg` (deterministic, diffable). Add `png` only for a raster deliverable. 2. When `--in` is a run directory, warn that the machine graph is derived by executing the module, and offer a `polyviz.annotations.json` for nicer copy. 3. Branding (footer wordmark + tagline, default `COGNITIVE FAB · POLYGRAPH` / `Provable Trust`) is configurable per render: `--brand "…"`, `--footer "…"`, `--no-brand`, or `meta.brand`/`meta.footer` in the model or annotations. Ask which mark applies when rendering for someone else's org. 4. Use `hash` to prove determinism in CI. The reference figures under `${CLAUDE_PLUGIN_ROOT}/reference/` are the visual acceptance bar.

Read more
@cognitive-fab
Ships withpolygraph

Your tests check the paths you thought of. Polygraph checks the ones you didn't.

167 skills5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
16
Star history of cognitive-fab/polygraph on GitHub, a chart by star-history.com

Other commands on polygraph.

polygen

polygen

Command

Run polygen — draft a contract from a feature description, author a verifiable SAM v2 strict-profile module against it,…

polynv

polynv

Command

Run polynv — elicit the invariants for a state machine. Harvest candidates from the contract's vocabulary, traces, and fleet…

polyvers

polyvers

Command

Run polyvers — classify a state-machine version change into compatibility lanes, run the gates those lanes require against fleet…

verify

verify

Command

Run the Polygraph verification loop — generate N transition-function specs from a source file and replay real traces against…

workflow

workflow

Command

Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract +…

More commands from other plugins.

bkit

bkit

Command

bkit plugin help - Show all available bkit functions. Workaround for skills autocomplete issue. Use "/bkit" or just type "bkit…

bkit2w606
@popup-studio-ai@popup-studio-aiInstall Command
review

review

Command

Open the Canary session viewer and triage a recorded session.

canary3w496
@0xnyn@0xnynInstall Command