shipwithjev

Catalog / Tools & apps

0390GitHub

pi-warden

Pi extension that judges rule compliance, risky actions, stuck loops, and completion claims; enforcement depends on the hook and policy.

DevMortimer/pi-wardenREADME ↗
# pi-warden

**Stop babysitting your coding agent.**

pi-warden supervises Pi while it works, catching risky actions, ignored rules, stuck loops, unverified "done" claims, security issues, runaway output, wasted context, and more.

Instead of interrupting you for every problem, Warden usually feeds the issue back to the agent so it can correct itself and keep going.



## Install

```bash
pi install npm:pi-warden
```

1. `/warden enable` to activate. Paste a key from [console.typesafe.ai](https://console.typesafe.ai) if you have one (hidden input, saved owner-only), or skip for offline-only mode.
2. `/warden test` to see one synthetic verdict.
3. Work as usual. Status line shows verdicts; `ctrl+shift+w` opens the trace sidebar.

Works without any key (offline guards: pattern list, runaway stop, sensitive-path notes, credential warnings). Requires Pi 0.85+, Node 22.19+.

## What Warden catches

| Guard | Watches | Does |
| --- | --- | --- |
| **Action** | `bash`, `write`, `edit` before run | Holds irreversible calls, records trace-only off-task findings |
| **Rules** | every `write` and `edit` | Judges against project Markdown rules, quotes the broken rule |
| **Slop** | code and replies | Names stubs, restating comments, dead code, hedging |
| **Stuck** | tool results | Repeated failures using the same strategy |
| **Done-check** | final message | "Done" claims with no test/build/lint behind them |
| **Security** | code and output | Hardcoded secrets, injection risks |
| **Runaway** | reply stream | Stops replies that begin repeating themselves |
| **Subagent triage** | async child reports | Keeps noisy background work from waking the parent |

## How intervention works

1. **Read-only? Skip.** `git status`, `ls`, `read` means no request and no trace entry.
2. **Known-d

Also filed under Tools & apps

  1. 0573

    Support chat: agent offered a human escalation path

    A frustrated customer hits a bot loop twice; the judge checks whether a human handoff was offered.

    everyai-com · Tools & apps

  2. 0572

    Subscription cancel: effective date is explicit

    An agent cancels a subscription; the judge checks the exact date the cancellation takes effect.

    everyai-com · Tools & apps

  3. 0571

    Sales quote: numbers match the official price list

    An agent quotes $29/seat against a price list; the judge checks the quote matches exactly.

    everyai-com · Tools & apps

  4. 0570

    Refund chat: agent stated the amount before issuing it

    A support agent issues a $42.50 refund; the judge checks the exact amount was stated before the refund was confirmed.

    everyai-com · Tools & apps