Documentation
¶
Overview ¶
Package merge orchestrates the IntelliMerge escalation ladder: git-parity line merge, fine-grained LCS line merge, then symbol-level merge — each rung gated by a clean re-parse of the produced output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateResolution ¶ added in v0.5.0
ValidateResolution checks that src is a plausible resolution for filePath: non-empty, free of conflict markers, and syntactically valid for AST languages. Used before an agent-produced resolution is written to disk.
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 ¶
func New(g analysis.GroveLike) *IntelliMerge
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 pipeline and returns a MergeResult.
- Trivial exits (identical sides, one-sided change)
- Symbol extraction (parse base, ours, theirs)
- Breaking change detection (Grove blast radius, optional)
- Escalation ladder: a. git-equivalent line merge — clean + parses → ship (git parity) b. fine-grained LCS line merge — clean + parses → ship c. symbol-level merge + reconstruction — validated by re-parse
- Classification + diagnostics + handoff prompt emission (caller handles file IO)
Config files (JSON/YAML/TOML) use the line merge first and a structural deep-merge on conflict.
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. |