Traditional Git conflict detection mainly focuses on textual conflicts.
But code can be logically incompatible even when Git reports:
No merge conflict
Two branches may modify related functions, dependencies, security-sensitive code, or application behavior without touching the exact same lines.
That's where ConflictLens comes in.
ConflictLens is an AI-powered VS Code extension and backend system designed to identify semantic merge risks and security issues before merging branches.
Instead of waiting for a merge to fail, ConflictLens analyzes changes across Git branches and provides developers with:
- ๐ Semantic conflict detection
- ๐ Secret detection
- ๐ก๏ธ Injection-risk analysis
- ๐ Risk scoring
- ๐ค AI-powered explanations
- ๐ฅ๏ธ Inline VS Code diagnostics
- ๐ Visual risk dashboard
"Don't wait for the merge to reveal the problem. ConflictLens predicts it before it happens."
|
Analyze changes beyond simple line-by-line differences.
|
Detect potentially dangerous code patterns before they become part of a merged codebase.
|
|
Identify potentially dangerous patterns such as:
|
Convert detected issues into an easy-to-understand risk level:
|
|
Use the Gemini API to generate:
|
Get warnings directly inside your development environment using:
|
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ Developer โ
โ VS Code โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ ConflictLens โ
โ VS Code Extension โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend API โ
โ Node.js + Express โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Git & Semantic โ โ Security Engine โ โ AI Explanation โ
โ Analysis Engine โ โ โ โ Gemini โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ Risk Analysis โ
โ & Recommendations โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ React Dashboard โ
โ Risk Visualization โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
ConflictLens examines changes between branches using Git integration.
The semantic analysis layer tracks functions, signatures, and dependencies rather than relying only on textual differences.
The security engine searches for sensitive credentials and potentially dangerous code patterns.
Detected issues are classified according to their severity.
The AI layer converts technical findings into understandable explanations and recommendations.
Developers receive feedback directly inside VS Code and through the dashboard.
| Layer | Technology |
|---|---|
| ๐งฉ VS Code Extension | TypeScript + VS Code Extension API |
| ๐ Git Integration | simple-git |
| ๐ณ AST Analysis | @babel/parser + @babel/traverse |
| ๐ Security Scanner | Custom pattern/rule engine |
| โ๏ธ Backend | Node.js + Express |
| ๐ค AI | Google Gemini API |
| ๐ Dashboard | React Webview |
| ๐ฆ Shared Types | TypeScript |
| ๐ Documentation | Markdown |
ConflictLens/
โ
โโโ ๐ docs/
โ โโโ PRD
โ โโโ Architecture
โ โโโ Technology Stack
โ
โโโ ๐ extension/
โ โโโ VS Code Extension
โ
โโโ ๐ backend/
โ โโโ src/
โ โโโ semantic/
โ โ โโโ Git & Semantic Analysis
โ โ
โ โโโ security/
โ โ โโโ Security Scanning & Risk Scoring
โ โ
โ โโโ ai/
โ โ โโโ Gemini AI Explanation Layer
โ โ
โ โโโ schema/
โ โโโ Shared Types & Validators
โ
โโโ ๐ dashboard/
โ โโโ React Webview Dashboard
โ
โโโ ๐ packages/
โ โโโ git-engine/
โ
โโโ ๐ shared/
โ โโโ Cross-module Types
โ
โโโ ๐ package.json
โโโ ๐ package-lock.json
โโโ ๐ README.md
git clone https://github.com/soumen-tech/ConflictLens.git
cd ConflictLenscd backend
npm installnpm run scan:security -- <path-to-diff-file>npm run devcd ../extension
npm install
npm run compileThen press:
F5
inside VS Code to launch the Extension Development Host.
Developer changes code
โ
โผ
Git branch analysis
โ
โผ
Semantic dependency analysis
โ
โโโโโโโโโโโโโโโโโ
โผ โผ
Potential conflict Security risk
โ โ
โโโโโโโโโฌโโโโโโโโ
โผ
Risk Scoring
โ
โผ
AI Explanation
โ
โผ
Developer Warning
โ
โผ
Fix Before Merge
| Track | Area | Focus |
|---|---|---|
| 01 | Git & Semantic Analysis | AST + dependency analysis |
| 02 | Security Engine | Security scanning + risk scoring |
| 03 | VS Code Extension | Diagnostics + developer experience |
| 04 | Backend + AI | API + Gemini integration |
| 05 | Dashboard | React UI + integration + QA |
The project includes documentation covering:
- ๐ Product Requirements
- ๐๏ธ System Architecture
- ๐งฐ Technology Stack
Explore the docs/ directory for the detailed project documentation.
ConflictLens aims to move Git conflict detection from:
"Will Git be able to merge these files?"
to:
"Will these changes still work correctly after they are merged?"
The goal is to give developers early visibility into semantic conflicts, security risks, and potentially dangerous changes before they become expensive problems.
Contributions, ideas, bug reports, and improvements are welcome.
# Fork the repository
# Create a feature branch
git checkout -b feature/your-feature
# Make your changes
# Commit
git commit -m "feat: add your feature"
# Push
git push origin feature/your-feature
# Open a Pull RequestThis project is licensed under the MIT License.
ConflictLens
GitHub Repository โข Issues โข Pull Requests
โญ If you find the project interesting, consider giving it a star.