返回提示词库
文本 · 通用大模型多Agent编码团队代码冲突自动检测与合并策略生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

多Agent编码团队代码冲突自动检测与合并策略生成器

当多个AI编码Agent并行修改同一代码仓库时,自动检测潜在冲突区域,生成最优合并策略与冲突解决方案

13浏览
完整提示词可替换花括号中的变量后直接使用

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.

2026/4/26

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。