pi-warden
Pi extension that judges rule compliance, risky actions, stuck loops, and completion claims; enforcement depends on the hook and policy.
# pi-warden **Your coding agent says "done". It didn't run the tests.**<br> **pi-warden catches it, and the agent fixes it without you.** [](https://www.npmjs.com/package/pi-warden) [](https://www.npmjs.com/package/pi-warden) [](https://github.com/DevMortimer/pi-warden/stargazers) [](LICENSE) [](https://github.com/earendil-works/pi) [](https://typesafe.ai) </div> <div align="center"> **3,350 sessions · 817 risky actions stopped before they ran · 71% of fake "done"s turned into real test runs** <sub>Forty-one days of the maintainer's real use across all their projects, not just this one, 2026-09-16 to 2026-10-26. Method and noise: [field report](eval/reports/2026-10-27-field-usage/).</sub> </div> ## Install ```bash pi install npm:pi-warden ``` Then `/warden enable` (paste a [TypeSafe](https://console.typesafe.ai) key) and `/warden init` (writes a starter `pi-warden.md`). That's it. No key? The offline guards still run. ### Claude Code: per-edit rules ```bash npm install --global pi-warden pi-warden init claude ``` Launch Claude with `PI_WARDEN_ENABLED=1` and the active backend's key variable (`TYPESAFE_API_KEY` for the default backend). Successful `Write` and `Edit` calls receive advisory feedback from your `pi-warden.md` and the existing rules configuration. Claude support covers per-edit rules; the other guards below run inside Pi. Use `init claude --project` for this project's `.claude/settings.json`, and `uninstall claude [--project]` to remove the entries installed in that scope. Shared settings, keys, history and rules files stay in place. [Configuration, limits and uninstall behavior →](docs/claude-code.md) ## It reports. It doesn't nag. Most guardrails stop and ask you. pi-warden tells **the agent** what it got wrong, and the agent corrects itse