Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/agents/cases/lunatik-reader/2202-first.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source: >-
luainkernel/lunatik#2202, the body it opened with on 2026-10-25, on the kfuncs reachable from
hand-written C stubs alone and a paragraph on how the call lowers into the frame: the maintainer
could not tell what it was for until a program file handing UDP frames to a kernel script showed
it (harness/AGENTS.md, *Patches and commits*).
it (harness/.agents/skills/pr-prep/SKILL.md).
---
A compiled program cannot defer a packet to Lua: `bpf_luaxdp_run` and `bpf_luatc_run`, the kfuncs that run a kernel Lua runtime's callback, are reachable from hand-written C stubs alone.

Expand Down
6 changes: 4 additions & 2 deletions .agents/rules/checks.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
paths:
- "**/tools/**"
- "**/.agents/**"
- "**/.claude/**"
- "**/.github/**"
- "**/AGENTS.md"
- "**/.agents/harness.conf"
- "**/.agents/rules/**"
- "**/.agents/agents/lunatik-reader.md"
- "**/.agents/agents/cases/**"
---

# Checks
Expand Down
3 changes: 2 additions & 1 deletion .agents/rules/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ paths:
- "**/*.h"
- "**/*.lua"
- "**/*.sh"
- "**/*.md"
- "**/doc/**/*.md"
- "**/README.md"
- "**/config.ld"
- "**/bin/**"
- "**/tools/**"
Expand Down
36 changes: 24 additions & 12 deletions .agents/skills/pr-prep/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: pr-prep
description: Prepare a branch for a pull request and draft its title and body. Use when a branch is ready for a PR or when asked for a PR title and description.
---

Run AGENTS.md, "Before opening a pull request" (every item) and the pull request prose rule
under "Patches and commits": the title is a subject, `<area>: <what changes for whoever uses it>`,
the body says what and why, nothing the commits already say, no "Test plan" section, no em dashes.
Run AGENTS.md, "Before opening a pull request" (every item), and write the pull request's title and
body as this skill says: the title is a subject, `<area>: <what changes for whoever uses it>`, and the
body says what and why, nothing the commits already say, with no "Test plan" section and no em dashes.
On top of it:

- A fix answers a finding a script using the API as documented reaches; one whose stimulus is a
Expand Down Expand Up @@ -41,14 +41,25 @@ On top of it:
files>` fails a body that leaves one of them unnamed, which `pr-body-guard.sh` runs when the pull request
opens. An example is named as `examples/<name>` or as `<name>` in backticks, "`dnsblock`,
`dnsdoctor` ran", never as a bare word, which the check does not read.
- The body is written as AGENTS.md, "Patches and commits", says: the need, what the change lets a
script or a user do with the code they write in a fenced block that reads on its own, what changes
from today and what it costs; four short paragraphs at most, an example counting as none;
`bash tools/checks/pr-body.sh <file> <changed files>` before posting it. It names a first sentence
longer than any a merged body opened on, a change that reaches what a script writes or calls, under
the paths the `api` key of the project's `.agents/harness.conf` names, with no fenced block and no sentence on why no script is
shown, "Nothing a script calls changes", and the commits' words, a cell, a stimulus, a plan line, a
fixup, a squash, "this push", in a change that is not the tests' or the harness's.
- The body explains the change to a reviewer who has not read its issue, in four short paragraphs
at most: the failure or the need in one plain sentence, what a script can do today and what
breaks; what the change lets a script or a user do, shown, where it reaches one, by the code they
write, in a fenced block that reads on its own, every name in it defined there; what changes from
today, the hand-written stub it replaces or the refusal it lifts; and what it costs or needs, a
kernel, a build step, a path that pays more. An example counts as no paragraph. How the problem was
found, what was measured and what was tried belong in the commits, and so do the words of that work,
a test's cells and plan lines, a fixup, a squash, the push, and so does the mechanism: the
body says what a reader of the API meets, not how the code reaches it. #2202 opened on "the kfuncs
... are reachable from hand-written C stubs alone" and a paragraph on how the call lowers into
the frame, and the maintainer could not tell what it was for until a program file handing UDP
frames to a kernel script showed it. #2527's opened on one sentence of 86 words over a driver its
change never reaches, showed no code, and spoke of the cell and the plan line its test kept, with
every check passing it. `bash tools/checks/pr-body.sh <file> <changed files>` runs before posting
it, and names a first sentence longer than any a merged body opened on, a change that reaches what a
script writes or calls, under the paths the `api` key of the project's `.agents/harness.conf` names,
with no fenced block and no sentence on why no script is shown, "Nothing a script calls changes",
and the commits' words, a cell, a stimulus, a plan line, a fixup, a squash, "this push", in a change
that is not the tests' or the harness's.
- A body the session posts, opening a pull request or editing one, is read first by a reader with none
of the change's history, the `lunatik-reader` agent, which `review.js` runs with neither phase:

Expand All @@ -64,7 +75,8 @@ On top of it:
`read.title` holds, and the hand-back carries both restatements. `pr-body-guard.sh` refuses the session's
post of a body no reader of its workflow runs passed, read from the reader's own transcript, the text
as it stands, so a body edited after the read is read again; one `review.js` returned ready was read
already.
already. A change to this skill or to `.agents/agents/lunatik-reader.md` runs the reader's cases
again before it merges, as `.agents/rules/checks.md` says of the reader.
- The title and every subject of the branch are one plain clause of about 60 characters at most,
with no subordinate clause, "where", "so", "whose", "as ...", the why left to the body:
`bash tools/checks/title.sh '<title>'` and
Expand Down
10 changes: 5 additions & 5 deletions .agents/skills/review-pr/review.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ answered removed.${a.smallest ? `
The implementer's own reading, which yours is not bound by: ${JSON.stringify(a.smallest)}` : ''}${a.body && !a.pr ? `
The pull request opens with this body once the build passes; read it with the commit bodies, and your answer's
body is this text with what the final diff, your fixups included, makes untrue, or ${H}tools/checks/pr-body.sh names
over it and the files the change carries, corrected, the rest as it stands:
over it and the files the change carries, corrected as ${H}.agents/skills/pr-prep/SKILL.md says a body is written, the
rest as it stands:
${JSON.stringify(a.body)}` : ''}${a.title && !a.pr ? `
It opens with the title ${JSON.stringify(a.title)}, and your answer's title is that one with what the final diff
makes untrue, or ${H}tools/checks/title.sh names, rewritten.` : ''}
Expand Down Expand Up @@ -289,8 +290,8 @@ const READ = (title, text) => `
The body of ${a.pr ? `pull request #${a.pr}` : `the pull request the branch \`${a.branch}\` opens`} on ${github} is
the file ${bodyFile}, which you write first with your Write tool, exactly as this text: ${JSON.stringify(text)}.${title ? `
Its title is ${JSON.stringify(title)}.` : ''}
The checkout is at \`${repo}\`; the rules a title and a body are held to are \`${repo}/${H}AGENTS.md\`, "Patches and
commits", and \`${repo}/${H}.agents/skills/pr-prep/SKILL.md\`.
The checkout is at \`${repo}\`; the rules a title and a body are held to are
\`${repo}/${H}.agents/skills/pr-prep/SKILL.md\`.
`

