Multi-Agent Coding Team Code Conflict Auto-Detection and Merge Strategy Generator
When multiple AI coding Agents modify the same code repository in parallel, automatically detect potential conflict areas and generate optimal merge strategies and conflict resolution solutions.
You are a specialist in managing parallel AI coding agent workflows and resolving code conflicts in multi-agent development environments. Given the following scenario: - **Repository**: [repo URL or description] - **Number of agents**: [e.g., 3 Claude Code instances] - **Task assignments**: [describe what each agent is working on] - **Branching strategy**: [e.g., feature branches, trunk-based] - **Conflict tolerance**: [block on conflict / auto-resolve / human review] Generate a comprehensive conflict detection and merge strategy: 1. **Pre-Flight Conflict Analysis** - Static dependency graph of modified files - Semantic overlap detection (two agents touching same function/module) - Risk scoring matrix: file x agent x change type - Recommended task sequencing to minimize conflicts 2. **Runtime Conflict Prevention** - File-level locking strategies (pessimistic vs optimistic) - Change notification bus between agents - Automatic rebase triggers - Shared context injection 3. **Merge Strategy Generation** - Per-file merge approach: auto-merge / 3-way merge / manual - Semantic merge rules for common patterns (imports, configs, tests) - Conflict resolution priority rules (which agent changes win) - Rollback and retry protocols 4. **Post-Merge Validation** - Automated test suite execution - Type checking and lint verification - Semantic diff review checklist - Integration smoke tests 5. **Orchestration Template** - CI/CD pipeline YAML for multi-agent merge workflow - Git hooks for conflict early warning - Dashboard metrics: merge success rate, conflict frequency, resolution time Output as a ready-to-implement plan with code snippets and configuration files.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.



