Claude reasons.
Pathrule remembers.
A team layer above your CLAUDE.md. Path-scoped memories, rules and skills reach Claude Code through hooks, including the one that runs when you submit a prompt, so the slice that applies arrives before it acts.
Without
Done. The page fetches /api/orders in a useEffect.
Uses fetch where the team uses the api client.2 tries
With Pathrule
before Claude Code acts: 3 notes for features/orders
- Use the api client, not fetch
- React Query for data
- Shared buttons from ui/
Done. Orders load through the api client with React Query.
Matches what the team already decided.1 try
How Pathrule reaches Claude Code.
- files it reads: yesfiles it reads
- CLAUDE.md and .claude/rules
- before each prompt: yesbefore each prompt
- Prompt hook
- around tool calls: yesaround tool calls
- Tool hooks
- when it asks: yeswhen it asks
- Local, or Remote MCP
{ "hooks": { "SessionStart": [ { "hooks": [{ "type": "command", "command": "/Users/you/.pathrule/bin/pathrule-hook.js" }] } ], "UserPromptSubmit": [ { "hooks": [{ "type": "command", "command": "/Users/you/.pathrule/bin/pathrule-hook.js" }] } ], "PreToolUse": [ { "matcher": "Read|Edit|Write|Grep|Glob|Bash", "hooks": [{ "type": "command", "command": "/Users/you/.pathrule/bin/pathrule-hook.js" }] } ] }}
Context arrives before Claude Code acts on each prompt, and the knowledge for each file follows it into its tool calls.
CLAUDE.md vs Pathrule
- Native instruction files can be scoped by path and shared through version control.
- Context depends on the files and guidance the client loads.
- Large, always-loaded guidance can compete for attention.
- Tied to Claude Code; other agents need their own files.
- Version-controlled in the repo. Editable by anyone with push.
- Path-scoped slice for the directory the model is working in.
- Token cost scales with the relevant slice, not the whole rule set.
- Task-relevant rules are delivered within the context budget.
- Same content reaches Codex, Cursor, GitHub Copilot and Windsurf.
- Reviewable, auditable knowledge graph with server-enforced workspace access.
Long read: Why Claude Code ignores your CLAUDE.md.
What Pathrule adds to Claude Code
- Hook-time injectionUserPromptSubmit, SessionStart, tool hooksPathrule runs at the hook points Claude Code already exposes, including the one that fires when you submit a prompt, so the scoped slice arrives before Claude Code acts and follows it from file to file. Not just the one initial load from
CLAUDE.md. - Path-scoped graphRules where they applyA rule attached to
/apps/mobileonly fires when Claude Code is acting under that path. The rootCLAUDE.mdstops being a dumping ground. - Three node typesMemories, rules, skillsMemories carry team-learned context. Rules are advisory or strict. Skills are multi-step playbooks the model invokes by name.
- Same content, every agentCodex, Cursor, Copilot, WindsurfThe same memories, rules and skills reach Codex, Cursor, GitHub Copilot and Windsurf, each through the hooks, files and MCP that client supports. How each is connected.
Questions.
What does Pathrule add to Claude Code?
A path-scoped knowledge layer that injects team memories, rules and skills into Claude Code at hook time. It runs at UserPromptSubmit, SessionStart and the tool hooks, so the matching slice arrives before Claude Code acts on each prompt and the model gets only the context that matches the current working directory.
Do I have to give up my CLAUDE.md?
No. Pathrule sits above CLAUDE.md. Your existing file keeps working. Pathrule adds the path-routing layer so that team rules do not have to live in one giant file.
Why does Claude Code seem to ignore parts of my CLAUDE.md?
Partly a size problem and mostly a ranking one. A CLAUDE.md is loaded whole and delivered as prose, so a requirement and a passing preference arrive at the same weight; Anthropic's own documentation describes these files as "context, not enforced configuration". Path-scoped rules in .claude/rules/ fix the size half. Pathrule addresses the other half: each rule carries a priority and an enforcement level, so a constraint arrives ranked above an advisory, and a strict rule can be held at the hook. Long read: Why Claude Code ignores your CLAUDE.md.
How does Pathrule install into Claude Code?
Run npm i -g @pathrule/cli, then pathrule setup in your project (add --local to run with no account). Setup writes hook entries into .claude/settings.json that point at a single, unobfuscated Node.js hook script under ~/.pathrule/bin, updates CLAUDE.md and .claude/rules/, and adds a local MCP entry. Removing those entries removes Pathrule.
Can I connect Claude Code without installing anything?
Yes, for the MCP tools only. claude mcp add --transport http pathrule https://cloud.pathrule.io/mcp connects Claude Code to Remote MCP with OAuth and a Pathrule account. Remote MCP does not install hooks or write local files, so knowledge arrives when Claude Code asks for it rather than before it acts, and strict rules cannot block.
Does Pathrule see my source code?
No. Pathrule does not automatically upload your repository source code. In local mode there is no account and knowledge stays on your machine. In cloud mode, Pathrule Cloud stores the memories, rules and skills your team writes, the start of each prompt is sent to rank what applies, and pathrule snapshot, when you or your agent run it, uploads the file tree, manifests, short doc samples and recent git metadata. Full breakdown on the Security page.
Does Pathrule work for Claude Code teams?
Yes. Pathrule was built for teams. In a Pathrule Cloud workspace, memories, rules and skills are shared in a path-indexed graph with server-enforced workspace access, and on team plans, Team Intelligence adds patterns from the team's work once a person verifies them. Codex, Cursor, GitHub Copilot and Windsurf receive the same knowledge.