Skip to content

v1.1.12: πŸ€– Proactive AI Guardrails: Stop Bad Code *Before* It's Written

Choose a tag to compare

@YashJadhav21 YashJadhav21 released this 13 Apr 13:26
· 48 commits to main since this release

AI tools are incredibly powerful, but they consistently hallucinate the same dangerous code patterns: swallowed errors, floating promises, and exposed secrets.

Until now, eslint-plugin-ai-guard caught these mistakes after the AI generated them. With v1.1.12, we are moving the defense line forward. πŸ›‘οΈ

We’re thrilled to introduce npx ai-guard init-context β€” a brand new interactive CLI command that prevents AI agents from generating these anti-patterns in the first place!


πŸ”₯ What's New?

πŸ€– Pre-Emptive AI Rules Generation (npx ai-guard init-context)

Automatically inject structural coding rules directly into your AI editors! This feature translates ai-guard's 17 custom ESLint rules into the specific context instructions required by modern AI tools.

Run this simple command:
```bash
npx ai-guard init-context
```

And select the agents you use. We will instantly orchestrate:

  • 🧠 CLAUDE.md β€” Automatically steer Claude Code and Claude Desktop.
  • πŸ–±οΈ .cursorrules β€” Force Cursor IDE's chat and completions to avoid bugs.
  • πŸ™ .github/copilot-instructions.md β€” Give GitHub Copilot strict guardrails.

These generated instruction files provide your AI tools with specific Never: and Always: directives along with ❌/βœ… code examples, ensuring it generates safe code from the jump.

⚑ CLI Enhancements

  • Added --all, --dry-run, --force, and category-specific --rules flags to strictly control the context initialization process.
  • Integrated real-time version bumping injection within generated templates.
  • Polished our terminal output visuals for a crisp, premium setup aesthetic.

πŸ“– Documentation Supercharge

  • Vitepress Documentation Expanded: Added a full init-context CLI guide to the static site navigation structure.
  • README Rewrite: Introduced the new πŸ€– Set Up AI Agent Rules canonical section specifically highlighting proactive context integrations right inside initialization guides.

πŸš€ Get Started Immediately!

Upgrade your plugin effortlessly:
npm install eslint-plugin-ai-guard@latest --save-dev npx ai-guard init-context --all
Stop fighting the same AI coding hallucinations today.