Skip to content

docs: add a "AI-Generated PR Disclosure" section to AGENTS.md#15758

Merged
kevinjqliu merged 4 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/add-ai-disclousure-to-agents-md
Jun 18, 2026
Merged

docs: add a "AI-Generated PR Disclosure" section to AGENTS.md#15758
kevinjqliu merged 4 commits into
apache:mainfrom
kevinjqliu:kevinjqliu/add-ai-disclousure-to-agents-md

Conversation

@kevinjqliu

Copy link
Copy Markdown
Contributor

Follow up to #15529

Add a section for self-disclosure, esp when PRs themselves are created by an agent.
I have seen several newly opened PR that seem to be fully generated; it would be nice to have some kind of indication on the PR description.

@huaxingao

Copy link
Copy Markdown
Contributor

Thanks @kevinjqliu for the PR! Should we also talk about AI generated reviews? Maybe add something like "Similarly, if you use AI tools to review PRs, please review the comments for accuracy before posting. Auto-posting AI-generated comments without human review is discouraged."

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
@RussellSpitzer

Copy link
Copy Markdown
Member

I generally don't have strong feelings about this in Agent.MD

On the con side, everything we put in here is essentially a cost in tokens for all users so I want to make sure it's useful
On the pro side, it would nice to auto mark

I would recommend we go over the text though and have less "if then" comments and more straight instructions.

No need to say "if you are doing this with ai" just say "PR's include this disclosure box after the description"

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
@manuzhang

Copy link
Copy Markdown
Member

Why don't we add such a section to the PR template like https://github.com/apache/spark/blob/master/.github/PULL_REQUEST_TEMPLATE?

Comment thread AGENTS.md
@@ -161,6 +161,38 @@ The `api/` module has the strongest stability guarantees — breaking changes ar
- Commit messages describe the *what* and *why*, not implementation details.
- Apache License header required on all new files (enforced by spotless pre-commit hook).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the code is generated, the copyright doesn't apply.

@jbonofre

jbonofre commented Apr 7, 2026

Copy link
Copy Markdown
Member

That's good. I think the ash header/copyright should be documented here if the code is AI generated. See the asf guidelines.

@jbonofre

jbonofre commented Apr 7, 2026

Copy link
Copy Markdown
Member

For reference, here's the updated guidelines https://www.apache.org/legal/generative-tooling.html

Included the Generated-By mention

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 8, 2026
kevinjqliu and others added 3 commits May 9, 2026 10:22
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@kevinjqliu kevinjqliu force-pushed the kevinjqliu/add-ai-disclousure-to-agents-md branch from b351727 to a0b20ed Compare May 9, 2026 17:34
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

thanks for the reviews!

picking this back up, i've edited the instructions based on reviews. Added a sentence on PR review as well.

I'll create a separate PR for the pull request template

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

added pr template in #16267

@github-actions github-actions Bot removed the stale label May 10, 2026
@qzyu999

qzyu999 commented May 10, 2026

Copy link
Copy Markdown

Hi @kevinjqliu, thanks for the AGENTS.md update. A bit off-topic, but it is possible to add a (nearly empty) CLAUDE.md and have it symlink (via ln -s AGENTS.md CLAUDE.md) so Claude code users can benefit, the same way it's done in Airflow: https://github.com/apache/airflow/blob/main/CLAUDE.md. This may deserve a separate issue in itself though.

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

is possible to add a (nearly empty) CLAUDE.md

i remember AGENTS.md was chosen to be vendor agnostic, i think claude can also read from AGENTS.md

@qzyu999

qzyu999 commented May 10, 2026

Copy link
Copy Markdown

is possible to add a (nearly empty) CLAUDE.md

i remember AGENTS.md was chosen to be vendor agnostic, i think claude can also read from AGENTS.md

Hi @kevinjqliu, from their own docs, https://code.claude.com/docs/en/memory#agents-md, they mention that Claude won't read it automatically:

Claude Code reads CLAUDE.md, not AGENTS.md. If your repository already uses AGENTS.md for other coding agents, create a CLAUDE.md that imports it so both tools read the same instructions without duplicating them. You can also add Claude-specific instructions below the import. Claude loads the imported file at session start, then appends the rest:

for example, CLAUDE.md:

@AGENTS.md

Claude Code

Use plan mode for changes under src/billing/.

I don't use Claude Code directly myself, but it sounds to me like Claude Code users would benefit from a CLAUDE.md file that simply has the line: @AGENTS.md and it would solve the problem for them.

Looks like users have requested the feature, but Anthropic is not going with it yet: anthropics/claude-code#6235.

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Jun 10, 2026
@nssalian

Copy link
Copy Markdown
Collaborator

@RussellSpitzer @huaxingao @jbonofre PTAL

@github-actions github-actions Bot removed the stale label Jun 12, 2026
Generated-by: OpenAI Codex
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

made an edit to include the ASF policy

See the ASF generative tooling guidelines for additional policy on AI-generated contributions. Generated files must still follow Iceberg's Apache License header and license check requirements unless explicitly excluded by project policy. For commits authored using generative AI tooling, include a Generated-by: <tool> token in the commit message.

@kevinjqliu kevinjqliu merged commit 829e29a into apache:main Jun 18, 2026
42 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/add-ai-disclousure-to-agents-md branch June 18, 2026 03:11
@kevinjqliu

Copy link
Copy Markdown
Contributor Author

merging this, we can keep iterating on it. thanks everyone!

jakelong95 pushed a commit to jakelong95/iceberg that referenced this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants