Pathrule

Pathrule CLI for Cursor

Shared rules and team context for Cursor

Cursor is supported through Pathrule CLI, the lighter integration route into Pathrule's Context Layer. Team memories, rules and skills live in one path-scoped graph and reach Cursor before work starts, while Pathrule Studio remains the complete product and runs its primary agents itself.

The .cursorrules problem at team scale

Pathrule for Cursor is a concrete implementation of the AI coding context layer pattern. .cursorrules works for a solo developer. Two engineers in, the file grows. Five engineers in, half of it is stale and the other half contradicts itself. The pattern is not a Cursor problem; it is a one-flat-file problem. The work is path-scoped; the rule file is not.

Pathrule fixes the shape, not the file. Team knowledge lives in a path-indexed graph. Cursor still reads .cursorrules for repo-wide constants; Pathrule carries the scoped rules and routes them in on every turn.

What Pathrule adds to Cursor

Hook-time injection

Before the first tool call

Pathrule runs at the hook layer Cursor exposes, before the model picks a tool. The scoped slice is delivered every turn.

Path-scoped graph

Rules where they apply

A rule attached to /apps/web only fires when Cursor is acting under that path. .cursorrules stops being a dumping ground.

Reviewable team knowledge

Memories, rules, skills

Three node types, reviewable in the web app. Stale rules surface for cleanup. Conflicting edits resolve through a typed merge flow.

Same content, clear product roles

Studio agents first, Cursor through CLI

Studio's six primary agents and Cursor use the same path-scoped knowledge without making Cursor the product itself.

What the install actually does

Pathrule does not patch Cursor. It registers hooks in your Cursor config that point at a single unobfuscated Node.js script under ~/.pathrule/bin. A session-start hook and a post-tool hook deliver the path-scoped context for the directory you are working in, and the pre-tool hook is where a strict rule blocks a matching edit. You can grep the hook script and your Cursor config yourself. Removing the entries removes Pathrule instantly, and the rest of your Cursor setup is untouched.

.cursorrules vs Pathrule

.cursorrules alonePathrule + Cursor
One file per project. Every turn. Every path.Path-scoped slice for the directory the model is working in.
Editable by anyone with push. No team review trail.Reviewable rules and skills with row-level security and a self-audit.
Token budget grows with team rules.Token cost scales with the relevant slice, not the whole rule set.
Tied to Cursor; other agents need their own files.Same content drives every Studio agent, while Pathrule CLI connects Cursor, Windsurf and GitHub Copilot.
Onboarding = "read the file and hope it is current".Onboarding = "join the workspace; the right rules show up on the right paths".

Long read: Why AI coding assistants need scoped rules.

How Pathrule fits a team running Cursor

  • Authoring. Write memories, rules and skills in the web app, desktop or CLI, and attach each to a path. Or let the assistant capture them in flow: when something is worth keeping it proposes a memory or rule and writes it once you confirm. Nothing is saved without your okay.

  • Review and repair. Pathrule treats rules and skills as reviewable artifacts. The self-audit surfaces stale or conflicting entries as suggestions; your assistant drafts the fix and you approve the change. Pathrule never edits your knowledge on its own.

  • Sharing. Memberships and per-node overrides enforced server-side. Onboarding is one invite, not a 400-line file.

  • Privacy. Source code never leaves your disk through Pathrule. See Security.

Frequently asked questions

What does Pathrule add to Cursor?

A path-scoped knowledge layer that injects team memories, rules and skills into Cursor at hook time. It runs before the first tool call so the model sees only the slice of context that matches the current working directory.

Is Pathrule a .cursorrules alternative?

Pathrule is a layer above .cursorrules. .cursorrules is one flat file per project; Pathrule indexes team knowledge by path and delivers only the relevant subtree on each turn. You can keep .cursorrules for repo-wide constants and let Pathrule carry the scoped rules.

Can my whole team share Cursor rules through Pathrule?

Yes. Pathrule is built for teams. Rules and skills are shared in a path-indexed graph with row-level security. Studio's primary agents use that graph directly, and Cursor receives it through Pathrule CLI.

Why does Cursor ignore my .cursorrules?

Long instruction files lose signal. As a .cursorrules file grows, the rules that matter for the current file increasingly compete with unrelated guidance. Pathrule fixes this by delivering only the rules that apply to the current path, so each instruction the model sees is load-bearing.

How does Pathrule install into Cursor?

Pathrule writes a hook entry into ~/.cursor/hooks.json that points at a single unobfuscated Node.js script under ~/.pathrule/bin. The hook emits JSON. Removing the entry removes Pathrule instantly.

Does Pathrule see my source code?

No. Pathrule never reads, scans or uploads your source files. The cloud stores only the typed memories, rules and skills your team writes. Full breakdown on the Security page.

Get started with Pathrule.