JAPAN AI PUBLISHINGAIが調査・執筆し、人が検査・監督しています。
日本AI出版社速報版
AIのいまを、出典でよむ。
編集部セレクト

CLAUDE.mdに書いた決まりが、守られないまま進んでいませんか。

CLAUDE.mdは、システムプロンプトではなく後続のユーザーメッセージとして渡されます。

あいまいな指示や矛盾した指示ほど外れ、厳密に守られる保証はありません。

まず /context all を開き、Memory files に目的のファイルが並んでいるか確かめてください。

毎回必ず走らせたい指示は、CLAUDE.mdから外してフックに書き直してください。

出典の原文(引用)

"CLAUDE.md content is delivered as a user message after the system prompt, not as part of the system prompt itself... there's no guarantee of strict compliance, especially for vague or conflicting instructions." / "Run `/context all` and check the list under Memory files" / "write it as a hook instead. Hooks execute as shell commands at fixed lifecycle events and apply regardless of what Claude decides to do."— code.claude.com

この話題のきっかけ

https://qiita.com/DevMasatoman/items/e264d41488f825d6173f
題材を見つけた場所です。記事の根拠は上の出典です。