PitchHut logo
A unified governance layer for AI coding agents.
Pitch

Crag serves as the bedrock for AI coding tools, ensuring that they remain synced with project-specific rules, eliminating config drift and allowing seamless integration. By extracting and maintaining the real rules from your codebase and CI, crag provides a one-source truth for multiple AI agents without dependencies or delays.

Description

Crag: The Foundation for AI Coding Agents

Crag facilitates a seamless integration of project-specific rules for AI tools, addressing the common issue of configuration drift that occurs when using outdated or unmaintained rule sets. Developers often encounter problems when AI tools function based on stale configurations, leading to inefficiencies and inaccuracies in AI tool behavior.

Key Features

  • Address Configuration Drift: Crag effectively eliminates stale AI configurations by synchronizing them with the current state of your codebase and CI processes.

  • Single Source of Truth: By generating a governance.md file that encapsulates the real rules your project follows, Crag ensures that all AI tools operate on the same foundational guidelines.

  • Multi-Tool Compatibility: One governance file compiles into 12 different formats for various AI tools, including Cursor, Claude, Copilot, and Gemini, allowing teams to maintain consistency across different platforms.

Workflow

Running Crag is straightforward:

npx @whitehatd/crag  

This command analyzes the project’s directory structure, CI workflows, and other configuration files to produce a comprehensive governance.md.

Subsequently, compiling this file generates the appropriate configurations for each AI tool, simplifying the management of AI integrations:

TargetOutputAI Tool
agents-mdAGENTS.mdCodex, Aider, Gemini CLI, Factory
cursor.cursor/rules/governance.mdcCursor
copilot.github/copilot-instructions.mdGitHub Copilot
geminiGEMINI.mdGemini CLI
github.github/workflows/gates.ymlGitHub Actions
pre-commit.pre-commit-config.yamlpre-commit.com
.........

Audit for Stale Configurations

Continuous monitoring is a core function of Crag. The audit feature detects discrepancies between the governance document and any generated configurations:

$ crag audit  

This command reveals any stale configurations and suggests fixes, allowing for real-time synchronization. Additionally, integrating a pre-commit hook ensures that governance changes automatically trigger recompilation of relevant configurations:

crag hook install  

Proven Reliability

Crag has demonstrated reliability across numerous high-profile open-source projects, revealing an average of 46% configuration drift while maintaining zero crashes throughout testing. Results are detailed in performance benchmarks available in the repository.

For those seeking a robust solution for maintaining consistent AI rules tailored to individual project requirements, Crag stands as a powerful tool to enhance productivity and reduce the overhead associated with managing AI configurations.

0 comments

No comments yet.

Sign in to be the first to comment.