🛡️ Guard Your Codebase Against Cursor & Copilot Rot

Stop AI from turning your repo into
architectural spaghetti.

AI coding assistants write 300 lines in 5 seconds — and bypass all your layers. RepoGuard scans your stack, generates strict guardrails, and audits violations in real-time.

Cursor AI (.cursorrules)
Claude Code (CLAUDE.md)
Windsurf (.windsurfrules)
GitHub Copilot
$ npx repoguard init
.cursorrules (Generated v1.2)
# Enforced Architecture Guardrails
## Layering Rules (RULE-01):
- NEVER call Prisma/ORM from Controllers or UI.
- Route queries through /src/services/.

## SSR & Hydration (RULE-05):
- No direct localStorage in Server Components.

## Strict Types (RULE-03):
- No any allowed. Use Zod schemas for DTOs.
PR #142 • Diff Review
- const user = await userService.get(id); + const user = await prisma.user.findUnique({ where: { id } });
🤖 RepoGuard Bot Architecture Check Failed

⚠️ Layering Violation (`RULE-01`): Controllers must not access the Prisma client directly. Encapsulate queries inside /services/user.service.ts.

Architectural Health Score: Know Your Grade

Run npx repoguard audit to scan your entire codebase and receive an instant architecture report card.

$ npx repoguard audit
🔍 Scanning entire codebase for architectural violations...

====================================================
ARCHITECTURAL HEALTH DASHBOARD
====================================================
Files Audited: 42
Total Violations: 0
Health Score: 100/100 [Grade: A+]
====================================================
✨ Flawless architecture! Zero drift detected across all files.

8 Built-in Architectural Rules

RepoGuard monitors your codebase against the most destructive anti-patterns generated by AI coding assistants.

Rule ID Category Severity Enforced Guardrail
RULE-01 Architecture Error Blocks raw ORM/DB calls inside Controllers and UI components.
RULE-02 Security Critical Flags hardcoded secrets, API tokens, and credentials in code.
RULE-03 Type Safety Warning Forbids lazy : any and as any escape hatches.
RULE-04 Code Quality Info Replaces raw console.log with structured loggers.
RULE-05 Next.js / SSR Error Prevents SSR hydration mismatch from browser globals (window/localStorage).
RULE-06 Security Critical Detects dangerous SQL injection risks in raw query interpolations.
RULE-07 API Design Warning Enforces Zod schema validation on incoming request body payloads.
RULE-08 DRY Principle Info Prevents AI assistants from duplicating existing common utility helpers.

Cursor writes code fast. You clean up the mess.

Without strict repo-level context, AI assistants invent duplicate utilities, break architectural boundaries, and drown tech leads in review debt.

🍝

Layer Bypassing

AI loves doing database mutations directly inside React components or API route handlers, completely ignoring your domain services.

♻️

Duplicate Utilities

Instead of importing your existing helper, the AI writes a slightly different 20-line copy with zero reuse.

PR Review Bottleneck

800-line AI-generated PRs that compile, but slowly poison the maintainability of your repository over time.

Built for Solo Hackers and Engineering Teams

Open Source

For public repositories and solo builders

$0/forever
  • ✓ Unlimited Local CLI runs
  • ✓ Automatic .cursorrules generation
  • ✓ CLAUDE.md & Windsurf generation
  • ✓ Architectural Health Score (A+ to F)
  • ✓ 5 PR reviews / mo on Public Repos
Install via GitHub

Engineering Team

For startups & scaling tech teams

$39/month
  • ✓ Up to 5 Developers included
  • ✓ GitHub Organization App integration
  • ✓ Slack & Discord alert webhooks
  • ✓ Architecture drift analytics
  • ✓ Priority support
Upgrade Team ($39/mo)