Skip to content

Add initial AI contribution policy - #7982

Merged
lagru merged 4 commits into
scikit-image:mainfrom
stefanv:ai-pr-policy
Apr 14, 2026
Merged

lagru merged 4 commits into
scikit-image:mainfrom
stefanv:ai-pr-policy

Conversation

@stefanv

@stefanv stefanv commented Dec 9, 2025 •

Copy link
Copy Markdown
Member

Tool disclosure

I used Claude to review and edit the "fast-track" agent PR text, as well as to generate the AGENTS.md (which may or may not be included in the final merge).

@stefanv
stefanv marked this pull request as draft December 9, 2025 08:13
@stefanv stefanv added the 📄 type: Documentation Updates, fixes and additions to documentation label Dec 9, 2025

@jni jni left a comment

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.

Love it. Short and to the point, and big "we don't do that here" vibes to head off discussion about the wisdom / non-wisdom of using / not-using LLMs.

@lagru
lagru self-requested a review December 9, 2025 09:35

@lagru lagru left a comment •

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.

Also like the text! Thanks @stefanv!

I'm less enthused that this increases the size of the PR template and I'll be seeing it everywhere. But I don't really have a better suggestion. So +1 from me.

Maybe it's finally time to remove the checklist? (Point in favor, @stefanv manually removed that section from this PR)

Comment thread .github/PULL_REQUEST_TEMPLATE.md Resolved
Comment thread .github/PULL_REQUEST_TEMPLATE.md Resolved
Comment thread .github/PULL_REQUEST_TEMPLATE.md Resolved
@stefanv

stefanv commented Dec 10, 2025

Copy link
Copy Markdown
Member Author

@stefanv

stefanv commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

I was able to incorporate all feedback, and also shorten the AI policy, so please take another look.

@stefanv

stefanv commented Dec 13, 2025

Copy link
Copy Markdown
Member Author

Love it. Short and to the point, and big "we don't do that here" vibes to head off discussion about the wisdom / non-wisdom of using / not-using LLMs.

I may have edited out the part you liked in the last version 😬, but I think the message is still clear.

Comment thread .github/PULL_REQUEST_TEMPLATE.md Resolved
Comment thread CONTRIBUTING.rst Resolved

@lagru lagru left a comment

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.

Love the changes @stefanv. Left a two small nitpicks. But happy to merge.

@stefanv

stefanv commented Jan 13, 2026

Copy link
Copy Markdown
Member Author

Just learned of scikit-learn's policy: https://scikit-learn.org/stable/developers/contributing.html#automated-contributions-policy

@coderabbitai

coderabbitai Bot commented Jan 29, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updates repository documentation and PR template: replaces Description/Checklist in the PR template with links to CONTRIBUTING and an AI-policy note, adjusts release-note heading and placeholders, and adds new AI/agents documentation and contributor guidance files.

Changes

Cohort / File(s) Summary
PR template
.github/PULL_REQUEST_TEMPLATE.md
Replaced Description and Checklist sections with links to CONTRIBUTING.rst and an AI policy note, closed an open comment block, changed "## Release note" to "### Release note (optional)", and added a PR description placeholder.
Contribution guide
CONTRIBUTING.rst
Inserted new "PR Checklist" and "AI Policy" sections with contributor instructions and AI usage guidelines; documentation-only additions.
AI / Agents docs
AGENTS.md, .cursorrules, CLAUDE.md, GEMINI.md
Added AGENTS.md (full policy content) and several small/empty agent-related files; introduce agent/tool disclosure, Co‑authored-by requirements, and contribution expectations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Draft AI contribution policy' is concise, descriptive, under 80 characters, and clearly reflects the main objective of introducing an AI contribution policy to the repository.
Description check ✅ Passed The PR description provides a release-note template and directs contributors to documentation, which relates to the overall PR objective of adding policy documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread CONTRIBUTING.rst Resolved
Comment thread CONTRIBUTING.rst Resolved
Comment thread CONTRIBUTING.rst Resolved
Comment thread CONTRIBUTING.rst Resolved
Comment thread CONTRIBUTING.rst Resolved
Comment thread CONTRIBUTING.rst Resolved
@stefanv

stefanv commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

I've neutralized the language a bit; please re-review and merge if y'all are happy with it.

@stefanv
stefanv marked this pull request as ready for review January 29, 2026 23:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/PULL_REQUEST_TEMPLATE.md (1)

2-15: Align dev/stable doc links to avoid mixed guidance.

The template points to dev docs for the Contribution Guide and AI policy, but the release-note link points to stable docs. This can confuse contributors and may reference different content. Consider using the same doc version throughout.

✅ Suggested alignment
-<!-- See https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes -->
+<!-- See https://scikit-image.org/docs/dev/development/contribute.html#documenting-changes -->

