Izzo: AI agents keep breaking your code faster than you can fix it. Izzo: You're listening to Exploring Next, episode 228. I'm Izzo, and today Boone and I are diving into something that hits way too close to home — finally getting AI coding agents under control. Boone: Oh man, this is the conversation every developer needs right now. I've watched Claude completely rewrite my authentication system when I asked it to fix a typo. Izzo: Exactly! So lundrog built this framework called agent-guardrails-template that's getting real traction. But here's the counterintuitive part — putting AI in a tighter box actually makes it faster. Boone: That makes total sense though. Without boundaries, the AI burns through tokens asking itself permission for everything. 'Should I edit this file? Is this safe?' It's analysis paralysis at scale. Izzo: Right, and from a product perspective, this solves the adoption barrier that's killing AI tooling. Developers want the speed but they're terrified of the chaos. Boone: The architecture here is actually pretty clever. They built it around four safety laws — read before editing, stay in scope, verify before committing, halt when uncertain. Izzo: Sounds basic, but Boone, break down how they actually enforce this stuff. Because we all know LLMs love to ignore markdown instructions. Boone: That's where it gets interesting. They built a Go MCP server that acts like a bouncer. Seventeen different tools that intercept every bash command, file edit, and git operation before the AI can execute them. Izzo: Wait, MCP server — that's Model Context Protocol, right? So this isn't just documentation, it's actual runtime enforcement? Boone: Exactly. It's not asking the AI to be good, it's physically preventing bad operations. Think of it as a firewall but for AI actions instead of network traffic. Izzo: That's brilliant. And they've got this decision matrix that categorizes risk levels — low risk like styling gets auto-approved, medium risk like dependencies prompts the human, high risk like auth code gets hard-stopped. Boone: The risk categorization is what makes this actually usable. You're not saying no to everything, you're being surgical about where human judgment matters. Izzo: The numbers are pretty compelling too — 78% drop in AI-caused incidents. That's the difference between AI tooling being a productivity boost versus a liability. Boone: And check this out — they've got INDEX_MAP routing that saves 60 to 80% of tokens by forcing the AI to only look up what it actually needs. That's a huge cost optimization. Izzo: Smart. Instead of the AI reading your entire codebase every time, it has to justify what files it actually needs to touch. Boone: The implementation is really thoughtful too. Forty-four hardened docs covering all the stuff AI usually botches — state management, cross-platform deployment, accessibility patterns. Izzo: I love that they kept each doc under 500 lines so it doesn't blow up the context window. That's product thinking — understanding the constraints of how AI actually consumes information. Boone: Plus fourteen language examples out of the box. Go, TypeScript, Rust, Python — they're not making you start from scratch for your stack. Izzo: The deployment options are smart too. You can use just the docs for zero setup, or deploy the full MCP server for active enforcement. Meet developers where they are. Boone: And it works with whatever model you're using — Claude, GPT, Gemini, LLaMA, Mistral. They're not betting on one AI vendor winning. Izzo: That vendor agnostic approach is crucial. The AI landscape changes every month, but the need for guardrails is constant. Boone: What I really appreciate is the honesty in the post. 'Is it perfect? Nope. Do I need feedback and PRs? Yep.' That's how you build something developers actually trust. Izzo: Totally. And the shared trauma aspect is real — every developer has watched an AI agent casually commit API keys or force-push over hours of work. Boone: The fact that this exists and is getting adoption tells you the AI tooling space still has fundamental UX problems to solve. Izzo: I'm giving this a solid A-minus. It's addressing a real pain point with actual enforcement, not just hopes and prayers. Boone: Agreed. This feels like infrastructure that should exist. I'm definitely adding this to my weekend project list — again. Izzo: Alright, here's what you should go build. First, clone github.com/TheArchitectit/agent-guardrails-template and set it up in a test project. See how the MCP server actually intercepts operations. Second, if you're already using AI agents, audit your last week of commits. Count how many times the AI touched files it didn't need to — that's your baseline for measuring improvement. And third, experiment with the decision matrix concept in your own workflow. Define what's low, med