fix-merge-conflicts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Fix merge conflicts

修复合并冲突

Trigger

触发条件

Branch has unresolved merge conflicts and needs a reliable path to a buildable state.
分支存在未解决的合并冲突,需要一条可靠路径恢复至可构建状态。

Workflow

工作流程

  1. Detect all conflicting files from git status and conflict markers.
  2. Resolve each conflict with minimal, correctness-first edits.
  3. Prefer preserving both sides when safe. Otherwise, choose the variant that compiles and keeps public behavior stable.
  4. Regenerate lockfiles with package manager tools instead of hand-editing.
  5. Run compile, lint, and relevant tests.
  6. Stage resolved files and summarize key decisions.
  1. 从git状态和冲突标记中检测所有冲突文件。
  2. 以最小化、正确性优先的编辑方式解决每个冲突。
  3. 在安全的情况下优先保留双方内容。否则,选择可编译且能保持公共行为稳定的版本。
  4. 使用包管理器工具重新生成锁文件,而非手动编辑。
  5. 运行编译、代码检查及相关测试。
  6. 暂存已解决的文件并总结关键决策。

Guardrails

约束规则

  • Keep changes minimal and readable.
  • Do not leave conflict markers in any file.
  • Avoid broad refactors while resolving conflicts.
  • Do not push or tag during conflict resolution.
  • 保持修改最小化且可读性强。
  • 不得在任何文件中遗留冲突标记。
  • 解决冲突期间避免大范围重构。
  • 冲突解决过程中不得推送或打标签。

Output

输出内容

  • Files resolved
  • Notable resolution choices
  • Build/test outcome
  • 已解决的文件
  • 值得注意的冲突解决选择
  • 构建/测试结果