This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0ddf5174d5f Add self-review checklist for AI agents in AGENTS.md
(#62617)
0ddf5174d5f is described below
commit 0ddf5174d5f24d3ba86744f56f74b5107f3f1179
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Feb 28 18:59:10 2026 +0100
Add self-review checklist for AI agents in AGENTS.md (#62617)
* Add self-review checklist for AI agents before creating PRs
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Use `--ref-from` instead of `--all-files` for prek in AGENTS.md
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
---
AGENTS.md | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/AGENTS.md b/AGENTS.md
index 24f7c001d5f..05f76fa45ac 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -17,9 +17,13 @@
- **Run a Python script:** `breeze run python dev/my_script.py`
- **Run Airflow CLI:** `breeze run airflow dags list`
- **Type-check:** `breeze run mypy path/to/code`
-- **Lint/format (runs on host):** `prek run --all-files`
-- **Lint with ruff only:** `prek run ruff --all-files`
-- **Format with ruff only:** `prek run ruff-format --all-files`
+- **Lint/format (runs on host):** `prek run --ref-from <target_branch>`
+- **Lint with ruff only:** `prek run ruff --ref-from <target_branch>`
+- **Format with ruff only:** `prek run ruff-format --ref-from <target_branch>`
+
+`<target_branch>` is the branch the PR will be merged into — usually `main`,
but could be
+`v3-1-test` when creating a PR for the 3.1 branch.
+
- **Build docs:** `breeze build-docs`
SQLite is the default backend. Use `--backend postgres` or `--backend mysql`
for integration tests that need those databases. If Docker networking fails,
run `docker network prune`.
@@ -95,6 +99,21 @@ That is the user's fork remote. If no such remote exists,
create the fork and ad
gh repo fork apache/airflow --remote --remote-name <GITHUB_USER>
```
+Before pushing, perform a self-review of your changes following the Gen-AI
review guidelines
+in
[`contributing-docs/05_pull_requests.rst`](contributing-docs/05_pull_requests.rst)
and the
+code review checklist in
[`.github/instructions/code-review.instructions.md`](.github/instructions/code-review.instructions.md):
+
+1. Review the full diff (`git diff main...HEAD`) and verify every change is
intentional and
+ related to the task — remove any unrelated changes.
+2. Read `.github/instructions/code-review.instructions.md` and check your diff
against every
+ rule — architecture boundaries, database correctness, code quality, testing
requirements,
+ API correctness, and AI-generated code signals. Fix any violations before
pushing.
+3. Confirm the code follows the project's coding standards and architecture
boundaries
+ described in this file.
+4. Run static checks (`prek run --ref-from <target_branch>`) and fix any
failures.
+5. Run relevant tests (`breeze run pytest <path> -xvs`) and confirm they pass.
+6. Check for security issues — no secrets, no injection vulnerabilities, no
unsafe patterns.
+
Then push the branch to the user's fork remote and open the PR creation page
in the browser
with the body pre-filled (including the generative AI disclosure already
checked):