Loading...
Loading...
Compare original and translation side by side
code-intelligence-routing.mdcode-intelligence-routing.md| Stage | Tool | What it does | When it runs |
|---|---|---|---|
| 1 | | Tree-sitter structural merge of base / ours / theirs. Independent additions merge cleanly even when text merge would conflict. Falls back to text merge on parse failure. | Automatically as a git merge driver, or via |
| 2 | | Replays a previously recorded human resolution for the same conflict signature. | After mergiraf, especially during long rebases where conflicts recur. |
| 3 | | Manual 3-way diff for what mergiraf and rerere could not resolve. | Launched via |
| 阶段 | 工具 | 功能 | 运行时机 |
|---|---|---|---|
| 1 | | 基于Tree-sitter对基准版本/本地版本/远程版本进行结构化合并。即使文本合并会冲突,独立新增内容也能干净合并。解析失败时回退到文本合并。 | 自动作为git合并驱动运行,或通过 |
| 2 | | 针对相同冲突特征,复用之前记录的人工解决方案。 | 在mergiraf处理之后运行,尤其适用于冲突反复出现的长期变基场景。 |
| 3 | | 针对mergiraf和rerere无法解决的冲突,提供手动三路对比工具。 | 通过 |
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz detect-squash-residueSQUASH-MERGED--baseorigin/main--branch--jsontree-matchlocal-synthgh-apilocal-synthgit cherrySQUASH-MERGEDmethod=tree-matchtree-match+ghSQUASH-MERGEDmethod=gh-apiSQUASH-MERGEDmethod=local-synthnot-detectednot-applicablegit merge <base>git reset --hard <base>git cherry-pick <unique-shas>python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz detect-squash-residueSQUASH-MERGED--baseorigin/main--branch--jsontree-matchlocal-synthgh-apilocal-synthgit cherrySQUASH-MERGEDmethod=tree-matchtree-match+ghSQUASH-MERGEDmethod=gh-apiSQUASH-MERGEDmethod=local-synthnot-detectednot-applicablegit merge <base>git reset --hard <base>git cherry-pick <unique-shas>python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz conflict-summary--json--verbose--context Ngit log --merge --oneline # commits involved in the merge
git status # conflict / staging statepython3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz conflict-summary--json--verbose--context Ngit log --merge --oneline # 涉及合并的提交
git status # 冲突/暂存状态undefinedundefined
To inspect what mergiraf would produce for a single file without touching the working copy, use `--debug`:
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve --debug <path>catdiffcp <merged_path> <path>
git add <path>
如需查看mergiraf对单个文件的处理结果但不修改工作区,使用`--debug`参数:
```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/melt.pyz batch-resolve --debug <path>catdiffcp <merged_path> <path>
git add <path>git rerere status # files with recorded resolutions
git rerere diff # show what rerere would applygit mergetool # opens kdiff3 for each conflicted file
git mergetool <path> # or just one filegit add <resolved-files>
git merge --continue # or
git rebase --continue # or
git cherry-pick --continuegit statusUnmerged paths<<<<<<<git rerere status # 已有记录解决方案的文件
git rerere diff # 查看rerere将应用的变更git mergetool # 为每个冲突文件打开kdiff3
git mergetool <path> # 或仅处理单个文件git add <resolved-files>
git merge --continue # 或
git rebase --continue # 或
git cherry-pick --continuegit statusUnmerged paths<<<<<<<| Script | Purpose | When |
|---|---|---|
| Detect that the branch was squash-merged and emit both the merge and reset+cherry-pick remedies | Run first — short-circuits the cascade |
| Structured summary with line numbers and context | After residue check |
| Run | Supported languages |
| Choose ours / theirs per hunk | Shell, SQL, formats mergiraf does not parse |
| Take one side and regenerate the lockfile | |
| 脚本 | 用途 | 运行时机 |
|---|---|---|
| 检测分支是否已被squash合并,并输出合并和重置+cherry-pick两种解决方案 | 优先运行——若检测到则终止后续流程 |
| 生成带行号和上下文的结构化冲突摘要 | 残留检查之后 |
| 对所有冲突文件运行 | 支持的语言文件 |
| 按冲突块选择本地/远程版本 | Shell、SQL及mergiraf无法解析的格式 |
| 选择某一侧版本并重新生成锁文件 | |
gh/cookgit addcommit/agegh/cookgit addcommit/agemergiraf solve--stdout-p--output.gitattributes|||||||mergiraf solve--stdout-p--output.gitattributes|||||||../cheese/references/handoff-gate.mdgit merge --continuegit rebase --continuegit cherry-pick --continue/melt../cheese/references/handoff-gate.mdgit merge --continuegit rebase --continuegit cherry-pick --continue/melt