r/ClaudeCode • u/palmerden5 • 14h ago
Help/Question Chart conventions in code or in CLAUDE.md
i make charts with scripts, and i want the palette and label format to stay consistent when Claude Code changes the data feeding them. i could keep those conventions as constants in the script, which makes the output rule explicit but adds code to edit, or put them in CLAUDE.md, which is easier to adjust but depends on the assistant following them. which side would you choose?
1
Upvotes
•
u/AutoModerator 14h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/ByteFoundry 14h ago
I let it write a report.py that uses a html template to build the reports. Input is a markdown file. This way they all look the same.
AGENTS.md now only has "use report.py to create reports when the user asks."
1
u/iam-stevie-bee 11h ago
Both, but with different jobs. Put the palette and label formats in a small style module every chart script imports, and have CLAUDE.md say only "use chart_style, never set colours or formats inline". The code is the rule and CLAUDE.md is the pointer to it. Instructions can drift over a long session; an import doesn't. If you want belt and braces, a quick grep for hex codes outside the style module catches the times it forgets.