CLAUDE.md: описан сторож расхождения с веткой notes

В раздел «Read this first» добавлен абзац про PostToolUse-хук: чем он занят, где лежит он сам и его настройка, и почему обе части исключены через .git/info/exclude, а не .gitignore. Без этого файл описывал порядок публикации, умалчивая, что он теперь автоматический.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B9Gcr11JJJyf8NnWsXjDzZ
This commit is contained in:
2026-09-06 20:19:55 +03:00
co-authored by Claude Opus 5
parent 83eb87d81d
commit 6902b887d7
+7
View File
@@ -33,6 +33,13 @@ git push CFDManager notes
`git clean -xfd` deletes the working copy, since it is untracked — restore it with `git clean -xfd` deletes the working copy, since it is untracked — restore it with
the first command above. the first command above.
Drift is guarded automatically: a `PostToolUse` hook
(`.claude/hooks/notes_guard.py`, wired in `.claude/settings.local.json`) compares
this file against `notes` after every edit and demands a described commit when the
two diverge — necessary because an untracked file never shows up in `git status`.
Both live outside git, excluded through `.git/info/exclude` rather than
`.gitignore`, so no branch has to carry them.
The consequence to keep in mind: **this file describes the whole project, but no The consequence to keep in mind: **this file describes the whole project, but no
single branch contains all of it.** Before assuming a directory exists, check single branch contains all of it.** Before assuming a directory exists, check
`git branch --show-current` against the map below — `rust/` and `git branch --show-current` against the map below — `rust/` and