- PROMPT.md references best-practices/ files instead of inlining all knowledge
- best-practices/{memory,disk,ci,dev-agent,git}.md — loaded on demand by claude
- All alerts go to claude -p. Claude decides what to fix and what to escalate.
- update-prompt.sh targets specific best-practices files for self-learning
1.3 KiB
1.3 KiB
Disk Best Practices
Safe Fixes
- Docker cleanup:
sudo docker system prune -f(keeps images, removes stopped containers + dangling layers) - Truncate factory logs >5MB:
truncate -s 0 <file> - Remove stale worktrees: check
/tmp/harb-worktree-*, only if dev-agent not running on them - Woodpecker log_entries:
DELETE FROM log_entries WHERE id < (SELECT max(id) - 100000 FROM log_entries);thenVACUUM; - Node module caches in worktrees:
rm -rf /tmp/harb-worktree-*/node_modules/ - Git garbage collection:
cd /home/debian/harb && git gc --prune=now
Dangerous (escalate)
docker system prune -a --volumes— deletes ALL images including CI build cache- Deleting anything in
/home/debian/harb/that's tracked by git - Truncating Woodpecker DB tables other than log_entries
Known Disk Hogs
- Woodpecker
log_entriestable: grows to 5GB+. Truncate periodically. - Docker overlay layers: survive normal prune.
-avariant kills everything. - Git worktrees in /tmp: accumulate node_modules, build artifacts
- Forge cache in
~/.foundry/cache/: can grow large with many compilations
Lessons Learned
- After truncating log_entries, run VACUUM FULL (reclaims actual disk space)
- Docker ghost overlay layers need
prune -abut that kills CI images — only do this if truly desperate