safe-delete
Installation
SKILL.md
Safe delete
There are three kinds of reset. Pick the mildest one that does the job.
- Undo recent changes. Run
ddev snapshot restore --latest, orddev snapshot restore <name>for a named snapshot. The agent may run this itself. - A fresh install that keeps config. Use the
backend-setupskill. Do this only on a site made from the vibe-config-backend template, and only after a snapshot. Tell the person that content will be lost. This skill carries no fresh-install command of its own. Never delete the project to get a fresh install. - Delete the DDEV project. This is only the person's, through the delete script,
skills/safe-delete/scripts/safe-delete.shin this repository.
On any other site, offer only the restore and the delete.
What a snapshot covers
A snapshot covers the database only. It does not cover sites/default/files, code or exported config. Say so before the person relies on one.
Hard rules
- The agent never runs
ddev deleteand never runs the script itself. - The agent never fakes a terminal (a pseudo-terminal,
script, piped input) to get past the script's confirmation. The script refuses without a real terminal on purpose. - The agent hands the person the exact command to run in their own terminal. Before handing it over, the agent replaces the script path with its absolute path on this machine, because the person runs it from the DDEV project folder: