From b601178fe88a0410e579bdb541fac2f581a57302 Mon Sep 17 00:00:00 2001 From: Cristian Greco Date: Mon, 12 Oct 2026 18:52:23 +0100 Subject: [PATCH 1/2] Let agents commit and open draft PRs on request The Git and GitHub rule told agents never to commit, push or post without explicit approval, so a request to commit and raise a PR still produced a second round of approval for the diff, title, body and labels. A request to commit, push or open a PR is now enough, and PRs open as drafts by default. Other GitHub posts still need approval first. --- .agents/skills/open-pr/SKILL.md | 6 ++---- AGENTS.md | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.agents/skills/open-pr/SKILL.md b/.agents/skills/open-pr/SKILL.md index ed92be0f0..64b741287 100644 --- a/.agents/skills/open-pr/SKILL.md +++ b/.agents/skills/open-pr/SKILL.md @@ -7,8 +7,6 @@ description: Verifies, commits, pushes and opens a pull request in testcontainer Release Drafter turns PR titles into release notes and labels into the version bump (`.github/release-drafter.yml`). Titles and labels matter as much as the code. -Before committing, pushing or opening anything, get the user's approval of the diff, commit message, title and body (AGENTS.md). - ## Before committing - Branch from an up-to-date `main`. @@ -64,7 +62,7 @@ Include: - `Closes #`, only if the PR fully resolves that issue. ```bash -gh pr create --base main --title "" --body "<body>" --label <type> --label <semver> +gh pr create --draft --base main --title "<title>" --body "<body>" --label <type> --label <semver> ``` -Open it ready for review. Only open it as a draft if the user asks. +Open it as a draft. Drop `--draft` only if the user asks for a PR that is ready for review. Afterwards, give the user the PR link, title and labels so they can ask for changes. diff --git a/AGENTS.md b/AGENTS.md index 32afa6fdf..6fcac7032 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -117,7 +117,10 @@ reviewers can follow the reasoning. ## Git and GitHub -- Never commit, push, or post on GitHub without first sharing the proposed diff or content and getting explicit user approval. Posting includes issues, PRs, comments, reviews, labels, and closing or editing anything. +- Commit, push, or open a PR only when the user asks for it. + - Do only the steps asked for. "Commit this" is not a request to push or open a PR. + - Open PRs as drafts unless the user asks for one that is ready for review. +- Never post anything else on GitHub without first sharing the proposed content and getting explicit user approval. This includes issues, comments, reviews, labels on existing issues and PRs, and closing or editing anything. - This holds even when explicitly asked to review a PR: present the full set of comments first. - Never bypass commit signing (for example `--no-gpg-sign`). If signing fails, stop and ask the user to resolve it. - Ask for explicit permission before any force push. From 8e11f7e352be1eb14b1fd908970a3846ba15f902 Mon Sep 17 00:00:00 2001 From: Cristian Greco <cristianrgreco@gmail.com> Date: Mon, 12 Oct 2026 19:02:59 +0100 Subject: [PATCH 2/2] Scope the approval rule to actions that affect someone else --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 6fcac7032..37dea63bf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -120,7 +120,7 @@ reviewers can follow the reasoning. - Commit, push, or open a PR only when the user asks for it. - Do only the steps asked for. "Commit this" is not a request to push or open a PR. - Open PRs as drafts unless the user asks for one that is ready for review. -- Never post anything else on GitHub without first sharing the proposed content and getting explicit user approval. This includes issues, comments, reviews, labels on existing issues and PRs, and closing or editing anything. +- Before doing anything on GitHub that affects someone else, share the proposed content and get explicit user approval. Examples: commenting on, reviewing, editing or pushing to someone else's PR, and commenting on, labelling or closing someone else's issue. - This holds even when explicitly asked to review a PR: present the full set of comments first. - Never bypass commit signing (for example `--no-gpg-sign`). If signing fails, stop and ask the user to resolve it. - Ask for explicit permission before any force push.