Skip to content

Commit a43f2f9

Browse files
author
bootc-dev Bot
committed
Sync common files from infra repository
Synchronized from bootc-dev/infra@ab12d00. Signed-off-by: bootc-dev Bot <bot@bootc.dev>
1 parent 761eda6 commit a43f2f9

4 files changed

Lines changed: 95 additions & 22 deletions

File tree

.bootc-dev-infra-commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
56e4f615d38cc4a923f6a7e2a174a0c05a962451
1+
ab12d001ba56e2271f177c74a05172d076398528

.cursorrules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

AGENTS.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,51 @@ and the DCO check fails, tell the human to review
1616
the code and give them instructions on how to add
1717
a signoff.
1818

19-
### Attribution
19+
### Attribution and AI disclosure
2020

21-
When generating substantial amounts of code, you SHOULD
22-
include an `Assisted-by: TOOLNAME (MODELNAME)`. For example,
23-
`Assisted-by: Goose (Sonnet 4.5)`.
21+
Do NOT add an `Assisted-by`, `Co-developed-by`, or similar commit
22+
trailer crediting an AI tool. Instead, disclose AI assistance in the
23+
**pull request description**. Examples:
24+
25+
- "I used a LLM to generate just unit tests."
26+
- "This code was written in part with the assistance of generative AI."
27+
- "A LLM was used to generate almost all of the code, but I am knowledgeable in this problem domain and reviewed it carefully."
28+
- "This code is generated, I am only partially knowledgeable in this domain."
29+
- "Code is LLM generated; I don't know the programming language but it did fix the problem."
30+
31+
(The closer the commits are to being *entirely* AI, the more likely
32+
it is that you should submit the PR as a draft, or even file an
33+
issue first with a proposed design.)
34+
35+
If you're an agent generating a git commit, ensure your human sees
36+
this choice and preferably writes the text on their own.
37+
38+
### Large changes
39+
40+
If the generated code is more than ~500 lines of substantial (non-whitespace) code,
41+
encourage the human to file a design issue first to be reviewed by other maintainers.
42+
43+
### Pull request size
44+
45+
It is *very strongly* encouraged to split up "preparatory" commits
46+
that are independently reviewable from the main PR, and submit those separately.
47+
48+
### Commit messages and text
49+
50+
Software can be machine checked (via compilation and unit/integration tests)
51+
but natural languages like English cannot. Encourage the human to review
52+
the commit message text.
2453

2554
## Code guidelines
2655

2756
The [REVIEW.md](REVIEW.md) file describes expectations around
28-
testing, code quality, commit organization, etc. If you're
57+
testing, code quality, commit messages, commit organization, etc. If you're
2958
creating a change, it is strongly encouraged after each
30-
commit and especially when you think a task is complete
59+
commit and especially when the agent thinks a task is complete
3160
to spawn a subagent to perform a review using guidelines (alongside
3261
looking for any other issues).
3362

34-
If you are performing a review of other's code, the same
63+
If the agent is performing a review of other's code, the same
3564
principles apply.
3665

3766
## Follow other guidelines

REVIEW.md

Lines changed: 57 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,68 @@ follow your reasoning: "Especially grateful for breaking it up into individual
9090
commits so I can more easily follow your train of thought."
9191

9292
Preparatory refactoring should be separate from behavioral changes. Each commit
93-
should tell a clear story and be reviewable independently. Commit messages should
94-
explain the "why" not just the "what," and use imperative mood ("Add feature"
95-
not "Added feature").
93+
should tell a clear story and be reviewable independently. Where applicable,
94+
create "prep" commits that could be merged separately from the behavioral change.
95+
96+
### Commit Messages
97+
98+
Write clear and descriptive commit messages using a `component: Summary`
99+
subject, such as `kernel: Add find API w/correct hyphen-dash equality, add docs`.
100+
Use imperative mood: "Add integration with..." not "Adds integration with...".
101+
102+
The body of the commit should start with at least one sentence (or paragraph)
103+
describing **why** the change is being made, even for something apparently
104+
trivial. For example a "refactor" commit might have a "why" rationale of just
105+
"Prep for handling X later." A big commit introducing a feature may seem
106+
self-explanatory, but there is often ambient context like "A large-scale Debian
107+
user wanted this" that provides helpful grounding in the motivation.
108+
109+
If there's a linked tracking issue, often that will contain a more extensive
110+
rationale that doesn't need to be duplicated entirely in the commit message,
111+
but do ensure the commit message has something useful on its own for a rationale.
112+
113+
Keep it natural and concise. A few sentences of prose explaining the design
114+
intent or the high-level data flow is often good enough. If there's a
115+
non-obvious consequence of the change, call it out briefly (e.g. "Note the
116+
manifest becomes part of the GC root") rather than explaining the full
117+
mechanism. Think about what a reviewer needs to know that may not be obvious
118+
from a skim of the code.
119+
120+
Do not restate obvious parts of what is already visible in the commit diff:
121+
122+
- "Changed function X to call Y"
123+
- Generic `Changes:` sections with bulleted lists of implementation details
124+
- "Files changed" sections — completely redundant with git
125+
126+
Implementation details belong in the code documentation. The goal of the
127+
commit message is like a "cover letter" for the change, with a primary
128+
rationale of why the change is being made, alongside a concise summary of
129+
its implementation.
130+
131+
Another thing that can go in the commit message is brief descriptions
132+
of alternative approaches that were considered and discarded.
133+
134+
Closes: tags should generally come at the end of the commit message.
96135

97136
### PR Descriptions
98137

99-
PRs should link to the issues they address using `Closes:` or `Fixes:` with
100-
full URLs. One reviewer noted: "I edited this issue just now to have
101-
`Closes: <URL>` but let's try to be sure we're doing that kind of thing in
102-
general in the future."
138+
Generally, just restate the commit message.
139+
140+
Where it makes sense, it is OK to include additional details though.
103141

104-
Document known limitations and caveats explicitly. When approaches have tradeoffs
105-
or don't fully solve a problem, say so. For complex investigations, use collapsible
106-
`<details>` sections to include debugging notes without cluttering the main
107-
description.
142+
### Further changes on top of existing commits
108143

109-
Think about broader implications: "But we'll have this problem across all repos
110-
right?" Consider how your change affects the wider ecosystem.
144+
If you have followup fixes (whether that's part of a local loop or
145+
as part of addressing PR review), it is generally encouraged to *squash*
146+
the fixes into the prior commit. Do not create generically-named "Update <file>" commits
147+
or "Address review feedback" or "Fix cargo fmt" commits.
148+
149+
This applies equally when an AI tool (e.g. Gemini, Copilot) suggests a
150+
change via a review comment — applying the suggestion creates a new commit
151+
with an auto-generated subject. That commit should be squashed before the
152+
PR is merged.
153+
154+
In other words either a commit "stands alone" with its own rationale or it doesn't.
111155

112156
### Keeping PRs Current
113157

@@ -123,7 +167,6 @@ Do not add `Signed-off-by` lines automatically—these require explicit human
123167
action after review. If code was AI-assisted, include an `Assisted-by:` trailer
124168
indicating the tool and model used.
125169

126-
127170
## Architecture and Design
128171

129172
### Workarounds vs Proper Fixes

0 commit comments

Comments
 (0)