From 0746303c330e03fee0418386b092f208b38aec87 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 22 Aug 2026 14:38:26 -0700 Subject: [PATCH] AGENTS.md: add mandatory Deletion & Trash Policy (mv to ~/.AGENTTRASH, never rm) Explicit rule: stage deletions in a dated ~/.AGENTTRASH/YYYYMMDD-topic directory, list sizes, and wait for user approval before purging. rm, rm -rf, and git clean -f forbidden without explicit permission. Applies to every host. --- AGENTS.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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.