Edit Quality
BMO’s edit quality pipeline connects seven stages — from intelligent tool selection through adaptive learning — so each edit in a session benefits from what the system learned from previous edits. The pipeline catches errors introduced by edits before the model moves on, and automatically adjusts strategy when edits are producing too many failures.
What problem it solves
Section titled “What problem it solves”Multi-line edits can introduce compilation errors, break references in other files, or fail to apply when the model’s old_string doesn’t match exactly. Without validation, the model discovers these problems turns later — or never. BMO catches them immediately and feeds the information back.
How it works
Section titled “How it works”- Tool router — a decision tree biases the model toward the smallest edit tool that matches the intent (
editfor single replacements,multieditfor coordinated changes, LSP symbol tools for renames). Model edit metadata can declare anedit_floor(exact_replace,unified_diff,patch, orwhole_file) that constrains low-confidence format choices while adaptiveedit_tool_preferenceremains the higher session-learning layer. - Pre-edit ripple — before the file is modified, LSP impact analysis identifies which other files reference symbols in the edited file.
- Edit mutation — one of 8 edit tools applies the change.
- Confidence gate — for multi-line edits, LSP error counts are compared before and after. If new errors were introduced, a
<confidence_gate>warning tells the model to fix them. - Post-edit ripple — after mutation, a second ripple analysis identifies affected files and suggests follow-up edits.
- Edit resolver — when exact
old_stringmatch fails, a small model produces the correct replacement. - Adaptive learning — the
edit_tool_preferencegene tracks resolver fire rate and reshapes the edit strategy mid-session.
Configuration
Section titled “Configuration”Most layers activate automatically when LSP is available. The edit resolver auto-enables when a supported backend is configured.
[options.edit_resolver]enabled = true # auto-enables when backend supports itmodel = "small" # cost-bounded: uses the small model slot
[options.smart_apply]enabled = true # stale-file 3-way merge
[options.suggested_edits]mode = "advisory" # "advisory" or "required"
[options.adaptive_orchestration]enabled = true # enables edit_tool_preference geneOptions
Section titled “Options”| Option | Default | Description |
|---|---|---|
edit_resolver.enabled | auto | Model-assisted fallback for exact-match failures |
edit_resolver.model | "small" | Model slot: small (fast) or large (more reasoning) |
smart_apply.enabled | false | Stale-file conflict recovery via 3-way merge |
suggested_edits.mode | "advisory" | Whether ripple-suggested edits are best-effort or required |
adaptive_orchestration.enabled | false | Adaptive genome including edit_tool_preference gene |
The tool router and confidence gate have no config — they are always active when the edit tools run.
When to enable
Section titled “When to enable”- Edit resolver — enable for any session using models that occasionally produce inexact
old_stringmatches. Cost is bounded by thesmallmodel slot. - Smart Apply — enable for long sessions or multi-agent workflows where files may change between reads and edits.
- Adaptive orchestration — enable for sessions where you want the system to learn from edit patterns and adjust strategy automatically.
Related
Section titled “Related”- Editing tools (architecture and resolver) — full pipeline design and model-assisted fallback details.
- Smart Apply — stale-file conflict recovery.
- Adaptive Orchestration — genome and monitor system.