mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Ramos <capitain_jack@yahoo.com>
To: Sasha Levin <sashal@kernel.org>, Theodore Ts'o <tytso@mit.edu>
Cc: workflows@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: [PATCH] agents: add a skill to determine the target tree of a change
Date: Wed, 25 Nov 2026 06:27:39 -0000	[thread overview]
Message-ID: <179558805924.3383392.1456615917266025706@yahoo.com> (raw)
In-Reply-To: <179558805924.3383392.1456615917266025706.ref@yahoo.com>

From: Daniel Campos Ramos <Capitain_Jack@yahoo.com>

Whether a change goes into the current release during its -rc weeks or
waits for the next merge window is decided by hand, and being a fix is
often taken as enough. Linus asked that new development and test cases
be kept on a separate branch so that they can be merged during the merge
window, and noted that fixes for subtle bugs that went unnoticed for a
long time can themselves be buggy.

Add a skill that sends the agent to the parts of 2.Process.rst,
howto.rst and handling-regressions.rst that describe the cycle, and to
the maintainer profiles of the changed files, and adds the checks agents
tend to get wrong: reading where the cycle stands, using the kernel's
meaning of a regression, keeping fixes for old bugs, new tests, cleanups
and new development for the next merge window, splitting mixed changes,
and counting every added line when judging a change sent during the -rc
weeks. The skill proposes a target; the maintainer decides.

Most of the skill points at existing documents. Keeping new tests on a
separate branch for the merge window, and counting lines that are not
built by default, come from Linus's mail and are not in Documentation/
yet.

Point the bug-fix procedure in coding-assistants.rst at the skill.

Link: https://lore.kernel.org/r/CAHk-=whyUfwzMDMTpih8Xs1MxmhwTCDAc_YwUSZG79vXFMLU=Q@mail.gmail.com
Link: https://lore.kernel.org/r/CAHk-=whOCnAwXz-FMRdQEDJQ+9b2YXh9M=GHgRay0o4cxSmPVg@mail.gmail.com
Signed-off-by: Daniel Campos Ramos <Capitain_Jack@yahoo.com>
---
This applies on top of v5 of the agents series [1].

None of the skills there says where a change goes in the cycle: the current
release during its -rc weeks, or the next merge window.
This one sends the agent to the documents that already say it (2.Process.rst,
howto.rst, handling-regressions.rst, the maintainer profiles) and adds what
agents get wrong. It proposes a target and the maintainer decides.

Two of its rules are not in Documentation/ yet and come from Linus's mail [2]:
new tests and new development stay on a separate branch for the merge window,
and every added line counts when a change is sent during the -rc weeks, built
by default or not.
If you prefer those two in 2.Process.rst first, I can send that patch.

Sasha, would you take it into your respin, or should it wait until the series
lands?

How it was made: I use Claude Code (Claude Opus). It read the v1 to v5 threads,
Linus's two mails and the documents named in the skill, and wrote the skill and
the commit message. Each sentence was then checked against its source by a
script. checkpatch gives the same single MAINTAINERS warning as the other
skill patches. The skill has not been tried with an agent yet.

[1] https://lore.kernel.org/r/20261111225940.1573565-1-tytso@mit.edu
[2] https://lore.kernel.org/r/CAHk-=whyUfwzMDMTpih8Xs1MxmhwTCDAc_YwUSZG79vXFMLU=Q@mail.gmail.com

 Documentation/process/coding-assistants.rst |  5 +-
 agents/skills/target-tree/SKILL.md          | 66 +++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletion(-)
 create mode 100644 agents/skills/target-tree/SKILL.md

diff --git a/Documentation/process/coding-assistants.rst b/Documentation/process/coding-assistants.rst
index bb927fea5..a3da7453c 100644
--- a/Documentation/process/coding-assistants.rst
+++ b/Documentation/process/coding-assistants.rst
@@ -46,6 +46,8 @@ The following skills are available:
   message or cover letter, and writes the text of a pull request.
 * agents/skills/writing-kunit-tests/SKILL.md designs, writes, verifies, or
   reviews KUnit unit tests.
+* agents/skills/target-tree/SKILL.md proposes the tree and release a change is
+  for: the current release during its -rc weeks, or the next merge window.
 
 Licensing and Legal Requirements
 ================================
@@ -97,7 +99,8 @@ these steps:
    find-fixes skill, and a stable tag if the stable-tag skill calls for one. Do
    not add a Signed-off-by tag.
 7. Identify the maintainers and lists using scripts/get_maintainer.pl.
-   Documentation/process/security-bugs.rst shows how to do that.
+   Documentation/process/security-bugs.rst shows how to do that. Determine the
+   tree and release the fix is for with the target-tree skill.
 8. Indicate what could not be done. If the fix could not be built or tested, or
    if no reproducer could be produced, say so explicitly: maintainers currently
    waste too much time analyzing unverified reports and untested fixes.
diff --git a/agents/skills/target-tree/SKILL.md b/agents/skills/target-tree/SKILL.md
new file mode 100644
index 000000000..fee4be202
--- /dev/null
+++ b/agents/skills/target-tree/SKILL.md
@@ -0,0 +1,66 @@
+---
+# SPDX-License-Identifier: GPL-2.0-only
+name: target-tree
+description: >-
+  Decide which tree, branch and release a Linux kernel change is for: the
+  current release during its -rc weeks, or the next merge window. Use when
+  preparing a fix, a test, a cleanup or new development for submission,
+  when preparing a pull request, or when checking where a change should go.
+---
+
+# Determine the target of a change
+
+Read "The big picture" and "Next trees" in
+Documentation/process/2.Process.rst, "Mainline tree" in
+Documentation/process/howto.rst, and "Expectations and best practices for
+fixing regressions" in Documentation/process/handling-regressions.rst.
+Follow the maintainer profiles, the `P:` entries in MAINTAINERS, for the
+changed files; their trees, branches and cycle dates take precedence.
+Follow the rules for skills in Documentation/process/coding-assistants.rst.
+
+- Find where the cycle stands from the newest tag in Linus Torvalds' tree,
+  as "Development cycle" in Documentation/process/maintainer-netdev.rst
+  describes: after a release tag the merge window is most likely open,
+  after an -rc tag the release is being stabilized. Name the tag in the
+  result.
+- Being a fix is not enough to go into the current release. During the -rc
+  weeks it is meant for fixes of regressions, above all those introduced
+  in the current cycle, and of bugs that are urgent or critical. A bug
+  that has always existed is not a regression; its fix goes in only if it
+  is important. Everything else is for the next merge window.
+- Use the kernel's meaning of a regression, from
+  Documentation/admin-guide/reporting-regressions.rst: an application or
+  use case that ran fine with one kernel works worse or not at all with a
+  newer one.
+- A fix for a subtle bug that went unnoticed for a long time fixes
+  something rare, and can itself be buggy. Unless the bug is important,
+  propose the fix for the next merge window. It still reaches the stable
+  trees once it is in mainline, with the tag the stable-tag skill returns.
+- Do not hold a regression fix back for the next merge window unless the
+  fix is extraordinarily risky or the culprit was mainlined more than a
+  year ago. Report whether reverting the culprit would be the quicker and
+  less dangerous fix.
+- New development, new tests, cleanups and refactoring are for the next
+  merge window. Keep them on a branch of their own, and do not fold them
+  into a fix or a pull request for the current release. Split a change
+  that mixes them with such a fix, as "Separate your changes" in
+  Documentation/process/submitting-patches.rst asks.
+- Count every line a change adds when judging the risk of sending it
+  during the -rc weeks, including tests that are not built by default and
+  fixes for other bugs.
+- A pull request sent after the merge window, or with fixes that look
+  risky, explains its timing, as Documentation/maintainer/pull-requests.rst
+  asks. Whether a risky fix goes in days before a release is Linus
+  Torvalds' call, as handling-regressions.rst describes.
+- A change for the next merge window should be in the subsystem's tree,
+  and through it in linux-next, some time before the merge window opens.
+  Check the key cycle dates in the maintainer profile; after them, propose
+  the merge window after the next one.
+- Base the change on the tree and branch the maintainer profile names for
+  its target, and mark the target where the profile asks for it, as
+  `[PATCH net]` and `[PATCH net-next]` do in maintainer-netdev.rst.
+
+Return the tree, branch and release, the tag that showed where the cycle
+stands, and the reasons with the documents they come from. The maintainer
+decides where a change goes. If the target cannot be determined, return no
+target and say what is missing.

base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
prerequisite-patch-id: 774c0910c3ff50a2e5ef950cb1059edf20e61e30
prerequisite-patch-id: 4df6324f28893898e730b3c0ec7c4b6139731191
prerequisite-patch-id: 73cecd1860937722f43ce4dcd0b0515e4052a3df
prerequisite-patch-id: 7eddf81879b882b0877f3ad6da6c54755c4d4209
prerequisite-patch-id: 51559949fc320fa3be648e50755afb3dcbd8df91
prerequisite-patch-id: b9b23ba3acde59f30659dc2b07c9ab079ea8d72c
-- 
2.53.0


       reply	other threads:[~2026-11-25  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <179558805924.3383392.1456615917266025706.ref@yahoo.com>
2026-11-25  6:27 ` Daniel Ramos [this message]
2026-11-25  8:57   ` Geert Uytterhoeven

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=179558805924.3383392.1456615917266025706@yahoo.com \
    --to=capitain_jack@yahoo.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sashal@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tytso@mit.edu \
    --cc=workflows@vger.kernel.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

all inboxes | Powered by JetHome®