Skip to content

Improve AI agent guidelines: git history review and doc conventions#22263

Open
gnodet wants to merge 4 commits intomainfrom
improve-agent-guidelines
Open

Improve AI agent guidelines: git history review and doc conventions#22263
gnodet wants to merge 4 commits intomainfrom
improve-agent-guidelines

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 25, 2026

Summary

Improve AI agent guidelines based on lessons learned from recent PRs:

  • Add Issue Investigation section requiring agents to thoroughly investigate JIRA issues before implementing — check git history, related tickets, design docs, and validate the issue's premises
  • Add Knowledge Cutoff Awareness rule: verify external project versions/state via web search rather than relying on potentially stale training data
  • Add Git History Review section for PR reviews with the same investigative rigor
  • Add Documentation Conventions for .adoc files: use xref: instead of external URLs, and verify cross-version fragment anchors
  • Add PR Description Maintenance rule: always update PR description/title after each push to reflect current state
  • Add PR Reviewers section: identify relevant committers via git log/git blame and request reviews

Motivation

Recent PRs highlighted gaps in agent guidelines:

  • #22205: Change effectively reverted a prior intentional commit (CAMEL-16072) without recognizing it — git blame would have surfaced this
  • #22190: Ported code from deprecated camel-opentelemetry that was intentionally omitted from camel-opentelemetry2 per design doc (proposals/tracing.adoc)
  • #22118: Agent incorrectly questioned a Spring Boot 4.0 reference based on stale training data
  • #22226: Fixed an external URL that should have been xref: from the start
  • #22224: Fixed a broken cross-version xref fragment anchor

Claude Code on behalf of Guillaume Nodet

- Add "Issue Investigation" section requiring agents to check git history,
  related JIRA tickets, and design docs before implementing fixes
- Add "Git History Review" section for PR reviews with same rigor
- Add "Documentation Conventions" for adoc files: use xref instead of
  external URLs, and verify cross-version fragment anchors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions bot added the docs label Mar 25, 2026
@github-actions
Copy link
Contributor

ℹ️ CI did not run targeted module tests (all projects built or tests skipped).

gnodet and others added 2 commits March 25, 2026 14:32
Require agents to identify relevant committers using git log/blame
on affected files and request reviews when creating PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet marked this pull request as ready for review March 25, 2026 14:39
Require agents to verify external project versions and state via
web search rather than relying on potentially stale training data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@orpiske orpiske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think this is a good improvement. In the future, I think we should also investigate creating some documentation that can be used to fill the context with the right set of information... but that is something to do on a separate occasion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants