Skip to content

docs: Update the AI code guidelines - #3249

Open
stephanmeesters wants to merge 1 commit into
TheSuperHackers:mainfrom
stephanmeesters:docs/ai-policy
Open

docs: Update the AI code guidelines#3249
stephanmeesters wants to merge 1 commit into
TheSuperHackers:mainfrom
stephanmeesters:docs/ai-policy

Conversation

@stephanmeesters

Copy link
Copy Markdown

This change expands upon the existing AI code generation guidelines and turns it into an AI policy.

Notably it disallows pull requests that have descriptions that are entirely AI generated (unless translated), as well as disallowing copy-pasting answers from an AI chatbot during the review process.

It also describes a way of how this policy would be enforced.

This new policy incorporates the existing TSH guidelines on AI code generation and is based on the Mastodon AI policy and the CloudNativePG AI Policy.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Establish comprehensive AI contribution policy

📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Establishes accountability, disclosure, intentionality, and prohibited-use rules for AI-assisted
 contributions.
• Defines enforcement measures for low-effort or noncompliant AI-generated submissions.
• Links contribution guidance to the centralized policy.
Diagram

graph TD
  A["Contributor"] --> B["CONTRIBUTING.md"] --> C["AI_POLICY.md"] --> D{"AI-assisted?"}
  D -->|Yes| E["Disclose and verify"] --> F["Human review"] --> G["Maintainer enforcement"]
  D -->|No| F
Loading
High-Level Assessment

A dedicated AI policy linked from CONTRIBUTING.md is the clearest approach. Keeping the full policy separate avoids overloading the general contribution guide, provides a focused governance document, and prevents duplicated requirements; embedding the entire policy in CONTRIBUTING.md was considered but would reduce maintainability and discoverability.

Files changed (2) +57 / -6

Documentation (2) +57 / -6
AI_POLICY.mdAdd comprehensive AI contribution policy +55/-0

Add comprehensive AI contribution policy

• Introduces requirements for human accountability, AI-use disclosure, intentional contribution scope, and review participation. It also documents prohibited uses, enforcement consequences, and the external policies used as references.

AI_POLICY.md

CONTRIBUTING.mdLink contributors to the centralized AI policy +2/-6

Link contributors to the centralized AI policy

• Replaces the embedded AI code-generation guidance with a concise link to AI_POLICY.md, making the new policy the canonical source for AI-assisted contribution requirements.

CONTRIBUTING.md

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Description ban contradicts itself 🐞 Bug ≡ Correctness
Description
Section 2 says AI must not be used to create a pull request description except for translation,
while the strict prohibition only rejects AI-written descriptions that are vague, flowery, or
inaccurate. Consequently, an accurate AI-generated description is simultaneously disallowed and
outside the stated prohibited-use criteria, making enforcement ambiguous.
Code

AI_POLICY.md[42]

+- **Automated Pull Request Descriptions:** Using AI to write pull requests 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).
Evidence
AI_POLICY.md line 24 instructs contributors not to use AI to create the description except for
translation, but line 42 defines the strict violation using content-quality qualifiers. Those
qualifiers permit accurate AI-written descriptions under one section while another section rejects
them.

AI_POLICY.md[24-24]
AI_POLICY.md[40-42]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The policy gives conflicting rules for AI-generated pull request descriptions: one section rejects any AI use except translation, while the prohibited-uses section rejects only vague, flowery, or inaccurate AI descriptions. State one consistent rule, including whether partial AI assistance is allowed and retaining the translation exception.

## Issue Context
This is a central rule of the new AI policy and directly affects whether maintainers should close a pull request.

## Fix Focus Areas
- AI_POLICY.md[24-24]
- AI_POLICY.md[40-42]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread AI_POLICY.md

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 Pull Request Descriptions:** Using AI to write pull requests 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Description ban contradicts itself 🐞 Bug ≡ Correctness

