Parent: PROGRAMMING_RULES
Prefer ~/tmp or ./tmp (project-relative) over system /tmp. System /tmp is shared, hard to grep, and invisible to version control. A project-local ./tmp keeps scratch files co-located with the work; ~/tmp is a reasonable middle ground for cross-project ephemera. Only use /tmp when the host system requires it (e.g. remote scripts on a machine you do not own).
If a file is genuinely temporary (safe to delete after a short time), name it with a tmp_ prefix.
Schedule deletion of stale files using at. Use "teatime" (16:00 same day) to give a same-day window to recover if needed, or "teatime tomorrow" for overnight work:
at teatime <<'EOF'
rm /tmp/file1.py /tmp/file2.json
EOF
Only schedule deletion for files whose basename starts with tmp_, or for scripts in /tmp/ that have been superseded by permanent versions elsewhere.
To cancel before it runs: atrm <jobid> (find the job ID from at -l). The teatime window lets you cp out anything needed before deletion fires.
It is acceptable to draft utility scripts in /tmp/ during development. Once working, move them to a permanent location (e.g. ~/py/envoy/utils/) and schedule the /tmp/ originals for deletion at teatime so they are not left as silent duplicates.