diff --git a/AGENTS.md b/AGENTS.md index 763d4ba3..0af66aa3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,19 @@ design is in `docs/design.md`; read it before changing the architecture, and upd 3. Merge with `gh pr merge --squash --delete-branch` once every check is green. If GitHub refuses because VisualCI is pending, that's the review you skipped. Never bypass the ruleset. (1 Dec 2026, unreviewed builds let a CSS break from three merges reach production.) +- **Hold the merge lock from the final rebase to the merge.** A PR must be up to date with `main` before it merges, + so a merge by one agent sends every other agent's PR back through CI. Take Fleetlayer's lock, one per repository, + around the last rebase, the CI run and the merge, in one script, and only for one PR at a time: + + ```sh + id=$(fleetlayer lease acquire main-merge --payload '{"repo":"DocSpring/visualci"}' --reason "merge PR #N" \ + --pid $$ --wait --json | jq -r .id | tail -1) + trap 'fleetlayer lease release "$id"' EXIT + # rebase onto origin/main, push, wait for the checks (with a timeout), gh pr merge N --squash --delete-branch + ``` + + `--pid $$` ties the lock to the script, so it outlives an idle session and is freed when the script ends. (3 Dec + 2026: two agents' merges kept making each other's green PRs out of date.) - No backwards compatibility before launch. There are no old setups to keep working: rename, change formats and drop old behaviour outright, with no redirects, aliases, fallbacks or shims for the old way (Nathan, 1 Dec 2026). - `skills/` is generated from the docs pages with `skill:` front matter. After editing such a page, run