Browse Source

document merged-PR and bot-mention pitfalls in AGENTS.md

- never amend/force-push a branch whose PR already merged or closed;
  open a new PR from current master instead
- read back GitHub comments that @-mention a bot (e.g. `@dependabot
  rebase`) since tool-call composition can silently mangle the mention

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fabian Peter Hammerle 1 month ago
parent
commit
249f7e91ae
1 changed files with 12 additions and 0 deletions
  1. 12 0
      AGENTS.md

+ 12 - 0
AGENTS.md

@@ -17,7 +17,19 @@
 - Force-push with `--force-with-lease` on feature branches.
 - **Never force-push to `master`.**
 - **Always open a pull request — never push directly to `master`.**
+- **Never amend or force-push a branch whose PR is already merged or closed** — that rewrites
+  history that's already landed (or been reviewed) and leaves a dangling branch that no longer
+  reflects what merged. For a follow-up change, create a **new** branch (from current `master`)
+  and a **new** PR instead.
 
 ## CI failures
 
 - Fix CI failures automatically, iterating until all checks are green — no need to ask first.
+
+## GitHub comments that @-mention a bot
+
+- Commands like `@dependabot rebase` must reach GitHub as plain text — tool-call composition can
+  silently insert stray characters (e.g. interpunct `·`) into `@mentions`, which stops the bot from
+  recognizing the command.
+- After posting such a comment, read it back and confirm the body matches exactly what was
+  intended; if not, fix it immediately with an update rather than leaving a broken command posted.