feat(worktree)!: remove force-discard of a dirty or locked worktree from every surface #233
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!233
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-208-worktree-force-omission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements the ADR 0029 classification for worktrees: discarding a dirty or locked worktree is unrecoverable, so madtea carries no surface that does it. MCP madt_worktrees action=remove drops force= for the discard case (force= is out of the action's accepted param set, so a force=true is rejected before any git call); the CLI loses -f/--force with an actionable redirect to raw git in the user's own shell, mirroring how branch delete refuses its force forms. The #168 elicitation gate (gateForcedWorktreeRemove, ElicitWorktreeForceRemoveConfirm) and the error-swallowing WorktreeForceWouldDiscard retire with it. A dirty/locked remove now refuses with a message naming what would be lost and the raw
git worktree remove --forcethe user can run themselves; a clean remove is unchanged; action=add keeps force= (path/branch reuse destroys nothing). The check-git-worktree hook still blocks raw git worktree for agents, now steering that dirty/locked discard is user-only. Merge commit reconciles with the git-signature add (#171) and the hook-flow removal (#172); full union gate green.Closes #208