Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(skills): prevent tracking comment overwrite in review-reviewers (#1646)

worktrunk-bot0f9174b06248
diff --git a/.claude/skills/review-reviewers/SKILL.md b/.claude/skills/review-reviewers/SKILL.md
index 3b3fa4d2b..ae4e4f234 100644
--- a/.claude/skills/review-reviewers/SKILL.md
+++ b/.claude/skills/review-reviewers/SKILL.md
@@ -119,8 +119,8 @@ gates.
### Recording below-threshold findings
After analysis, find **the bot's existing comment** on the tracking issue and
-**edit it** to include any new findings. If no bot comment exists yet, create
-one. This avoids notification spam from hourly runs.
+**append** new findings to it. If no bot comment exists yet, create one. This
+avoids notification spam from hourly runs.
```bash
# Find existing bot comment on the tracking issue
@@ -130,13 +130,23 @@ EXISTING_COMMENT=$(gh api "repos/$REPO/issues/$TRACKING_NUMBER/comments" \
--jq "[.[] | select(.user.login == \"$BOT_LOGIN\")] | last | .id // empty")
```
-If `EXISTING_COMMENT` is non-empty, update it via
-`REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner') && gh api repos/$REPO/issues/comments/$EXISTING_COMMENT -X PATCH -F body=@/tmp/findings.md`.
+If `EXISTING_COMMENT` is non-empty, download existing body, append new findings,
+then PATCH. Never replace the body — prior entries contain per-run evidence
+needed for gate evaluation.
+
+```bash
+gh api "repos/$REPO/issues/comments/$EXISTING_COMMENT" --jq '.body' > /tmp/existing.md
+cat /tmp/existing.md /tmp/findings.md > /tmp/combined.md
+gh api "repos/$REPO/issues/comments/$EXISTING_COMMENT" -X PATCH -F body=@/tmp/combined.md
+```
+
Otherwise create a new comment.
-Format each finding in the comment body as:
+Format each finding under a `## Run <run-id>` heading:
```
+## Run <run-id> — <ISO timestamp>
+
### <short description>
- **Evidence level**: Medium
- **Occurrences this run**: 1
@@ -146,7 +156,8 @@ Format each finding in the comment body as:
- **Detail**: <brief description of what was observed>
```
-This lets future runs search for the description and count prior occurrences.
+Each run gets its own heading so future runs can count prior occurrences and
+trace incidents to session logs.
## Step 1: Find recent runs