Crag – 하나의 거버넌스 파일, 모든 AI 코딩 도구(50개 저장소, 96.4% 정확도)
hackernews
|
|
🏷️ AI 딜
#ai 딜
#ai 에이전트
#ai 코딩 툴
#claude
#gemini
#개발 자동화
#거버넌스
#오픈소스
요약
최근 주요 오픈소스 프로젝트 13개 중 9개가 AI 코딩 도구용 구성 파일이 아옆 없거나, 있다 해도 구식 데이터를 바탕으로 작동하여 관리에 어려움을 겪고 있습니다. 이를 해결하기 위해 등장한 'crag' 도구는 단 한 번의 명령어로 프로젝트를 분석해 단일 거버넌스 파일(governance.md)을 생성한 뒤, 이를 12개 주요 AI 도구 및 CI 포맷에 맞게 자동 컴파일합니다. 50개 유명 오픈소스 저장소를 대상으로 테스트한 결과 1,809개의 규칙을 추론해냈으며, 심층 감사 결과 96.4%의 높은 정확도를 입증했습니다. 이를 통해 개발자는 규칙 변경 시 발생할 수 있는 드리프트 현상을 추적하고 커밋 시 자동으로 설정 파일을 동기화하여 최신 상태를 유지할 수 있습니다.
왜 중요한가
개발자 관점
검토중입니다
연구자 관점
검토중입니다
비즈니스 관점
검토중입니다
본문
Your AI agents are reading stale rules right now. You have .cursorrules from three months ago. CLAUDE.md doesn't know about the API routes you added last week. copilot-instructions.md still says "use npm" but you switched to pnpm. Your CI enforces rules that none of your AI configs mention. We checked 13 of the most important open-source projects. 9 of them — Django, Angular, Vue, Svelte, Tokio, Remix, Tauri, Cal.com, Airflow — have zero AI agent configuration. No CLAUDE.md . No .cursorrules . No AGENTS.md . Nothing. Your AI agent is working off stale training data with zero project-specific guidance. The 4 that do have configs? Supabase has 3 separate AI config surfaces that don't share rules. Prisma's own AGENTS.md warns: "Your training data contains a lot of outdated information." These are projects with hundreds of contributors. Yours is worse. crag fixes this. One command. npx @whitehatd/crag Analyzes your project. Generates governance. Compiles to all 12 AI tool formats. 500 ms. Zero dependencies. crag analyze reads your project — CI workflows, package manifests, configs, directory structure, code patterns — and writes a governance.md that captures what a senior engineer would write after spending a week with your codebase: ## Gates (run in order, stop on failure) ### Lint - npm run lint ### Test - npm run test ### Build - npm run build - npm run typecheck ## Architecture - Type: monolith - Entry: bin/app.js ## Key Directories - `src/` — source - `test/` — tests (unit + integration) - `prisma/` — database ## Testing - Framework: vitest - Naming: *.test.ts ## Code Style - Indent: 2 spaces - Formatter: prettier - Linter: eslint ## Anti-Patterns Do not: - Use `any` in TypeScript — use `unknown` - Use `getServerSideProps` with App Router — use Server Components Then crag compile --target all takes that single file and generates configs for every AI tool your team uses — in each tool's native format, with the right frontmatter, activation patterns, and structure: | Target | Output | Consumer | |---|---|---| agents-md | AGENTS.md | Codex, Aider, Gemini CLI, Factory (60K+ repos) | cursor | .cursor/rules/governance.mdc | Cursor | copilot | .github/copilot-instructions.md | GitHub Copilot | gemini | GEMINI.md | Gemini CLI | cline | .clinerules | Cline | continue | .continuerules | Continue.dev | windsurf | .windsurf/rules/governance.md | Windsurf Cascade | zed | .rules | Zed | amazonq | .amazonq/rules/governance.md | Amazon Q Developer | github | .github/workflows/gates.yml | GitHub Actions | husky | .husky/pre-commit | husky | pre-commit | .pre-commit-config.yaml | pre-commit.com | One file in, twelve files out. Change a rule, recompile, done. $ crag audit crag audit — governance drift report Compiled configs ✗ .cursor/rules/governance.mdc stale — governance.md is newer ✗ AGENTS.md stale — governance.md is newer ✓ .github/workflows/gates.yml in sync ✓ .husky/pre-commit in sync Gate reality ✗ npx tsc --noEmit tsc not in devDependencies ✗ npm run lint "lint" script not in package.json 2 stale · 2 drift Fix: crag compile --target all — or — crag audit --fix Install the pre-commit hook and it auto-recompiles on every commit: crag hook install # auto-recompile when governance changes crag hook install --drift-gate # also block commits if drift detected We cloned 50 of the highest-profile open-source projects and ran the full crag pipeline on each one. 20 languages. 7 CI systems. Monorepos to single-crate Rust libraries. | Repo | Stack | Gates | Finding | |---|---|---|---| | grafana/grafana | Go + React + Docker | 67 | Clean | | calcom/cal.com | Next.js + React + Docker | 53 | Clean | | hashicorp/vault | Go + Docker + Node | 50 | Clean | | biomejs/biome | Rust + React + TS | 47 | Clean | | excalidraw/excalidraw | TypeScript + Docker | 46 | 2 drift | | moby/moby | Go + Docker | 45 | Clean | | vuejs/core | TypeScript | 44 | 2 drift | | tauri-apps/tauri | Rust + TypeScript | 44 | Clean | | supabase/supabase | TS + React + Docker | 43 | 1 drift | | apache/airflow | Python + Docker | 41 | Clean | | prisma/prisma | TypeScript | 40 | 2 drift | | django/django | Python | 38 | Clean | | angular/angular | TypeScript | 38 | 1 drift | | remix-run/remix | TypeScript | 37 | 1 drift | | dotnet/aspnetcore | .NET + TypeScript | 37 | 1 drift | | pandas-dev/pandas | Python + C | 35 | Clean | 1,809 gates inferred across 50 repos. 96.4% verified accurate (187/194 gates matched against codebase reality in deep audit). Full results: benchmarks/phase1-benchmark.md # One command — analyze + compile in one shot npx @whitehatd/crag # Or step by step: npx @whitehatd/crag analyze # generate governance.md npx @whitehatd/crag compile --target all # compile to 12 targets npx @whitehatd/crag audit # check for drift npx @whitehatd/crag hook install # enforce on every commit Requirements: Node.js 18+ and git . Zero runtime dependencies. Analyze. Reads your repo: 25+ language detectors, 11 CI system extractors, 8 framework convention engines. Writes