public inbox for tools@linux.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: tools@kernel.org
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	broonie@kernel.org, Sasha Levin <sashal@kernel.org>
Subject: [RFC v2 0/7] LLMinus: LLM-Assisted Merge Conflict Resolution
Date: Sun, 11 Jan 2026 16:29:08 -0500	[thread overview]
Message-ID: <20260111212915.195056-1-sashal@kernel.org> (raw)
In-Reply-To: <20251219181629.1123823-1-sashal@kernel.org>

This series introduces LLMinus, an LLM-powered tool for assisting with
git merge conflict resolution in the Linux kernel.

The tool builds a searchable database of historical conflict resolutions
from the kernel's git history, uses semantic embeddings to find similar
past conflicts, and constructs rich prompts for LLMs to resolve current
conflicts with appropriate context.

Commands:
  learn     - Extract historical conflict resolution cases from git history
  vectorize - Create semantic embeddings using fastembed (BGE-small model)
  find      - Perform similarity search on historical resolutions
  resolve   - LLM-assisted conflict resolution with contextual guidance
  pull      - Fetch pull requests from lore.kernel.org and auto-resolve

The tool works with any LLM that accepts stdin input, performing best
with models that support tool use for dynamic investigation.

Changes since RFC v1:
====================
- Add --max-tokens option (default: 100K) with adaptive RAG reduction
  to prevent prompt overflow errors across different LLM providers.
  When prompts exceed the token limit, historical examples are
  progressively removed until the prompt fits.

- Add semantic conflict detection via build test integration. When
  no textual conflicts exist but the merge may have introduced build
  failures, LLMinus runs the build and generates specialized prompts
  for the LLM to investigate and fix compile errors caused by
  incompatible changes from different branches.

- Update ureq HTTP client from v2 to v3.

Real-World Testing:
==================
LLMinus is being actively tested through automated subsystem integration
branches. These are available for anyone who wants to follow along or
help identify edge cases:

  https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-next.git/

The repository contains ~40 subsystem-specific integration branches
(drivers-next, fs-next, net-next, etc.) that are merged into an all-next
integration branch. This exercises LLMinus on actual kernel merges from
maintainer trees.

Note that these branches are experimental and primarily serve to shake
out LLMinus itself. They are not intended to replace or compete with
existing integration workflows - rather, they provide a testing ground
for the tool. Build testing is performed after merges complete, and
trees are only recreated when upstream maintainers rebase.

Build:
  cd tools/llminus && cargo build --release

RFC v1: https://lore.kernel.org/all/20251219181629.1123823-1-sashal@kernel.org/

Sasha Levin (7):
  LLMinus: Add skeleton project with learn command
  LLMinus: Add vectorize command with fastembed
  LLMinus: Add find command for similarity search
  LLMinus: Add resolve command for LLM-assisted conflict resolution
  LLMinus: Add pull command for LLM-assisted kernel pull request merging
  LLMinus: Add prompt token limit enforcement
  LLMinus: Add build test integration for semantic conflicts

 tools/llminus/.gitignore  |    1 +
 tools/llminus/Cargo.toml  |   20 +
 tools/llminus/src/main.rs | 2678 +++++++++++++++++++++++++++++++++++++
 3 files changed, 2699 insertions(+)
 create mode 100644 tools/llminus/.gitignore
 create mode 100644 tools/llminus/Cargo.toml
 create mode 100644 tools/llminus/src/main.rs

-- 
2.51.0


  parent reply	other threads:[~2026-01-11 21:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19 18:16 [RFC 0/5] LLMinus: LLM-Assisted Merge Conflict Resolution Sasha Levin
2025-12-19 18:16 ` [RFC 1/5] LLMinus: Add skeleton project with learn command Sasha Levin
2025-12-19 18:16 ` [RFC 2/5] LLMinus: Add vectorize command with fastembed Sasha Levin
2025-12-19 18:16 ` [RFC 3/5] LLMinus: Add find command for similarity search Sasha Levin
2025-12-19 18:16 ` [RFC 4/5] LLMinus: Add resolve command for LLM-assisted conflict resolution Sasha Levin
2025-12-19 18:16 ` [RFC 5/5] LLMinus: Add pull command for LLM-assisted kernel pull request merging Sasha Levin
2025-12-21 16:10 ` [RFC 0/5] LLMinus: LLM-Assisted Merge Conflict Resolution Sasha Levin
2025-12-22 14:50   ` Mark Brown
2025-12-23 12:36     ` Sasha Levin
2025-12-23 17:47       ` Mark Brown
2026-01-05 18:00         ` Sasha Levin
2026-01-05 18:30           ` Mark Brown
2026-01-11 21:29 ` Sasha Levin [this message]
2026-01-11 21:29   ` [RFC v2 1/7] LLMinus: Add skeleton project with learn command Sasha Levin
2026-01-11 21:29   ` [RFC v2 2/7] LLMinus: Add vectorize command with fastembed Sasha Levin
2026-01-11 21:29   ` [RFC v2 3/7] LLMinus: Add find command for similarity search Sasha Levin
2026-01-11 21:29   ` [RFC v2 4/7] LLMinus: Add resolve command for LLM-assisted conflict resolution Sasha Levin
2026-01-11 21:29   ` [RFC v2 5/7] LLMinus: Add pull command for LLM-assisted kernel pull request merging Sasha Levin
2026-01-11 21:29   ` [RFC v2 6/7] LLMinus: Add prompt token limit enforcement Sasha Levin
2026-01-11 21:29   ` [RFC v2 7/7] LLMinus: Add build test integration for semantic conflicts Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260111212915.195056-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tools@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox