# RepoGuard – CLI to stop Cursor and Copilot from bypassing architecture

> Source: <https://github.com/taylormatematica-beep/repoguard>
> Published: 2026-09-18 12:20:58+00:00

**The Architecture Guardian for AI-Assisted Codebases.**

  Stop AI from turning your repository into architectural spaghetti.

AI coding assistants write 300 lines in 5 seconds. However, without strict repo context, they frequently:

- **Bypass Layers:** Call Prisma/ORM directly inside UI components and controllers.
- **Leak Secrets:** Hardcode mock credentials and API tokens.
- **Break Hydration:** Inject direct`window` or`localStorage` calls in Server Components.
- **Escape Types:** Scatter`: any` across your codebase to pass compilation.

```
# 1. Generate .cursorrules, CLAUDE.md & Windsurf rules
npx repoguard init

# 2. Run Full Architecture Health Check (Score A+ to F)
npx repoguard audit

# 3. Audit uncommitted git changes in real-time
npx repoguard diff

# 4. Block AI drift before commit (Git Hook)
npx repoguard hook install

# 5. List all 8 active architectural rules
npx repoguard rules
```


