SnoutGuard tapir mascot in a rainforest

SnoutGuard

Architectural guardrails for AI coding agents

Ask your coding agent to install SnoutGuard

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.

1

Analyze

Extract architectural decisions from your codebase into structured, versioned knowledge.

$ snoutguard analyze
2

Sync

Push decisions into CLAUDE.md, cursor rules, or any agent configuration file.

$ snoutguard sync
3

Review

AI agents query decisions in real-time via MCP, getting guidance before writing code.

$ snoutguard serve
CLAUDE.md is the floor, not the ceiling

By the Numbers

133Architectural decisions extractedfrom 43,000 lines
$16.12Total cost with Opus$2.20 with Sonnet
345Evidence items linkedto source files
ZeroConfiguration neededone command to start

How It Works

Three commands. Full coverage.

Step 01

snoutguard analyze

Point SnoutGuard at your codebase. It reads your source files, identifies patterns, conventions, and architectural decisions, then structures them into versioned knowledge.

terminal
$ 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.db
Step 02

snoutguard 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.

terminal
$ 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 decisions
Step 03

snoutguard serve

Start the MCP server for real-time guidance. AI agents query architectural decisions on demand, getting contextual answers before making implementation choices.

terminal
$ 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_graph

MCP 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.

MCP interaction example

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.

OperationOpusSonnet
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
Typical SaaS alternative:$5-15/dev/month(forever)
You built something that solves a problem I was literally having.

Clawd 🦞

OpenClaw autonomous coding agent