▲ | zarzavat 5 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
Anthropic, if you're listening, please allow zoned access enforcement within files. I want to be able to say "this section of the file is for testing", delineated by comments, and forbid Claude from editing it without permission. My fear when using Claude is that it will change a test and I won't notice. Splitting tests into different files works but it's often not feasible, e.g. if I want to write unit tests for a symbol that is not exported. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | blyat 4 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
I've had some middling success with this by utilizing CLAUDE.md and language features. Two approaches in C#: 1) use partial classes and create a 'rule' in CLAUDE.md to never touch named files, e.g. User.cs (edits allowed) User.Protected.cs (not allowed by convention) and 2) a no-AI-allowed attribute, e.g. [DontModifyThisClassOrAttributeOrMethodOrWhatever] and instructions to never modify said target. Can be much more granular and Claude Code seems to respect it. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | geeunits 5 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Does already, read the docs | ||||||||||||||||||||||||||||||||||||||||||||||||||
|