Pathrule
io.pathrulePublished by pathrule.ioOfficial publisherv1.0.6Updated Oct 26, 2026
Path-scoped project memories, rules and skills for coding agents, on your machine or Pathrule Cloud.
The publisher's own server: Pathrule
Overview
Pathrule stores path-scoped memories, rules and skills for coding agents and serves each agent only the notes relevant to the code it is about to touch.
- What you can do
- Retrieve project knowledge scoped to a path, so an agent gets the memories, rules and skills filed for the files it is working on
- Fetch context on demand through the get_context MCP tool, at the depth a request needs
- Capture decisions, gotchas and lessons from failing commands as short markdown notes filed next to the code they concern
- Keep enforced rules ahead of advice and list whatever does not fit the per-prompt budget by title
- Share the same knowledge across Claude Code, Codex, Cursor, GitHub Copilot, Windsurf and other MCP clients
- When to use it
- Useful when you keep repeating the same corrections to coding agents across sessions and tools, or when a CLAUDE.md or AGENTS.md file has grown large and is read in full on every step. It suits teams that want project conventions delivered per path rather than in one global file.
- Requirements
- Either the remote endpoint at cloud.pathrule.io with OAuth sign-in, or the local npm package @pathrule/mcp run through npx; the CLI setup path needs Node.js 22.14.0 or newer on macOS, Linux or Windows. Local mode needs no account, network or model. Cloud workspaces are opt-in and paid from AI Credits.
Installation
In SourceWeft
- Open Pathrule in the dashboard and add it to a workspace.
- Connect the required credentials. They are stored privately and never shown on public pages.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.pathrule%2Fpathrule/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.
{
"mcpServers": {
"pathrule": {
"type": "http",
"url": "https://cloud.pathrule.io/mcp"
}
}
}README
English · Español · Français · Deutsch · 日本語 · Italiano · Türkçe · Português (Brasil)
Your AI forgets. Pathrule remembers.
The open-source knowledge layer for coding agents. Pathrule keeps what your project has learned as memories, rules and skills scoped to paths in your code, and gives Claude Code, Codex, Cursor, GitHub Copilot and Windsurf only what the task in front of them needs, before they act.
[npm] [License: Apache-2.0] [PathruleBench: Python · Go · TypeScript] [CI] [VS Code Marketplace] [Open VSX]
PathruleBench, 2,000 items: 55% lower cost a chain · 2.7× fewer input tokens · 97% of memory probes passed · the numbers
Website · Docs · Quickstart · Benchmarks · Smarter over time · Changelog
Same request, same agent. On the right, Pathrule's hook hands over the three notes filed for apps/web/dashboard before the agent writes a line.
Works with Claude Code · Codex · Cursor · GitHub Copilot · Windsurf · any MCP client
Quickstart
Node.js 22.14.0 or newer, on macOS, Linux or Windows.
Restart your agent. From the next session on, it gets the notes for the path it is about to touch, and writes new ones as it works.
Explain it once
Coding agents start every session blank. So the same correction comes back, day after day, agent after agent:
Five sessions, three agents, nothing remembered. With Pathrule you say it once:
- You fix it once, the way you normally would.
- Pathrule files it next to the code it is about: a memory on
features/, not a line in a file every session has to read. - Every agent knows from the next session on, whichever one you open.
Only what matters
A workspace collects hundreds of notes. An agent editing features/orders needs four of them.
Knowledge is matched by path, scope and relevance, then fit to a per-prompt budget. Enforced rules are never cut for space. Whatever does not fit is listed by title, so the agent can ask for it. When a prompt names a function or a type, the hook also points the agent to the file and line where it is defined (JS/TS, Python, Go).
Three kinds of knowledge
Three ways in
Why not just CLAUDE.md?
[PathruleBench: Python · Go · TypeScript]
A CLAUDE.md file is read whole on every step, so every note your team adds makes every session cost more. Pathrule sends each prompt only what the path and the task need. PathruleBench measured the difference with the same agent, the same prompts and the same hidden checks, from 500 to 2,000 items of team knowledge.
[Cost and input tokens a chain: CLAUDE.md climbs as knowledge grows, Pathrule stays flat]
From 500 to 2,000 items, a chain with CLAUDE.md costs 89–98% more. With Pathrule it moves between −1% and +10%. Your knowledge base can grow; the bill does not.
Claude Code with claude-sonnet-5-5 in Python, Go and TypeScript; nine chains an arm at 2,000 items (three per language); executable tests decide every pass, no model judges. The Pathrule arm is this repository's open-source CLI in local mode: no Cloud, no model.
Every condition, chain and check, and how to run it yourself → pathrule/benchmark
Smarter the longer you use it.
Day one needs no account, no network and no model. Everything after builds on what you and your agents already did in this repository.
[Smarter the longer you use it.]
No model runs on your machine. Everything before Team is the open-source CLI, the same path the benchmark above measured.
Switch agents. Keep the knowledge.
[Switch agents. Keep the knowledge.]
Not another rules file
Keep your CLAUDE.md and AGENTS.md: Pathrule does not edit them. It delivers the rest per path and per task, where a single file cannot.
What's in this repository
This is Pathrule's open-source foundation. It runs with no account and no network service: the store, retrieval and ranking, the MCP server, the hooks, the learning loop and the CLI.
The 11 packages
protocol · agent-ir · core · integrations · mcp · host · ui · local-console · cloud · cli · vscode
Your code stays yours
- Source code is never uploaded automatically.
- Local mode has no account, runs no model, and the open CLI sends no telemetry.
- Your agent keeps its own model provider. Pathrule is not a model, an agent or an IDE.
- Pathrule Cloud is opt-in. Signed in, it stores your knowledge and uses the prompt to rank it, and its model tier may read a prompt to find a decision meant to last.
Community
[Star history]Contributors
[Contributors]Contributing (DCO sign-off) · Code of conduct · Report a vulnerability · Get help · Trademark policy
License
Apache-2.0. See LICENSE and NOTICE. The Pathrule name and logo are not licensed under Apache-2.0.
Source: README.md at commit 37dec9b
Tools
0Version history
1- v1.0.6LatestOct 19, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
