Open Source

Linux Kernel Proposes New Directory for AI-Powered Bug-Fix Skills

Sasha Levin is pushing the Linux kernel to create a dedicated agents directory that would house AI coding assistant skills, starting with a tool to verify which commit actually introduced a bug before assigning it a Fixes tag.

4 min read
Linux May Get a New Home for AI Agent Skills

When a kernel patch includes a Fixes tag pointing to the commit that introduced a bug, that tag may be incorrect if the last change to touch the buggy line merely relocated the code to a different file. Sasha Levin, co-maintainer of the stable and long-term support kernel trees, is working to address this problem by enlisting AI coding assistants to validate which commit truly introduced the defect before the Fixes tag gets assigned.

Levin submitted a two-patch series to the workflows and ksummit mailing lists proposing a new agents directory within the kernel tree to house skills and resources designed for coding assistants. The proposal aims to establish a standardized location for these tools and the prompts they use.

The new directory

The first patch introduces an agents/ directory at the kernel source tree's root level, intended to contain skills, prompts, and other materials for use by coding assistants. A MAINTAINERS entry would cover the directory's governance.

Each skill would occupy its own folder beneath agents/skills/, with a SKILL.md file serving as the entry point and written according to the Agent Skills format. Assistants would retrieve resources directly from their repository paths, with internal links within a skill remaining relative to that skill's folder. The kernel's coding assistants documentation would include a new section describing this structure.

The find-fixes skill, introduced in the second patch, would become the first entry in this directory.

Why do Fixes tags go wrong?

Levin traces the series to a question raised by Ted Ts'o regarding inaccurate tags appearing in stable tree maintenance work. Ts'o pointed to large language model workflows that assist in identifying the correct commit.

Ts'o later disclosed that the inquiry stemmed from a conversation with Hannes Reinecke, who suggested that between 15 and 20 percent of Fixes tags contain errors. The consequences extend beyond administrative record-keeping: stable maintainers and distributions rely on these tags to determine which kernel versions require a particular fix. An incorrect tag can direct a fix to the wrong branches or leave a vulnerability unpatched.

The find-fixes skill examines Git history and generates a proposed tag along with supporting evidence, without modifying the commit itself. According to the skill's guide.rst file, no single indicator—not even an existing tag—definitively determines which commit a Fixes tag should reference. The agent would explain how the bug manifests, identify candidate commits, and evaluate each against its parent commit.

The skill distinguishes between the commit that introduced the code, the one that made it faulty, and any subsequent change that merely exposed the problem. For backported fixes, it would determine whether the bug originated in the initial change or in how that change was adapted for an older kernel version. The tool would handle merges, reverts, and incomplete histories with dedicated logic.

When the skill cannot pinpoint the origin, it returns no tag, lists candidate commits and identifies what information is missing, leaving the fix in draft status until someone resolves the uncertainty.

Still a work in progress

The second patch would add language to the kernel's coding assistants documentation requiring that an assistant verify the tag before finalizing a bug fix, its commit message, or when reviewing an existing tag. The documentation's step for committing a fix would shift from requesting a Fixes tag to requesting a verified tag. The skill itself would not write commit messages, apply tags, or determine whether a fix belongs in the stable tree.

This series builds on Levin's earlier advocacy for the kernel's AI coding assistants policy, which was covered in April, and his separate proposal for a kernel killswitch.

The location for these files remains undecided. Levin's introductory patch message indicates uncertainty about whether they should reside under Documentation or in a separate agents directory at the root level.

Greg Kroah-Hartman questioned whether the series would resolve issues with tools bypassing the kernel's guidance due to a missing AGENTS.md file. Levin responded that this represents a separate concern for a symlink patch.

Source: It's FOSS News · Reporting supplemented by The Silicon Ledger staff.