
SnoutGuard
Architectural guardrails for AI coding agents
Requires Node.js 18 or later
The Problem
Your AI agents write code that works but violates your architecture.
Without guardrails, AI coding agents make decisions that drift from your established patterns. SnoutGuard extracts your architectural decisions and makes them available to every agent, every time.
Analyze
Extract architectural decisions from your codebase into structured, versioned knowledge.
Sync
Push decisions into CLAUDE.md, cursor rules, or any agent configuration file.
Review
AI agents query decisions in real-time via MCP, getting guidance before writing code.
By the Numbers
How It Works
Three commands. Full coverage.
snoutguard analyze
Point SnoutGuard at your codebase. It reads your source files, identifies patterns, conventions, and architectural decisions, then structures them into versioned knowledge.
$ snoutguard analyze
Scanning 43,000 lines across 312 files...
Found 133 architectural decisions
Extracted 345 evidence items
Linked decisions to source locations
Output: .snoutguard/snoutguard.dbsnoutguard sync
Push extracted decisions into your agent configuration files. CLAUDE.md, .cursorrules, or any custom format. Your agents get architectural context before they write a single line.
$ snoutguard sync --format claude
Syncing 133 decisions to CLAUDE.md...
Added: API design conventions (12 rules)
Added: Database access patterns (8 rules)
Added: Error handling standards (15 rules)
Added: Testing requirements (11 rules)
CLAUDE.md updated with 133 decisionssnoutguard serve
Start the MCP server for real-time guidance. AI agents query architectural decisions on demand, getting contextual answers before making implementation choices.
$ snoutguard serve --transport sse --port 3100
MCP server running on localhost:3100
4 tools available:
- get_architectural_guidance
- get_architectural_decisions
- check_architectural_compliance
- get_dependency_graphMCP Tools
Real-time architectural guidance
Four MCP tools that give your AI agents instant access to your architectural decisions. No more guessing, no more violations.
get_architectural_guidance
The killer feature. Agents describe what they want to build, and get back relevant architectural decisions, patterns, and constraints specific to your codebase.
get_architectural_decisions
Browse all extracted architectural decisions with their categories, confidence levels, and linked evidence.
check_architectural_compliance
Verify that code changes comply with established architectural decisions and patterns.
get_dependency_graph
Explore the dependency graph of your codebase. Understand how modules and components are connected.
Agent request
"I need to add a new API endpoint for user preferences. What patterns should I follow?"
get_architectural_guidance response
Decision #47: REST API Design Standards
- Use resource-based URLs: /api/v1/users/{id}/preferences
- Return 200 for success, 404 for missing resources
- Validate input with Pydantic models
- Evidence: src/api/routes/users.py (lines 12-45)
Decision #63: Database Access Patterns
- Use repository pattern for all DB operations
- Never access DB directly from route handlers
- Evidence: src/repositories/base.py (lines 1-30)Cost Breakdown
Pay pennies, not subscriptions
SnoutGuard uses your own API keys. You pay for exactly what you use, nothing more.
| Operation | Opus | Sonnet |
|---|---|---|
| Analyze codebase | $12.48 | $1.70 |
| Extract decisions | $2.89 | $0.38 |
| Link evidence | $0.62 | $0.09 |
| Generate sync files | $0.13 | $0.03 |
| Total | $16.12 | $2.20 |
You built something that solves a problem I was literally having.
Clawd 🦞
OpenClaw autonomous coding agent