Просмотр исходного кода

AGENTS.md: sync with instructions of other repositories (#178)

Creating and editing the Dependabot rebase comment both produced a corrupted body on fphammerle/docker-postfix#158, so bot commands now fall back to other automatic approaches and, as a last resort, to asking the user with the exact link to post at. Other shared rules that were missing here (merging pull requests without rewriting signed commits, PR state check before pushing, deleting merged branches, Dependabot rebase after CI fixes, `AGENTS.md` across repositories, CI / build tooling not being user-facing) are synced as well; repository-specific rules are kept unchanged.

Source: https://github.com/fphammerle/docker-postfix/blob/ecc55138f443946e20d3abe0d00b86ef762a7dfb/AGENTS.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 1 день назад
Родитель
Сommit
54b16e0c24
1 измененных файлов с 13 добавлено и 5 удалено
  1. 13 5
      AGENTS.md

+ 13 - 5
AGENTS.md

@@ -93,11 +93,19 @@
   - Post such comments **one at a time**, never several in parallel.
   - Immediately after posting, read the comment back from GitHub and compare it character by
     character with the intended text. Only then post the next one.
-  - If the body is wrong, edit the comment to the exact intended text (Dependabot does act on
-    edited comments) and read it back again — don't leave a broken command posted.
-  - Creating the comment has corrupted the body **every time** so far, while editing it to the
-    same text came through intact — so never consider a bot command posted after the create
-    call alone; the read-back and (almost always needed) edit are part of posting it.
+  - Creating the comment has corrupted the body **every time** so far (stray `·` inside the
+    command, plus an appended "Generated by Claude Code" footer), so never consider a bot command
+    posted after the create call alone.
+  - If the body is wrong, edit the comment **once** to the exact intended text (Dependabot does act
+    on edited comments) and read it back again. Editing used to fix the body, but has also come
+    back corrupted (twice in a row on fphammerle/docker-postfix#158).
+  - If the edited body is still wrong, don't keep re-editing the same way. First re-check whether
+    another **automatic** approach is available to fix the comment or re-post it (e.g. another
+    tool or API that reaches GitHub without the corruption), and apply it, again with read-back.
+  - Only if that fails too, ask the user to post the command, naming the **exact link** to post it
+    at (the pull request URL, e.g. `https://github.com/<owner>/<repo>/pull/<number>`) and the exact
+    command text; mention the broken comment's link so it can be deleted. Continue once the bot has
+    acted on it.
 - The same corruption also hits `@mentions` in PR descriptions and other GitHub text. Don't quote
   bot commands literally there (describe them instead, e.g. "the Dependabot rebase command"), and
   read every PR description back after creating or updating it.