Section 2 says AI must not be used to create a pull request description except for translation,
while the strict prohibition only rejects AI-written descriptions that are vague, flowery, or
inaccurate. Consequently, an accurate AI-generated description is simultaneously disallowed and
outside the stated prohibited-use criteria, making enforcement ambiguous.
Agent Prompt
## Issue description
The policy gives conflicting rules for AI-generated pull request descriptions: one section rejects any AI use except translation, while the prohibited-uses section rejects only vague, flowery, or inaccurate AI descriptions. State one consistent rule, including whether partial AI assistance is allowed and retaining the translation exception.

## Issue Context
This is a central rule of the new AI policy and directly affects whether maintainers should close a pull request.

## Fix Focus Areas
- AI_POLICY.md[24-24]
- AI_POLICY.md[40-42]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces the brief AI-generation guidance with a dedicated contribution policy covering accountability, disclosure, prohibited uses, and enforcement.

  • Adds AI_POLICY.md with the expanded policy and source acknowledgements.
  • Updates CONTRIBUTING.md to direct contributors to the new policy.

Confidence Score: 4/5

The documentation-only PR appears safe to merge after adding the required GPL license header to the new policy file.

The policy content and contribution-guide link are coherent, with the only accepted issue being the omitted licensing prologue in AI_POLICY.md.

Files Needing Attention: AI_POLICY.md

Important Files Changed

Filename Overview
AI_POLICY.md Adds the detailed AI contribution policy, but the new file lacks the required GPL license header.
CONTRIBUTING.md Replaces duplicated AI guidance with a concise link to the dedicated policy.
Prompt To Fix All With AI
### Issue 1
AI_POLICY.md:1
**Missing GPL license header**

The newly added `AI_POLICY.md` starts directly with its document heading and omits the repository-required GPL license header, leaving the policy document without its required licensing notice.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs: Update the AI code guidelines" | Re-trigger Greptile

Comment thread AI_POLICY.md
Comment thread AI_POLICY.md
@@ -0,0 +1,55 @@
# AI Contribution Policy

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A test for each clause: does it still say something with 'AI' removed? Most of these do. Worth asking whether most of this belongs in CONTRIBUTING.md, with a short AI file left for provenance.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That is true, but this document is here to solve a specific problem and it's good to name the cause of the problem directly, we don't see low-effort human slop really so there is no need to impose more guidelines on "regular" contributions

Comment thread AI_POLICY.md
- You are responsible for verifying that the code is human readable, maintainable and logically correct.
- All code needs to be tested and verified.

"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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The copy-paste ban could be rewritten. Linguistic support, surface edits, meaning-preserving edits and rendering are all valid reasons to copy-paste, the translation exception is already reaching for some of these.

Maybe something like: "If you cannot verify an answer well enough to defend it under follow-up questioning, say so rather than presenting it as your own"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That's fair, could use some nuance

Comment thread AI_POLICY.md
Comment thread AI_POLICY.md
@@ -0,0 +1,55 @@
# AI Contribution Policy

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should we maybe call it LLM instead of AI? Because it is not AI. It is just the marketing term fort it, but not technically correct. At least in the technical description. The header title can probably stay "AI" for a broader understanding of the topic matter.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Technically as well LLM's are an AI system, it's an umbrella term.

Artificial Intelligence (AI) → Machine Learning (ML) → Deep Learning → Generative AI → Large Language Models (LLMs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is not Artificial Intelligence. It does not think. It is a complex predictor.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is not Artificial Intelligence. It does not think. It is a complex predictor.

not to argue with that concept, but i belive it do think or emulate the thinking process of the human, also i agree that it is just a very complex predictor, with massive amounts of data.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

So this is becoming philosophical. LLM’s are the tool of today but in a few years (or sooner) it may be something else. ML is bit less common of a term I think. We can do LLM for now, that’s fine.

Comment thread AI_POLICY.md

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 Pull Request Descriptions:** Using AI to write pull requests 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is not clear what "overly flowery" means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants