diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3ff3c95c247f4..445f906400179 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -31,3 +31,7 @@ You can run the aforementioned command in your module so that the build auto-for You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md --> +# AI-assisted contributions + +- [ ] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. + diff --git a/.oss-ai-helper-rules/project-standards.md b/.oss-ai-helper-rules/project-standards.md index f5d1549de9d04..82b4c3e2af393 100644 --- a/.oss-ai-helper-rules/project-standards.md +++ b/.oss-ai-helper-rules/project-standards.md @@ -7,10 +7,11 @@ This rule file contains build tools, commands, and code style constraints for th - **Test command:** `mvn verify` - **Format command:** `cd && mvn -DskipTests install` - **Module-specific build:** yes (always run `mvn` in the module directory where changes occurred) -- **Parallelized Maven:** no (resource intensive, do NOT parallelize Maven jobs) +- **Parallelized Maven:** yes (except for running tests, which can be resource intensive) - **Code style restrictions:** - Do NOT use Lombok (unless already present in the file) - Do NOT change public API signatures without justification - Do NOT add new dependencies without justification + - Records are allowed for internal/non-API classes; do NOT convert existing public API classes to Records - Maintain backwards compatibility for public APIs diff --git a/AGENTS.md b/AGENTS.md index 096a0f9cc8fd3..02fdac29121a5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,6 +19,9 @@ These rules apply to ALL AI agents working on this codebase. - All AI-generated content (GitHub PR descriptions, review comments, JIRA comments) MUST clearly identify itself as AI-generated and mention the human operator. Example: "_Claude Code on behalf of [Human Name]_" +- AI coding agents MUST be configured to add co-authorship trailers to commits + (e.g., `Co-authored-by`). For Claude Code, enable this via the + [attribution settings](https://code.claude.com/docs/en/settings#attribution-settings). ### PR Volume @@ -313,6 +316,9 @@ camel/ ## Build +For project build commands, code style restrictions and other standards, check +[`.oss-ai-helper-rules/project-standards.md`](.oss-ai-helper-rules/project-standards.md). + ```bash mvn clean install -Dquickly # fast build, no tests mvn clean install # full build diff --git a/docs/main/modules/contributing/pages/index.adoc b/docs/main/modules/contributing/pages/index.adoc index 0a2ef970de7ee..9acbb5235c01d 100644 --- a/docs/main/modules/contributing/pages/index.adoc +++ b/docs/main/modules/contributing/pages/index.adoc @@ -354,6 +354,14 @@ They are maintained as part of the repository so that AI-assisted contributions The `.oss-ai-helper-rules/` files are designed for use with the https://github.com/Open-Harness-Engineering/ai-agents-oss-helper[OSS Helper] toolset, which provides ready-made skills for common contribution tasks (fixing issues, creating PRs, running CI checks, and more). +=== Attribution + +Pull requests that include AI-generated code **must** provide proper attribution. +AI coding agents should be configured to add co-authorship trailers to commits (e.g., `Co-authored-by`). +For example, Claude Code supports this via its https://code.claude.com/docs/en/settings#attribution-settings[attribution settings]. + +PR descriptions for AI-assisted contributions should also clearly identify the AI tool used. + == Becoming a committer Once you have become sufficiently involved with the community, we may well invite you to be a committer. See xref:manual:faq:how-do-i-become-a-committer.adoc[How do I become a committer] for more details.