Guardian

•
1
•

Equips AI coding tools with accurate, machine-readable architectural context to prevent hallucinations and improve code generation.

AI coding tools often struggle with understanding complex codebase architectures, leading to hallucinations, incorrect imports, and risky modifications. Guardian addresses this by deterministically extracting precise architectural boundaries, coupling hotspots, and data flows using Tree-Sitter AST parsing, entirely without LLMs. This process creates compact, machine-readable context that AI tools can leverage to reason accurately about the codebase. It integrates seamlessly via a VSCode extension, pre-commit hooks for continuous freshness, and an MCP server providing AI agents with 8 specialized tools for searching, understanding impact, and navigating the project structure.

Key Features

01Deterministic AST-based architecture extraction (no LLM involved)
02Automated injection of codebase context into AI tools (e.g., CLAUDE.md)
03Integrated MCP server with 8 compact, AI-callable tools (search, orient, impact, grep, glob)
04VSCode extension for continuous architecture updates, context generation, and MCP setup
05Architectural drift detection, complexity metrics, and constraint verification
060 GitHub stars

Use Cases

01Prevent AI coding tools from generating hallucinated or incorrect code
02Provide AI agents with deep, accurate codebase understanding for complex tasks
03Automate the generation of architectural diagrams and technical documentation