This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch add-pr-template-instructions-for-agents
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 6203a54a092eb895c13ef0285aa3829b8e35fdcb
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Feb 27 17:19:58 2026 +0100

    Add PR creation instructions for AI agents to AGENTS.md
    
    Agents must create PRs via `gh pr create --web` to open the browser
    with the repository's PR template pre-filled. Includes instructions
    to disclose generative AI usage with the Generated-by line.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 AGENTS.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index 456a87ca4b2..c7e48f6ec7b 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -81,6 +81,57 @@ Write commit messages focused on user impact, not 
implementation details.
 Add a newsfragment for user-visible changes:
 `echo "Brief description" > 
airflow-core/newsfragments/{PR_NUMBER}.{bugfix|feature|improvement|doc|misc|significant}.rst`
 
+### Creating Pull Requests
+
+**Always push to the user's fork**, not to the upstream `apache/airflow` repo. 
Never push
+directly to `main`.
+
+Before pushing, ensure the user's fork exists and is configured as a remote:
+
+```bash
+# Create the fork on GitHub if it doesn't exist yet (idempotent — no-op if it 
already exists)
+gh repo fork apache/airflow --remote --remote-name fork
+# Verify the remote is set up
+git remote -v | grep fork
+```
+
+Then push the branch to the fork and open the PR creation page in the browser 
with the body
+pre-filled (including the generative AI disclosure already checked):
+
+```bash
+git push -u fork <branch-name>
+gh pr create --web --title "Short title (under 70 chars)" --body "$(cat <<'EOF'
+Brief description of the changes.
+
+closes: #ISSUE  (if applicable)
+
+---
+
+##### Was generative AI tooling used to co-author this PR?
+
+- [X] Yes — <Agent Name and Version>
+
+Generated-by: <Agent Name and Version> following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
+
+---
+
+* Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
+* For fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
+* When adding dependency, check compliance with the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
+* For significant user-facing changes create newsfragment: 
`{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
+EOF
+)"
+```
+
+The `--web` flag opens the browser so the user can review and submit. The 
`--body` flag
+pre-fills the PR template with the generative AI disclosure already completed.
+
+Remind the user to:
+
+1. Review the PR title — keep it short (under 70 chars) and focused on user 
impact.
+2. Add a brief description of the changes at the top of the body.
+3. Reference related issues when applicable (`closes: #ISSUE` or `related: 
#ISSUE`).
+
 ## Boundaries
 
 - **Ask first**

Reply via email to