CLAUDE.md: hand session sync to the hooks

Pulling at session start and the commit/push reminder now run as hooks in Desktop\Claude\.claude (outside the repo). Claude only does them by hand in sessions opened elsewhere.
This commit is contained in:
2026-09-24 14:58:08 -04:00
parent 660d5b2d73
commit 1fee46ef36
+19 -15
View File
@@ -5,24 +5,28 @@
This repo is backed up to `http://10.3.8.90:3000/chris/AV-Watch` (private, branch This repo is backed up to `http://10.3.8.90:3000/chris/AV-Watch` (private, branch
`main`). The Git login is in Windows Credential Manager, not in this repo. `main`). The Git login is in Windows Credential Manager, not in this repo.
1. **Pull at the start.** Before starting on the first request of every session, For sessions opened in `C:\Users\Live Stream\Desktop\Claude`, hooks do the syncing
pull in the repo root (`C:\Users\Live Stream\Desktop\Claude\avwatch`): (`.claude\settings.json` and `.claude\hooks\avwatch-sync.ps1` in that folder,
outside this repo):
```powershell - **At session start** a hook runs `git pull --ff-only` and adds the result to your
# 'never' makes a bad token fail fast instead of opening a login window context as "AVWatch SessionStart hook: ...". Don't pull again. If it says the
$env:GCM_INTERACTIVE = 'never'; git pull --ff-only pull was skipped, mention that in your first reply, and don't stash, reset,
``` rebase or merge to get past it unless asked.
- **After each reply** a hook shows the user a one-line note while anything is
uncommitted or unpushed, so don't add a reminder of your own. Only commit or
push when asked.
Report the result in one line, then carry on with the request. If the pull In a session opened anywhere else the hooks don't run, so do both by hand: pull
fails (server unreachable, local changes in the way, history diverged), say before the first request, and end any reply that leaves work uncommitted or
why in that line and carry on. Don't stash, reset, rebase or merge to get past unpushed with a one-line reminder and an offer to commit and push.
it unless asked. If `git` isn't found, use `C:\Program Files\Git\cmd\git.exe`.
2. **Remind before finishing.** When you finish a piece of work and `git status` ```powershell
shows uncommitted changes or unpushed commits, end your reply with a one-line # 'never' makes a bad token fail fast instead of opening a login window
reminder of what isn't on Gitea yet and offer to commit and push. Do the same $env:GCM_INTERACTIVE = 'never'; git pull --ff-only
when the user says they're wrapping up. Only commit or push when asked, and ```
don't repeat the reminder if nothing has changed since the last one.
If `git` isn't found, use `C:\Program Files\Git\cmd\git.exe`.
## What this is ## What this is