From 97d1a35e07dca0e2314bd2e794641513a6daa778 Mon Sep 17 00:00:00 2001 From: Jakob Heuser Date: Sun, 29 Nov 2026 17:52:25 -0800 Subject: [PATCH] docs(agents): describe main's protection as the rulesets that enforce it Required checks are now Validate and OpenSpec: stack archived, set in the 'main :: Required Checks' ruleset, which does not require branches to be up to date. The old text named classic branch protection with strict_up_to_date. --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d03d6a86..7f9ba925 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -142,7 +142,7 @@ The three rules that cause the most damage when missed: ## Stacked PRs -When PRs stack, the **stack-breadcrumb workflow** (`.github/workflows/stack-breadcrumb.yml`) keeps their cross-links and carried-forward bodies in sync automatically; there is no git-town or other stacking tool in the loop. Branch protection lives on `main` only (`Validate` required, `strict_up_to_date: true`, 0 required reviews); child branches are unprotected. When you do land a stack, follow these practices. +When PRs stack, the **stack-breadcrumb workflow** (`.github/workflows/stack-breadcrumb.yml`) keeps their cross-links and carried-forward bodies in sync automatically; there is no git-town or other stacking tool in the loop. Protection lives on `main` only, as two rulesets: `main :: Required Checks` requires `Validate` and `OpenSpec: stack archived` (both from the GitHub Actions app, with "require branches to be up to date" off), and `main :: No Force Push` blocks deletion and force pushes, requires linear history, and allows rebase merges only, with 0 required reviews. Child branches are unprotected. Read them with `gh api repos/taskless/cli/rulesets` rather than trusting this sentence. When you do land a stack, follow these practices. ### Every OpenSpec proposal declares its delivery shape @@ -299,7 +299,7 @@ discards the parent's fix. There, replay from where the child forked: Three things that will bite: -- **Branch protection is `strict_up_to_date: true`,** so the next PR reports `mergeable_state: "behind"` until you rebase it. That is not a conflict; it is the protection asking for the rebase you owe it. +- **The rulesets do not require a branch to be up to date,** so `mergeable_state: "behind"` alone does not block a merge. Rebase the next PR anyway after its parent merges: its history diverged from `main` (see above), and `Validate` should run against the base it will land on. - **Right after a merge, `rebaseable` reads `null`** while GitHub recomputes. Poll until it is a boolean rather than treating `null` as "not mergeable". Reading it as a failure is what stranded commits mid-stack before. - **Read the lease SHA from the remote, not from memory.** `--force-with-lease=:` fails with `stale info` when `` is not what the remote currently holds, which includes the case where _you_ rebased the branch a moment ago and reached for its old tip. `$(git rev-parse origin/)` after a `git fetch` is the value that works. The failure looks like the shallow-clone symptom in the git section above and is not: check whether the SHA is just out of date before concluding anything about the clone.