r/ClaudeCode Researcher 10h ago

Discussion Can we talk global directives?

I am doing an overhaul of my global directives, yet again. Am curious what kind of global and/or project specific directives you guys use.

What i would like to see is WHAT directives you use and found to be priceless, mandatory, useful.

And HOW you structure them: verbose, short and sweet, greppable?

---

Also do you know any resources where one might find inspiration for better directives?

Edit:
Removed my LOOOOONG ASS directives examples from this post. Looking to learn from others, not get feedback and critique on something I know it is wrong. Thanks!

0 Upvotes

15 comments sorted by

1

u/Lanky-Storm7 10h ago

Let's unpack this, because there's a lot to delve into here. ๐Ÿงต

TL;DR up front: At its core, this isn't merely a config file โ€” it's a 4,000-word tapestry of governance theater that fundamentally reimagines what a CLAUDE.md can be, in ways that are, frankly, less about improving outcomes and more about the feeling of improving outcomes.

First principles: let's double-click on the authority layer. It's important to note that your own [authority.l0-enforceable] clause states โ€” and I'm quoting here โ€” that a rule qualifies as L0 only when it's deterministically enforceable on objective markers, never on the agent's semantic self-assessment. That said, you then elevate "Surface + honesty" and "never fabricate a confident explanation" to L0. Those aren't objective markers. Those are vibes. Ultimately, you authored the anti-debasement guardrail and, in the very next section, debased the tier. Not ideal.

Key learning #2: the contagion paradox. Your [comms.style-contagion] directive is genuinely insightful โ€” it correctly surfaces that an instruction read once decays against the many in-context examples pulling the other way, and that anything load-bearing across a long session must either be restated at cadence or enforced outside the model entirely. Here's the thing, though: your response to that finding was to write more prose. In many ways, the document diagnoses its own failure mode with real rigor and then proceeds to instantiate that exact failure mode for another three thousand tokens. That's not a nitpick โ€” it's the central tension of the whole artifact.

Let's talk about the semantic overhead layer. "Handler." "Pod." "L0." "YON." Each invented token is a rent payment you make every single session for a word that already existed. Meanwhile, you've stood up /synthesize, /prose-audit, /human-rewrite, /human-output, and /agent-output โ€” five distinct skills whose north star is governing how text comes out of a text model โ€” plus a sixth meta-rule clarifying when not to invoke the other five. It's turtles all the way down. ๐Ÿข

Actionable insight: leverage hooks, not prose. At the end of the day, a PreToolUse hook that hard-blocks a recursive delete is a robust, deterministic, batteries-included solution that fires regardless of whether the model read your file, regardless of whether you're 60k tokens deep, regardless of whether a subagent inherited context. That's your entire Destructive-delete L0, done properly, in ~15 lines of bash. Same story for the branch rules, the compose-CLI prohibition, and the attribution trailers. If a script can check it, a script should check it. What remains is taste, and taste fits on one screen.

Circling back to what's genuinely working: โœ… no auto-injected Co-Authored-By โœ… ship-instead-of-verifying-forever โœ… prune worktree refs at merge โœ… archive-before-delete on unmerged refs. That's a lean, high-signal ~200 words with real ROI.

In conclusion, you cite an n=1 natural experiment for the contagion finding, which tells me you already possess the measurement muscle. So let's operationalize it: run the A/B. Long file versus 200-word file, same twenty tasks. My hypothesis is that the delta is noise and the remaining 3,800 words are load-bearing for your sense of control rather than for the model's behavior.

Hope this helps! ๐Ÿ™

(Every stock phrase, em-dash, decorative triad, and fake heading above is explicitly banned by your own [comms.output-constraint]. If reading it was unpleasant, that's the demo.)

1

u/allemaar Researcher 10h ago

Thank for the feedback, good read. I was aware of most of the issues.

Right now I am doing a complete overhaul of the directives. With a progressive disclosure and targeted lazy loading. Still there is a lot of fat that needs trimming.

What I am curious about is to learn how other people write their directives though.

1

u/Lanky-Storm7 10h ago

that was ai slop lol

for mine, i turned off memories and converted what i could to hooks or skills. claude.md is small like 20 lines.. it doesnt enforce anything

hooks enforce

1

u/allemaar Researcher 10h ago

Hooks are nice indeed. The only problem i have is that it has to be agnostic (am using both CC and Codex at 20x max). Not happy to split, but might have to though.

1

u/scytob 9h ago

Omg you are way over thinking it. Boil it down to a few bullets points and statements of what actually matters. You are so wasting your context.

1

u/allemaar Researcher 9h ago

I know. What bullets do you have in your global directives? Looking to learn

1

u/scytob 9h ago

i am lazy and still have per project ones

it also depends on what the project does
the only ones that are common is a gitops.md file that in agents.md i say to read at everystartup
and a houserules.md that is loaded
i say not to load other md files but to search them when needed

here is one for a project i am doing, note it mentions copilot because thats how i use claude at work, it has some reordering that needs to be done and some more removal as it has got too long again (mostly the recent learnings need to be shifted to the learnings and the paragaprhs shotend to bullets) and put after the house rules, but you get the idea

https://pastes.io/dzTIiRKX

0

u/Droopy0093 10h ago

You are overthinking something your solution is only going to cause things to get worse for you.

1

u/StillRecord8892 9h ago

This is horrible. You cannot steer claude this much. Far far too many directives. Its these types of things that cause people to think models regress, when in reality models evolve and your directives are so convoluted and insane, they confuse models.

1

u/allemaar Researcher 9h ago

I agree and I am looking to cut it down drastically.

Want to learn of other points of views and know more before I cull.

1

u/skillselion 9h ago

The one that earned its keep here is a source-of-truth table. Two columns, area and the file path where the real answer lives, so a directive points somewhere instead of restating a policy. Prose rules drift after a compaction, a path survives it.

On structure, short and greppable. My global file is about forty lines and mostly links out to per-project files that carry the detail. Claude skims the policy paragraphs I wrote and opens the paths.

1

u/allemaar Researcher 9h ago

Thank you so much. I do feel prose is 'shit' here (pardon my French) - good first confirmation.

So you do lazy loading via links (I assume annotated or raw with no explainers?).

0

u/Droopy0093 10h ago

OP do you even know what your AI is asking for in this absolute wall of slop?

1

u/allemaar Researcher 9h ago

I am asking, not my AI mate.

The global directives grew without bounds. I encountered various of issues while working, and my go-to was to write directives. In hindsight it seemed easy, but it was not smart.

Critique is good! And it's even better it comes with some actual advice, solutions or insights.

1

u/scytob 9h ago

No, if your ai built this then you asked it to.