harness: gitignore tmp/ + add promotion check to /save and /scc

- .gitignore: ignore root tmp/ (temp/ and .claude/tmp/ were already ignored;
  root tmp/ was not, which is how scratch got committed and needed cleanup).
- New .claude/scripts/tmp-promotion-check.sh: advisory, read-only, never blocks.
  Scans the gitignored scratch dirs (tmp/, temp/, .claude/tmp/) and flags files
  worth graduating (scripts, substantial docs, session-log-referenced) before
  they're lost to cleanup. Silent when scratch is empty.
- /save (Phase 4) and /scc (new step 2) run the check before sync.sh, pointing
  at .claude/TEMP_GRADUATION.md for the graduate-vs-delete decision.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-12 06:26:20 -07:00
parent 8009dc66ca
commit 48666f987a
4 changed files with 85 additions and 3 deletions

View File

@@ -102,6 +102,18 @@ not on every save.
## Phase 4 — Sync
First, run the **promotion check** — the scratch dirs (`tmp/`, `temp/`, `.claude/tmp/`)
are gitignored, so anything in them is invisible to git and lost on cleanup. This is
advisory and never blocks:
```bash
bash .claude/scripts/tmp-promotion-check.sh
```
If it flags `[GRADUATE?]` candidates, graduate the keepers per `.claude/TEMP_GRADUATION.md`
(`git mv` into `scripts/` / `clients/<x>/reports/` / `projects/<p>/tools/`) **before** the
sync sweeps the commit. Pure scratch can be left or deleted. Then sync:
```bash
bash .claude/scripts/sync.sh
```