fix(finishing): check in with human partner when worktree removal hits untracked files#2024
Open
obra wants to merge 1 commit into
Open
fix(finishing): check in with human partner when worktree removal hits untracked files#2024obra wants to merge 1 commit into
obra wants to merge 1 commit into
Conversation
…s untracked files git worktree remove refuses when the tree holds modified or untracked files, and the skill gave no guidance for that refusal — the natural agent response was --force, permanently destroying files that exist nowhere else (uncommitted plans, notes, scratch work). Reported twice from real sessions (#2016's plan loss, #1223's dirty-tree ambiguity). Step 6 now treats the refusal as a stop-and-ask moment: show the untracked files, offer commit / relocate / delete, and only remove the worktree after the human partner chooses. Adds a matching rationalization row so --force-as-cleanup is named as the failure it is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is submitting this PR? (required)
claude-fable-5)What problem are you trying to solve?
git worktree removerefuses when the worktree contains modified or untracked files, and Step 6 offinishing-a-development-branchgave no guidance for that refusal. The error message itself suggests--force, so the natural agent response destroys files that exist nowhere else. Reported from two independent real sessions:docs/superpowers/plans/— untracked for the whole branch lifetime — was permanently deleted at cleanup. Reproduced deterministically during triage:git worktree removerefuses,--forcesucceeds, the plan is unrecoverable while committed work survives.Both prior fix attempts baked in a policy: #2016 force-committed plan documents into every user's history (declined — not everyone wants superpowers plans committed), #1223 hard-refused with "commit or stash first, then re-run" (a wall that invites workarounds). Maintainer decision: the destruction point should check in with the human partner instead.
What does this PR change?
Step 6 now treats a refused
git worktree removeas a stop-and-ask moment: never--forceon the skill's own initiative; showgit -C "$WORKTREE_PATH" status --porcelainoutput to the human partner and offer commit-to-branch / move-to-main-root / delete, then remove the worktree after the choice. One matching row is added to Common Rationalizations.Is this change appropriate for the core library?
Yes — it modifies an existing core skill's cleanup step only. Applies to any project on any harness that uses worktrees; no dependencies, no domain-specific content.
What alternatives did you consider?
Does this PR contain multiple unrelated changes?
No. One file; the rationalization row exists solely to reinforce the new Step 6 behavior.
Existing PRs
Environment tested
New harness support (required if this PR adds a new harness)
N/A — no new harness.
Evaluation
--force→ untracked file unrecoverable, committed file survives).writing-skillsmethodology have not been executed for this wording. They can be run before or after merge at the maintainer's discretion.Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)The first two boxes are honestly unchecked: adversarial pressure testing is pending, as stated in Evaluation. The maintainer directed this change and owns the merge decision with that gap visible.
Human review