From 2ef3c8bb17a4a7c426cb9e9187b2ee42a76271d3 Mon Sep 17 00:00:00 2001 From: Jakob Heuser Date: Sun, 29 Nov 2026 16:44:27 -0800 Subject: [PATCH] docs(agents): say when an agent merges its own pull request --- AGENTS.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index f1a2aa91e..39542da90 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -96,6 +96,26 @@ gh pr comment -R taskless/cli --body '@claude /review' This is where taskless/cli differs from the other Taskless repos, which run the review automatically when a PR opens and take a manual `@claude /review` only for a later push that adds significant new code. +## Merging your own pull request + +**An agent merges a single PR it opened once all three of these hold.** Do not stop and wait for a person to press the button. + +1. **Every check on the head commit has passed**, `Validate` included. A check still running is not a pass, and a pass on an earlier commit does not count for the current one. +2. **The Claude review you requested has posted.** +3. **Every finding the review raised is fixed or answered on its own thread.** A finding you disagree with gets a reply saying why, not silence. + +Then merge with rebase, the only method this repository allows (see [Rebase is the only merge method](#rebase-is-the-only-merge-method-and-a-stack-pays-for-it)): + +```bash +gh pr checks -R taskless/cli # every check on the head commit passed +gh pr merge -R taskless/cli --rebase +``` + +This rule covers a single PR that targets `main`. For a stack: + +- **Never pass `--delete-branch` on a stacked PR.** It closes the child instead of retargeting it; see [Never `--delete-branch` mid-stack](#never---delete-branch-mid-stack). +- **Land the stack as a whole**, following [Landing a stack](#landing-a-stack) (or the vendor-upgrade variants after it), not by merging its PRs one by one with this rule. + ## Background Agents and Worktrees **Use the `worktrees-pnpm` skill** whenever creating a worktree or delegating to a background agent with worktree isolation. It covers the full procedure, the pnpm specifics, cleanup, and recovery.