Skip to content
Pathrule

docs

Architecture overview

How Pathrule turns what a project, a developer and a team have learned into scoped guidance for the coding agents you already use, and where people stay in control of what agents are told.

On this page

Pathrule is the intelligence layer between you, your workspace, and the coding agents you run.

That sentence is doing specific work, so it is worth unpacking one clause at a time. Between you and your agents, because part of what Pathrule keeps is how you prefer to work, not facts about the code. Between your workspace and your agents, because the rest is what one repository, and the team around it, has learned about itself. A layer, because it is not inside any agent: switching from Claude Code to Codex changes who executes, not what is known.

What Pathrule is not: a coding model, an IDE or an agent runtime. It does not write your application code, and your coding agent keeps its own model provider.

The shape of the system

        YOU                        YOUR TEAM
         |                             |
         v                             v
 USER INTELLIGENCE   WORKSPACE INTELLIGENCE   TEAM INTELLIGENCE
  (your machine)     (memories, rules,        (Pathrule Cloud,
                      skills, findings)        human-verified)
         \                   |                    /
          \                  v                   /
           +-------->  TASK-SCOPED DELIVERY  <--+
                             |
                             v
        Claude Code / Codex / Cursor / Copilot / Windsurf

Several sources of knowledge converge. For a given piece of work, the part that matters for that path and that prompt is selected, ranked and delivered to the agent through the mechanism its client supports.

Foundation and clients

LayerWhat it does
Workspace IntelligencePath-scoped memories, rules and skills for one codebase: architecture, decisions, conventions, procedures.
User IntelligenceHow you prefer to work, stored on your machine and managed with pathrule me.
Team IntelligenceOn Pathrule Cloud, patterns drawn from team evidence that reach agents only after a person verifies them.
DeliveryResolves the path, selects and ranks what applies, and hands it to the agent through hooks, instruction files and MCP.
Pathrule CLIInstallation, Cloud or Local setup, knowledge in the terminal, and the local MCP server.
VS Code extensionBrowse and edit knowledge in the editor, connect clients, and register MCP for Copilot agent mode.
Remote MCPA hosted MCP endpoint for clients that connect over Streamable HTTP with a Pathrule account.
Pathrule CloudAccounts, organizations, workspaces, managed persistence and history, Team Intelligence and billing.

The CLI, the VS Code extension and the local MCP server are the surfaces you install. Pathrule CLI, Pathrule for VS Code and Remote MCP describe each one.

The lifecycle

Six stages. Each one is something you can observe in the product, not a diagram.

Observe. Work produces evidence: the memories, rules and skills people and agents write, the findings agents record about the code, the activity agents log, and what was delivered to which session.

Understand. Pathrule's Intelligence Engine works out what that evidence means for future work. On Pathrule Cloud, Team Intelligence analyses team evidence into suggested patterns. On an Apple Silicon Mac, the optional local model turns what you teach about how you work into a structured preference grounded in your own words. Anything inferred stays a suggestion until a person approves it.

Compile. Knowledge is rendered into the files each agent already reads, such as CLAUDE.md or AGENTS.md at the paths it governs, and into a local index the hooks read. See compilation.

Deliver and enforce. For each task, the knowledge that applies to the path and the prompt is selected, ranked and delivered within a per-prompt budget, with anything that does not fit listed by title. A rule can carry an executable constraint; once a person has approved it, the pre-tool hook can block a matching edit in clients whose hooks support that. A written requirement alone does not create a blocking check.

Verify. Pathrule records what it delivered and which entries the agent then went on to read, so the effect of a piece of knowledge can be measured rather than assumed.

Learn. What agents actually used informs what is brought forward next time. Stale knowledge can be flagged for a refresh. On Cloud, team patterns move from draft to suggested to verified, or are rejected or expire, and only verified ones reach agents.

Words that are not synonyms

The rest of these docs depends on keeping these apart.

  • Memory is what was recorded. A note about a decision, written at a moment in time.
  • Knowledge is what that record means for future work, with the evidence that supports it.
  • Intelligence is the system that decides what knowledge matters and when.
  • Context is the answer for one task: what matters, here, now.
  • Finding is a conclusion an agent recorded about the code. It is advice, checked against the code on every delivery, and never becomes a rule on its own.
  • Suggestion is something Pathrule or an agent inferred that a person has not approved. It is not trusted.
  • Verified knowledge is something a person approved.
  • Rule is a constraint a person set for a scope. Its executable form is enforced only after a person approves it.
  • Delivery is what actually reaches the agent for one task. Agent IR describes it.

A memory is an input. Context is an output. Neither is the product.

Where to go next

The open package boundary

The Pathrule CLI is open source under Apache-2.0 and published on npm as @pathrule/cli. The public repositories under github.com/pathrule include the CLI, core, patterns and benchmarks under Apache-2.0, and the earlier MCP server under MIT.

Pathrule Cloud and the Intelligence Engine, which covers extraction, learning, evaluation, selection and prioritisation and the model-assisted features, are proprietary. These docs describe what they do for you, not how they are built.

See Open source core for the details.