system. A policy is code that runs on every agent action; test it before relying on it.
Who it is forA developer with project-specific rules agents must follow.
The problemBuilt-in policies cannot know your repo's rules.
The outcomeA policy file that loads automatically and enforces your rule.
What you need first
- Node.js with npm
- A coding agent installed on the machine
Steps
- Install with
npm install -g failproofai - Create a file in
.failproofai/policies/ - Return allow(), deny(message) or instruct(message) from your policy, as in the README example
- It loads automatically with no flags needed
Prompt for your agent
Using FailproofAI/failproofai, write a policy file in .failproofai/policies/ that denies <my risky command> with a clear message back to the agent, following the README's allow, deny and instruct API.
Caveat.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for FailproofAI/failproofai and "Write a custom policy in JavaScript"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer