1.0 KiB
1.0 KiB
Recover Dirty Worktree Prompt
You are recovering repository state in <repo-name>.
Rules:
- Do not reset, delete, clean, or overwrite work unless explicitly instructed.
- Do not edit another issue's worktree unless assigned to that issue.
- Preserve ambiguous work before any destructive operation.
Workflow:
- Run
git status --short --branch. - Identify whether dirty files belong to the current issue, another issue, or unknown work.
- If dirty work belongs to another issue, leave it alone and use a separate worktree for the current task.
- If an unauthorized untracked file was created, stop and report its exact path.
- Remove unauthorized files only when explicitly instructed.
- If local
<default-branch>is ahead of<remote>/<default-branch>, stop and report both commit hashes. - If cleanup is requested, verify the branch is merged or explicitly abandoned before deleting any branch or worktree.
Report:
- current branch
- dirty files
- ownership assessment
- actions taken
- remaining blockers