Skip to content

docs: Update the AI code guidelines - #3249

Merged
xezon merged 3 commits into
TheSuperHackers:mainfrom
stephanmeesters:docs/ai-policy
Sep 5, 2026
Merged

docs: Update the AI code guidelines#3249
xezon merged 3 commits 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

qodo-free-for-open-source-projects Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Description ban contradicts itself ✓ Resolved 🐞 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 keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread AI_POLICY.md Outdated
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces the brief AI code-generation guidance with a dedicated contribution policy and links it from the contributing guide.

  • Defines contributor accountability, disclosure, intentionality, prohibited uses, and enforcement.
  • Clarifies that AI-generated pull-request descriptions and chatbot-generated review responses are prohibited, with limited translation and editing exceptions.
  • Preserves attribution to the external policies on which the document is based.

Confidence Score: 4/5

The documentation changes are otherwise coherent, but the explicit GPL-header requirement must be satisfied before merging.

The new policy clearly communicates the intended contributor rules, but AI_POLICY.md omits the GPL license header required in new file prologues.

Files Needing Attention: AI_POLICY.md

Important Files Changed

Filename Overview
AI_POLICY.md Adds the comprehensive AI contribution policy; the new file is missing the repository-required GPL license header.
CONTRIBUTING.md Replaces the abbreviated AI guidance with a link to the dedicated policy.
Prompt To Fix All With AI
### Issue 1
AI_POLICY.md:1
**GPL Header Is Missing**

The newly created `AI_POLICY.md` starts directly with its heading instead of the required GPL license header. This violates the repository requirement for license headers in new file prologues and must be fixed before merging.

---

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

Reviews (6): Last reviewed commit: "Some more touch-ups" | Re-trigger Greptile

Comment thread AI_POLICY.md
Comment thread AI_POLICY.md Outdated
Comment thread AI_POLICY.md Outdated
Comment thread AI_POLICY.md
Comment thread AI_POLICY.md
Comment thread AI_POLICY.md Outdated
Comment thread LLM_POLICY.md Outdated
Comment thread CONTRIBUTING.md Outdated
@OmarAglan

Copy link
Copy Markdown

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fbf04b2a48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AI_POLICY.md Outdated
Comment thread AI_POLICY.md Outdated
@xezon xezon added the Documentation Is documentation or complementary resource label Sep 5, 2026
@xezon

xezon commented Sep 5, 2026

Copy link
Copy Markdown

There are unaddressed comments

@xezon

xezon commented Sep 5, 2026

Copy link
Copy Markdown

It does a replay check on doc edit 👀

@xezon
xezon merged commit e6f1d06 into TheSuperHackers:main Sep 5, 2026
44 of 45 checks passed
@stephanmeesters
stephanmeesters deleted the docs/ai-policy branch September 5, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Is documentation or complementary resource

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants