You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add push failure recovery instructions to sweep skill (#787)
* fix: add push failure recovery instructions to sweep skill
Subagents in worktrees were failing silently when hooks (guard-git.sh)
denied commits or pushes — the agent couldn't distinguish a hook denial
from a user denial and would abort. Added explicit recovery instructions
for commitlint failures, edit-log hook denials, and other push errors
so subagents diagnose and recover instead of dying.
* fix: remove duplicate function definitions in leiden optimiser
collectRefinementCandidates and boltzmannSelectCandidate were defined
twice, causing TS2393 compilation errors in CI.
* fix: use --force-with-lease and add missing branch validation case (#787)
Copy file name to clipboardExpand all lines: .claude/skills/sweep/SKILL.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,6 +206,11 @@ After addressing all comments for a PR:
206
206
2. Group changes by concern — each logically distinct fix gets its own commit (e.g., one commit for a missing validation, another for a naming change). Do not lump all feedback into a single commit.
207
207
3. Use descriptive messages per commit: `fix: <what this specific change does> (#<number>)`
208
208
4. Push to the PR branch.
209
+
5.**If the push is rejected** (e.g., by a hook or commitlint), diagnose the error before retrying:
210
+
-**Commitlint failure** (bad commit message format): This is the ONE case where amend + force-push is allowed. Fix the message with `git commit --amend -m "correct message"` then `git push --force-with-lease`.
211
+
-**Hook denial** (guard-git.sh blocking staged files not in session edit log): The worktree has no edit log — commit with explicit file paths (`git commit <file1> <file2> -m "msg"`) instead of staging first.
212
+
-**Branch name validation failure**: You are on the wrong branch — check out the correct PR branch before retrying.
213
+
-**Any other failure**: Fix with a new commit. Never amend + force-push for code changes.
209
214
210
215
### 2g. Re-trigger reviewers
211
216
@@ -309,7 +314,7 @@ If any subagent failed or returned an error, note it in the Status column as `ag
309
314
## Rules
310
315
311
316
-**Never rebase.** Always `git merge <base>` to resolve conflicts.
312
-
-**Never force-push** unless fixing a commit message that fails commitlint. Amend + force-push is the only way to fix a pushed commit title (messages are part of the SHA). This is safe on feature branches. For all other problems, fix with a new commit.
317
+
-**Never force-push** unless fixing a commit message that fails commitlint. Amend + force-push is the only way to fix a pushed commit title (messages are part of the SHA). This is safe on feature branches. For all other problems, fix with a new commit.**If a push or commit is denied by a hook**, read the denial reason — don't blindly retry or escalate to force-push. Common causes: (1) commitlint rejects the message format → amend + force-push (`git push --force-with-lease`), (2) guard-git blocks staged files not in session edit log → use `git commit <file1> <file2> -m "msg"` with explicit paths, (3) branch name validation fails → you're on the wrong branch.
313
318
-**Address ALL comments from ALL reviewers** (Claude, Greptile, and humans), even minor/nit/optional ones. Leave zero unaddressed. Do not only respond to one reviewer and skip another.
314
319
-**Always reply to comments** explaining what was done. Don't just fix silently. Every reviewer must see a reply on their feedback.
315
320
-**Never trigger `@greptileai` without replying to every Greptile comment first.** Before posting the re-trigger, run the Step 2g verification script to confirm zero unanswered Greptile comments. Triggering a new review while old comments are unanswered is a blocking violation — it creates review noise and signals that feedback was ignored. Reply first, verify, then trigger.
0 commit comments