Crag: Open-source tool generates unified AI agent rules from project configs

What Crag does
Crag is an open-source tool that solves configuration drift across multiple AI coding agent rule files. It analyzes your project's existing configurations and generates a unified governance file, then compiles that into all the specific rule files needed by different AI agents.
The problem it addresses
Developers using multiple AI coding agents face configuration management challenges. According to the source, one developer maintained 12 rule files across 4 projects (48 files total), including:
- CLAUDE.md for Claude Code
- AGENTS.md for Codex
- .cursor/rules/ for Cursor
- copilot-instructions.md for Copilot
- CI workflows to enforce rules
These files drifted over time, causing issues where agents wrote code that CI rejected because lint rules didn't match. The problem went unnoticed because "nobody reads all 12 files."
How Crag works
The tool has two main commands:
crag analyzereads your project configurations including CI workflows, package.json, tsconfig, and test configscrag compile --target allgenerates all rule files from the unified governance file
The analysis generates a governance.md file (~80 lines) that includes:
- Gates
- Architecture guidelines
- Testing profile
- Code style rules
- Anti-patterns to avoid
- Framework conventions
The output is described as "auto-generated, reads like a senior engineer wrote it."
Technical details
Crag has several notable technical characteristics:
- No LLM required
- No network dependencies
- Zero dependencies
- Deterministic output
- SHA-verified across platforms
To try it: npx @whitehatd/crag demo (remove space between @ and whitehatd)
Source and availability
The tool is open-source and available on GitHub at https://github.com/WhitehatD/crag.
📖 Read the full source: r/ClaudeAI
👀 See Also

VoidLLM: Zero-Knowledge Proxy for Ollama and vLLM with Team Access Control
VoidLLM is a proxy that sits between applications and local LLM servers like Ollama and vLLM, adding organization/team access control, API key management, usage tracking, and rate limiting without viewing prompts. It has <2ms proxy overhead and works with OpenAI-compatible SDKs.

Claude Skills: 12 Strict Coding Rule Packs for TypeScript, Rust, Swift, Go, JS, Postgres, and Audits
12 markdown files with opinionated, version-aware rules for TS, Rust, Swift, Go, JS, Postgres, security, performance, testing, code review, GitHub standards, and git commits. MIT, free, no signup.

GSD-Lite: A State Machine for Claude Code That Enforces TDD and Prevents Test Skipping
GSD-Lite is an open-source MCP server that adds a 12-state workflow machine to Claude Code, enforcing test-driven development with specific anti-rationalization prompts and separate agent contexts for execution, review, and debugging.

FixAI: Browser Game Teaches Consumer Law by Fighting Corporate AI Bots
FixAI is a browser game with 36 levels where players argue against corporate or government AI systems using real consumer laws. Built with Vanilla JS, Node/Express, and Claude Haiku, it features a resistance scoring system and educational explanations of legal arguments.