docs: document AI contribution policy and agent guidelines#27
docs: document AI contribution policy and agent guidelines#27SamBarker wants to merge 9 commits intokroxylicious:mainfrom
Conversation
Sets out the project's position on AI-assisted contributions: contributors may use AI tools, but they own what they submit, must understand it, and must disclose significant AI usage. Also introduces the concept of AGENTS.md files in repositories. Closes kroxylicious#26 Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Adds guidance on using an Assisted-by trailer in commit messages to identify the AI tool and model used. The trailer is intended to be populated by the tooling itself, with AGENTS.md providing tool-specific configuration details. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Adds a brief 'About the Project' section noting Kroxylicious is a Java project built with Apache Maven. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Provides AI coding tools with process expectations including DCO sign-off, Assisted-by trailers, commit discipline, and pull request review requirements. Clarifies that human committer review and merge decisions are not substituted by AI reviews. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Adds language to both CONTRIBUTING.md and AGENTS.md clarifying that AI-assisted reviews supplement but do not substitute for Committer review, and that merge decisions follow the project's decision making framework. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Adds guidance on commit messages (why not what), cohesive PRs, PR descriptions focused on problems and trade-offs, and naming conventions that prefer intent over encoded logic. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
|
@k-wall's issue gave the following reasons for wanting an AI contribution policy:
I think there are broadly two way we can look at those things:
Finally, It's not clear to me that |
|
I like the suggestions that @tombentley is making under the 2) bullet. |
Explicitly requires AI-generated content must not reproduce copyrighted material and that contributors enable available controls to reduce that risk. Adds that PRs may be closed where the contributor does not appear to understand their submission. Adds matching copyright instruction to AGENTS.md. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Adds conciseness requirement to both CONTRIBUTING.md and AGENTS.md. Adds PR review guidance that unfocused or oversized PRs may be closed and the contributor asked to break them down. These apply to all contributions regardless of how they were produced. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Routine IDE-like AI features (code completion, spelling) do not require disclosure. Disclosure is expected when AI generates substantial content such as functions, tests, or documentation. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
| Commits should include an `Assisted-by` trailer identifying the tool and model used (e.g. `Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>`). | ||
| Most AI coding tools can be configured to add this automatically — see the repository's `AGENTS.md` for details. | ||
| Use of AI features in the same way you would use an IDE — code completion, spelling, and the like — does not require disclosure. | ||
| Disclosure is expected when AI tools are used to generate substantial content such as functions, tests, documentation, or design approaches. |
There was a problem hiding this comment.
Open question: AI-assisted thinking vs AI-assisted production
One scenario worth considering: a contributor discusses design options with an AI tool but then writes the code and PR themselves, without the AI being directly involved in producing the contribution.
Under this policy, we don't think this requires disclosure. The contributor understood the problem, evaluated the options, and wrote the code — the AI influenced their thinking in much the same way that reading a blog post, discussing ideas with a colleague, or whiteboarding a design would. The policy is concerned with AI tools producing the content of a contribution, not with how a contributor arrived at their ideas.
This also helps clarify the intent behind "played a significant role in producing a contribution" — it's about the production of the submitted content, not about the contributor's broader learning or decision-making process.
Does this reading match others' expectations, or should the policy say something explicit about this distinction?
There was a problem hiding this comment.
Does this reading match others' expectations, or should the policy say something explicit about this distinction?
It matches my expectations. No need to say anything explicit.
| @@ -0,0 +1,67 @@ | |||
| # Kroxylicious AI Agent Guidelines | |||
|
|
|||
| This file provides guidance to AI coding tools (such as GitHub Copilot, Claude Code, and similar) when working on repositories within the Kroxylicious organisation. | |||
There was a problem hiding this comment.
| This file provides guidance to AI coding tools (such as GitHub Copilot, Claude Code, and similar) when working on repositories within the Kroxylicious organisation. | |
| This file provides guidance for AI coding tools, such as GitHub Copilot and Claude Code, when working in Kroxylicious repositories. |
|
|
||
| This file provides guidance to AI coding tools (such as GitHub Copilot, Claude Code, and similar) when working on repositories within the Kroxylicious organisation. | ||
|
|
||
| Contributors using AI tools should ensure their tool has access to this file and any repository-specific `AGENTS.md`. |
There was a problem hiding this comment.
| Contributors using AI tools should ensure their tool has access to this file and any repository-specific `AGENTS.md`. | |
| Contributors using AI tools must ensure the tools can access this file and any repository-specific `AGENTS.md` file. |
|
|
||
| ### Assisted-by Trailer | ||
|
|
||
| Commits produced with AI assistance must include an `Assisted-by` trailer identifying the tool and model. |
There was a problem hiding this comment.
| Commits produced with AI assistance must include an `Assisted-by` trailer identifying the tool and model. | |
| Commits created with AI assistance must include an `Assisted-by` trailer identifying the tool and model. |
| ### Assisted-by Trailer | ||
|
|
||
| Commits produced with AI assistance must include an `Assisted-by` trailer identifying the tool and model. | ||
| The trailer should be added to the commit message body, after the sign-off: |
There was a problem hiding this comment.
| The trailer should be added to the commit message body, after the sign-off: | |
| Add the trailer to the commit message body after the sign-off: |
There was a problem hiding this comment.
Do we need to say that the project requires that this format is followed exactly?
| <commit message> | ||
|
|
||
| Signed-off-by: Name <email> | ||
| Assisted-by: <Tool and model> <noreply@example.com> |
There was a problem hiding this comment.
Is the tool email to use clear?
Would people know what to add there beyond a placeholder
| reproducing copyrighted content, ensure they are enabled. | ||
| * **Meet the same quality bar.** AI-assisted contributions are reviewed to the same standard as any other contribution. | ||
| Code must be correct, maintainable, tested, and consistent with project conventions. | ||
| We may close pull requests where the contributor does not appear to understand the contribution they have submitted. |
There was a problem hiding this comment.
| We may close pull requests where the contributor does not appear to understand the contribution they have submitted. | |
| We may close pull requests if the contributor does not demonstrate an understanding of the submitted changes. |
| * **Meet the same quality bar.** AI-assisted contributions are reviewed to the same standard as any other contribution. | ||
| Code must be correct, maintainable, tested, and consistent with project conventions. | ||
| We may close pull requests where the contributor does not appear to understand the contribution they have submitted. | ||
| * **Be concise.** AI tools can generate text faster than reviewers can read it. |
There was a problem hiding this comment.
| * **Be concise.** AI tools can generate text faster than reviewers can read it. | |
| * **Be concise.** AI tools can generate content faster than reviewers can read it. |
| Code must be correct, maintainable, tested, and consistent with project conventions. | ||
| We may close pull requests where the contributor does not appear to understand the contribution they have submitted. | ||
| * **Be concise.** AI tools can generate text faster than reviewers can read it. | ||
| Contributions, PR descriptions, and issue comments should be clear, focused, and free of unnecessary verbosity. |
There was a problem hiding this comment.
| Contributions, PR descriptions, and issue comments should be clear, focused, and free of unnecessary verbosity. | |
| Contributions, PR descriptions, and issue comments should be clear, focused, and free of unnecessary detail. |
|
|
||
| ### AGENTS.md | ||
|
|
||
| Individual repositories within the Kroxylicious organisation may include an `AGENTS.md` file. |
There was a problem hiding this comment.
| Individual repositories within the Kroxylicious organisation may include an `AGENTS.md` file. | |
| Individual repositories within the Kroxylicious organisation can include an `AGENTS.md` file. |
|
|
||
| Individual repositories within the Kroxylicious organisation may include an `AGENTS.md` file. | ||
| These files provide AI tools with project-specific context such as build instructions, architecture, coding conventions, and testing expectations. | ||
| If you are using an AI tool to help prepare a contribution, ensure it has access to the relevant `AGENTS.md` so that its output aligns with project norms. |
There was a problem hiding this comment.
| If you are using an AI tool to help prepare a contribution, ensure it has access to the relevant `AGENTS.md` so that its output aligns with project norms. | |
| If you use an AI tool to help prepare a contribution, ensure that it can access the relevant `AGENTS.md` so that its output aligns with project conventions. |
Summary
Addresses #26 — documenting how AI may be used when crafting contributions to the project.
CONTRIBUTING.mdestablishing the project's position: AI tools are permitted, but the contributor owns what they submit, must understand it, and must disclose significant AI usage.CONTRIBUTING.mdnoting the Java/Maven foundation.AGENTS.mdproviding AI coding tools with process expectations (DCO, commit discipline, PR standards, naming conventions). Individual repositories can add their ownAGENTS.mdwith repo-specific technical details.Why
Assisted-byrather than Apache'sGenerated-byApache's
Generated-bytrailer is primarily about provenance tracking — an audit trail so the foundation can later query "which artifacts did model X generate?" if licensing concerns emerge around a model's training data. The focus is on the output's origin.Kroxylicious's
Assisted-bytrailer is primarily about contributor responsibility. The policy's core message is "you are the contributor" — the trailer reinforces that the human is in the driving seat and the tool assisted them, rather than implying the tool produced the output and the human accepted it. The DCO sign-off already establishes legal accountability;Assisted-byextends that spirit to tooling disclosure.In practice, both provide the same audit trail if needed. The difference is philosophical:
Generated-byframes the tool as the actor,Assisted-byframes the contributor as the actor. The latter is more consistent with this project's emphasis on contributor ownership and understanding.References consulted
Test plan
CONTRIBUTING.mdfor tone, completeness, and consistency with governance modelAGENTS.mdfor clarity as instructions to AI toolsGOVERNANCE.md#decision-making,DCO.txt, andLICENSEresolve correctlyAssisted-bytrailer format meets the project's needs🤖 Generated with Claude Code