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.
This commit is contained in:
Frank
2026-08-22 14:38:26 -07:00
parent c45f40a9b3
commit 0746303c33
+24
View File
@@ -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 <path> ~/.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.