@oisin-ee/pi-guardrails0.7.2
Agent guardrails for pi, Claude Code, and Codex: Git safety, no waiting, no typing into other agents, GitOps-only clusters.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@oisin-ee/pi-guardrails
Agent guardrails for pi, Claude Code, and Codex. One set of policies checks every shell and edit call:
- Git safety: no
--no-verify, no discarding uncommitted work, no stash push and pop in one command, worktrees only under.worktrees/, no on-the-fly identity. - Wait gate: no
sleep,watch, follow flags,--wait/--watch, or wait subcommands. Start long work in the background instead. - Agent typing: no
herdr agent promptorpane send-*into another agent's terminal. Usedogsled send. For prompt answers, onlyherdr agent send-keysaccepts# dogsled: answer-prompt; each use is recorded. - GitOps: no imperative
kubectl,helm,argocd, ornixmutations, and nofsck/mkfs. - Generated paths: no hand-edits of lockfiles or generated files.
In pi, it also fills a missing shell timeout (120 s) and blocks one above 10 minutes, naming each tool's unit.
Shell text is parsed with shfmt, which must be on PATH. A command that cannot be parsed is blocked.
pi
pi install npm:@oisin-ee/pi-guardrails
Claude Code and Codex
Install the package globally, then run agent-hook as a PreToolUse hook for shell and edit tools. It reads the hook
payload on stdin and exits 2 with the reason on stderr to block.
{ "type": "command", "command": "agent-hook", "timeout": 30 }