Skip to content
Pathrule

cursor

Cursor edits.
Pathrule remembers.

Shared rules and team context for Cursor. One path-scoped source reaches Cursor through its session and tool hooks, a .cursor/rules file it loads itself, and MCP.

Cursorexample
Add an orders page.

Without

Done. The page fetches /api/orders in a useEffect.

Uses fetch where the team uses the api client.2 tries

With Pathrule

at session start and on the first edit: 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 Cursor.

files it reads: yesfiles it reads
.cursor/rules
before each prompt: nobefore each prompt
No prompt hook
around tool calls: yesaround tool calls
Tool hooks
when it asks: yeswhen it asks
Local

Hooks at session start and around tool calls, a rules file Cursor loads itself, and MCP for anything the agent asks for.

.cursorrules vs Pathrule

.cursorrules alonenative guidance
  • Native instruction files can be scoped by path and shared through version control.
  • Changes follow repository permissions and its Git or pull-request history.
  • Context depends on the files and guidance the client loads.
  • Tied to Cursor; other agents need their own files.
  • Onboarding follows the repository’s instruction setup.
Pathrule + Cursorfor this path
  • Path-scoped slice for the directory the model is working in.
  • Reviewable rules and skills with server-enforced workspace access and a self-audit.
  • Token cost scales with the relevant slice, not the whole rule set.
  • Same content reaches Claude Code, Codex, GitHub Copilot and Windsurf.
  • Onboarding = "join the workspace; the right rules show up on the right paths".

Long read: Why AI coding assistants need scoped rules.

What Pathrule adds to Cursor

  • Hook-time injectionAt session start and after tool callsPathrule runs at Cursor's sessionStart and postToolUse hooks, so the scoped slice arrives when a session opens and follows the agent as it touches files. Cursor's prompt event cannot carry context, so Pathrule does not use it.
  • Path-scoped graphRules where they applyA rule attached to /apps/web only fires when Cursor is acting under that path. .cursorrules stops being a dumping ground.
  • Reviewable team knowledgeMemories, rules, skillsThree knowledge types, reviewable in Local Console and VS Code, with shared Cloud authoring through CLI and MCP. Stale rules surface for cleanup, and concurrent edits conflict cleanly instead of overwriting each other.
  • Same content, every agentOne source for every agentClaude Code, Codex, GitHub Copilot and Windsurf receive the same path-scoped knowledge, so editor choice does not fragment what the team knows.

Questions.

What does Pathrule add to Cursor?

A path-scoped knowledge layer that delivers team memories, rules and skills into Cursor through its session and tool hooks, a .cursor/rules file and MCP. Context arrives when a session starts and after each tool call, so the model sees the slice that matches the directory being worked in.

Is Pathrule an alternative to Cursor rules?

Pathrule is a layer above Cursor's own context. Cursor rules are committed and glob-scoped, which works; Cursor also has memory and shared Projects. Those have their own sharing and precedence within Cursor. Pathrule keeps both halves inspectable, shares the workspace half with your team, and carries your own working preferences to the next repository.

Can my whole team share Cursor rules through Pathrule?

Yes. Pathrule is built for teams. In a Pathrule Cloud workspace, rules and skills are shared in a path-indexed graph with server-enforced workspace access, and every teammate's Cursor receives them, as do Claude Code, Codex, GitHub Copilot and Windsurf.

Why does Cursor ignore my .cursorrules?

Cursor rules take globs, so scope is not the issue it once was. What remains is that a rule is delivered as text with no rank, so a hard requirement reads like a preference, and that anything Cursor learns about how you work stays in Cursor. Pathrule stores each rule with a priority and an enforcement level so requirements outrank advice, a strict rule can block a matching edit at Cursor's pre-tool hook, and what Pathrule learns stays outside any one editor.

How does Pathrule install into Cursor?

Run npm i -g @pathrule/cli, then pathrule setup in your project and pick Cursor (add --local to run with no account). Setup writes hook entries into .cursor/hooks.json that point at a single unobfuscated Node.js script under ~/.pathrule/bin, writes .cursor/rules/pathrule-protocol.mdc, and adds a local MCP entry. Removing those entries removes Pathrule.

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.

One setup.
Then it remembers.