[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7589AS9R5TAFCB7XGYM8HWA":3,"skill-same:01M7589AS9R5TAFCB7XGYM8HWA":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7589AS9R5TAFCB7XGYM8HWA","hermes-home-cleanup",null,"Use when cleaning ~\u002F.hermes or ~\u002F.steadfaste-fleet. Verify.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fhermes-home-cleanup\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: hermes-home-cleanup\ndescription: \"Use when cleaning ~\u002F.hermes or ~\u002F.steadfaste-fleet. Verify.\"\nversion: 1.0.0\ncategory: devops\nauthor: Esther\nlicense: MIT\nplatforms: [linux, macos]\nmetadata:\n  hermes:\n    tags: [cleanup, maintenance, hermes, stale-files, disk-space]\n    related_skills: [hermes-backup, steadfaste-fleet-maintenance, repo-organization, survey-before-action]\n---\n\n# Hermes Home Cleanup — Safe Stale-File Removal\n\nUse when asked to \"clean up\" `~\u002F.hermes` or `~\u002F.steadfaste-fleet`, reclaim disk,\nor audit what's safe to delete on a Hermes Agent server.\n\n## Golden Rule\n\n**`~\u002F.hermes\u002F` is Hermes Agent territory.** Most of it is live agent\nmachinery. Before labeling anything stale, verify against the **agent source**\n(`~\u002F.hermes\u002Fhermes-agent\u002F`), not just fleet scripts. Two false \"stale\"\nclaims cost real time: `state-snapshots\u002F` and `~\u002F.hermes\u002Fhooks\u002F` are both\nagent-owned. Grep the agent repo before you rm.\n\n## Verification Chain (run BEFORE deleting anything)\n\n```bash\n# 1. Is it referenced by the agent source?\ngrep -rn '\u003Cname>' ~\u002F.hermes\u002Fhermes-agent\u002F 2>\u002Fdev\u002Fnull | grep -v node_modules | grep -v venv | grep -v '\\.git\u002F'\n# 2. Is it referenced by fleet scripts (repo + deployed)?\ngrep -rn '\u003Cname>' ~\u002Fsteadfaste-fleet\u002F ~\u002F.steadfaste-fleet\u002Fscripts\u002F ~\u002F.hermes\u002Fplugins\u002F 2>\u002Fdev\u002Fnull | grep -v '\\.git\u002F'\n# 3. Is it a live cron's state file? (renamed crons keep old state filenames!)\npython3 -c \"import json;d=json.load(open('$HOME\u002F.hermes\u002Fcron\u002Fjobs.json'));jobs=d.get('jobs',d) if isinstance(d,dict) else d;print([j.get('name') for j in jobs if isinstance(j,dict)])\"\n# 4. Is it a symlink target or consumed by install scripts?\ngrep -rn '\u003Cname>' ~\u002F.steadfaste-fleet\u002Fscripts\u002Finstall*.sh ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Finstall*.sh 2>\u002Fdev\u002Fnull\n```\n\n**Zero references in ALL FOUR = candidate. One reference = LIVE. Never guess.**\n\n## LIVE — Do NOT Touch (agent-owned)\n\n| Path | Why live |\n|------|----------|\n| `~\u002F.hermes\u002Fhermes-agent\u002F` | The running agent source + venv + node_modules (CLI at `~\u002F.local\u002Fbin\u002Fhermes` runs from here) |\n| `~\u002F.hermes\u002Fstate.db` (+ `-wal`\u002F`-shm`) | Live session DB, written every turn. Never delete; checkpoint before copy (`PRAGMA wal_checkpoint(TRUNCATE)`) |\n| `~\u002F.hermes\u002Fstate-snapshots\u002F` | **Agent's own pre-update backup.** `hermes update` creates `*-pre-update\u002F`; restore with `hermes backup restore --state pre-update` or `\u002Fsnapshot restore`. Config: `updates.pre_update_backup` (quick\u002Ffull\u002Foff), `backup_keep` |\n| `~\u002F.hermes\u002Fhooks\u002F` | **Agent event-hook directory** (`gateway\u002Fhooks.py` scans for `HOOK.yaml` + `handler.py` dirs; web UI `\u002Fapi\u002Fops\u002Fhooks`). The DIRECTORY must stay. Plain files inside are ignored by the agent but may be pre-migration copies — verify, don't assume |\n| `~\u002F.hermes\u002Fcron\u002F` (jobs.json, executions.db, ticker_*) | Live scheduler state |\n| `~\u002F.hermes\u002Fgateway.*`, `~\u002F.hermes\u002Fprocesses.json`, `auth.json`, `.env` | Live runtime \u002F secrets |\n| `~\u002F.hermes\u002Fsession.id` | **REMOVED vestige (2026-11-12)** — write-only cache since the 2026-09-29 non-Hermes session-id scoping fix; no readers anywhere. Safe to delete; nothing recreates it |\n| `~\u002F.hermes\u002Fstate\u002Fbus-audit-watchdog.json` + `.state` | **LIVE** — the renamed `orch-bus-audit-watchdog` cron uses these EXACT filenames. A renamed cron keeps its old state files |\n| `~\u002F.hermes\u002Fstate\u002Fworker-pending\u002F`, `worker-completed\u002F` | Live `agent-worker.py` machinery (`is_completed()` reads `.done` files; deleting can re-trigger old steps) |\n| `~\u002F.steadfaste-fleet\u002Fa2a\u002F` | **DEPRECATED dir, zero consumers** — A2A service merged into fleet-bus (`src\u002Fa2a\u002F` → `ops\u002Fservices\u002Fa2a\u002F` → fleet-bus). Bus server serves a HARDCODED card at `\u002F.well-known\u002Fagent-card.json`; deployed card is `bus\u002Fagent-card.json` (register_orch in fleet-update.sh). `agent-card.json` there was last written 2026-07-27 by a one-off `generate-agent-card.py --output` run — no cron, script, or nginx route reads it. Safe to delete both files (keep the empty dir or remove it; nothing recreates it) |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002F_cron_find.py` | LIVE — `install-crons.sh` + `install-orch-crons.sh` call it |\n| `~\u002F.steadfaste-fleet\u002Fdata\u002Floop-governance.db`, `session-embeddings.db` | Live governance\u002Fscoring DBs |\n| `~\u002F.hermes\u002Fbin\u002Fuv`, `uvx`, `tirith` | Python toolchain + security scanner (tirith referenced in `config.yaml` `security.tirith_*`) |\n| `~\u002F.hermes\u002Fnode\u002F`, `~\u002F.hermes\u002Flsp\u002F` | Runtimes for desktop\u002FLSP features |\n| `~\u002F.hermes\u002Fagent-profiles\u002F` | SOUL.md profile templates (legacy) — `soul-merge.py`\u002F`soul-sync-all.sh` that read them were removed 2026-11-04; `pre-commit-score` no longer syncs SOUL |\n| `~\u002F.hermes\u002FAGENTS.md.local`, any `local-*` | Preserved by rule (fleet-update never deletes) |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002Fdeploy-backups\u002F`, `scripts-unique-backup-*` | Recent deploy rollback safety nets |\n\n## Truly Stale — Safe to Delete\n\n> **Log policy (Luke, 2026-08-03): keep logs unless actually out of disk space.**\n> Rotated log archives are NOT routine cleanup targets — only remove them when\n> `df -h` shows real pressure (e.g. \u003C 10% free). Same for any log under\n> `~\u002F.hermes\u002Flogs\u002F` or `~\u002F.steadfaste-fleet\u002Flogs\u002F`.\n\n| Path | Evidence | Saves |\n|------|----------|-------|\n| `~\u002F.steadfaste-fleet\u002Fstate\u002Floop-governance.db` (0 bytes) | All scripts reference `data\u002Floop-governance.db`, none reference `state\u002F` copy. **Do NOT touch `data\u002Floop-governance.db` — that is the live governance DB.** | 0 bytes (dead file) |\n| `~\u002F.hermes\u002Fhermes-agent\u002F__pycache__\u002F`, `~\u002F.steadfaste-fleet\u002F{scripts,offline}\u002F__pycache__\u002F` | Regenerable bytecode (Python rebuilds on import) | ~2.5 MB, 800+ dirs |\n| `~\u002F.steadfaste-fleet\u002Fa2a\u002Ftask-state.db` | Zero references in agent source or fleet scripts (agent-card.json in same dir IS live) | 20 KB |\n| `~\u002F.hermes\u002Fstate\u002Fpost-commit-notify` + `.log` | Pre-migration leftovers: old hook wrote to `~\u002F.hermes\u002Fstate\u002F`, current script writes to `~\u002F.steadfaste-fleet\u002Fstate\u002F` | 3.5 KB |\n| `~\u002F.hermes\u002Fcron\u002Foutput\u002F\u003Chash>\u002F` subdirs older than 30 days | Scheduler run artifacts; doctor does NOT read cron\u002Foutput. **Keep loose named deliverables** (e.g. `sustainability-briefing-*.md\u002F.docx`) | several MB, 1000s of files |\n\n## Verify-First (do NOT delete without owner OK)\n\n| Path | Why |\n|------|-----|\n| `~\u002F.hermes\u002Fhooks\u002Fpost-commit` + `pre-commit` | Pre-migration copies of fleet git hooks (migration-2026-07-08 moved hooks to `~\u002F.steadfaste-fleet\u002Fhooks\u002F`). Agent ignores them (not hook dirs); git uses hooksPath → `~\u002F.steadfaste-fleet\u002Fhooks`. But the DIRECTORY is agent infrastructure and files may be referenced manually — confirm with owner |\n| `~\u002F.hermes\u002Fstate\u002Fworker-completed\u002F*.done` | Live machinery reads them; old entries look stale but deleting can re-trigger steps in `agent-worker.py` |\n| `~\u002F.hermes\u002Fconfig.yaml.bak.*` | Config backup — \"never destroy what you cannot restore.\" 76 KB, trivial; keep unless disk-critical |\n| `post-commit-notify.sh` wiring | Deployed (registered in fleet-update.sh) but NOT the active post-commit hook (that's `post-commit-audit` via symlink). State files are stale, but the script may be intended to be wired — flag, don't delete |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002F.hermes-session-*.id` | Auto-managed: `purge-stale-governance-locks.py` Phase 2 removes markers older than 24 h. Run that script, don't hand-delete |\n| `~\u002F.hermes\u002Fmodels_dev_cache.json` | Regenerable cache BUT `hermes-backup` skill copies it — part of backup surface. Tiny (3 MB); optional |\n\n## Vestigial Profiles — `~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002F`\n\nA named profile is a whole second Hermes home (its own `.env`, `config.yaml`,\n`SOUL.md`, skills, memories, sessions, cron), so it appears in NONE of the grep\ntables above. Its evidence is STRUCTURAL, and the question is not \"who references\nit\" but \"did it ever serve a turn\":\n\n| Evidence | What it means |\n|---|---|\n| no `config.yaml`; `memories\u002F` and `sessions\u002F` holding no files; no `cron\u002Fjobs.json`; a stock `SOUL.md` rather than the agent's edited identity | created and never configured — no turn ever ran there |\n| zero hits in `~\u002F.config\u002Fsystemd\u002Fuser\u002F`, `~\u002F.hermes\u002Fcron\u002Fjobs.json`, `~\u002Fsteadfaste-fleet` | nothing serves it — not a unit, not a cron, not a deploy step |\n| a file whose mtime PREDATES the directory containing it | the home was populated by an mtime-preserving copy, not written in place (`--clone` copies `config.yaml`, `.env`, `SOUL.md`, `skills\u002F`, `memories\u002FMEMORY.md`, `memories\u002FUSER.md`) |\n\n- **A copied profile carries a copy of `.env`, token included — that is not inert.**\n  A duplicate platform credential blocks the host gateway from multiplexing\n  (`hermes-gateway-operations` → the standalone-only section). A dead profile is\n  therefore never merely dead weight: decide it — delete, or strip the shared\n  credential — rather than leaving it in place.\n- **`onboarding.seen.profile_build_offered` is NOT evidence a profile was built.**\n  That flag records the offer to build a USER MEMORY profile; it has nothing to do\n  with a Hermes profile directory.\n- **Deletion is the owner's call.** Present the structural evidence plus the fix\n  options; never `rm -rf` a profile directory on your own judgement.\n\n### Deleting one (exercised 2026-10-14)\n\n```bash\n# 1. Prove nothing is lost — compare key NAMES only, then the shared credential's hash:\ndiff \u003C(grep -oE '^[A-Za-z_][A-Za-z0-9_]*=' ~\u002F.hermes\u002F.env | sort -u) \\\n     \u003C(grep -oE '^[A-Za-z_][A-Za-z0-9_]*=' ~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002F.env | sort -u)\ngrep '^TELEGRAM_BOT_TOKEN' \u003Ceach file> | tail -1 | sha256sum    # same digest on both sides\n\n# 2. Delete (owner-approved), then confirm:\nhermes profile delete -y \u003Cname>\nhermes profile list        # the duplicate-credential warning must be gone\n```\n\n- A right-only diff (every line prefixed `\u003C`) means the copied `.env` is a strict\n  SUBSET — no key is unique to the profile, so no secret is destroyed. The hash line\n  proves the shared credential is byte-identical without ever printing it.\n- `hermes profile delete -y \u003Cname>` prints the skill count it is about to destroy, then\n  removes the tree; a `.deleted\u002F` tombstone directory stays under `profiles\u002F`, and the\n  profile is never enumerated again.\n\n## Procedure\n\n1. **Survey** — `du -sh ~\u002F.hermes\u002F* ~\u002F.steadfaste-fleet\u002F* | sort -rh`; identify top consumers\n2. **Verify chain** — for each candidate, run the 4-step grep above\n3. **Classify** — LIVE (skip) \u002F STALE (delete) \u002F VERIFY-FIRST (flag to owner)\n4. **Delete stale only**, from the table above. Never `rm -rf` a LIVE path\n5. **Re-verify** — `du -sh` before\u002Fafter; `hermes doctor` \u002F `fleet-doctor.py --quiet` still clean\n6. **Report** — table of what was removed, evidence, space reclaimed\n7. **Share** — push any new knowledge (new live\u002Fstale entries) back into this skill\n\n## Pitfalls (learned the hard way)\n\n- **Renamed crons keep old state filenames.** `bus-audit-watchdog` → `orch-bus-audit-watchdog` but the script still writes `~\u002F.hermes\u002Fstate\u002Fbus-audit-watchdog.*`. Grep the SCRIPT, not the cron name.\n- **`state-snapshots\u002F` is not orphaned** — it's the agent's pre-update rollback. No fleet script references it; the AGENT does.\n- **`~\u002F.hermes\u002Fhooks\u002F` ≠ git hooks** — it's the agent's event-hook dir. Git hooks live under `~\u002F.steadfaste-fleet\u002Fhooks\u002F` (core.hooksPath).\n- **Grep the agent source, not just fleet** — the false-stale items all had agent-side consumers.\n- **Never delete while the gateway is writing** — `state.db` needs WAL checkpoint first if copied; never deleted.\n- **A profile directory shows up in none of the four greps — and still blocks the host.**\n  Verify it STRUCTURALLY (missing `config.yaml`, file-less `memories\u002F`+`sessions\u002F`, no\n  `cron\u002Fjobs.json`, zero unit\u002Fcron\u002Frepo references), because \"zero references\" alone reads\n  as a green light while its copied `.env` keeps the gateway standalone.\n- **`hermes gateway migrate --multiplex` is a NO-OP that does NOT restart on a\n  one-profile host.** It exits 0 with \"Only one profile exists: nothing to multiplex\" and\n  leaves `MainPID` unchanged — so the STALE boot-time `multiplex_standalone_reason` in\n  `gateway_state.json` keeps naming the deleted profile, and the dashboard keeps showing\n  it. Clear it with `systemctl --user restart hermes-gateway.service`, then verify the\n  restart LANDED (`systemctl --user show \u003Cunit> -p MainPID -p ExecMainStartTimestamp` —\n  both must change). The new boot log then reads `Cron scheduler will tick 1 profile(s):\n  ['default']` where it previously said 2.\n- **A stranded deployed skill needs its content COMMITTED before a deploy can move it.**\n  `check-skill-drift-parity.py` calls a file stranded when its deployed content appears\n  in no committed revision; copying the deployed content into the repo does NOT clear it\n  while you also add to it in the same commit, because no revision then holds the\n  deployed bytes verbatim. Land the deployed content as its own commit first, then add\n  your lesson on top. Use `ops\u002Fscripts\u002Fmanage\u002Freconcile-stranded-skills.py` (reports by\n  default, `--apply` copies only the pure-superset class) rather than copying by hand.\n- **fleet-update.sh purges governance locks mid-run** — if you run it during a cleanup session, re-acquire `begin_change` before continuing.\n\n## Related\n\n- `hermes-backup` — full backup procedure (use BEFORE aggressive cleanup)\n- `steadfaste-fleet-maintenance` — update workflow\n- `repo-organization` — canonical directory structure\n","# Hermes Home Cleanup — Safe Stale-File Removal\n\nUse when asked to \"clean up\" `~\u002F.hermes` or `~\u002F.steadfaste-fleet`, reclaim disk,\nor audit what's safe to delete on a Hermes Agent server.\n\n## Golden Rule\n\n**`~\u002F.hermes\u002F` is Hermes Agent territory.** Most of it is live agent\nmachinery. Before labeling anything stale, verify against the **agent source**\n(`~\u002F.hermes\u002Fhermes-agent\u002F`), not just fleet scripts. Two false \"stale\"\nclaims cost real time: `state-snapshots\u002F` and `~\u002F.hermes\u002Fhooks\u002F` are both\nagent-owned. Grep the agent repo before you rm.\n\n## Verification Chain (run BEFORE deleting anything)\n\n```bash\n# 1. Is it referenced by the agent source?\ngrep -rn '\u003Cname>' ~\u002F.hermes\u002Fhermes-agent\u002F 2>\u002Fdev\u002Fnull | grep -v node_modules | grep -v venv | grep -v '\\.git\u002F'\n# 2. Is it referenced by fleet scripts (repo + deployed)?\ngrep -rn '\u003Cname>' ~\u002Fsteadfaste-fleet\u002F ~\u002F.steadfaste-fleet\u002Fscripts\u002F ~\u002F.hermes\u002Fplugins\u002F 2>\u002Fdev\u002Fnull | grep -v '\\.git\u002F'\n# 3. Is it a live cron's state file? (renamed crons keep old state filenames!)\npython3 -c \"import json;d=json.load(open('$HOME\u002F.hermes\u002Fcron\u002Fjobs.json'));jobs=d.get('jobs',d) if isinstance(d,dict) else d;print([j.get('name') for j in jobs if isinstance(j,dict)])\"\n# 4. Is it a symlink target or consumed by install scripts?\ngrep -rn '\u003Cname>' ~\u002F.steadfaste-fleet\u002Fscripts\u002Finstall*.sh ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Finstall*.sh 2>\u002Fdev\u002Fnull\n```\n\n**Zero references in ALL FOUR = candidate. One reference = LIVE. Never guess.**\n\n## LIVE — Do NOT Touch (agent-owned)\n\n| Path | Why live |\n|------|----------|\n| `~\u002F.hermes\u002Fhermes-agent\u002F` | The running agent source + venv + node_modules (CLI at `~\u002F.local\u002Fbin\u002Fhermes` runs from here) |\n| `~\u002F.hermes\u002Fstate.db` (+ `-wal`\u002F`-shm`) | Live session DB, written every turn. Never delete; checkpoint before copy (`PRAGMA wal_checkpoint(TRUNCATE)`) |\n| `~\u002F.hermes\u002Fstate-snapshots\u002F` | **Agent's own pre-update backup.** `hermes update` creates `*-pre-update\u002F`; restore with `hermes backup restore --state pre-update` or `\u002Fsnapshot restore`. Config: `updates.pre_update_backup` (quick\u002Ffull\u002Foff), `backup_keep` |\n| `~\u002F.hermes\u002Fhooks\u002F` | **Agent event-hook directory** (`gateway\u002Fhooks.py` scans for `HOOK.yaml` + `handler.py` dirs; web UI `\u002Fapi\u002Fops\u002Fhooks`). The DIRECTORY must stay. Plain files inside are ignored by the agent but may be pre-migration copies — verify, don't assume |\n| `~\u002F.hermes\u002Fcron\u002F` (jobs.json, executions.db, ticker_*) | Live scheduler state |\n| `~\u002F.hermes\u002Fgateway.*`, `~\u002F.hermes\u002Fprocesses.json`, `auth.json`, `.env` | Live runtime \u002F secrets |\n| `~\u002F.hermes\u002Fsession.id` | **REMOVED vestige (2026-11-12)** — write-only cache since the 2026-09-29 non-Hermes session-id scoping fix; no readers anywhere. Safe to delete; nothing recreates it |\n| `~\u002F.hermes\u002Fstate\u002Fbus-audit-watchdog.json` + `.state` | **LIVE** — the renamed `orch-bus-audit-watchdog` cron uses these EXACT filenames. A renamed cron keeps its old state files |\n| `~\u002F.hermes\u002Fstate\u002Fworker-pending\u002F`, `worker-completed\u002F` | Live `agent-worker.py` machinery (`is_completed()` reads `.done` files; deleting can re-trigger old steps) |\n| `~\u002F.steadfaste-fleet\u002Fa2a\u002F` | **DEPRECATED dir, zero consumers** — A2A service merged into fleet-bus (`src\u002Fa2a\u002F` → `ops\u002Fservices\u002Fa2a\u002F` → fleet-bus). Bus server serves a HARDCODED card at `\u002F.well-known\u002Fagent-card.json`; deployed card is `bus\u002Fagent-card.json` (register_orch in fleet-update.sh). `agent-card.json` there was last written 2026-07-27 by a one-off `generate-agent-card.py --output` run — no cron, script, or nginx route reads it. Safe to delete both files (keep the empty dir or remove it; nothing recreates it) |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002F_cron_find.py` | LIVE — `install-crons.sh` + `install-orch-crons.sh` call it |\n| `~\u002F.steadfaste-fleet\u002Fdata\u002Floop-governance.db`, `session-embeddings.db` | Live governance\u002Fscoring DBs |\n| `~\u002F.hermes\u002Fbin\u002Fuv`, `uvx`, `tirith` | Python toolchain + security scanner (tirith referenced in `config.yaml` `security.tirith_*`) |\n| `~\u002F.hermes\u002Fnode\u002F`, `~\u002F.hermes\u002Flsp\u002F` | Runtimes for desktop\u002FLSP features |\n| `~\u002F.hermes\u002Fagent-profiles\u002F` | SOUL.md profile templates (legacy) — `soul-merge.py`\u002F`soul-sync-all.sh` that read them were removed 2026-11-04; `pre-commit-score` no longer syncs SOUL |\n| `~\u002F.hermes\u002FAGENTS.md.local`, any `local-*` | Preserved by rule (fleet-update never deletes) |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002Fdeploy-backups\u002F`, `scripts-unique-backup-*` | Recent deploy rollback safety nets |\n\n## Truly Stale — Safe to Delete\n\n> **Log policy (Luke, 2026-08-03): keep logs unless actually out of disk space.**\n> Rotated log archives are NOT routine cleanup targets — only remove them when\n> `df -h` shows real pressure (e.g. \u003C 10% free). Same for any log under\n> `~\u002F.hermes\u002Flogs\u002F` or `~\u002F.steadfaste-fleet\u002Flogs\u002F`.\n\n| Path | Evidence | Saves |\n|------|----------|-------|\n| `~\u002F.steadfaste-fleet\u002Fstate\u002Floop-governance.db` (0 bytes) | All scripts reference `data\u002Floop-governance.db`, none reference `state\u002F` copy. **Do NOT touch `data\u002Floop-governance.db` — that is the live governance DB.** | 0 bytes (dead file) |\n| `~\u002F.hermes\u002Fhermes-agent\u002F__pycache__\u002F`, `~\u002F.steadfaste-fleet\u002F{scripts,offline}\u002F__pycache__\u002F` | Regenerable bytecode (Python rebuilds on import) | ~2.5 MB, 800+ dirs |\n| `~\u002F.steadfaste-fleet\u002Fa2a\u002Ftask-state.db` | Zero references in agent source or fleet scripts (agent-card.json in same dir IS live) | 20 KB |\n| `~\u002F.hermes\u002Fstate\u002Fpost-commit-notify` + `.log` | Pre-migration leftovers: old hook wrote to `~\u002F.hermes\u002Fstate\u002F`, current script writes to `~\u002F.steadfaste-fleet\u002Fstate\u002F` | 3.5 KB |\n| `~\u002F.hermes\u002Fcron\u002Foutput\u002F\u003Chash>\u002F` subdirs older than 30 days | Scheduler run artifacts; doctor does NOT read cron\u002Foutput. **Keep loose named deliverables** (e.g. `sustainability-briefing-*.md\u002F.docx`) | several MB, 1000s of files |\n\n## Verify-First (do NOT delete without owner OK)\n\n| Path | Why |\n|------|-----|\n| `~\u002F.hermes\u002Fhooks\u002Fpost-commit` + `pre-commit` | Pre-migration copies of fleet git hooks (migration-2026-07-08 moved hooks to `~\u002F.steadfaste-fleet\u002Fhooks\u002F`). Agent ignores them (not hook dirs); git uses hooksPath → `~\u002F.steadfaste-fleet\u002Fhooks`. But the DIRECTORY is agent infrastructure and files may be referenced manually — confirm with owner |\n| `~\u002F.hermes\u002Fstate\u002Fworker-completed\u002F*.done` | Live machinery reads them; old entries look stale but deleting can re-trigger steps in `agent-worker.py` |\n| `~\u002F.hermes\u002Fconfig.yaml.bak.*` | Config backup — \"never destroy what you cannot restore.\" 76 KB, trivial; keep unless disk-critical |\n| `post-commit-notify.sh` wiring | Deployed (registered in fleet-update.sh) but NOT the active post-commit hook (that's `post-commit-audit` via symlink). State files are stale, but the script may be intended to be wired — flag, don't delete |\n| `~\u002F.steadfaste-fleet\u002Fstate\u002F.hermes-session-*.id` | Auto-managed: `purge-stale-governance-locks.py` Phase 2 removes markers older than 24 h. Run that script, don't hand-delete |\n| `~\u002F.hermes\u002Fmodels_dev_cache.json` | Regenerable cache BUT `hermes-backup` skill copies it — part of backup surface. Tiny (3 MB); optional |\n\n## Vestigial Profiles — `~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002F`\n\nA named profile is a whole second Hermes home (its own `.env`, `config.yaml`,\n`SOUL.md`, skills, memories, sessions, cron), so it appears in NONE of the grep\ntables above. Its evidence is STRUCTURAL, and the question is not \"who references\nit\" but \"did it ever serve a turn\":\n\n| Evidence | What it means |\n|---|---|\n| no `config.yaml`; `memories\u002F` and `sessions\u002F` holding no files; no `cron\u002Fjobs.json`; a stock `SOUL.md` rather than the agent's edited identity | created and never configured — no turn ever ran there |\n| zero hits in `~\u002F.config\u002Fsystemd\u002Fuser\u002F`, `~\u002F.hermes\u002Fcron\u002Fjobs.json`, `~\u002Fsteadfaste-fleet` | nothing serves it — not a unit, not a cron, not a deploy step |\n| a file whose mtime PREDATES the directory containing it | the home was populated by an mtime-preserving copy, not written in place (`--clone` copies `config.yaml`, `.env`, `SOUL.md`, `skills\u002F`, `memories\u002FMEMORY.md`, `memories\u002FUSER.md`) |\n\n- **A copied profile carries a copy of `.env`, token included — that is not inert.**\n  A duplicate platform credential blocks the host gateway from multiplexing\n  (`hermes-gateway-operations` → the standalone-only section). A dead profile is\n  therefore never merely dead weight: decide it — delete, or strip the shared\n  credential — rather than leaving it in place.\n- **`onboarding.seen.profile_build_offered` is NOT evidence a profile was built.**\n  That flag records the offer to build a USER MEMORY profile; it has nothing to do\n  with a Hermes profile directory.\n- **Deletion is the owner's call.** Present the structural evidence plus the fix\n  options; never `rm -rf` a profile directory on your own judgement.\n\n### Deleting one (exercised 2026-10-14)\n\n```bash\n# 1. Prove nothing is lost — compare key NAMES only, then the shared credential's hash:\ndiff \u003C(grep -oE '^[A-Za-z_][A-Za-z0-9_]*=' ~\u002F.hermes\u002F.env | sort -u) \\\n     \u003C(grep -oE '^[A-Za-z_][A-Za-z0-9_]*=' ~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002F.env | sort -u)\ngrep '^TELEGRAM_BOT_TOKEN' \u003Ceach file> | tail -1 | sha256sum    # same digest on both sides\n\n# 2. Delete (owner-approved), then confirm:\nhermes profile delete -y \u003Cname>\nhermes profile list        # the duplicate-credential warning must be gone\n```\n\n- A right-only diff (every line prefixed `\u003C`) means the copied `.env` is a strict\n  SUBSET — no key is unique to the profile, so no secret is destroyed. The hash line\n  proves the shared credential is byte-identical without ever printing it.\n- `hermes profile delete -y \u003Cname>` prints the skill count it is about to destroy, then\n  removes the tree; a `.deleted\u002F` tombstone directory stays under `profiles\u002F`, and the\n  profile is never enumerated again.\n\n## Procedure\n\n1. **Survey** — `du -sh ~\u002F.hermes\u002F* ~\u002F.steadfaste-fleet\u002F* | sort -rh`; identify top consumers\n2. **Verify chain** — for each candidate, run the 4-step grep above\n3. **Classify** — LIVE (skip) \u002F STALE (delete) \u002F VERIFY-FIRST (flag to owner)\n4. **Delete stale only**, from the table above. Never `rm -rf` a LIVE path\n5. **Re-verify** — `du -sh` before\u002Fafter; `hermes doctor` \u002F `fleet-doctor.py --quiet` still clean\n6. **Report** — table of what was removed, evidence, space reclaimed\n7. **Share** — push any new knowledge (new live\u002Fstale entries) back into this skill\n\n## Pitfalls (learned the hard way)\n\n- **Renamed crons keep old state filenames.** `bus-audit-watchdog` → `orch-bus-audit-watchdog` but the script still writes `~\u002F.hermes\u002Fstate\u002Fbus-audit-watchdog.*`. Grep the SCRIPT, not the cron name.\n- **`state-snapshots\u002F` is not orphaned** — it's the agent's pre-update rollback. No fleet script references it; the AGENT does.\n- **`~\u002F.hermes\u002Fhooks\u002F` ≠ git hooks** — it's the agent's event-hook dir. Git hooks live under `~\u002F.steadfaste-fleet\u002Fhooks\u002F` (core.hooksPath).\n- **Grep the agent source, not just fleet** — the false-stale items all had agent-side consumers.\n- **Never delete while the gateway is writing** — `state.db` needs WAL checkpoint first if copied; never deleted.\n- **A profile directory shows up in none of the four greps — and still blocks the host.**\n  Verify it STRUCTURALLY (missing `config.yaml`, file-less `memories\u002F`+`sessions\u002F`, no\n  `cron\u002Fjobs.json`, zero unit\u002Fcron\u002Frepo references), because \"zero references\" alone reads\n  as a green light while its copied `.env` keeps the gateway standalone.\n- **`hermes gateway migrate --multiplex` is a NO-OP that does NOT restart on a\n  one-profile host.** It exits 0 with \"Only one profile exists: nothing to multiplex\" and\n  leaves `MainPID` unchanged — so the STALE boot-time `multiplex_standalone_reason` in\n  `gateway_state.json` keeps naming the deleted profile, and the dashboard keeps showing\n  it. Clear it with `systemctl --user restart hermes-gateway.service`, then verify the\n  restart LANDED (`systemctl --user show \u003Cunit> -p MainPID -p ExecMainStartTimestamp` —\n  both must change). The new boot log then reads `Cron scheduler will tick 1 profile(s):\n  ['default']` where it previously said 2.\n- **A stranded deployed skill needs its content COMMITTED before a deploy can move it.**\n  `check-skill-drift-parity.py` calls a file stranded when its deployed content appears\n  in no committed revision; copying the deployed content into the repo does NOT clear it\n  while you also add to it in the same commit, because no revision then holds the\n  deployed bytes verbatim. Land the deployed content as its own commit first, then add\n  your lesson on top. Use `ops\u002Fscripts\u002Fmanage\u002Freconcile-stranded-skills.py` (reports by\n  default, `--apply` copies only the pure-superset class) rather than copying by hand.\n- **fleet-update.sh purges governance locks mid-run** — if you run it during a cleanup session, re-acquire `begin_change` before continuing.\n\n## Related\n\n- `hermes-backup` — full backup procedure (use BEFORE aggressive cleanup)\n- `steadfaste-fleet-maintenance` — update workflow\n- `repo-organization` — canonical directory structure\n",{"name":5,"author":24,"license":15,"version":25,"category":26,"metadata":27,"platforms":40,"description":7},"Esther","1.0.0","devops",{"hermes":28},{"tags":29,"related_skills":35},[30,31,32,33,34],"cleanup","maintenance","hermes","stale-files","disk-space",[36,37,38,39],"hermes-backup","steadfaste-fleet-maintenance","repo-organization","survey-before-action",[41,42],"linux","macos","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Fhermes-home-cleanup",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill hermes-home-cleanup",{"tool":58,"command":59},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill hermes-home-cleanup",{"tool":61,"command":62},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill hermes-home-cleanup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fhermes-home-cleanup\u002FSKILL.md",true,[],[67,75,82,89,96,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":74},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":74},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":74},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":97,"name":37,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":74},"01M78SS928F3R2RJAYVW4E30CE","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":74},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]