Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions docs/dev/AI_Policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
Proposed OpenImageIO Policy on AI Coding Assistants
===================================================

proposal as of 6-Mar-2026


Use of "AI coding assistants" is permitted on this project, with the following
guidelines and principles.

### Human authorship and interaction with the project

**The human making a PR is considered the author** and is fully responsible
for the code they submit.

**No PRs should be submitted, reviewed/merged, or deployed without a human
fully in the loop.** You may use agents locally to help you write code (and
docs, tests, etc.), but you may not use agents to autonomously interact with
the project community. Submit your own PRs, write your own discussion
comments, respond to community members in your own words, approve or reject
code in review using your own brain.

Code autonomously submitted without an identifiable human author and
responsible party will be immediately closed, and the account associated with
the submission may be banned from future project participation.

**DO NOT "vibe code."** This term refers to a pure prompt-to-behavior cycle
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Really appreciate this definition of vibe coding. I think it's spot on.

where the human accepts un-inspected code based on the program behavior alone.
We don't want this. Code that must be maintained by the project should be
truly understood. Project code is ideally the result of discussion / pair
programming between the author and assistant, but even if the machine is doing
most of the work, all code should be approved and fully understood by the
author prior to PR submission.

### Professionalism and quality

**The usual high quality level of PRs should be maintained regardless of tools
used.** This includes not only code, but also the design, testing, PR
preparation, and the author's ability to explain and defend the code and
respond to questions and requests for changes. We never want to hear "but the
AI..." as an excuse for anything.

**PRs should always be [reviewed](CodeReview.md) and approved by someone other
than their author if at all possible.** This is especially true of code with
machine-generated components, because of the additional risk that the
submitter/operator may not fully understand what they did not write
themselves. This is part of the reason for AI tool disclosure -- to ensure
that another pair of eyes is on it. AI code review may be requested for
additional input, but the AI cannot give "approval", nor merge code itself.

Even when using a coding assistant to write the code, you are strongly
encouraged to write your own PR description, in your own words, if for no
other reason than to force yourself to understand the code well enough to
describe it to others.
Comment on lines +60 to +63
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree with the intent, but I disagree about discouraging generated PR descriptions. I think there's a lot of value in letting a code assistant put together PR descriptions, especially if maintainers are able to guide behavior / structure output / assist compliance with this document... maybe we could adjust the wording to require a human-written description atop any generated PR description?

How about, as an alternative:

You can generate code or docs, but not both.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I disagree about discouraging generated PR descriptions

As I said in the "code review best practices" document I wrote, I actually believe that most of the value in code review is not from the reviewer finding mistakes themselves (though it's helpful when they do), but rather in having the author put themselves in what I call "teaching mode" to explain and justify what they have done and know that it will be scrutinized by their peers.

I believe that having to summarize and explain in a clear way what the PR does is, itself, valuable and I know that often, it's when I'm writing the detailed description (which for me are often the length of novellas) that I think of all the things I have not considered, and often do several revisions of the code at that point. I don't want to lose this benefit -- for myself or for others -- via the shortcut of having the machine write the description for you.

And yet... sometimes it's handy to let it take a stab at it, and it can be quite good at a detailed summary, often remembering details I would forget. So I don't want to absolutely say no, either. I think there are times, and certain developers (mostly the very senior ones), when it is the right move to let it write much of the PR description. But not usually, and I think it's very unwise for more junior engineers. Learning to explain clearly to others what your code is doing and why is a core skill.

So I was hoping that "strongly encouraged to write your own PR description" would... you know, encourage without outright banning the alternative in all circumstances. It's like a danger-zone warning, but if you really know what you're doing, you can try it and see if you satisfy the reviewers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Appreciate the thoughtful reply....! I totally agree with you about all the benefits of being all human-y and stuff when composing PR descriptions. I think what I meant to say was, if the requirement is that one is able to understand the code well enough to describe it to others, wouldn't that effort be put to better use by human-writing documentation, rather than PR descriptions (if you had to choose one or the other)? I guess it's a matter of opinion.

Anyway, carry on!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@zachlewis You are an important contributor to this project, and I trust your judgment as applied to the individual PRs you work on. Everything is shades of grey. The important thing is for you to understand the code you submit and its implications. I think writing the summary yourself is an aid to ensuring that, but that's the tool, not the end goal. Do what you think is best to help you understand and craft a good PR.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

to be fair to the original sentence strongly encouraged != discouraged :)


### Disclosure

**Disclosure is required.** Use of coding assistants to generate more than de
minimis changes should have a short disclosure in the PR submission comments:
what tool was used, for what purpose, and paraphrase the gist of the prompts.
In cases where the code generation was the result of a detailed "spec" or
other instructions, include that spec in the contents of the commit message or
PR description. If it was an extended dialog or circuitous route, a short
summary will do.

