archmind
v1.0.3
Published
Catches conflicting AI-generated auth logic before it ships.
Maintainers
Readme
ArchMind
Catches conflicting AI-generated auth logic before it ships.
AI coding tools (Cursor, Copilot, Claude Code) create conflicting implementations across sessions because they have no persistent memory. ArchMind detects when two AI sessions write competing auth logic that both exist in your codebase.
Install & Run
npx archmind scanOr install globally:
npm i -g archmindSetup
If you didn't install globally, you can run setup directly via npx:
npx archmind setupEnter your OpenRouter API key once. Config saves to ~/.archmind.
Usage
In any git repo with staged or unstaged changes:
archmind scanWhat it detects
- JWT validation logic that differs between files
- Competing auth middleware with different rules
- Conflicting token formats (e.g. both JWT and OAuth claiming
Bearerheader) - Functions named
verifyToken,validateToken,checkAuthwith different behavior - Stateless vs stateful auth approaches that contradict each other
- Permission models returning different results for the same user
Example output
Analyzing auth changes...
Reading changed files...
Checking auth logic...
⚠ Possible auth inconsistency found — 3 conflicts
1. JWT and OAuth both use Authorization: Bearer header, causing token ambiguity.
- auth/jwt_auth.py
- auth/oauth_auth.py
2. Permission models (RBAC, ABAC) return different results for same user.
- auth/permission_manager.py🤝 Share Your Findings
Did ArchMind catch a conflict? Paste the CLI output directly into a GitHub issue, Slack thread, or Cursor/Claude forum. The output is intentionally designed to be clean, self-contained, and perfectly formatted for engineering discussions.
Flags
archmind scan Default scan
archmind scan --verbose Show debug info (files found, model used, raw response)How it works
- Reads
git diffto find changed files - Filters for auth-related files (paths containing
auth,middleware,token,jwt,session,guard) - Sends file contents to an LLM via OpenRouter
- Returns conflicts with confidence levels (critical, high, medium)
Only surfaces high-confidence findings. Silence > Noise.
Requirements
- Node.js 18+
- Git repository
- OpenRouter API key (free tier available)
License
MIT
