Where do you define it? Do you define it in CLAUDE.md? That thing gets loaded on every conversation so it should pick up.
Ohh and one thing, you are only supposed to put there something that is absolutely necessary. Things like “This project uses Typescript” is absolutely unnecessary because its something claude will auto infer. Something like “Do not push into master branch” should be there. Also as it gets loaded on every conversation, you should keep it short or else your token usage blows up.
You can have something like “YOU MUST STRICTLY FOLLOW GUIDELINES LISTED IN commit_guidelines.md BEFORE YOU RUN ANY GIT COMMANDS” if you feel your CLAUDE.md is getting too large.
But honestly, you should ask CLAUDE itself to write CLAUDE.md with strict and proper guardrails rather than yourself
I have the problem that I defined coding patterns, eslint rules etc. But at some points it just ignores it.
It seems it just doesn’t have those defined rules available at all times.
You said to explicitly define things that the agent shouldn’t do?
Using Claude code if that matters.
Where do you define it? Do you define it in CLAUDE.md? That thing gets loaded on every conversation so it should pick up.
Ohh and one thing, you are only supposed to put there something that is absolutely necessary. Things like “This project uses Typescript” is absolutely unnecessary because its something claude will auto infer. Something like “Do not push into master branch” should be there. Also as it gets loaded on every conversation, you should keep it short or else your token usage blows up.
You can have something like “YOU MUST STRICTLY FOLLOW GUIDELINES LISTED IN commit_guidelines.md BEFORE YOU RUN ANY GIT COMMANDS” if you feel your CLAUDE.md is getting too large.
But honestly, you should ask CLAUDE itself to write CLAUDE.md with strict and proper guardrails rather than yourself