/workflow
Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract + invariants, author with polygen, declare effects, prove the anti-loop rules with check-effects, and stand it up under polyrun.
$ npx -y skills add cognitive-fab/polygraph --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/workflow
Context preview
What this command does when you run it.
Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract + invariants, author with polygen, declare effects, prove the anti-loop rules with check-effects, and stand it up under polyrun.
Command definition
workflow.mddescription: Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract + invariants, author with polygen, declare effects, prove the anti-loop rules with check-effects, and stand it up under polyrun.
argument-hint: "<feature description>" [--out <dir>]
allowed-tools: Bash, Read, Write, Glob, Grep
Invoke the `workflow` skill over `$ARGUMENTS` and follow its steps in order.
This is the COMPOSITION command: it drives the whole toolset end-to-end for a NEW feature built the workflows-not-loops way (polygen authors the machine, polyrun's checkers gate the effect composition, polyrun executes, polyvers evolves later). The design conversation in Step 1 — stages along the data flow, every failure answered with either a targeted bend-back or a human escalation, the fuzzy middle scoped to named stages — happens WITH the user before any file is written.
Reference material shipped with the plugin:
- `${CLAUDE_PLUGIN_ROOT}/examples/workflows-not-loops/MANUAL.md` — the recipe
- `${CLAUDE_PLUGIN_ROOT}/examples/workflows-not-loops/` — document pipeline
(incl. the polygen bisimulation and the v1→v2 polyvers evolution)
- `${CLAUDE_PLUGIN_ROOT}/examples/todo-machine/` — an ordinary app (durable
timers replace the cron scan; clickable HTTP shell)
No API key is required end-to-end: machine authoring follows the `polygen` skill's Step 0 choice (scripted with `ANTHROPIC_API_KEY` for the CI-grade, pinned-model run — or keyless in-session authoring gated by the same local checkers), and every checking tier (`check.mjs`, `check-effects`, deploy gate) and polyrun itself never need one. Always state the standard disclosure: exhaustive over the declared domains — a consistency check, not a proof.
Read more
description: Build a feature as a workflow, not an agentic loop — design stages/signals/budgets with the user, front-load contract + invariants, author with polygen, declare effects, prove the anti-loop rules with check-effects, and stand it up under polyrun. argument-hint: "<feature description>" [--out <dir>] allowed-tools: Bash, Read, Write, Glob, Grep
Invoke the `workflow` skill over `$ARGUMENTS` and follow its steps in order.
This is the COMPOSITION command: it drives the whole toolset end-to-end for a NEW feature built the workflows-not-loops way (polygen authors the machine, polyrun's checkers gate the effect composition, polyrun executes, polyvers evolves later). The design conversation in Step 1 — stages along the data flow, every failure answered with either a targeted bend-back or a human escalation, the fuzzy middle scoped to named stages — happens WITH the user before any file is written.
Reference material shipped with the plugin:
- `${CLAUDE_PLUGIN_ROOT}/examples/workflows-not-loops/MANUAL.md` — the recipe
- `${CLAUDE_PLUGIN_ROOT}/examples/workflows-not-loops/` — document pipeline
(incl. the polygen bisimulation and the v1→v2 polyvers evolution)
- `${CLAUDE_PLUGIN_ROOT}/examples/todo-machine/` — an ordinary app (durable
timers replace the cron scan; clickable HTTP shell)
No API key is required end-to-end: machine authoring follows the `polygen` skill's Step 0 choice (scripted with `ANTHROPIC_API_KEY` for the CI-grade, pinned-model run — or keyless in-session authoring gated by the same local checkers), and every checking tier (`check.mjs`, `check-effects`, deploy gate) and polyrun itself never need one. Always state the standard disclosure: exhaustive over the declared domains — a consistency check, not a proof.
Your tests check the paths you thought of. Polygraph checks the ones you didn't.
Repo: cognitive-fab/polygraph
Other commands on polygraph.
- /polygen
Run polygen — draft a contract from a feature description, author a verifiable SAM v2 strict-profile module against it (--legacy-bare-next for a bare next(state, action, data) implementation), self-repair against reachable invariant violations, and synthesize a demo/regression
Open command - /polynv
Run polynv — elicit the invariants for a state machine. Harvest candidates from the contract's vocabulary, traces, and fleet snapshots; contribute frontier-model domain priors; pre-check every candidate (HOLDS or a concrete counterexample); drive a plugin-led interview into an
Open 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
Open command - /verify
Run the Polygraph verification loop — generate N transition-function specs from a source file and replay real traces against them, reporting spec-errors vs code-findings.
Open 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
Open command

