gansheer commented on code in PR #6635: URL: https://github.com/apache/camel-k/pull/6635#discussion_r3259088610
########## CLAUDE.md: ########## @@ -0,0 +1,357 @@ +# Apache Camel K - AI Agent Guidelines + +Guidelines for AI agents working on this codebase. + +## Project Info + +Apache Camel K is a Kubernetes-native integration platform built on Apache Camel. It is a +Go **operator** plus the `kamel` **CLI** that turn user-supplied Camel route Custom Resources +(`Integration`, `Pipe`, `Kamelet`, …) into built container images and running workloads on +Kubernetes/OpenShift. + +- Version: not hardcoded — read it from `pkg/util/defaults/defaults.go` + (`Version = "…"`), or run `make get-version`. +- Go: not hardcoded — read the `go` directive in `go.mod`. +- Build: `make` (Go toolchain, not Maven) +- Module: `github.com/apache/camel-k/v2` (see `go.mod`) +- Issue tracker: **GitHub Issues** (not JIRA) + +## AI Agent Rules of Engagement + +These rules apply to ALL AI agents working on this codebase. + +### Attribution + +- All AI-generated content (GitHub PR descriptions, review comments, issue comments) MUST clearly + identify itself as AI-generated and mention the human operator. + Example: "_Claude Code on behalf of [Human Name]_" + +### PR Volume + +- An agent MUST NOT open more than 10 PRs per day per operator to ensure human reviewers can keep up. +- Prioritize quality over quantity — fewer well-tested PRs are better than many shallow ones. + +### Git branch + +- An agent MUST NEVER push commits to a branch it did not create. +- If a contributor's PR needs changes, the agent may suggest changes via review comments, + but must not push to their branch without explicit permission. +- An agent should prefer to use its own fork to push branches instead of the main + `apache/camel-k` repository. It avoids filling the main repository with a long list of + uncleaned branches. +- An agent must provide a useful branch name following the project conventions: + `fix/<ISSUE_NUMBER>`, `feature/<ISSUE_NUMBER>-<short-slug>`, `bugfix/<ISSUE_NUMBER>`, + `quick-fix/<short-slug>`, or `ci-issue/<short-slug>`. +- After a Pull Request is merged or rejected, the branch should be deleted. + +### GitHub Issue Ownership + +- An agent MUST ONLY pick up **unassigned** GitHub issues. +- If an issue is already assigned to a human, the agent must not reassign it or work on it. +- Before starting work, the agent must assign the issue to its operator. +- Link the PR to the issue (`Fixes #<ISSUE_NUMBER>`) so it is closed on merge, and apply the + relevant labels/milestone before closing where the project uses them. + +### PR Description Maintenance + +When pushing new commits to a PR, **always update the PR description** (and title if needed) to +reflect the current state of the changeset. PRs evolve across commits — the description must stay +accurate and complete. Use `gh pr edit --title "..." --body "..."` after each push. + +### PR Reviewers + +When creating a PR, **always identify and request reviews** from the most relevant committers: + +- Run `git log --format='%an' --since='1 year' -- <affected-files> | sort | uniq -c | sort -rn | head -10` + to find who has been most active on the affected files. +- Use `git blame` on key modified files to identify who wrote the code being changed. +- Cross-reference with the [committer list](https://home.apache.org/committers-by-project.html#camel) + to ensure you request reviews from active committers (not just contributors). +- For controller/trait/builder changes, prefer reviewers who recently worked on that area. +- For cross-cutting changes (apis, controller, platform), include committers with broader + project knowledge. +- Request review from **at least 2 relevant committers** using `gh pr edit --add-reviewer`. +- When all comments on the Pull Request are addressed (by providing a fix or more explanation) + and the PR checks are green, re-request review so reviewers know the new changeset is ready. + +### Merge Requirements + +- An agent MUST NOT merge a PR if there are any **unresolved review conversations**. Review Comment: Does that mean that an agent can merge a PR ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