There are several reasons for this disclosure/documentation, even though it
will sometimes be inconvenient:
- Reproducibility: We want even automated work to be reproducible by others in
principle, just like a scientific paper.
- Education: We want to actively teach each other what tools, prompts, or
methods are successful at making high quality results for the project.
- Metrics: We would like the ability to look back and compare assisted vs
non-assisted code for things like defect rate (how often were new bugs
introduced or commits needed to be reverted), whether people are more likely
to write comprehensive tests when using assistants, etc.
- Compliance: Many key users and developers are in companies where they need
to disclose how AI tools were used in their work, and in other software that
they use. Let's make it easy for them.
- Insurance: Should future legal decisions radically change the IP status of
AI-generated code, or if particular models are implicated in copyright
violations, we want a way to find out which contributions might need to be
revisited in order to bring the project back into compliance.

### Intellectual Property

Regardless of how the code came to be -- from your head alone, from a friend,
from Stack Overflow, from a blog post, from reading other code bases, or from
a coding assistant -- we expect the terms of the
[DCO](https://developercertificate.org/) and CLA to apply, and for the author
to take reasonable care that code is not copied from a source with an
incompatible license.

We believe that the reputable coding assistant tools automatically exclude
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can read this as (1) wishful thinking ;) or (2) a ironic statement that there are no reputable coding assistant tools. I don't believe anything in this paragraph can be demonstrated, or is actually implemented. I can find no evidence in any source-available assistants, and the secondary implication that such avoidance may be in the training or fine-tuning is again, not demonstrable or documented. Better just to omit I think.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Am I wrong in reading the claims from Claude, Copilot, and maybe others as implying that they have some internal safeguards that prevent it from giving you answers that contain wholesale copying?

But I can omit that if you think it's best.

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.

I think we just don't know, and I certainly don't trust the documentation from those tools being honest.

code that is too similar to that found in its training set. It is probably
also prudent to include instructions to your coding assistant to avoid basing
its answers on material from code bases with incompatible licenses.

### Extractive submissions

**Maintainer time and attention are precious commodities**, and use of coding
assistants is not an excuse to submit poor PRs or to externalize costs onto
maintainers/reviewers (such as responsibility for understanding, testing, or
fixing PRs that the human author does not have a full understanding of).

**AI tools may not be used to fix GitHub issues labeled as "good first
issue"**, and are strongly discouraged for "Dev Days" work. Cultivating and
educating new contributors is part of our job, and as such, we do not want
people to swoop in and use tools to trivially solve these tasks that were
curated specifically for somebody to actually learn from.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just as some students will secretly use AI to do their assignments, I suspect the same will happen here whether we allow it or not.

What we could do, however, is only allow a contributor to pick one item from the "good first issue". After that they would need approval from the maintainers if they want to keep submitting from this list. This would prevent someone grabbing the entire list. If they use AI for their one submission, hopefully they still got to learn something about OIIO...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unlike a school assignment, there is literally nothing to be gained by breaking the rules here. I think we just need to let people know our expectations, and not worry about or have any overhead of allowing/enforcing this particular point. The same situation would occur if a senior developer just spent the day (without AI) doing 10 different GFIs and left none for beginners. We'd tell them to knock it off, but we wouldn't worry about putting any kind of approval system in place.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think some people might see plenty of gain in this. I believe some might see getting a bunch of PRs submitted and accepted as helping their prospects of getting hired. Others might see it as a gamification where their goal is to get as many PRs completed across projects so that their "score" goes up. Whether they learned anything or whether they truly care about the project might be irrelevant to them.

I'm fine with starting with simple requests, like in the proposal, and only adding in enforcement if this ever starts to become a problem.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I see your point, @ThiagoIze. I guess we've already seen something like that in people who breeze through with a fuzz-induced crash who want to round it up to a major security issue to get the credit for finding it. I assume they are receiving some kind of accolades elsewhere?

There is nothing about this that lasts forever. If we're seeing a problem in practice, we can adjust and find some way to prevent it.

I think that orthogonal to AI tools, we can certainly say in our DD explanations that people can do more than one PR if they want, but only one should be GFI.

Maintainers are free to take counter-measures against submitters of sub-par
PRs, or other violations of this policy, up to and including banning habitual
abusers from future participation in the project.

### Exceptions

This AI tool use policy is not meant to encompass cases such as:
- "Smart auto-complete", spell-checking, grammar checking, or other uses that
aren't really contributing substantively to authorship.
- Language translation for non-fluent English speakers or other accessibility
accommodations.
- Trivial or de-minimis fixes such as fixing a typo, obviously wrong variable
use, etc.

### References and inspiration

Our policy has been informed and inspired by the following efforts in other communities:
- [LLVM AI Tool Policy](https://llvm.org/docs/AIToolPolicy.html)
- [Fedora Project policy on AI-assisted contributions](https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/)
- [Linux Foundation policy on Generative AI](https://www.linuxfoundation.org/legal/generative-ai)
- [Rust policy on rejecting burdensome PRs](https://github.com/rust-lang/compiler-team/issues/893)
- The METR paper [Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity](https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/)