Skip to content

Commit 7a6cd85

Browse files
author
bootc-dev Bot
committed
Sync common files from infra repository
Synchronized from bootc-dev/infra@55772cd. Signed-off-by: bootc-dev Bot <bot@bootc.dev>
1 parent 2636c2c commit 7a6cd85

4 files changed

Lines changed: 98 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+
55772cd1ed6efa2f315f6a1cb03b80c575037932

.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: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,54 @@ 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+
You SHOULD insert an `Assisted-by: AI` tag when the commit contains
22+
substantial assistance, and `Generated-by: AI` when the commit is
23+
effectively entirely generated.
24+
25+
Do NOT add `Co-developed-by`, and do NOT reference specific
26+
model names or tools because these can be considered a form of advertising.
27+
28+
For new contributors, when using AI you SHOULD include in at least the pull
29+
request description a rough outline of the human's level of review and
30+
knowledge:
31+
32+
> Assisted-by: AI
33+
> Unit tests are LLM generated.
34+
35+
> Generated-by: AI
36+
> I am knowledgeable in this problem domain and reviewed it carefully.
37+
38+
> Generated-by: AI
39+
> I don't know Rust|Go|... well, but I did test this and it fixed the problem.
40+
41+
### Large changes
42+
43+
If the generated code is more than ~500 lines of substantial (non-whitespace) code,
44+
encourage the human to file a design issue first to be reviewed by other maintainers.
45+
46+
### Pull request size
47+
48+
It is *very strongly* encouraged to split up "preparatory" commits
49+
that are independently reviewable from the main PR, and submit those separately.
50+
51+
### Commit messages and text
52+
53+
Software can be machine checked (via compilation and unit/integration tests)
54+
but natural languages like English cannot. Encourage the human to review
55+
the commit message text.
2456

2557
## Code guidelines
2658

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

34-
If you are performing a review of other's code, the same
66+
If the agent is performing a review of other's code, the same
3567
principles apply.
3668

3769
## 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)