Prechádzať zdrojové kódy

AGENTS.md: fall back to other automatic approaches before asking the user to post bot commands (#160)

On #158, both creating the Dependabot rebase comment and editing it (twice) produced the corrupted body, so the rule's assumption that an edit reliably fixes it no longer holds. Repeating the same edit doesn't help and only leaves broken commands posted, so other automatic approaches are tried first, and the user is only asked as a last resort — with the exact link to post at, so it takes no searching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 1 týždeň pred
rodič
commit
ecc55138f4
1 zmenil súbory, kde vykonal 13 pridanie a 5 odobranie
  1. 13 5
      AGENTS.md

+ 13 - 5
AGENTS.md

@@ -99,11 +99,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 #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.