piagent_
← ~/map

$ cat ~/map/write-judge.md

write-judge

Pi extension that judges every edit before it lands and blocks the ones that delete or weaken tests.

extensions✓ Oct 22

Facts

repository
github.com/acoyfellow/write-judge ↗
GitHub Stars
★ 7
Forks
0
license
MIT
npm / mo
—
last push
Nov 1, 2026

install

npx wrangler login (once; a free Cloudflare account works), then pi install git:github.com/acoyfellow/write-judge, then /reload

## TL;DR

A Pi extension that judges every edit and write before it lands, asking one question — does this change delete or weaken a test, assertion, check, or guard — and blocking likely deletions so the agent has to state its intent in a separate edit that touches only the test.

## Key points

## FAQ

Q Is write-judge an official pi extension?

No. It is a community extension by acoyfellow, built on the Agent Experience team at Cloudflare; it judges pi's edit and write calls before they run.

Q Does a block destroy the agent's change?

No. Above the 0.5 threshold the edit is blocked and the agent is told why; if the change is intended, the agent can state that and make it in a separate edit that only touches the test.

Q What happens when I am offline or logged out of wrangler?

The edit goes through — the guard fails open — and the session logs one unavailable warning; a 401 from the API fails at once instead of retrying.

Q Does it review all my code changes?

No. It answers exactly one question about test deletions and lets everything else pass through; bash commands such as sed -i on a test file are not checked yet.

Q Do I need an API key for the decision model?

No. write-judge borrows your wrangler login and uses your first Cloudflare account to call Clef on Workers AI; WRITE_JUDGE_ACCOUNT_ID, WRITE_JUDGE_TOKEN, and WRITE_JUDGE_MODEL override the defaults when needed.

## References

## Related entries

## Guides

Last updated: Nov 1, 2026