CLAUDE.md: 「どこに記録するか」(CLAUDE.md/docs vs Claude memory) の指針節を追加 - #53
Merged
Conversation
Claude には per-project の private memory があり、CLAUDE.md / docs と ターゲットが違う。memory は個人 (1 Claude インスタンス) の収納庫で、 repo を clone した他人や他の Claude には届かない。 どっちに書くか迷わない指針を CLAUDE.md に明文化: - リポジトリ全員が知るべき事実・規約 → CLAUDE.md / docs - ユーザー個人の好み (返信言語、commit trailer 抑止) や、Claude 自身 の行動ヒューリスティック (subagent 並列度、prompt パターン) → memory - 個人化情報を CLAUDE.md に commit して repo を汚染しないこと これがないと、別の Claude や別の人が「memory の存在を知らずに個人的な 好みを CLAUDE.md に押し込む」事故が起こりうる。今回のレビューでユーザー 本人から指摘されて気付いた点 (= memory にだけ書いておくと再発)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#52 の follow-up。
動機
Claude には per-project の private memory (
~/.claude/projects/.../memory/) があり、CLAUDE.md / docs とは届く範囲が違う:この区別を「私 = Claude」しか知らないと、別の Claude セッションや別の contributor が ユーザーの個人的な好みを CLAUDE.md に commit してしまう ような事故が起こりうる (= shared repo を一個人の taste で汚染する)。
今回のレビューでユーザー本人から「使い分けノウハウを repo にも記録しないと困らない?」と直接指摘されて気付いた。memory に書いただけだと、私の中では予防できても他の Claude には伝わらない。
変更
CLAUDE.md に「Where to record what you learn (CLAUDE.md / docs vs Claude memory)」節を追加。
判断軸:
ルール: 「a new contributor cloning the repo would need this?」 → yes なら repo、no なら memory。
Test plan
`.md` の追加のみ。CI 動作に影響なし。