Skip to content

Document AI-generated code policies#5693

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/update-mocha-docs-ai-code
Draft

Document AI-generated code policies#5693
Copilot wants to merge 5 commits intomainfrom
copilot/update-mocha-docs-ai-code

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Plan for AI-Generated Code Documentation

  • Review existing documentation structure (CONTRIBUTING.md, MAINTAINERS.md)
  • Add AI-generated code policy section to CONTRIBUTING.md
    • State that AI-generated code must pass all automated tests and manual inspections
    • Clarify that these requirements apply to all PRs, AI-generated or not
  • Add maintainer guidelines to MAINTAINERS.md (removed per maintainer feedback)
  • Validate changes don't break existing build/docs
  • Run code review and security checks
  • Address maintainer feedback to remove MAINTAINERS.md changes
  • Revert unintended package-lock.json changes

Changes Summary

CONTRIBUTING.md

Added "🤖 AI-Generated Code" section that:

  • Acknowledges AI tools as valuable development aids
  • Requires all code (AI or human) to pass automated tests
  • Requires thorough manual review for correctness, security, and standards
  • Establishes contributor responsibility for all submitted code

Other Files

  • MAINTAINERS.md: Changes removed per maintainer request
  • package-lock.json: Unintended changes reverted since package.json was not modified

All linting checks passed ✅

Original prompt

This section details on the original issue you should resolve

<issue_title>🛠️ Repo: Update Mocha docs RE our use of AI-generated code</issue_title>
<issue_description>### Tooling Suggestion Checklist

Overview

I've started opening GitHub Copilot PRs, and we have also accepted code from other AI tools like Claude provided by outside contributors. Personally, I think AI has a lot of value. I also fully recognize that blindly accepting AI-generated code is a huge risk, and I've seen it in my own life at work. We should update our docs to be clear that any AI-generated code still needs to pass all the same automated tests and manual inspections that any other PR needs to pass. Additionally, if a maintainer uses AI to generate any non-trivial amount of code (let's say 10+ lines), it must be approved by another maintainer before merging.

Additional Info

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 6, 2026

CLA Not Signed

Copilot AI and others added 2 commits February 6, 2026 16:03
Add guidelines for AI-generated code contributions and maintainer review requirements. This addresses issue requirements by:
- Clarifying that AI code must pass all tests and manual reviews
- Requiring maintainer approval for AI-generated code (10+ lines) by another maintainer

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Mocha documentation for AI-generated code Document AI-generated code policies Feb 6, 2026
Copilot AI requested a review from mark-wiemer February 6, 2026 16:05
MAINTAINERS.md Outdated
Requesting a review from another maintainer _may or may not_ actually result in a review; don't wait on it.
If the PR cannot move forward without input from a certain maintainer, _assign them to the PR_.

#### AI-Generated Code by Maintainers
Copy link
Member

Choose a reason for hiding this comment

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

@copilot we can remove changes to this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed changes to MAINTAINERS.md in commit 116e5b6. The AI-generated code policy now only appears in CONTRIBUTING.md.

"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
"dev": true,
"license": "MIT",
"peer": true,
Copy link
Member

Choose a reason for hiding this comment

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

@copilot revert changes to this file, as package.json didn't change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted package-lock.json changes in commit bd359d0.

Per maintainer feedback, keep AI-generated code policy only in CONTRIBUTING.md

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
Per maintainer feedback, revert unintended package-lock.json changes since package.json was not modified

Co-authored-by: mark-wiemer <7833360+mark-wiemer@users.noreply.github.com>
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.

🛠️ Repo: Update Mocha docs RE our use of AI-generated code

2 participants