Agentic review of Linux Kernel code changes
See the code
Sashiko (刺し子, literally "little stabs") is a form of decorative reinforcement stitching from Japan. Originally used to reinforce points of wear or to repair worn places or tears with patches, here it represents our mission to reinforce the Linux kernel through automated, intelligent patch review.
Sashiko is an agentic Linux kernel code review system. It uses a set of Linux kernel-specific prompts and a special protocol to review proposed Linux kernel changes. Sashiko can ingest patches from mailing lists or local git. It's fully self contained (doesn't use any external agentic cli tools) and can work with various LLM providers.
If you are a kernel maintainer, please see our Guide for Kernel Maintainers for information on interacting with Sashiko.
Sashiko is not perfect, but in our measurements the quality of reviews is high: in our tests sashiko was able to find 53.6% (with Gemini 3.1 Pro) of bugs based on unfiltered last 1000 upstream commits with Fixed: tags. In some sense, it's already above the human level given that 100% of these bugs made it through human-driven code reviews and were accepted to the main tree. The rate of false positives is harder to measure, but based on limited manual reviews it's well within 20% range and the majority of it is a gray zone.
Please, note that as with any other LLM-based tools, Sashiko's output is probabilistic: it might find or not find bugs (or find other bugs) with the same input.
lore.kernel.org), GitHub PRs, and GitLab MRs for new patch submissions.Sashiko uses a multi-stage review protocol to evaluate patches thoroughly from multiple perspectives, mimicking a team of specialized reviewers.
Stages are identified by name. The analysis stages run in parallel; the consolidation stages then run in sequence over what they produced.
Analysis stages. goal, implementation and execution-flow always run.
The planning stage decides which of the rest a patch warrants, and --stages
overrides that choice by name.
Consolidation stages, in order:
Also Sashiko is using per-subsystem and generic prompts, initially developed by Chris Mason:
Before using Sashiko, please be aware of the following:
Sashiko operates by sending patch data and potentially extensive portions of the Linux kernel git history to your configured Large Language Model (LLM) provider.
Running an automated review system like Sashiko can be computationally expensive and may incur significant API costs.
cargo install sashiko
git clone --recursive https://github.com/sashiko-dev/sashiko.git
cd sashiko
Note: The --recursive flag is important to initialize the linux kernel source submodule.
Copy Settings.toml to customize your configuration. For a full reference of every
setting, see the Configuration Reference. The default Settings.toml includes sections for:
sashiko.db).[forge], the NNTP (mailing list) ingestor is disabled by default. If you need to monitor both, set disable_nntp = false in the [forge] section of your config.Sashiko supports multiple LLM providers. To get started with the default (Gemini):
cp docs/examples/Settings.example.toml Settings.toml
export LLM_API_KEY="your-api-key-here"
When installed with cargo install, create the user config with:
sashiko init
This writes ~/.config/sashiko.toml by default. Use sashiko init --print
to print the template or sashiko init --path <file> to choose a different
location.
For Claude, Claude Code CLI, GitHub Copilot CLI, AWS Bedrock, Vertex AI, Kiro CLI, Devin CLI, goose, and OpenAI-compatible endpoints, see the LLM Provider Configuration Guide.
cargo build --release
Sashiko requires a configuration file to run (usually ~/.config/sashiko.toml or ./Settings.toml). You can initialize a default configuration with:
sashiko init
Sashiko can be run in two modes: Local Review (standalone, no daemon required) or as a Daemon (for automated monitoring, web UI, and team integration).
Sashiko can review your patches locally without starting the daemon, sending emails, or updating the database.
Run it from the Linux source checkout containing the commits to review:
# Review the latest commit
sashiko review
# Review a range of commits
sashiko review HEAD~3..HEAD
This mode:
For local review, Sashiko loads settings from ./Settings.toml if it exists in the current directory, otherwise from ~/.config/sashiko.toml. Use --settings <path> to point to a specific settings file.
The daemon is responsible for monitoring mailing lists (NNTP), managing the database, and coordinating the AI review process. It also provides a Web UI and an API.
To start the daemon:
sashiko
(Or from source: cargo run, or via Nix: nix run github:sashiko-dev/sashiko)
Once the daemon is running, you can access the Web UI. The daemon will print the URL to access it from localhost.
The CLI tool sashiko-cli allows you to interact with a running Sashiko daemon.
# Submit patches to the running daemon
sashiko-cli submit HEAD~3..HEAD
# Check review status
sashiko-cli show latest
(From source: cargo run --bin sashiko-cli -- [OPTIONS] [COMMAND], or via Nix: nix profile add github:sashiko-dev/sashiko)
For the full command reference, see the CLI Reference.
Sashiko includes a benchmark tool to evaluate review quality against known bugs. See the Benchmarking Guide for setup and usage.
Sashiko implements stateless JWT-based authorization and login via sign-in links.
API mutations are strictly controlled by a fine-grained, capability-based Access Control List (ACL) configured in Settings.toml ([server.acl]). Administrators assign user identities directly to specific capability arrays (ingest, cancel, review), adhering strictly to the principle of least privilege. Two further arrays cover the Linux kernel bug tracker: security lists the kernel security list, whose members read and comment on every bug and read the raw AI transcripts without gaining any other capability, and bug_reporters lists the principals permitted to file a bug over HTTP, which ships empty so that only admins can. Authority over an individual bug is not a capability array: it is resolved per request from MAINTAINERS, so a maintainer reaches exactly the bugs filed against the subsystems they are listed for. In addition, an explicit blocklist array denies access unconditionally, taking precedence over every capability, over admin rights and over every bypass. If the ACL configuration is omitted or the arrays are empty, the server transparently falls back to a completely secure, "Fail-Closed" mode where no remote mutations are permitted.
The server operates without persistent traditional user accounts and retains no user data aside from the explicit comments, actions, and review history metadata submitted directly onto the hosted bugs.
We welcome contributions and feedback through two main channels:
sashiko@lists.linux.dev (archived at lore.kernel.org) for Sashiko-related announcements and broader AI-review discussions, including general feedback, architectural ideas, and specific prompt discussions. Automated patch reviews are sent from and should be replied to sashiko-reviews@lists.linux.dev.This project uses the Developer Certificate of Origin (DCO). All contributions must include a Signed-off-by line to certify that you wrote the code or have the right to contribute it.
You can automatically add this line by using the -s flag when committing:
git commit -s
Development agents working on this repository should follow the guidance in GEMINI.md.
Please make sure your code builds cleanly without warnings, all tests pass, and cargo fmt and cargo clippy succeed before sending a pull request.
If you are changing AI-related parts, please run at least several code reviews.
Development got much faster these days, but testing is as important as ever.
We provide specialized skills under skills/ to automate development workflows:
review-pr: Performs deep, scrutinizing code reviews against GEMINI.md and design documents. Detects relevant design files automatically and generates categorized findings with ready-to-paste diffs.sashiko-feature: A meta-skill for implementing new features. It handles design document matching, codebase investigation, and ensures adherence to SOLID/DRY principles in Rust, while iteratively running make checks.Follow your agent interface's settings (e.g., Antigravity, OpenCode, Claude Code) to symlink or copy the skill configurations (the SKILL.md and references/ files) into your agent's custom skill or instruction path.
Copyright The Linux Foundation and its contributors. All rights reserved.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
(top 30 of 90)
Rust
91.2%
HTML
7.9%
Agentic review of Linux Kernel code changes
See the code
Sashiko (刺し子, literally "little stabs") is a form of decorative reinforcement stitching from Japan. Originally used to reinforce points of wear or to repair worn places or tears with patches, here it represents our mission to reinforce the Linux kernel through automated, intelligent patch review.
Sashiko is an agentic Linux kernel code review system. It uses a set of Linux kernel-specific prompts and a special protocol to review proposed Linux kernel changes. Sashiko can ingest patches from mailing lists or local git. It's fully self contained (doesn't use any external agentic cli tools) and can work with various LLM providers.
If you are a kernel maintainer, please see our Guide for Kernel Maintainers for information on interacting with Sashiko.
Sashiko is not perfect, but in our measurements the quality of reviews is high: in our tests sashiko was able to find 53.6% (with Gemini 3.1 Pro) of bugs based on unfiltered last 1000 upstream commits with Fixed: tags. In some sense, it's already above the human level given that 100% of these bugs made it through human-driven code reviews and were accepted to the main tree. The rate of false positives is harder to measure, but based on limited manual reviews it's well within 20% range and the majority of it is a gray zone.
Please, note that as with any other LLM-based tools, Sashiko's output is probabilistic: it might find or not find bugs (or find other bugs) with the same input.
lore.kernel.org), GitHub PRs, and GitLab MRs for new patch submissions.Sashiko uses a multi-stage review protocol to evaluate patches thoroughly from multiple perspectives, mimicking a team of specialized reviewers.
Stages are identified by name. The analysis stages run in parallel; the consolidation stages then run in sequence over what they produced.
Analysis stages. goal, implementation and execution-flow always run.
The planning stage decides which of the rest a patch warrants, and --stages
overrides that choice by name.
Consolidation stages, in order:
Also Sashiko is using per-subsystem and generic prompts, initially developed by Chris Mason:
Before using Sashiko, please be aware of the following:
Sashiko operates by sending patch data and potentially extensive portions of the Linux kernel git history to your configured Large Language Model (LLM) provider.
Running an automated review system like Sashiko can be computationally expensive and may incur significant API costs.
cargo install sashiko
git clone --recursive https://github.com/sashiko-dev/sashiko.git
cd sashiko
Note: The --recursive flag is important to initialize the linux kernel source submodule.
Copy Settings.toml to customize your configuration. For a full reference of every
setting, see the Configuration Reference. The default Settings.toml includes sections for:
sashiko.db).[forge], the NNTP (mailing list) ingestor is disabled by default. If you need to monitor both, set disable_nntp = false in the [forge] section of your config.Sashiko supports multiple LLM providers. To get started with the default (Gemini):
cp docs/examples/Settings.example.toml Settings.toml
export LLM_API_KEY="your-api-key-here"
When installed with cargo install, create the user config with:
sashiko init
This writes ~/.config/sashiko.toml by default. Use sashiko init --print
to print the template or sashiko init --path <file> to choose a different
location.
For Claude, Claude Code CLI, GitHub Copilot CLI, AWS Bedrock, Vertex AI, Kiro CLI, Devin CLI, goose, and OpenAI-compatible endpoints, see the LLM Provider Configuration Guide.
cargo build --release
Sashiko requires a configuration file to run (usually ~/.config/sashiko.toml or ./Settings.toml). You can initialize a default configuration with:
sashiko init
Sashiko can be run in two modes: Local Review (standalone, no daemon required) or as a Daemon (for automated monitoring, web UI, and team integration).
Sashiko can review your patches locally without starting the daemon, sending emails, or updating the database.
Run it from the Linux source checkout containing the commits to review:
# Review the latest commit
sashiko review
# Review a range of commits
sashiko review HEAD~3..HEAD
This mode:
For local review, Sashiko loads settings from ./Settings.toml if it exists in the current directory, otherwise from ~/.config/sashiko.toml. Use --settings <path> to point to a specific settings file.
The daemon is responsible for monitoring mailing lists (NNTP), managing the database, and coordinating the AI review process. It also provides a Web UI and an API.
To start the daemon:
sashiko
(Or from source: cargo run, or via Nix: nix run github:sashiko-dev/sashiko)
Once the daemon is running, you can access the Web UI. The daemon will print the URL to access it from localhost.
The CLI tool sashiko-cli allows you to interact with a running Sashiko daemon.
# Submit patches to the running daemon
sashiko-cli submit HEAD~3..HEAD
# Check review status
sashiko-cli show latest
(From source: cargo run --bin sashiko-cli -- [OPTIONS] [COMMAND], or via Nix: nix profile add github:sashiko-dev/sashiko)
For the full command reference, see the CLI Reference.
Sashiko includes a benchmark tool to evaluate review quality against known bugs. See the Benchmarking Guide for setup and usage.
Sashiko implements stateless JWT-based authorization and login via sign-in links.
API mutations are strictly controlled by a fine-grained, capability-based Access Control List (ACL) configured in Settings.toml ([server.acl]). Administrators assign user identities directly to specific capability arrays (ingest, cancel, review), adhering strictly to the principle of least privilege. Two further arrays cover the Linux kernel bug tracker: security lists the kernel security list, whose members read and comment on every bug and read the raw AI transcripts without gaining any other capability, and bug_reporters lists the principals permitted to file a bug over HTTP, which ships empty so that only admins can. Authority over an individual bug is not a capability array: it is resolved per request from MAINTAINERS, so a maintainer reaches exactly the bugs filed against the subsystems they are listed for. In addition, an explicit blocklist array denies access unconditionally, taking precedence over every capability, over admin rights and over every bypass. If the ACL configuration is omitted or the arrays are empty, the server transparently falls back to a completely secure, "Fail-Closed" mode where no remote mutations are permitted.
The server operates without persistent traditional user accounts and retains no user data aside from the explicit comments, actions, and review history metadata submitted directly onto the hosted bugs.
We welcome contributions and feedback through two main channels:
sashiko@lists.linux.dev (archived at lore.kernel.org) for Sashiko-related announcements and broader AI-review discussions, including general feedback, architectural ideas, and specific prompt discussions. Automated patch reviews are sent from and should be replied to sashiko-reviews@lists.linux.dev.This project uses the Developer Certificate of Origin (DCO). All contributions must include a Signed-off-by line to certify that you wrote the code or have the right to contribute it.
You can automatically add this line by using the -s flag when committing:
git commit -s
Development agents working on this repository should follow the guidance in GEMINI.md.
Please make sure your code builds cleanly without warnings, all tests pass, and cargo fmt and cargo clippy succeed before sending a pull request.
If you are changing AI-related parts, please run at least several code reviews.
Development got much faster these days, but testing is as important as ever.
We provide specialized skills under skills/ to automate development workflows:
review-pr: Performs deep, scrutinizing code reviews against GEMINI.md and design documents. Detects relevant design files automatically and generates categorized findings with ready-to-paste diffs.sashiko-feature: A meta-skill for implementing new features. It handles design document matching, codebase investigation, and ensures adherence to SOLID/DRY principles in Rust, while iteratively running make checks.Follow your agent interface's settings (e.g., Antigravity, OpenCode, Claude Code) to symlink or copy the skill configurations (the SKILL.md and references/ files) into your agent's custom skill or instruction path.
Copyright The Linux Foundation and its contributors. All rights reserved.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
(top 30 of 90)
Rust
91.2%
HTML
7.9%