Skip to content
Merged
Show file tree
Hide file tree
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
80 changes: 80 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# AI Contribution Policy

Mastodon is a complex project, deployed at scale and across thousands of servers, used daily by hundreds of thousands of people worldwide. The complexity of the project includes database and server software, user-facing web and mobile clients, administration interfaces, and integration with other Fediverse software via ActivityPub and associated standards. It is important that the software has a high standard of quality and maintainability, with careful thought given to changes that affect production deployments.

Today, AI-assisted tools are being deployed in many coding environments. Some of the "lower-end" features like keyword-driven code completion can be useful aids; other tools make it very easy to generate contributions without the submitter fully understanding how the code works, or the consequences of specific implementation choices. These latter forms of AI assistance cause major overhead for project maintainers. There are a small number of people on the Mastodon core team, and we seek to use our time and resources effectively.

Our project is fundamentally about authentic human connection and communication. These values are reflected in our policy towards AI-generated contributions (below), just as much as they are embodied in how we work together, and how Mastodon enables anyone to connect on the social web. We generally *do not encourage* AI-assisted contributions; we have adopted this policy to reinforce the importance of genuine human interaction in everything we work on.

## 1. Accountability

We recognise that some tools make it difficult to disable AI-generated or assisted code, and that sometimes the output can be helpful. With that said, Mastodon is a human project, so even if you've used some AI-based tools to support your work processes, in the end we expect contributions to be made by you, the person doing the work.

**The human contributor is the sole party responsible for the contribution.**

If you submit a Pull Request that includes AI-generated code, documentation, or comments:

- You must fully understand every line of code in the submission.
- You must be able to explain the "why" behind the implementation during the review process.

"The AI generated it and it works for me" is never an acceptable answer to a reviewer's question. Copy-and-pasting to and from an AI chatbot during the process of code review is not acceptable (unless this is only for translation to and from English). If a maintainer suspects you do not understand your PR, it will be closed immediately.

Autonomous AI agents may not submit Pull Requests to Mastodon repositories. Humans will take time to review the code, and we expect a human contributor to make the same commitment in handling the submission themselves. Do not post comments on issues or PRs that are AI-generated. Discussions on the Mastodon repositories are for humans only.

## 2. Disclosure

If AI was used to generate a significant portion of your contribution (i.e. beyond simple autocomplete), we require you to **disclose it** in the Pull Request description. Note that you should not use AI to create the PR description itself (unless you’ve used it for translation) - as discussed above, we expect PRs to be submitted by humans.

Transparency helps maintainers calibrate their review focus. Please add a trailer to your commit message in the following format:

```text
Assisted-by: Name of AI
```

Examples:

```text
Assisted-by: ChatGPT 5.2
Assisted-by: Claude Opus 4.5
Assisted-by: Google Gemini 3
```

## 3. Intentionality

Mastodon is a project with code written by humans and interfaces designed by humans - for everyone. It is not a testing ground for AI experimentation.

We do not accept Pull Requests and Issues that result from running an AI tool over the codebase to find improvements without prior context or alignment with the project.

- **Focused changes:** Do not submit PRs that perform broad refactoring or cleanup suggested by AI unless a maintainer specifically requests it.
- **Design First:** For any non-trivial change, we strongly recommend opening an **Issue** or **Discussion** first. PRs that arrive out of the blue with significant AI-generated logic that doesn't align with our roadmap or architecture will be closed.
- **Quality over Quantity:** We value one thoughtful, manually crafted PR over ten AI-assisted fixes for nonexistent or trivial issues.

Note that these guidelines apply equally to human-created contributions. Please consider whether the change is meaningful and wanted by the project before submitting a PR.

## 4. Copyright & Legal

By submitting a contribution to Mastodon, you represent and warrant that:

1. You have the legal right to submit the contribution under the project's (or specific repository) licence.
2. The contribution does not violate the intellectual property rights of any third party.
3. If AI was used, the resulting code does not violate the terms of service of the AI provider and does not include "regurgitated" code from libraries with incompatible licences to the repository you’re submitting it to.
Copy link
Copy Markdown

@McSinyx McSinyx Mar 11, 2026

Choose a reason for hiding this comment

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

I suggest adding that verbatim and near-verbatim copies of snippets from other works must comply with the original licences, including attribution, so them being compatible is not enough, but these licences and copyright text must also be included in the target repository.

Moreoever, if LLM output snippets are derived from proprietary codebases, it's practically impossible to check.


If you cannot guarantee the provenance and legal safety of the AI-generated code, **do not submit it**.

## 5. Prohibited Uses

The following are strictly prohibited and will result in immediate closure of a Pull Request or Issue and potentially a block from the organisation:

- **Automated PR Descriptions:** Using AI to write PR descriptions that are vague, overly flowery, or fail to accurately describe the technical changes. We want to hear from *you* - the developer - why this change matters (see points 1 & 2).
- **Unvetted Boilerplate:** Submitting large blocks of AI-generated boilerplate that hasn't been trimmed to what's actually necessary. If you don't understand what the code does, don't submit the PR.
- **Hallucinated Features:** Submitting PRs for features or bug fixes that don't exist, based on AI hallucinations about the project's capabilities.

## 6. Enforcement

Mastodon project maintainers reserve the right to close any Pull Request that appears to be a low-effort AI contribution, without providing a detailed technical critique. We are a small team supporting a production project; our time is best spent working with contributors who understand the project's technical requirements, and the safety of our users' data.

Cases of repeated violations of these (or any of our other contributor guidelines) could result in a ban from our repositories.

### Acknowledgement

This policy was written by humans, based on the work in the [CloudNativePG AI Policy](https://github.com/cloudnative-pg/governance/blob/main/AI_POLICY.md), which in turn was inspired by the [Ghostty AI Policy](https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md) and with acknowledgement to the Linux Foundation's [Generative AI Policy](https://www.linuxfoundation.org/legal/generative-ai).
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

We pledge to make our community welcoming, safe, and equitable for all.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, colour, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.

## Encouraged Behaviors
## Encouraged Behaviours

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behaviour. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that centre our shared values, including:

1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
Expand All @@ -20,14 +20,14 @@ With these considerations in mind, we agree to behave mindfully toward each othe
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.

## Restricted Behaviors
## Restricted Behaviours

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
We agree to restrict the following behaviours in our community. Instances, threats, and promotion of these behaviours are violations of this Code of Conduct.

1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
3. **Stereotyping or discrimination.** Characterising anyone’s personality or behaviour on the basis of immutable identities or traits.
4. **Sexualisation.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.
Expand All @@ -37,15 +37,15 @@ We agree to restrict the following behaviors in our community. Instances, threat
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviours.

## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviours and norms that can help avoid conflicts and minimise harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, send an email describing the situation to hello@joinmastodon.org.

Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honour these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.

## Addressing and Repairing Harm

Expand All @@ -61,11 +61,11 @@ If an investigation by the Community Moderators finds that this Code of Conduct
3. Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
3. Temporary Suspension
1. Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
2. Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
2. Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behaviour and possible corrective actions.
3. Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
4. Permanent Ban
1. Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
2. Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
2. Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behaviour.
3. Repair: There is no possible repair in cases of this severity.

This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
Expand Down
Loading