diff --git a/AGENTS.md b/AGENTS.md index d01b368..95fac4b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -62,6 +62,30 @@ All script edits must flow through git. Do not edit files on the remote machine 5. **Pull on the target** — `git pull` on the remote machine before restarting 6. **Restart the service** — use the updated script on the target +## Deletion & Trash Policy (MANDATORY) + +Never run `rm` to delete files. The command deletes permanently. Move every +item you would delete into `~/.AGENTTRASH/` instead. The trash keeps the +deletion recoverable and reviewable. + +Procedure: + +1. Create a dated staging directory: `mkdir -p ~/.AGENTTRASH/YYYYMMDD-topic` +2. Move each item: `mv ~/.AGENTTRASH/YYYYMMDD-topic/` +3. List the staged items and their sizes for the user. +4. Wait for explicit user permission before you empty the trash. + +Rules: + +- `rm`, `rm -rf`, and `git clean -f` are forbidden without explicit user + permission. +- `git * --no-verify` is forbidden. +- A moved item stays in the trash until the user approves its purge. +- The trash is a temporary hold, not a long-term archive. + +Use `mv`, never `rm`. This applies to every host, including Dankserver and +Dankclaw. + ## Deployment & Update Process Use `scripts/deploy.sh` to deploy committed changes to a target. It pushes `main`, pulls on the target, restarts the service, and checks the health endpoint.