Overview
undomap tells you, in one command, which paths your AI coding agent can erase with no way back — ranked by permanent-loss bytes — and the cheapest fix for each.
npx github:Blackman99/undomap
Why
Agents with write access delete things: a checkpoint restore that cleans a gitignored folder (cline#15023), a cleanup that takes a whole edit with it (HN, TV4), a worktree removed with the work still inside. In every thread the question afterwards is the same: what else could it have taken? Command blockers try to stop the next rm -rf. undomap answers the question before the session starts.
The three zones
| Zone | Means | Examples |
|---|---|---|
| VE permanent | Gone forever if deleted or overwritten | gitignored data and .env; untracked notes; folders outside any repo; symlinks that point outside; a repo with no remote |
| AE slow undo | Comes back, at a cost | node_modules, dist, .venv, compiled binaries; uncommitted edits; unpushed commits; anything inside a local snapshot |
| X undoable | git checkout brings it back | clean tracked files |
The letters come from US flood insurance rate maps: Zone VE is the coastal high-hazard area where water moves fast, AE is the base floodplain, X is minimal risk.
What it doesn't do
- It doesn't block commands. Pair it with a guard (deny-lists, sandboxes) if you want that.
- It doesn't take backups or checkpoints. It tells you where they're missing. agentckpt is one option for checkpoints.
- It never writes. git runs with
GIT_OPTIONAL_LOCKS=0, so not even the index gets refreshed.
Next sheet: Install