DOC: Add Create a Pull Request section with draft PR guidance#5975
DOC: Add Create a Pull Request section with draft PR guidance#5975blowekamp wants to merge 2 commits intoInsightSoftwareConsortium:mainfrom
Conversation
|
Cool, @blowekamp Very glad to have such a guidance for PRs! 👍 Some more detailed comments coming up... |
| author has personally verified that: | ||
|
|
||
| - all automated CI tests pass, | ||
| - the implementation is correct and complete, |
There was a problem hiding this comment.
Can you please make this:
- the implementation is correct, complete and fully understood,
I think it's essential that we keep understanding the code, even when it is partially AI generated, to avoid cognitive debt. As I mentioned at https://discourse.itk.org/t/ai-generated-pull-requests-overwhelming-hard-to-review-carefully/7728/12?u=niels_dekker
There was a problem hiding this comment.
I am concerned that the new developer burden to meet all the requirements of contributing to ITK may discourage participation. I understand the intent of this request, but the tone may need to be more inviting to new developers.
There was a problem hiding this comment.
I understand the intent of this request, but the tone may need to be more inviting to new developers.
@hjmjohnson You mean like replacing words like "must" with more friendly and modest expressions like "please do..." or "we prefer to...", right?
dzenanz
left a comment
There was a problem hiding this comment.
Good as-is. The feedback provided so far also looks useful.
|
I guess many organizations worldwide are writing guidelines for AI assisted PRs, these days. Did you write your PR entirely from scratch, or did you get some inspiration from others? This one looks quite nice as well: How to Be an Open Source Hero: Contributing AI-Generated Code with Care by Jake Levirne and Antaripa Saha, DigitalOcean, Oct 10, 2025 Another example: |
|
I've incorporated the requested language changes in https://github.com/hjmjohnson/ITK/tree/docs_pr_guidelines — here's a summary of what was applied:
@blowekamp — feel free to cherry-pick or incorporate these suggestions directly. |
|
@hjmjohnson Please just force push to my branch to update with your changes. Thanks for following up I was unsure the best way to address everything. |
|
| Filename | Overview |
|---|---|
| Documentation/docs/contributing/index.md | Adds a new "Create a Pull Request" section with draft PR guidance and an AI-agent-specific important callout covering review time expectations; changes are well-structured and use correct MyST Markdown syntax. |
Sequence Diagram
sequenceDiagram
participant Dev as Developer / AI Agent
participant Git as git review-push
participant GH as GitHub PR
participant CI as CI / Azure Pipelines
participant Rev as Reviewer / Maintainer
Dev->>Git: git review-push --force
Git-->>Dev: URL provided in terminal
Dev->>GH: Open PR as Draft
GH->>CI: Trigger automated tests
CI-->>GH: Tests pass / fail
alt Tests fail
CI-->>Dev: Notify failure
Dev->>Git: Fix & re-push (Revise a Topic)
end
alt AI-agent-assisted PR
Note over Dev,GH: Human author must verify:<br/>1. CI tests pass<br/>2. Implementation correct & understood<br/>3. PR description accurate
Dev->>GH: Convert Draft → Ready for Review
Note over GH,Rev: Allow ≥1 working day (low-impact)<br/>or longer (core/algorithmic changes)<br/>before merging
else Standard PR
Dev->>GH: Convert Draft → Ready for Review
Dev->>Rev: Request reviewers
end
Rev->>GH: Review & approve
Rev->>GH: Merge PR
Reviews (2): Last reviewed commit: "DOC: Soften tone and incorporate reviewe..." | Re-trigger Greptile
OK, I understand that it can be burdensome when there are many prompts and agent settings involved. However, I still think we should encourage PR authors to share the essential information on how the PR was generated. The DigitalOcean article says about it:
and
Just like we share the regular expression with a PR that proposes a large find-and-replace code change. |
I agree, in general, that we should share essential information on how and why a PR was generated. Including a regular expression that was applied is a great example.
This article, from October 2025, is extremely old in terms of development practices, speaking for myself, at least. A single prompt, "I used ChatGPT", or "I used Claude Code" does not capture or really encompass how a PR is created. There is an entire disciple called "harness engineering" now. And there is a lot more involved. I do not think we need developers to try to include what text editor they used, their shell, one of the LLMs in one of the harness agents, etc. It is too much and it does not really add value. |
A side note, this was discussed at the most recent Insight Software Consortium Council meeting. |
f6613a7 to
bf38fb7
Compare
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.