merge

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package merge orchestrates the 7-phase IntelliMerge pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntelliMerge

type IntelliMerge struct {
	Parser           *parser.Engine
	Registry         *languages.Registry
	Grove            analysis.GroveLike
	HandoffThreshold float64 // confidence below which we emit a handoff prompt
	EnableBreaking   bool
	EnableContext    bool
	BreakingAnalyzer *analysis.BreakingChangeAnalyzer
}

IntelliMerge orchestrates parsing, classification, merging, and diagnostics for a single-file merge.

func New

New returns an IntelliMerge using default registry + thresholds.

func (*IntelliMerge) Merge

func (im *IntelliMerge) Merge(
	ctx context.Context,
	baseContent, oursContent, theirsContent []byte,
	lang core.LanguageKey,
	filePath string,
) (*core.MergeResult, error)

Merge runs the 7-phase pipeline and returns a MergeResult.

  1. Context (Grove deps + dependents)
  2. Symbol extraction (parse base, ours, theirs)
  3. Recency analysis (placeholder; uses symbol-level signals only — no git log)
  4. Project graph context (Grove blast radius)
  5. Breaking change detection
  6. Classification + strategy selection + merge application
  7. Diagnostics + handoff prompt emission (caller handles file IO)

For config files (JSON/YAML/TOML), phases 2/4/5/6 collapse to a single structural deep-merge.

Directories

Path Synopsis
Package analysis covers breaking change detection, blast radius lookup, and risk scoring during the merge pipeline.
Package analysis covers breaking change detection, blast radius lookup, and risk scoring during the merge pipeline.
Package classification categorizes a merge conflict by type and severity.
Package classification categorizes a merge conflict by type and severity.
Package strategies implements three-way merge algorithms.
Package strategies implements three-way merge algorithms.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL