Skip to content

Commit ec377c4

Browse files
docs: add AI attribution policy and fix target branch
Add an Assisted-by trailer convention (inspired by the Linux kernel coding-assistants policy [1]) to both AGENTS.md and CONTRIBUTING.md so that AI agents and human contributors know when and how to attribute AI assistance in commit messages. Also correct the PR target branch in CONTRIBUTING.md from `main` to `develop`, consistent with the rest of the project documentation. 1. https://docs.kernel.org/process/coding-assistants.html
1 parent 8b1181c commit ec377c4

2 files changed

Lines changed: 62 additions & 3 deletions

File tree

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,39 @@ Add a new schedules endpoint which allows getting the resources of a schedule.
318318
Closes: #2222
319319
```
320320

321+
### AI Attribution
322+
323+
When an AI coding assistant contributed meaningfully to a commit (writing or
324+
significantly modifying code, suggesting the fix, generating tests, etc.),
325+
add an `Assisted-by` trailer to the commit message footer:
326+
327+
```text
328+
Assisted-by: <AgentName>:<ModelVersion>
329+
```
330+
331+
**Rules**:
332+
333+
- Place `Assisted-by` in the commit footer, alongside any `Closes:` or
334+
`BREAKING CHANGE:` lines
335+
- Use the agent name and model version that did the work (e.g.
336+
`Claude:claude-sonnet-4-6`)
337+
- Omit the tag when the AI contribution was trivial (e.g. a one-word
338+
suggestion accepted unchanged, or only autocomplete)
339+
- Do **not** add `Assisted-by` for purely mechanical operations (running
340+
linters, reformatting, applying `composer fix`)
341+
342+
**Example**:
343+
344+
```text
345+
fix(reservations): correct overlap check for multi-day bookings
346+
347+
The start-of-day boundary was calculated in UTC rather than the
348+
schedule's local timezone, causing false conflicts.
349+
350+
Closes: #1234
351+
Assisted-by: Claude:claude-sonnet-4-6
352+
```
353+
321354
### Pull Request Guidelines
322355

323356
1. **Target branch**: PRs should target `develop` (not main/master)

CONTRIBUTING.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ about.
4949

5050
## Getting Started
5151

52-
* *Ensure you have an up-to-date `main` branch:** Fork the repository and make
53-
sure your `main` branch is synced with the upstream project before creating
52+
* **Ensure you have an up-to-date `develop` branch:** Fork the repository and make
53+
sure your `develop` branch is synced with the upstream project before creating
5454
your feature branch.
5555
* **Create a new branch** for your changes: `git checkout -b feature/your-feature-name` or `git checkout -b bugfix/issue-number-and-fix`.
5656
* **Make your changes** and **add tests** if applicable.
5757
* **Keep Composer files in sync:** If you change `composer.json`, regenerate and commit `composer.lock` in the same PR.
5858
* **Ensure your code lints**
5959
* **Commit your changes** with a clear and descriptive commit message.
6060
* **Push your branch** to your fork: `git push origin feature/your-feature-name`.
61-
* **Open a Pull Request** against our `main` branch.
61+
* **Open a Pull Request** against our `develop` branch.
6262

6363
## Reporting Bugs
6464

@@ -128,6 +128,32 @@ Add a new schedules endpoint which allows getting the resources of a schedule.
128128
Closes: #2222
129129
```
130130

131+
### AI Attribution
132+
133+
When an AI coding assistant contributed meaningfully to a commit (writing or
134+
significantly modifying code, suggesting the fix, generating tests, etc.),
135+
add an `Assisted-by` trailer to the commit footer:
136+
137+
```text
138+
Assisted-by: <AgentName>:<ModelVersion>
139+
```
140+
141+
Place it alongside any `Closes:` or `BREAKING CHANGE:` lines. Omit it when
142+
the AI contribution was trivial (e.g. a one-word suggestion or only
143+
autocomplete) or purely mechanical (running linters, reformatting).
144+
145+
Example:
146+
147+
```text
148+
fix(reservations): correct overlap check for multi-day bookings
149+
150+
The start-of-day boundary was calculated in UTC rather than the
151+
schedule's local timezone, causing false conflicts.
152+
153+
Closes: #1234
154+
Assisted-by: Claude:claude-sonnet-4-6
155+
```
156+
131157
### Revert
132158

133159
If the commit reverts a previous commit, it should begin with `revert:`,

0 commit comments

Comments
 (0)