Comment thread CONTRIBUTING.rst Resolved
@stefanv

stefanv commented Jan 30, 2026

Copy link
Copy Markdown
Member Author

Actionable comments posted: 1
🧹 Nitpick comments (1)

.github/PULL_REQUEST_TEMPLATE.md (1)> 2-15: Align dev/stable doc links to avoid mixed guidance.

The template points to dev docs for the Contribution Guide and AI policy, but the release-note link points to stable docs. This can confuse contributors and may reference different content. Consider using the same doc version throughout.

✅ Suggested alignment

-<!-- See https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes -->
+<!-- See https://scikit-image.org/docs/dev/development/contribute.html#documenting-changes -->

@coderabbit.ai apply this change

@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@stefanv I'll apply this change to align the documentation links.

Task: Align documentation version links in PR template

  • Update the release-note documentation link from stable to dev version

+

</requirement> -->

---

<details>
<summary>🧠 Learnings used</summary>

Learnt from: CR
Repo: scikit-image/scikit-image PR: 0
File: doc/source/development/core_developer.md:0-0
Timestamp: 2026-01-27T08:58:38.273Z
Learning: Use GitHub's suggestion feature for nitpicky changes (spelling mistakes, formatting, etc.) rather than asking contributors to make them


---

Learnt from: CR
Repo: scikit-image/scikit-image PR: 0
File: CONTRIBUTING.rst:0-0
Timestamp: 2026-01-27T08:58:22.125Z
Learning: Use scikit-image's changelist tool with release-note code blocks to describe complex changes in pull request descriptions for automatic release notes generation


</details>

---

💡 Use `@coderabbitai` plan to create a plan for code changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
CONTRIBUTING.rst (1)

45-48: Clarify the declaration scope to avoid over-breadth.

“Anything other than a basic text editor” may be interpreted too broadly (e.g., formatters, linters, CI helpers). Consider narrowing this to tools that materially generate or transform PR content.

Proposed wording tweak
-It may make sense to apply AI for some mechanical tasks, but our
-policy is consistent across all tools: the usage of anything other
-than a basic text editor must be declared (e.g., if you use sed, post
-the script used).
+It may make sense to apply AI for some mechanical tasks, but our
+policy is consistent across all tools: usage of tools that materially
+generate or transform PR content must be declared (e.g., if you use
+sed for bulk edits, include the script used).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37ecf02 and 5237feb.

📒 Files selected for processing (5)
  • .cursorrules
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.rst
  • GEMINI.md
✅ Files skipped from review due to trivial changes (4)
  • GEMINI.md
  • AGENTS.md
  • .cursorrules
  • CLAUDE.md

@matthew-brett matthew-brett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a difficult problem, because the people who we are worried about, will follow these instructions (and use AI to do so). But as we have seen previously, there's no good reason to think that the AI will confess to the extent of its own use. We can ask it nicely to do so, in the AGENTS.md file, but we can't rely on that to be confident the agent has "followed" the instructions.

I continue to suspect that the new contributors who are starting off with AI-supported coding, will be a great net drain on project resources, and will prove difficult or impossible to mentor effectively. Maybe I'm wrong, but let's monitor carefully for that effect, because it could be disastrous. I'm sure that experienced contributors, using AI, will make some useful contributions.

Comment thread CONTRIBUTING.rst Outdated
---------
scikit-image requires that PR authors illustrate a thorough
understanding of any changes they propose. We typically assess this
from the PR description and subsequent conversations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR description is almost invariably written by the AI, so I would guess it is not useful to assess the author's understanding.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I had thought of that; I wasn't sure how else we assess (description + follow-up conversations). Do you have suggestions for wording here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can I reflect that back to you? Given the kind of PR summaries and even replies we are seeing in these PRs -how would we assess for understanding?

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.

How about just scratching this sentence. How we assess an LLM contribution is unclear and probably prone to change and gut feeling.

@lagru

lagru commented Mar 10, 2026

Copy link
Copy Markdown
Member

In the meeting right now, we arrived at something like this:

We will not accept code that we suspect as largely being generated by LLMs. Such PRs will be closed with a comment.

Along @matthew-brett's proposal, I'm also happy with adding that

If you want to make use of LLMs in significant way it is a good idea to check in with us first. In any case, we expect a deep understanding of code proposed in PRs from contributors.

Happy to iterate on those words.

Comment thread .cursorrules Outdated

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.

I'm not fond at all about polluting our top-level namespace with extra files for major LLM vendors. I'm very tempted to veto including this file and the other ones for CLAUDE.md and GEMINI.md.

Comment thread AGENTS.md Outdated

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.

Are we confident including this file is useful and will have the desired effect? I might misremember reading somewhere that it wasn't very effective in practice?