const READ_OUT = { type: 'object', properties: {
Expand All @@ -311,8 +312,7 @@ body below, and a reader with none of the change's history failed them on the pr
it could not follow and the rule it holds them to. The change is the branch \`${a.branch}\` at \`${tip}\` over
\`${a.base}\`, in the checkout at \`${repo}\`: read its commits, \`git -C ${repo} log ${a.base}..${tip}\`, and the files
of its diff, \`git -C ${repo} diff --name-only ${a.base}...${tip}\`, each as \`git -C ${repo} show ${tip}:<file>\`, and the
rules a title and a body are held to, \`${repo}/${H}.agents/skills/pr-prep/SKILL.md\` and \`${repo}/${H}AGENTS.md\`, "Patches
and commits".
rules a title and a body are held to, \`${repo}/${H}.agents/skills/pr-prep/SKILL.md\`.

Rewrite what each problem quotes so that the reader can follow it and its rule holds, true to the change as its commits
and its diff show it, and keep the rest as it stands, the issues it closes and what it says of each example among it.
Expand Down
20 changes: 1 addition & 19 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,25 +332,7 @@ named, not one discovered at that consumer's build.
the titles before it he said "os titulos tao ruins e incompreensiveis". `tools/checks/title.sh` holds
a subject or a title to the length and the clauses. A body only when there is something the diff
does not say: a new API, a behaviour change, a non obvious rationale. No bullet list of every detail.
* A pull request title and body follow the same rule: the title is a subject, and the body says what
and why, nothing the commits already say. No "Test plan" section, and no em dashes.
* The body explains the change to a reviewer who has not read its issue, in four short paragraphs
at most: the failure or the need in one plain sentence, what a script can do today and what
breaks; what the change lets a script or a user do, shown, where it reaches one, by the code they
write, in a fenced block that reads on its own, every name in it defined there; what changes from
today, the hand-written stub it replaces or the refusal it lifts; and what it costs or needs, a
kernel, a build step, a path that pays more. An example counts as no paragraph. How the problem was
found, what was measured and what was tried belong in the commits, and so do the words of that work,
a test's cells and plan lines, a fixup, a squash, the push, and so does the mechanism: the
body says what a reader of the API meets, not how the code reaches it. #2202 opened on "the kfuncs
... are reachable from hand-written C stubs alone" and a paragraph on how the call lowers into
the frame, and the maintainer could not tell what it was for until a program file handing UDP
frames to a kernel script showed it. #2527's opened on one sentence of 86 words over a driver its
change never reaches, showed no code, and spoke of the cell and the plan line its test kept, with
every check passing it. `tools/checks/pr-body.sh` holds a body file and the files of its change to
the count, a plain first sentence, the example and the commits' words, and a reader with none of the
change's history restates the body before it goes out (the pr-prep skill), which
`pr-body-guard.sh` holds the session to.
* A pull request's title and body are written as the pr-prep skill says.
* A pull request that replaces another says so in the body, `Alternative to #N`, and the merge of
the replacement closes #N in the same breath: one left open is a claim about the queue nobody made.
`tools/pr-status.sh` marks an open pull request a merged body names that way as superseded and
Expand Down
2 changes: 1 addition & 1 deletion tools/checks/pr-body.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-FileCopyrightText: (c) 2026 Ring Zero Desenvolvimento de Software LTDA
# SPDX-License-Identifier: MIT OR GPL-2.0-only
#
# Checks a pull request body against AGENTS.md, "Patches and commits": at most four
# Checks a pull request body against the pr-prep skill: at most four
# paragraphs outside its fenced examples, the first one the failure or the need in one plain sentence, no em dash, no "Test plan" section,
# no failure named as a flake (untraced.sh), and a body tied to an issue in words GitHub
# does not act on (Part of, Top of, Bottom of, Answers, reported as) closes one or names
Expand Down
Loading