Repository navigation
Petri 0.1.0
Petri 0.1.0: run Flagsmith experiments where the code lives.
Install
VS Code
curl -fsSL -o petri.vsix https://github.com/Ivan825/petri/releases/latest/download/petri.vsix && code --install-extension petri.vsixOr download petri.vsix below and use Extensions → ⋯ → Install from VSIX…. Cursor and VSCodium work the same way.
CLI / CI: npx petri-check . or uses: Ivan825/petri@v0.1.0 in a workflow.
What's in it
- 12 diagnostics for experiments that silently lose or skew data, with quick fixes: events sent to Flagsmith Cloud from self-hosted SDKs, event-name case mismatches, reads that skip the exposure, phantom arms, variants without keys and more.
- CodeLens, hovers and a results panel: live split, lift, 95% credible intervals and chance to win, next to the flag read.
- One conservative decision rule: ship only at ≥95% chance to win, no guardrail likely hurt, no SRM, no phantom arms.
- Lifecycle from the editor: start, pause, complete and roll out, then remove the losing code path.
- Experiment Copilot (Claude): idea → flag, metrics and code → start → judge → ship → delete the losing code. Every write shows the exact HTTP request or diff and waits for your approval, and every decision goes to
.petri/audit.jsonl. - Self-hosted Flagsmith in one command, with experimentation enabled.
petri-checkCLI and GitHub Action for CI.
Docs: quick start · diagnostics · copilot · self-hosting