worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

Semantic merge driver for cleaner worktree branch merges

Open rs545837 opened this issue 9 months ago • 3 comments

When merging worktree branches back to main, git's line-level merge creates false conflicts whenever two branches touch the same file, even if they edited different functions.

weave is a semantic merge driver that merges at the function/class level using tree-sitter. It registers via .gitattributes so every git merge and git rebase uses it automatically in worktrees. On benchmarks: 31/31 clean merges vs git's 15/31.

It also ships as an MCP server with weave_potential_conflicts for detecting overlapping changes between worktrees before merge time, and weave_preview_merge for simulating merge outcomes.

Could be worth mentioning in the docs or integrating as a recommended merge driver for worktrunk users running parallel agents.

brew install ataraxy-labs/tap/weave

rs545837 avatar Feb 22 '26 19:02 rs545837

Thanks for the suggestion! This is a feature request rather than a bug, so I'll leave it for a maintainer to evaluate and prioritize.

worktrunk-bot avatar Feb 22 '26 19:02 worktrunk-bot

I'm a big fan of the concept, and the tool looks great

the Worktrunk project should be fairly secular about tools; doesn't have a role to endorse specific ones

but will keep an eye for me personally, and best of luck with the project, thanks for contributing to the ecosystem!

max-sixty avatar Feb 22 '26 20:02 max-sixty

Thanks! Appreciate it.

rs545837 avatar Feb 22 '26 20:02 rs545837