Skip to content

Update CONTRIBUTING AI Policy - #1937

Open
xstoicunicornx wants to merge 2 commits into
payjoin:masterfrom
xstoicunicornx:contrib-ai-policy
Open

xstoicunicornx wants to merge 2 commits into
payjoin:masterfrom
xstoicunicornx:contrib-ai-policy

Conversation

@xstoicunicornx

Copy link
Copy Markdown
Collaborator

Given that AI code generation has quickly become ubiquitous, the existing AI Policy seemed a bit outdated and didn't feel useful or informative. I made updates to no longer focus on the code generation aspects of AI usage and instead focus on the aspects of AI usage that ensure that reviewer's time and attention is respected.

The main points are:

  • Removes requirement of disclosing AI generated code
  • AI communication should be disclosed, thoughtful, and relevant
  • AI review should be done prior to submitting a PR

I also added a prompt that should be used to run the AI review and I would really like feedback on what others think of this prompt. I worry that it is a bit too verbose as is, but also think it is good to list specifics of what should be reviewed.

The second commit adds a section in Code guidelines about adhering to code conventions, since this is something and AI can enforce but a lint can't, but I'd like feedback on this as well.

Assigning primary review to @DanGould but would like everyone's eyes on this.

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls

coveralls commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 36910396434

Coverage remained the same at 87.289%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 17804
Covered Lines: 15541
Line Coverage: 87.29%
Coverage Strength: 320.3 hits per line

💛 - Coveralls

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cACK

Comment thread .github/CONTRIBUTING.md Outdated

Before opening a pull request, run an AI review of your branch locally and address any valid findings. For those who are unable to complete the local AI review, this must be disclosed in the pull request. Use the following prompt:

> Review the changes on this branch relative to `master`, commit by commit. Check for adherence to the guidelines in `.github/CONTRIBUTING.md`, relevant test coverage, consistency with the overall codebase, bugs, missed edge cases, unintended side effects, poor implementation choices, new panics or unwraps in library code, unintended public API changes, and other general concerns.

@spacebear21 spacebear21 Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure I like the idea of providing prompts in the human-level docs, perhaps this should live in AGENTS.md instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, updated.

Drop the requirement to disclose AI-generated code. Contributors remain
responsible for understanding and explaining their changes, and pull
requests must not be opened or driven by autonomous agents.

Require disclosure of AI-generated communication, such as issue
descriptions, pull request descriptions, and comments, and allow
maintainers to moderate or block thoughtless AI-generated
communication. Using AI only to fix grammar or translate text the
contributor wrote does not need to be disclosed.

Require a local AI review before opening a pull request, and disclosure
when that review was not completed. Keep the review criteria in
AGENTS.md, which coding agents load automatically, rather than as a
prompt in the human-facing guide. Replace the AI disclosure checkbox in
the pull request template with one for the local AI review.

Move the section out from between the Commits and Nix Development
Shells subsections, where the remaining Code subsections rendered as
part of it, to a top-level section after Code.
Clippy and rustfmt enforce most style conventions, but not API design.
Ask contributors to follow the idioms of the language they write in,
since payjoin-ffi includes bindings in several languages, and point
Rust contributors to the Rust API Guidelines for public APIs.

@caarloshenriq caarloshenriq left a comment

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.

ACK

@xstoicunicornx

Copy link
Copy Markdown
Collaborator Author

Agh sorry @caarloshenriq just pushed update!

@caarloshenriq caarloshenriq left a comment

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.

re-ACK

This branch has not been deployed

No deployments
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.

6 participants