Built a tool that blocks AI agent commits when they change code outside scope
bluetech333 · reddit · 2026-07-26
A developer built Ripple, a guardrail tool that blocks AI agent commits if the diff touches files or symbols outside the agent’s declared scope.
- The demo uses a real temporary Git repo and runs in about 90 seconds with zero setup.
- In the example, the agent is allowed to add a SAVE20 discount code, but when it also changes processCharge() the pre-commit hook blocks the commit.
- Detection happens at the AST/symbol level, so it catches scope violations even when the file path is unchanged.
- The full version can enforce the same rule as a required GitHub PR status check, preventing merges unless a receipt proves the change stayed in bounds.
- The author says the system also produces an audit trail for compliance export and asks for feedback on cryptographic verification of blocked merges.
More from coding & agent
- Developer uses Codex Remote to keep building on the go and record gameplay progress — Dimillian · 2026-07-26
- Live workshop promises a real-business GenAI + data science workflow with Python and agents — mdancho84 · 2026-07-26
- Codex computer-use handles Google Cloud Console setup tasks with less manual work — lucasmeijer · 2026-07-26
- One-Click Desktop AI Client: Run Claude & Codex Locally with Zero Inference Fees — jasonkneen · 2026-07-26
- Agent workspace lets humans and multiple sandboxes share one endpoint, one context and one compute pool — jasonkneen · 2026-07-26
- Built 47 Agents With n8n and Claude, Now Sharing 3 Prompts He Says Actually Work — Aiden_Tech_Ai · 2026-07-26