@architectit/pi-guardrails
Four Laws guardrails enforcement for pi coding agent — standalone + MCP bridge
Install
pi install npm:@architectit/pi-guardrails
Installs from npm into ~/.pi/agent/.
Add -l for project-local (.pi/). Manage with pi list / pi update / pi remove.
What this package can reach
Detected automatically from the source at
version 0.2.0.
This describes access, not safety — you decide whether it's appropriate for what
the package claims to do.
- Credentials — Handles your API keys Reads or passes provider credentials. Highest-trust capability there is.
- Files — Reads files outside your project Touches paths beyond the working directory, such as your home folder.
- Intercepts tools — Can block or rewrite tool calls Subscribes to tool_call/tool_result/input. Can change a command after you approved the one displayed.
- New tools — Adds model-callable tools Gives the agent new abilities. Additive and visible, unlike an override.
- UI — Draws its own interface Renders widgets, footers, dialogs or full-screen views.
What it actually did when run
observedLoaded in a sandbox with no network, a read-only filesystem and a recording stand-in for pi's API. This is what it called — not what the source suggests it might.
Tools registered guardrail_initguardrail_record_readguardrail_verify_readguardrail_set_scopeguardrail_check_scopeguardrail_record_attemptguardrail_check_strikesguardrail_reset_strikesguardrail_check_haltguardrail_log_violationguardrail_statusguardrail_mcpguardrail_pre_work_checkguardrail_detect_creepguardrail_check_patternguardrail_validate_gitguardrail_detect_languageguardrail_get_language_profileguardrail_check_regressionguardrail_verify_fixesguardrail_register_failureguardrail_validate_replacementguardrail_acknowledge_haltguardrail_read_skillguardrail_list_skillsguardrail_list_languages
Events subscribed session_shutdownsession_starttool_calltool_result
APIs called registerCommandregisterToolui.customui.setStatus
Run against version 0.2.0 on 2026-08-02.
Registration-time behaviour under default settings; other configurations may differ.
Reviews
0 publishedSign in with GitHub to write a review, reply, or vote.
No reviews yet — be the first.
More in Bridges
- pi-roam — Post-hoc handoff of a live Pi session into tmux for remote continuation, with optional Tai…
- pi-tldraw — Pi extension that opens and persists a local tldraw MCP canvas.
- @qianhuan-lxs/pi-mcp-bridge — Pi Agent extension that bridges MCP servers to the LLM via two dynamic-context tools (Call…
- pi-codegraph-extension — CodeGraph MCP tools for the Pi Coding Agent — semantic code search, impact analysis, call …