Skip to content

fix(finishing): don't cleanup worktree when creating PR#913

Open
chris-yyau wants to merge 1 commit intoobra:mainfrom
chris-yyau:fix/finishing-worktree-cleanup-contradiction
Open

fix(finishing): don't cleanup worktree when creating PR#913
chris-yyau wants to merge 1 commit intoobra:mainfrom
chris-yyau:fix/finishing-worktree-cleanup-contradiction

Conversation

@chris-yyau
Copy link

@chris-yyau chris-yyau commented Mar 24, 2026

What problem are you trying to solve?

Step 5 "Cleanup Worktree" in finishing-a-development-branch/SKILL.md lists Options 1, 2, 4 for worktree cleanup. But three other sections in the same document disagree:

  • Quick Reference table (line 157): Option 2 shows "Keep Worktree: ✓"
  • Common Mistakes (line 173): "Only cleanup for Options 1 and 4"
  • Red Flags (line 191): "Clean up worktree for Options 1 & 4 only"

When a user picks Option 2 (Create PR), the agent cleans up the worktree — but the user may still need it while the PR is under review. This contradicts the document's own guidance.

What does this PR change?

Updates Step 5 to cleanup worktree for Options 1 and 4 only, matching the Quick Reference table, Common Mistakes, and Red Flags sections.

Is this change appropriate for the core library?

Yes — this fixes an internal contradiction in a core skill document. The finishing skill is general-purpose infrastructure used by all users.

What alternatives did you consider?

  1. Update the other three sections to include Option 2 — Rejected because cleaning up a worktree while a PR is under review removes the user's ability to iterate on review feedback.
  2. Add a conditional note — Rejected as over-engineering. The document already established the right behavior in 3 out of 4 places; simplest fix is aligning the outlier.

Does this PR contain multiple unrelated changes?

No. Single line change fixing one contradiction.

Existing PRs

  • I have reviewed all open AND closed PRs for duplicates or prior art
  • Related PRs: none found

Environment tested

Harness Harness version Model Model version/ID
Claude Code 1.0.33 Claude claude-opus-4-20250514

Evaluation

  • Initial prompt: "Check for internal contradictions in superpowers skill documents"
  • Verified by reading the full finishing skill document and confirming all four sections now agree on cleanup behavior (Options 1 and 4 only).
  • Single documentation fix — behavioral eval not applicable.

Rigor

  • If this is a skills change: I used superpowers:writing-skills and completed adversarial pressure testing (paste results below)
  • This change was tested adversarially, not just on the happy path
  • I did not modify carefully-tuned content (Red Flags table, rationalizations, "human partner" language) without extensive evals showing the change is an improvement

This change aligns Step 5 with the existing Red Flags and Common Mistakes tables — it does not modify their content.

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

Step 5 listed Options 1, 2, 4 for worktree cleanup, but the Quick
Reference table (line 157), Common Mistakes section (line 173), and
Red Flags section (line 191) all agree: only Options 1 and 4 should
cleanup. Option 2 (Create PR) needs the worktree preserved while the
PR is under review.
Copilot AI review requested due to automatic review settings March 24, 2026 11:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the finishing-a-development-branch skill documentation to ensure worktree cleanup guidance matches the intended workflow—specifically that creating a PR should preserve the worktree while it’s under review.

Changes:

  • Updated Step 5 “Cleanup Worktree” to specify cleanup applies to Options 1 and 4 (not Option 2).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 136 to 140
### Step 5: Cleanup Worktree

**For Options 1, 2, 4:**
**For Options 1 and 4:**

Check if in worktree:
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 5 now says cleanup is only for Options 1 and 4, but Option 2 still ends with “Then: Cleanup worktree (Step 5)”. With this change, following Option 2’s flow leads to a contradictory instruction. Consider updating Step 4’s Option 2 section to not direct users to Step 5, or add an explicit “For Option 2: keep worktree” note in Step 5 to remove ambiguity.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants