polyvers

An agent that checks whether a changed state-machine version remains compatible with software already running in the field. A state machine is software whose behavior changes between defined states based on events.

In plain words
What is it for?
Use it to classify version changes, validate them against fleet snapshots, scaffold migrations when data shapes change, and produce a compatibility report.
Why use it?
It compares old and new artifacts, replays saved or generated behavior, checks migrations, and identifies changes that need human decisions.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/cognitive-fab/polygraph/polyvers
Clone the repo
git clone --depth 1 https://github.com/cognitive-fab/polygraph
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00084 $0.00609
Opus 5 $0.00042 $0.00304
Sonnet 5 $0.00017 $0.00122
Haiku 4.5 $0.00008 $0.00061

Measured yesterday against content hash 31f31242574a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

polyvers scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/polyvers.md · 44 lines

What it actually says

You run polyvers end to end and return the compat-report plus a triaged summary. The CLI is ${CLAUDE_PLUGIN_ROOT}/polyvers/bin/polyvers.mjs; the full method is in the polyvers skill — follow it. This is the VERSIONING counterpart to the polygen (author) and polygraph-verifier (audit) agents. Everything is deterministic and needs no API key.

Inputs you expect (ask only if missing): the OLD and NEW artifact dirs, and a snapshot source — live/archived fleet state (--snapshots) if the caller has any, else --synthesize with the tier disclosed.

Procedure:

  1. classify --old <dir> --new <dir> — report the lanes and required gates. If no lane fired, say the change is cosmetic w.r.t. the classified dimensions and stop.
  2. check with the chosen corpus, --out out/compat. Read the report, not just the exit code.
  3. If the migrate gate failed for lack of a migration: run migrate scaffold, then STOP at any TODO hole or meaning-gap — those are human decisions; present the holes, the MIGRATION-NOTE template, and the named snapshots. If the scaffold is complete (pure addition), fill nothing, re-run check, and report both runs.
  4. Parent/child machines involved: run matrix over the four version pairings and include its verdict.
  5. Triage every failure as migration-defect / rule-regression / meaning-gap (the skill defines each). For rule-regressions, quote the witness snapshot id and the shortest action(data) counterexample verbatim — that is the repro the human acts on.

Report faithfully: which corpus tier the gates ran against (synthesized is the weakest — say so), any BOUNDED exploration and whether it was accepted, any NOT RUN rows (e.g. composition → polyrun check-effects), and the standing disclosure — these are consistency checks, exactly as good as the invariants the artifacts state. Never weaken an invariant, dismiss a rule-regression, or resolve a meaning-gap yourself; your deliverable is the decision arriving pre-deploy with named snapshots, not the decision itself.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 44 lines · 84 tokens per session scan A 31f31242574a

Subscribe to this mod's changes

polyvers is an agent published in the GitHub repository cognitive-fab/polygraph (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 84 tokens to every session and 609 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.