Skip to content
Open
Changes from all commits
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
52 changes: 52 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# MuPT AI & Authorship Policy

**Version:** 1.0
**Applicability:** All Pull Requests (Human & Bot)

## Core Philosophy

MuPT accepts AI-assisted code (e.g., using Copilot, Cursor, etc.), but strictly rejects AI-generated contributions where the submitter acts merely as a proxy. The submitter is the **Sole Responsible Author** for every line of code, comment, and design decision.

## Principles of Contribution

### Verification

AI tools frequently write code that looks correct but fails execution. Therefore, "vibe checks" are insufficient.

- Every PR introducing functional changes must pass all tests that are currently extant. This is mandatory for all contributors and is particularly important for first-time contributors.
- All code with AI contributions should include tests to demonstrate their validity. Intially, as the testing framework develops, this may be relaxes, but will become mandatory in the near future.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Theme that I'll repeat a few times: Many rules for agents are equally good for humans. I see no reason to call these out as "AI contributions" -- the same standard should apply to human contributions. Tests should be required regardless of the level of AI contribution.


### Hallucination & Redundancy

AI models often hallucinate comments or reinvent existing utilities.

- You should existing `mupt` utilities and never reinvent the wheel, except for when the utility is not available. Creating new helper functions when a MuPT equivalent exists will be rejected
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.

Suggested change
- You should existing `mupt` utilities and never reinvent the wheel, except for when the utility is not available. Creating new helper functions when a MuPT equivalent exists will be rejected
- You should use existing `mupt` utilities and never reinvent the wheel, except for when the utility is not available. Creating new helper functions when a MuPT equivalent exists will be rejected

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is another "applies to humans as well as AI." Calling a for hard reject of a PR based on that may be extreme.

- "Ghost comments" (comments explaining logic that was deleted or doesn't exist) will result in a request for a full manual rewrite.

### The "Explain It" Standard

- All pull requests messages and descriptions must be entirely authored by human. Individual commit methods may use AI tools to fully summarize the changes. If the PR is suspected to be AI, the submitters will be asked to rewrite the PR message from scratch.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Generally recommend exceptions for translation or grammar improvement (thinking of use by non-native speakers).

- If a maintainer or reviewer asks during code review, you must be able to derive the math or explain the logic of any function you submit. Answering a review question with "That's what the AI outputted" or "I don't know, it works" leads to immediate closure.

### Transparency in AI Usage Disclosure

All PRs must accurately describe the actual use of AI tools.

**When to mark as 🔴 AI-generated:**
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 personally don't like the implied requirement that we need to tag all of our code contributions with emojis. I've seen people in the OS community have a short line at the bottom of their commits/PRs that read "🤖 Generated with Claude Code". See patterns in PyLabRobot by @rickwierenga

- An AI agent (e.g., Cursor, GitHub Copilot, ChatGPT, etc.) generated the code or commit messages
- You cannot explain the logic without referring to the AI's output
- The PR was created primarily by an agent with minimal human review or modification
- This should not currently submitted to MuPT
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 should not currently submitted to MuPT

Is this really the policy? Seems like we're blocking agents writing code + generating commits even if the author has full ownership of the code that is produced. I read this as contradicting the previously mentioned "Explain It" standard.

Comment on lines +35 to +39
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 have a couple of concerns about this section:

  1. "Mark it this way, but don't submit it" -- this is contradictory. Let's not talk about how to mark it if it isn't allowed.
  2. It is unclear to me whether the bullet points are joined by "AND" operators or "OR" operators. If "AND" operators, sure, don't accept this. If "OR" operators, IMO, the real gatekeeping is "can you explain it."
  3. Following on 2, I'm not sure that the other points should be gatekeepers. For example, I recently had a number of "pkg_resources is longer available by default in my environment, update to importlib" issues, where basically I said that to an agent, skimmed the changes, ensured it passed tests, and called it good. That's "created primarily by an agent with minimal human review or modification", but also a good use of AI to cut my time to solve the problem by a factor of 5 or more.


**When to mark as 🟡 AI-assisted:**
- You used AI tools for boilerplate code, refactoring, or suggestions, but you manually reviewed and tested every line
- You understand and can explain all the code you're submitting
- You made significant modifications to AI-suggested code
- This code is appropriate for MuPT contribution

**When to mark as 🟢 No AI used:**
- You wrote all code manually without any AI assistance

Incorrectly marking AI-generated code as "AI-assisted" or "No AI used" may result in PR closure, especially if the code contains hallucinations or cannot be explained during review.

This document inspired by policies developed at https://github.com/kornia/kornia/AI_POLICY.md
Loading