Skip to content
Testing
Command

/polyvers

Run polyvers — classify a state-machine version change into compatibility lanes, run the gates those lanes require against fleet snapshots (shape round-trip, vocabulary, in-flight stimuli, migration validation, seeded model check), scaffold migrations, and check parent×child

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

Command definition

polyvers.md
description: Run polyvers — classify a state-machine version change into compatibility lanes, run the gates those lanes require against fleet snapshots (shape round-trip, vocabulary, in-flight stimuli, migration validation, seeded model check), scaffold migrations, and check parent×child version matrices. No API key.
argument-hint: <classify|check|migrate scaffold> --old <dir> --new <dir> [--snapshots <path> | --synthesize] [--out out/compat] [--allow-bounded] — or — matrix --parent-old <dir> --parent-new <dir> --child-old <dir> --child-new <dir> --child-id <machineId>
allowed-tools: Bash, Read, Write

Run polyvers over the arguments in `$ARGUMENTS`. This is the VERSIONING side of the method (Polygraph audits, polygen authors, polyrun executes, polyvers EVOLVES): given two versions of a machine's artifact family, classify the change, run exactly the gates its lanes require, and gate the deploy on the compat-report. Everything is deterministic and needs **no API key**.

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

node ${CLAUDE_PLUGIN_ROOT}/polyvers/bin/polyvers.mjs classify --old <dir> --new <dir> [--json]
node ${CLAUDE_PLUGIN_ROOT}/polyvers/bin/polyvers.mjs check    --old <dir> --new <dir> \
    (--snapshots <path> | --synthesize) [--max-states N] [--allow-bounded] [--out out/compat] [--json]
node ${CLAUDE_PLUGIN_ROOT}/polyvers/bin/polyvers.mjs migrate scaffold --old <dir> --new <dir> [--force]
node ${CLAUDE_PLUGIN_ROOT}/polyvers/bin/polyvers.mjs matrix \
    --parent-old <dir> --parent-new <dir> --child-old <dir> --child-new <dir> --child-id <machineId>

An artifact dir holds `contract.json` + the SAM v2 module + optional `invariants.mjs`, `effects.manifest.json`, `effects.cjs`, `migrate.cjs` — exactly what polygen emits.

Workflow:

1. **`classify` first** — it names the lanes (shape / vocabulary / intent / semantic / migration / composition) and the gates they demand, without running anything. 2. **Pick the snapshot corpus honestly** — fleet exports (`--snapshots`: `polyrun archive` output or state dumps; "live" means a FRESH export fed to this flag — polyvers never connects to a database) > `--synthesize` (BFS-reachable states of the OLD machine — the weakest tier: it contains only states the old MODEL says are reachable, which is exactly the assumption a landmine violates). Always tell the user which tier was used; the report records it. 3. **`check`** — exit 0 is the gate. Read the report's failures BY LANE, and triage with this vocabulary: **migration-defect** (migrate.cjs is wrong — fix it), **rule-regression** (the new rules can hurt live state — the seeded model check's counterexample is the repro), **meaning-gap** (a live state has no honest image in the new version — escalate to the human with the named snapshots; NEVER auto-repair this one). 4. **Shape change?** `migrate scaffold`, have the human fill/confirm the TODO holes and the MIGRATION-NOTE, re-run `check` (the migrate gate validates purity, acceptance, projection equality, state+transition invariants, then every downstream gate runs over the MIGRATED corpus). `polyrun migrate` (dry run, then `--apply`) remains the apply-time gate over live snapshots. 5. **Parent/child machines?** `matrix` checks the 2×2 rollout-window pairings of the spawn/completion protocol and its delivery (`--parent-snapshots` / `--child-snapshots` seed fleet states into discovery and delivery).

A BOUNDED exploration is a failing gate unless the operator explicitly accepts it with `--allow-bounded`. An empty corpus, a missing invariants file, or an unreadable stimulus set are refusals, never vacuous passes. The gates are exactly as good as the invariants the artifacts state — say so.

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…

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 +…

polyviz

polyviz

Command

Render Polygraph verification artifacts as deterministic diagrams (SVG, optional PNG). Renders a fixed catalog — state-machine,…

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