1.5 KiB
1.5 KiB
name, description, scope
| name | description | scope |
|---|---|---|
| emergency-procedures | Recover from repeated failed fixes, tangled git state, or lost task context when ordinary debugging cannot make progress or recovery is requested. | global |
Recovery
- Stop speculative edits. Inspect status, diffs, branch, HEAD, and the current failure. Re-read the active objective and relevant repository conventions.
- Preserve work before changing branches or discarding anything. A branch at HEAD preserves commits only. Save tracked staged/unstaged diffs and copy relevant untracked files into an identified recovery location; or use a repository-approved snapshot method that captures those files. Verify the snapshot can recover them. Account for ignored files when relevant; do not accidentally collect credentials.
- Identify a known-good checkpoint from tests or history. Prefer a separate worktree for investigation so the user's current checkout remains intact. Returning to the previous branch is not evidence that it is healthy.
- Recover or fix the smallest demonstrated cause. Split work by meaningful behavior, without line-count limits or a new approval gate for the same task.
- Verify the relevant recovery outcome and report the preserved state and next step.
Never bulk-stage user work, clean untracked files, or reset the checkout just to make status clean. Existing authorization governs recovery; ask only if the next step would discard work or change scope without authorization. Follow shared workflow.