An intelligent branch integration assistant powered by Large Language Models (LLMs).
The Git Integration Agent was created to automate one of the most expensive activities in software development: integrating long-lived Git branches.
Instead of performing a traditional line-based merge, the agent analyzes the semantic differences between two branches, plans the integration, decomposes the work into implementation tasks and reconstructs the final code while preserving the original developer's intent.
The project combines deterministic Git analysis with AI reasoning to significantly reduce manual integration effort while keeping the process reproducible and auditable.
Traditional Git merge tools are excellent at detecting textual conflicts.
However, they cannot understand:
- semantic changes;
- architectural refactorings;
- renamed abstractions;
- business rule changes;
- dependency migrations;
- long-lived feature branches.
As branches become older, the probability of semantic conflicts increases dramatically.
Developers often spend hours—or even days—performing manual merges.
The Git Integration Agent was designed to solve this problem.
The project has four primary goals.
Every change performed in the source branch is considered intentional.
The objective is to preserve those changes whenever technically possible.
Automate repetitive work involved in semantic branch integration.
Although an LLM is used during implementation, the overall workflow is deterministic.
Every execution produces:
- analysis;
- planning;
- implementation history;
- generated files;
- execution artifacts.
The project is designed as an extensible platform capable of supporting multiple repositories, workflows and LLM providers in the future.
Current capabilities include:
- Git repository analysis
- Source vs target branch comparison
- Integration strategy classification
- Semantic conflict analysis
- Automatic feature planning
- Task decomposition
- File snapshot generation
- Prompt generation
- Claude CLI integration
- AI response normalization
- AI contract validation
- Independent task execution
- Integration history
- Generated file consolidation
Git Repository
│
▼
Repository Analysis
│
▼
Integration Strategy Classification
│
▼
Feature Planning
│
▼
Task Decomposition
│
▼
File Snapshot Generation
│
▼
Prompt Construction
│
▼
Claude CLI
│
▼
Response Normalization
│
▼
Contract Validation
│
▼
Generated Source Files
│
▼
Final File Consolidation
.
├── agents/
├── analyzers/
├── classifiers/
├── contracts/
├── core/
├── docs/
├── generators/
├── implementation/
├── prompts/
├── workspace/
└── app.py
| Folder | Responsibility |
|---|---|
| agents | Reusable AI and infrastructure components |
| analyzers | Git repository analysis |
| classifiers | Integration strategy classification |
| contracts | AI response contracts |
| core | Application orchestration |
| docs | Project documentation |
| generators | Planning and analysis generators |
| implementation | Implementation pipeline |
| prompts | Prompt templates |
| workspace | Execution artifacts |
Recommended:
- Linux
Supported:
- macOS
- Windows (WSL recommended)
Python 3.14 or newer.
Verify:
python --versionVerify:
git --versionThe implementation pipeline currently depends on Claude CLI.
Verify:
claude --versionThe Claude CLI must be authenticated before executing implementation commands.
git clone <repository-url>
cd git-integration-agentpython -m venv .venvsource .venv/bin/activate.venv\Scripts\activatepip install -r requirements.txtCopy:
config.example.json
to
config.json
Update the configuration according to your environment.
python app.py analyze \
--repo "<repository>" \
--from feature \
--to qapython app.py plan-feature \
--repo "<repository>" \
--from feature \
--to qapython app.py run-task \
--workspace workspace/<workspace> \
--repo "<repository>" \
--from feature \
--to qa \
--task 1python app.py integrate-feature \
--repo "<repository>" \
--from feature \
--to qaEvery execution creates an isolated workspace.
workspace/
└── Repository/
└── source_vs_target/
├── analysis/
├── implementation-history/
│ ├── task-001/
│ ├── task-002/
│ └── ...
└── generated-files/
This structure allows executions to be resumed and inspected without affecting previous runs.
Implemented:
- Repository analysis
- Integration classification
- Feature planning
- Task decomposition
- Independent task execution
- Claude integration
- Response normalization
- AI contract validation
- Generated file consolidation
The project is under active development.
Additional documentation is available inside the docs/ directory.
| Document | Description |
|---|---|
| getting-started.md | Installation and first execution |
| architecture.md | System architecture |
| workflow.md | Complete execution workflow |
| commands.md | Command reference |
| implementation-pipeline.md | Implementation pipeline |
| prompt-engineering.md | Prompt generation strategy |
| ai-contracts.md | AI contracts |
| workspace.md | Workspace structure |
| troubleshooting.md | Known issues |
| contributing.md | Contribution guidelines |
| decision-log.md | Architectural decisions |
| roadmap.md | Project roadmap |
The project follows a few fundamental principles.
- Single Responsibility Principle
- Deterministic execution
- Explicit AI contracts
- Complete file generation
- Semantic preservation
- Reproducible executions
- Auditability
- Small composable components
Some planned improvements include:
- Prompt budget management
- Incremental snapshot loading
- Resume interrupted executions
- Automatic retry pipeline
- Progress reporting
- Multiple LLM providers
- Parallel task execution
- Automatic validation pipeline
- Better conflict visualization
Contributions are welcome.
Before submitting changes:
- Keep components focused on a single responsibility.
- Preserve deterministic behavior.
- Update documentation whenever architecture changes.
- Maintain compatibility with existing AI contracts.
- Prefer small incremental improvements.
This project is released under the MIT License.