guardrail-ai
v0.1.0
Published
Give your AI CLI agents the ability to remember project conventions.
Maintainers
Readme
guardrail-ai
Memory and rules for AI CLI agents - automatically enforces project standards while you vibe code.
The Concept
guardrail-ai removes the manual friction of maintaining documentation while enforcing strict project standards in the background. The developer literally just vibe codes normally, and the system manages the AI's memory invisibly.
How It Works
Guardrail - When initialized, guardrail-ai updates your agent's AGENTS.md file to force the AI to read project rules before writing code.
Rule Retrieval - When the AI generates code, it silently queries the rule files in
.guardrail-ai/to ensure compliance.Update Rules - Run
/update-rulesanytime to have the AI analyze your project and update the rules.
Installation
npm install
npm run buildUsage
# Initialize guardrail-ai in your project
npx guardrail-ai init
# Run in your AI agent to update rules
/update-rulesRule Files
| File | Category |
|------|----------|
| .guardrail-ai/architecture.json | File placement, routing, folder structures |
| .guardrail-ai/stack.json | Libraries, ORMs, state managers |
| .guardrail-ai/conventions.json | Coding styles, naming conventions |
| .guardrail-ai/security.json | Auth, validation, access control |
| .guardrail-ai/testing.json | Testing frameworks, mocking |
Supported Agents
- Claude Code
- Cursor
- Codex
- Gemini CLI
- Windsurf
- Opencode
