Skip to content

AI Contribution Policy For MONAI #8914

Closed

Description

@ericspod

A policy stating requirements for AI generated or assisted contributions should be developed for repositories across the MONAI project. This is needed to ensure contributions from any party meet open source license requirements, allow attribution consistent with DCO requirements enforced by the project, and make clear the origin and nature of code or data being proposed for inclusion.

Policies regarding AI have been developed by other open source projects/foundations, most prominently is the Linux Foundation stating requirements for generative AI contributions and guidance for the use of coding assistants. Other organisations have developed similar policy statements, eg. Python, PyTorch, EFF.

MONAI should include a policy with its contribution guidance which ensures:

  • AI assistance or generation is not prohibited but must have accompanied human review and oversight, such that the contributor can honestly take responsibility for the proposed content.
  • Any contributed code or data must adhere to open source and open data licensing conditions irrespective of size or nature of proposed content.
  • The contributor can honestly sign their commits to satisfy DCO requirements, that is they can certify the origin of their contributions.
  • Attribution to AI tools may be mandated as well if these are used to generate anything beyond trivial content.
  • Any documentation, description, discussion, or other informative material forming part of the proposed content must be written by the contributor.
  • AI code review is a separate subject from generation, such that these tools can be used to help review and amend contributions so long as these only assist human reviewers who take responsibility for review results/comments.

These policy statements should be discussed to refine the content and consider other issues not touched upon here.

Activity

  1. added theissue type on Jun 12, 2026
  2. ericspod commented on Jun 12, 2026

    @ericspod
    MemberAuthor

    For my part I feel that much AI tool use is much like using linters or code generators. From before YACC even, code generation has been a valuable tool without raising the issues discussed above. It's the breadth and possibilities of AI tools that differ from simple code generators thus requiring deeper thought, and the threat of hallucination or unintended IP theft not found in older tools. AI tools for generation or analysis are fine so long as they assist the human and not replace the human.

  3. aylward commented on Jun 27, 2026

    @aylward
    Collaborator

    Agreed!

    1. I agree with the sentiment / premise: AI tools are welcomed, as are other coding tools; but there are additional risks that come from halucinations and/or less rigorous review by the submitter.

    2. We should use the contributing guide to remind people of those risks, including risk of omission of contribution attributions which may be required by some AI tools, risk of weak/incorrect tests , and submission of code that has not been reviewed by the submitter.

    I had thought about asking folks to indicate if AI was used to generate their pull request, but AI is so dominant that perhaps we should just assume AI is being used to generate every pull request.

    One thing we could do is ask folks to use a different AI engine to review the code, than what was used to generate the code. That is, for example, if they used Claude for coding, we strongly recommend they use Codex to do a review prior to submission. That is a "good practice" that should be promoted (but perhaps not required), imo.

  4. sjh9714 commented on Jul 24, 2026

    @sjh9714

    One empirical data point that might help calibrate the "additional risks from less rigorous review" concern @aylward raised. I recently scanned 2,204 merged agent-authored PRs across public repos with a deterministic, checkout-free policy check (no LLM, reads the GitHub API only). Three findings relevant to a contribution policy:

    (1) 0 of 2,204 declared any machine-checkable scope for the change in the PR body — so today there is nothing a reviewer or a CI check can verify the change against beyond reading the diff. (2) 3.9% modified agent control-plane files (AGENTS.md, .mcp.json, and similar) — the files that steer future agent runs, worth calling out explicitly since an agent editing its own instructions is easy to miss. (3) Of the PRs that touched CI workflows, about 13% raised GitHub Actions permissions — the kind of change DCO/attribution language will not catch but a policy could ask reviewers to look for.

    Full methodology and queries are public if useful for framing the policy: https://github.com/sjh9714/mergewarden/blob/main/docs/study/what-2204-agent-prs-showed.md — findings are review evidence, not misconduct claims, and I name no repositories. Sharing purely as data for the discussion.

  5. ericspod commented on Aug 11, 2026

    @ericspod
    MemberAuthor
  6. ericspod commented on Aug 11, 2026

    @ericspod
    MemberAuthor

    We should also ensure our contributing guide mentions not to duplicate other people's open work.

  7. sjh9714 commented on Aug 11, 2026

    @sjh9714

    Following up on the July data point with one narrower measurement that bears on the "less rigorous review" concern. We went back and pulled the review records for a subset of that scan.

    Out of the 2,204 merged agent PRs, 86 changed an agent instruction file (CLAUDE.md, AGENTS.md, .mcp.json and similar). 68 of those modified an existing one, and none of the 68 drew a human review comment on that file. Seventeen were on repositories with 100 or more stars, and 10 of those were formally reviewed and approved, so the reviews did happen. The instruction file just passed through inside them without remark. The only instruction file in the whole sample that was reviewed line by line was one being introduced to a repository for the first time.

    For a contributing guide, I read this as review coverage and review attention being different things. If MONAI ever adopts agent instruction files, edits to them seem to be the one change class where the measured norm is silence even under otherwise rigorous review. It may be worth a line in the guide that treats instruction-file changes like CI workflow changes rather than documentation.

    The usual caveats apply. A missing comment does not prove nobody read the diff, and the sample is merged PRs only, so a review that rejected such a change is invisible here. Method and per-PR numbers are in https://github.com/sjh9714/mergewarden/blob/main/docs/study/who-reviews-the-steering-files.md

  8. ericspod commented on Sep 9, 2026

    @ericspod
    MemberAuthor

    Hi @sjh9714 thanks for this info (and sorry for slow turnaround), I have opend the PR #9106 for the proposed policy. In general we do now treat any changes not in document files, docstrings, or inline comments in code as a substantive code change, so I think this would cover your concern. If you think we need specific language somewhere in our contirbutions guide please propose specific wording here or in the PR.

  9. added a commit that references this issue on Sep 18, 2026
    fffb113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions