RepoGuard – CLI to stop Cursor and Copilot from bypassing architecture RepoGuard launched as a command-line tool that enforces architectural rules on code written by AI assistants including Cursor and Copilot, offering commands such as `npx repoguard init`, `npx repoguard audit`, `npx repoguard diff`, `npx repoguard hook install`, and `npx repoguard rules`. The tool targets four failure modes the project lists — bypassing layers by calling Prisma/ORM directly inside UI components and controllers, hardcoding mock credentials and API tokens, injecting direct `window` or `localStorage` calls in Server Components, and scattering `: any` to pass compilation — and scores repository architecture health from A+ to F. RepoGuard generates `.cursorrules`, `CLAUDE.md`, and Windsurf rules files and installs a Git hook to block AI drift before commit, with 8 active architectural rules available to list. 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