Hasty Briefsbeta

Bilingual

Weave: Merging based on language structure and not lines

5 hours ago
  • #code-collaboration
  • #git-merge
  • #semantic-merge
  • Weave is an entity-level semantic merge driver for Git, replacing Git's line-level merge with parsing code using tree-sitter and merging by function and class.
  • It resolves merge conflicts when two agents edit different functions in the same file by recognizing that functions don't actually overlap, avoiding conflicts that Git would flag based on overlapping lines.
  • The tool allows agents to claim entities before editing to detect potential conflicts early and supports coordination for multi-agent workflows.
  • It includes 15 tools accessible via Model Context Protocol for AI agents like Claude and uses sem-core and tree-sitter for entity extraction across 7 languages and 5 data formats.
  • Installation is simple via 'brew install weave' and setup in a project with 'weave setup' to configure the merge driver, enabling conflict-free merges as demonstrated with 'git merge feature-b'.