DETERMINISTIC PRETOOLUSE GUARDRAIL

実行する前に、
ルールで止める。

Policy before
execution.

Check commands and supported file operations against local policy before Claude Code or Codex CLI runs them. Decisions use no AI or LLM, so the same input produces the same result.

Claude Code · Codex CLI MIT License

policygate

$ rm -rf /

DENYdestructive.root

Recursive force-delete of filesystem root

$ git status

DEFERhost approval flow
0LLMs in decisions
2supported hosts
JSONLaudit log

Auditable rules,
not another prompt.

Inspect tool input at execution time in a layer separate from agent instructions. Rules and decision reasons stay local and auditable.

01

Deterministic decisions

A Go rule engine evaluates input without AI or an external decision service.

02

Command and path checks

Check dangerous commands, protected branches, and operations involving out-of-project or sensitive paths.

03

Auditable outcomes

Record decisions and reasons locally, with log rotation and hashing options.

Host differences stay explicit.

Claude Code and Codex CLI do not handle every policy decision in the same way. PolicyApprovalGate keeps that boundary explicit.

DecisionClaude CodeCodex CLI
denyRejectReject
askPrompt userdeny conversion
deferHost approvalHost approval
!

Use it as a complementary guardrail.

PolicyApprovalGate does not replace host permissions, a sandbox, or human review. It is not a complete shell analyzer or an independent security boundary, and should not be your only line of defense.

Review it, then install.

Download the installer, review its contents, and then run it. No elevation is required.

01curl -fsSLO https://raw.githubusercontent.com/nobuo-miura/PolicyApprovalGate/main/install.sh
02less install.sh
03sh install.sh
Read the quick start →macOS · Linux · Windows (experimental)

LOCAL POLICY · DETERMINISTIC DECISIONS · AUDITABLE RESULTS

Put an auditable boundary before execution.

GitHub Repository