Skip to content
Pathrule

docs

Introduction

What Pathrule is, what it learns about a project, a developer and a team, and how scoped knowledge reaches Claude Code, Codex, Cursor, GitHub Copilot and Windsurf.

On this page

Pathrule is the intelligence layer for your coding agents.

It keeps what a project, a developer and a team have learned, scopes that knowledge to paths in the code, and delivers what each task needs to the coding agent you already use. Project Intelligence holds how one codebase works: the decisions, constraints, verification requirements, fixes and procedures a repository accumulates around its code. User Intelligence holds how you prefer to work, stored on your machine. Team Intelligence, on Pathrule Cloud, analyses team evidence into patterns that reach agents only after a person verifies them.

Pathrule is not a coding model, an IDE or an agent runtime. Claude Code, Codex, Cursor, GitHub Copilot, Windsurf and other MCP compatible clients stay the execution engines, each with its own model provider. Pathrule is what they start from, which is why switching agents does not reset what is known about the work.

For the whole architecture in one place, read the architecture overview.

What you write, and what Pathrule makes of it

Three kinds of content your team writes intentionally. These are inputs, and the authoring surface: they are what a person edits and argues about, not what an agent receives.

  • Memory: a short markdown note that captures a decision, a schema gotcha, a postmortem, or a convention. Attached to a workspace path so it only surfaces when work happens nearby.
  • Rule: a constraint the assistant must follow when working in a scope. Rules carry a priority (high, medium, low) that ranks how strongly they surface. A rule rides along as context; a rule whose executable constraint a person has approved can also block a matching edit in clients whose hooks support it.
  • Skill: a named procedure the assistant can invoke instead of re deriving the steps. Useful for recurring jobs like replaying a webhook, regenerating a fixture, or running a release checklist.

What Pathrule does not do: scan or upload your source code automatically. What it does read from a checkout is narrow and named. On a cloud workspace, the first time an agent asks for deep context, the local runtime reads file paths from recent git history to learn which files change together, and file names near the top of the folder tree to recognise the technologies in use. The file path pairs and a few short technology memories are saved to the workspace, written without asking; contents, diffs and commit messages are not read for it. In Cloud mode the start of each prompt is sent to rank knowledge. What Pathrule computes lists exactly what is read and what is kept.

What an agent receives is narrower than these documents. For a given task, Pathrule selects the entries that apply to the path and the request, ranks them and fits them within a per-prompt budget; what does not fit is listed by title so the agent can fetch it deliberately. A rule arrives as a requirement and a remembered fix arrives as advice, rather than as two paragraphs of equal weight. Agent IR describes what that delivered package contains.

And what it derives

Those three are what your team writes. They are the smaller half of what the layer holds.

Around them sits a derived layer that nobody types. Every entry also exists as a computed representation of its meaning, which is how a Turkish prompt finds an English memory that shares no words with it. Every delivery is measured: which entries were sent, which the assistant actually consulted, how many tool calls the turn took and how many failed. Those measurements accumulate into a picture of what helps for each kind of work, a graph of the files your team changes together, a map of where an assistant keeps getting stuck, and judgements about which entries the code has moved past.

All of it comes from what your team wrote down and what the work reported about itself, plus, on a cloud workspace, file paths from recent git history that seed which files change together before your team has logged much work. None of it comes from reading the contents of your files. It is also the reason the same three files sitting in a directory do not behave the same way: a directory does not know what was delivered, what helped, or which files move together. See what Pathrule computes.

One intelligence, every way in

The same knowledge is reachable from every surface:

  • CLI: installation, Cloud or Local setup, connecting your coding agents, reading and adding knowledge from the terminal, scripting and automation.
  • VS Code extension: browse and edit knowledge beside your files, register MCP for GitHub Copilot agent mode, and connect other clients.
  • Local MCP server: workspace tools for every supported client, installed with the CLI or the VS Code extension.
  • Remote MCP: a hosted MCP endpoint for clients that connect over Streamable HTTP with your Pathrule account.
  • Pathrule Cloud: accounts, organizations, workspaces, managed persistence and history, Team Intelligence, Remote MCP and billing.
  • Enterprise self-hosted: Pathrule Cloud in your own Cloudflare account, through Sales.

Agent independence does not mean every agent is reached the same way. Claude Code and Codex get hooks that deliver context when a prompt is submitted. Cursor, GitHub Copilot and Windsurf get Pathrule's MCP entry and receive knowledge when they call its tools. The MCP overview has the details for each client.

How a session feels

  1. Your team writes a memory at a workspace path, for example /apps/api/payments.
  2. You open Claude Code in ~/repos/main/apps/api/payments.
  3. When you submit a prompt, the Pathrule hook reads the cached slice for that path and hands it to the agent before its first tool call.
  4. The assistant sees the memory, the relevant rules, and any skills attached to that scope, and behaves like it already knew them.

There is no extra prompt to write, no extra MCP round trip mid task, and no global file that grows forever. Clients without Pathrule hooks receive knowledge through MCP, as their guide describes.

  • Architecture overview is the whole system in one page and the vocabulary the rest of these docs depends on.
  • Quickstart walks through installing the CLI, connecting a workspace, writing your first memory, and watching the hook fire.
  • Core concepts explains the difference between memories, rules, and skills, plus how path scope and priority work.
  • Pathrule for VS Code covers working with knowledge in the editor.
  • MCP overview covers the MCP tools the assistant uses to read and write content.