Signal a positive stance towards vibecoded contributions and heavy LLM-use in general?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The goal is to help steer LLM contributions. If you don't provide guidance, then the user will.

@lagru lagru left a comment •

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.

I'm okay with the wording of the AI policy.

Edit: #7982 (comment) should probably be included in some form.

Not in favor at all about including the AGENTS.md file and especially the other LLM-specific ones. Can we discuss those in scope of another PR?

If you drop the LLM instructions from this PR, I'm happy to approve this.

@greptile-apps

greptile-apps Bot commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Important Files Changed

Filename Overview
CONTRIBUTING.rst Adds a PR Checklist and AI Policy section near the top of the document. The AI policy text is well-worded, but two checklist items use Markdown-style hyperlinks that will not render as links in Sphinx-built RST documentation.
.github/PULL_REQUEST_TEMPLATE.md Streamlines the PR template by replacing the explicit Description/Checklist sections with comment-block guidance linking to the contribution guide and AI policy, and making the release note section optional. No issues found.

Reviews (7): Last reviewed commit: "Satisfy linter" | Re-trigger Greptile

Comment thread AGENTS.md Resolved
Comment thread .github/PULL_REQUEST_TEMPLATE.md Resolved
Comment thread CONTRIBUTING.rst Resolved
@stefanv

stefanv commented Mar 26, 2026 •

Copy link
Copy Markdown
Member Author

@lagru @jni I've updated the text another time.

I realize the AGENTS.md/GEMINI.md file seems somewhat useless right now, as it is mainly a trap to catch unsuspecting automated submitters. However, I can imagine us updating it over time to have actionable information in there, for when people want to use LLMs to learn about scikit-image.

However, if you still feel strongly about it, I can move it to a different PR, where we can perhaps discuss adding those more, err, nourishing aspects to it.

@lagru

lagru commented Mar 27, 2026

Copy link
Copy Markdown
Member

However, if you still feel strongly about it, I can move it to a different PR, where we can perhaps discuss adding those more, err, nourishing aspects to it.

Yes, let's discuss the more controversial stuff to a different scope and get the AI policy in. :)

@lagru
lagru self-requested a review March 27, 2026 10:23
Comment thread CONTRIBUTING.rst
Comment on lines +39 to +40
AI Policy
---------

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.

This section is short enough for now but it still makes our contributor file even more overwhelming. If everything is included, nothing stands out. Would you be against moving this into a dedicated ai_policy.md in our docs and linking to it here?

I don't have a clear solution but I've been thinking about how we can shorten our contribution guide to be less overwhelming.

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.

I feel like this belongs in our Development section with a clear link from our contribution guide.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Perhaps wise to just get it in for now, then we can always reshuffle material in a follow-up PR.

stefanv and others added 3 commits March 29, 2026 15:46
Move checklist to contributor guide and add AI policy
Co-authored-by: Lars Grüter <[email protected]>
@stefanv stefanv mentioned this pull request Mar 29, 2026
@lagru
lagru merged commit 5cda688 into scikit-image:main Apr 14, 2026
22 checks passed
@stefanv stefanv added this to the 0.27 milestone Apr 14, 2026
@lagru

lagru commented Apr 14, 2026

Copy link
Copy Markdown
Member

Feels good to have this in even if this is only a first version. 😊 Thanks!

@lagru lagru changed the title Draft AI contribution policy Add initial AI contribution policy Apr 14, 2026
@stefanv

stefanv commented Apr 14, 2026

Copy link
Copy Markdown
Member Author

@lagru Somehow, the text we agreed upon seems to have gotten lost when I tried to extricate the agents from the text.

@stefanv

stefanv commented Apr 14, 2026

Copy link
Copy Markdown
Member Author

I've restored the content that got destroyed in the last force push in #8123

lagru added a commit to lagru/scikit-image that referenced this pull request Apr 14, 2026
lagru added a commit that referenced this pull request Apr 14, 2026
On request from @stefanv, this reverts commit 5cda688 while we iterate on #8123.
matthew-brett added a commit that referenced this pull request Apr 21, 2026
* origin/main:
  Port feature.canny to skimage2 (#8047)
  Revert "Add AI contribution policy (#7982)" (#8124)
  Add AI contribution policy (#7982)
@stefanv

stefanv commented Apr 21, 2026

Copy link
Copy Markdown
Member Author

matthew-brett added a commit to matthew-brett/scikit-image that referenced this pull request Apr 23, 2026
* origin/main:
  Drop 3.13t builds from cibuildwheel configuration (scikit-image#8127)
  Restore wording of AI policy (scikit-image#8123)
  Port feature.canny to skimage2 (scikit-image#8047)
  Revert "Add AI contribution policy (scikit-image#7982)" (scikit-image#8124)
  Add AI contribution policy (scikit-image#7982)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📄 type: Documentation Updates, fixes and additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants