Problem
When a feature is in the merge review step, a user may open the worktree in their IDE, make edits, and forget to commit them. When the user clicks "merge" in Shep, those uncommitted changes are silently lost.
Expected Behavior
- Before initiating merge, Shep should check the feature's worktree for uncommitted changes (staged or unstaged)
- If uncommitted changes exist, prompt the user: "You have uncommitted changes in the worktree. Would you like to commit them before merging?"
- If the user says yes, pass a flag to the merge agent to commit those changes before proceeding with the merge
- If the user says no, proceed with merge (with a warning that changes will be lost)
Acceptance Criteria
- Shep detects dirty worktree state (unstaged + staged changes) before merge
- User is prompted with a clear message listing the uncommitted files
- On confirmation, the merge agent receives a flag to commit changes first
- On decline, merge proceeds with a warning
- Works for both CLI and web UI flows
Problem
When a feature is in the merge review step, a user may open the worktree in their IDE, make edits, and forget to commit them. When the user clicks "merge" in Shep, those uncommitted changes are silently lost.
Expected Behavior
Acceptance Criteria