pi-steering-hooks
pi-steering-hooks is a deterministic tool-call guardrail designed for the pi agent. By intercepting calls before tool execution, it enforces rules via hooks rather than relying on prompts. It has zero token cost and is 100% reliable, can block operations such as bash, write, and edit that violate rules, and provides a structured escape mechanism and override annotations for legitimate scenarios. The tool also includes file-writing guardrails that guide the agent to use write/edit tools that show diffs and go through the LSP, rather than invisible bash commands; it supports configuring rules and disabling rules via steering.json, and can set non-overridable rules. It is suitable for development scenarios that require strict constraints on agent behavior.