WhitehatD

WhitehatD / crag

Public

The bedrock layer for AI coding agents. One governance.md. Any project. Never stale. Universal skills + cross-agent compilation (Claude, Cursor, Codex, Gemini, Aider).

15
0
100% credibility
Found Apr 08, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
JavaScript
AI Summary

Crag scans a project's code, tests, and setup files to create unified rules that compile into formats for AI coding tools and enforce them automatically.

How It Works

1
🔍 Spot the AI confusion

Your AI helpers give outdated advice because they don't know your latest project rules or testing setup.

2
💡 Discover crag

You learn about a simple tool that reads your project and creates fresh rules for all your AI friends to follow.

3
Run one easy command

In your project folder, type a quick command and watch it scan your code, tests, and setup to build a smart rule book.

4
📝 Review your new rules

Check the clear list of steps like 'test everything' or 'check the style' that match exactly how your project works.

5
🔄 Share with AI helpers

With one click, send these rules to all your AI tools so they instantly understand your project's ways.

6
🛡️ Set up auto-checks

Add watchers that spot if rules get old and fix them before you commit changes.

🎉 AI now perfectly in sync

Your AI assistants follow your real project rules every time, no more wrong advice or failed builds.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 15 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is crag?

Crag is a JavaScript CLI that scans your project's CI workflows, configs, and code patterns to auto-generate a single `governance.md` file capturing your real rules—like lint steps, test commands, architecture, and anti-patterns. Run `npx @whitehatd/crag` and it analyzes in seconds, then compiles that one file into native configs for 12 AI agents: Cursor rules, GitHub Copilot instructions, Gemini.md, AGENTS.md for Codex/Aider, plus Zed, Continue, Windsurf, Amazon Q, and hooks for Husky or pre-commit. It audits for drift (stale rules or missing tools) and enforces via git hooks, ensuring your AI agents always follow current project reality without manual updates.

Why is it gaining traction?

Unlike scattered `.cursorrules` or outdated Copilot instructions that drift from your actual CI (Biome vs ESLint conflicts, anyone?), crag acts as the bedrock layer—universal skills compile across agents with zero LLM calls or deps, hitting 500ms on monorepos. Benchmarks on 50 top repos (Grafana, Supabase, Django) extracted 1,800+ gates with 0 crashes and flagged 46% drift. Developers love the "one truth" source that auto-syncs on commit, bridging GitHub Copilot's bedrock knowledge base to Cursor or Gemini without per-tool tweaks.

Who should use this?

Full-stack teams on Node/Python/Rust/Go stacks juggling Cursor, Copilot, and Aider—especially monorepos where AI hallucinates wrong package managers (npm vs pnpm). Solo devs onboarding AI agents to legacy codebases need its CI extraction for instant gates. Skip if you're single-tool (pure Claude) or non-JS; it's tuned for polyglot projects with heavy GitHub Actions.

Verdict

Solid foundation for AI agent governance, but at 15 stars and 1.0% credibility, it's early—docs shine, benchmarks impress, but adoption lags. Try on a side project; pair with `crag hook install` for drift-proof workflows. Worth watching as agent ecosystems mature. (198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.