Architecture
A persistent intelligence layer for you, your workspace, and every coding agent you use.
Pathrule learns how your project works and how you work, understands both on your own machine, and compiles what matters into the knowledge an agent needs for the task in front of it. The agent can change. The intelligence stays.
Pathrule Intelligence is the layer between you, your workspace, and the coding agents you run. It turns what a project and a person know into persistent, structured knowledge that an agent can actually use, and it does the understanding on your own device.
It is not a coding model, and it does not replace Claude or Codex. Those are execution and reasoning engines. Pathrule is what they start from.
Every agent starts over
A coding agent is extremely capable and almost entirely new to your work. It reads the code in front of it and reasons well about what it sees. What it cannot see is the decision that was argued out six months ago, the constraint that exists because of an incident, the fix that worked the last three times this broke, or the fact that you have corrected the same behaviour in it four times already.
That knowledge is not missing. It is just somewhere a session cannot reach: in a closed conversation, in a pull request comment, in someone's head. So each session rediscovers, re-asks, or quietly does the reasonable thing that your project decided against a year ago.
Writing it all into one instruction file moves the problem rather than solving it. The file grows, the relevant three sentences compete with two hundred irrelevant ones, and nothing in it knows which of its own paragraphs mattered for the task at hand.
Workspace Intelligence learns the project
Workspace Intelligence is the answer to how does this project work. Not the files, which the agent can already read, but the working knowledge a repository accumulates around them.
Architecture decisions and the reasoning behind them. Constraints that are not visible in the code. Verification that has to happen before something is called done. Fixes that worked when a specific problem appeared. Conventions, procedures, contextual facts, preferred implementations, decisions that superseded earlier ones, and the recurring failures a team has already paid for once.
It stays with the workspace rather than with the session that discovered it, and it is scoped to the path it belongs to, so work in one part of a repository is not weighed down by everything true elsewhere in it.
User Intelligence learns the person behind the work
Workspace Intelligence is only half the picture. Two engineers working in the same repository do not want the same thing from an agent, and the difference is not decoration. It is how much autonomy the agent should take, when it should stop and offer options, how much verification counts as enough, and which trade-off you make when two reasonable designs are available.
User Intelligence is the answer to how do you work. It builds from what you actually do: the instructions you give, the corrections you repeat, the approaches you accept and the ones you send back, the decisions you make in Studio.
It is yours rather than the repository's, so it comes with you when you move to a different project. What your workspace knows changes when you switch repositories. How you work does not.
Two layers, two jobs
| Workspace Intelligence | User Intelligence |
|---|---|
| How does this project work | How does this person work |
| Scoped to a repository and a path | Scoped to you, across repositories |
| Architecture decisions, constraints, verification, fixes, procedures, context | Execution preferences, decision patterns, quality expectations, collaboration style |
| Shared with the team working in it | Yours, and it travels with you |
| Can hold hard requirements: what must not happen, what must be verified | Shapes how the work is done, never what correctness means |
| Changes when you switch projects | Stays the same when you switch projects |
Both are compiled together for one task. Where they disagree, the workspace's hard requirements win. See the authority model.
The understanding happens on your device
Your workspace is understood where it lives. Pathrule Intelligence runs a model on your own machine, installed once and shared by Studio and the CLI, and that is what reads your knowledge and works out what it means.
This is the part that would otherwise require sending your team's decisions, incidents and internal reasoning to someone else's inference service in order to have them understood. It does not. The interpretation, the structuring and the compilation all happen locally.
Pathrule still has cloud services around that: accounts, teams, billing, workspace sync for the knowledge you choose to share, and distribution of the model itself. And when you run Claude, Codex or any other agent, that agent's own provider boundaries apply to what you send it, exactly as they do today. Those are three separate things, and the security page keeps them separate.
Memory is an input, not the output
A memory is a record of something that was true when it was written. That is worth having, and it is where most of this starts. It is not the thing an agent should receive.
Memory is what was recorded. Intelligence is knowing what matters now. Between the two sits a step most memory systems skip: understanding what a written paragraph actually means for the work, in a form that survives being delivered.
So memories, rules, corrections, sessions and runtime evidence are sources. What comes out of them is structured knowledge, and what reaches an agent is the part of that knowledge the task in front of it needs.
Compile context, do not dump it
The common approach is retrieval: find the prose that looks relevant, put it in the prompt, hope the model reads the right sentence. It treats knowledge as text to be located, and it scales by sending more text.
Pathrule's path is different. Narrative knowledge is understood once, at write time, into structured knowledge. For a given task, the relevant part of that structure is selected and compiled into a compact representation, the Agent IR, and that is what the agent receives. Nothing is interpreted at delivery time: compilation is deterministic and makes no model calls.
On narrative memories this is a large difference in what actually arrives. In a live A/B on real tasks the task-scoped Agent IR carried the same knowledge in about 104 to 234 tokens where the prose form took roughly 3,000, a measured 13 to 30 times smaller knowledge payload. That is a claim about the knowledge payload and nothing else; the benchmark page is explicit that it did not reduce an agent's total token usage.
What structured knowledge actually holds
What must never happen.
CONSTRAINT. A forbidden action, in a scope. The only primitive that can deny an alternative outright.What must be checked.
CHECK. A verification that has to happen before the work counts as finished, with an actor: a machine or a person.What worked before.
REMEDY. A condition and the corrective action that resolved it, carrying how strongly the source claimed success.What is preferred here.
SELECTION. A preferred choice under a condition. It states the preference and never denies the alternative.How this should be done.
PROCEDURE. An ordered workflow, steps kept in source order and source wording.What is true here.
CONTEXT. A descriptive fact about the environment that changes how the work should be approached.Why it works this way.
RATIONALE. The reason behind a decision, which is what stops an agent from helpfully undoing it.Which decision wins.
PRECEDENCE. Which piece of valid knowledge outranks another when two of them apply to the same work.
When Pathrule is not sure, it does not pretend
A system that turns prose into structure can lose the part that mattered. A memory that says to use one helper instead of another can compile into a clean atom that names the winner and silently drops the loser, and an agent that receives it learns what to use but not what to avoid.
So compilation is not trusted on its own. Meaning is grounded in the source text, validated, and then put through a completeness gate that compares what would actually be delivered against what the source actually said. The gate is deterministic, has no model in it, and fails closed.
When the compiled form represents the source well enough, the agent gets it. When it does not, the delivery falls back to the source knowledge instead. Producing something confident and incomplete is the failure mode worth avoiding, and the gate exists to choose the honest option rather than the impressive one.
Some knowledge should not be a suggestion
Understanding what a sentence means is a job for a model. Making sure a forbidden action does not happen is not.
Pathrule separates the two. Semantic work happens once, locally, at write time. Enforcement is deterministic and runs in the runtime, where a CONSTRAINT can intervene when an agent is about to do the thing your project has decided it must not do, and a CHECK can require that a verification actually happened before work is treated as finished.
This is the line between a memory product and a runtime. A paragraph in a prompt is advice that a model may or may not weigh correctly on turn forty. A constraint that the runtime holds is not depending on that.
The agent can change. The intelligence stays.
Claude today, Codex tomorrow, something else next year. Each of them is an execution and reasoning engine, and each is genuinely good at that job.
None of them is where your project's knowledge should live. A memory feature inside one agent is knowledge held hostage to that agent: switch, and it stays behind. Everything Workspace Intelligence and User Intelligence have accumulated lives in Pathrule, so switching agents changes who does the work, not what is known about it.
Studio runs Claude Code, Codex, Grok, Kimi, Antigravity and OpenCode on the same workspace. Cursor, Windsurf and GitHub Copilot connect through Pathrule CLI. They all start from the same compiled knowledge.
Studio is where you talk to it
Everything above can run behind the agents you already use, and most of the time it does. Pathrule Studio is where you work with the intelligence directly.
Ask why a constraint exists and get the decision and the incident behind it, not a guess from the code. Ask what the workspace has learned about authentication. Tell it to prepare a refactor without starting it. Teach it something you would rather not correct again. Look at what it has concluded about how you work, and change it.
It is not a chat window with a model behind it. The thing answering has the workspace knowledge, your User Intelligence, the knowledge graph, the task board, runtime signals and the record of what actually happened on previous runs.
What changes in the work
The measurable claim is about compliance rather than speed. In a 12-task, 24-run grid on identical repositories with the same prompts, an agent working alone finished every task correctly and followed the project's own conventions on 3 of 12, with 8 violations. The same agent with Pathrule finished every task correctly and followed the conventions on 12 of 12, with none.
The reading matters more than the numbers. Claude could complete the tasks either way. What changed was whether it completed them according to what the workspace already knew. That is the whole proposition: the knowledge existed, and the difference is whether it reached the work.
Read further
Frequently asked questions
What is Pathrule Intelligence?
The layer that understands what your workspace and you know and compiles it into knowledge a coding agent can use for a specific task. The inference runs on your own device. It is not a coding model and it does not write your code.
Is Pathrule another coding model?
No. Pathrule does not generate your application code. The local model exists to understand knowledge, not to write software. Claude, Codex and the other agents remain the execution and reasoning engines.
Does Pathrule run AI locally?
Yes. Pathrule Intelligence inference runs on your machine, from a model installed once and shared by Studio and Pathrule CLI. See the local model docs.
What happens when my preferences conflict with a project rule?
The workspace wins where correctness is at stake. A CONSTRAINT or a CHECK is a hard requirement of the project and is not dropped because a user preference would be more convenient. User Intelligence shapes how the work is done, not what counts as correct.
Does User Intelligence work across repositories?
Yes. It is scoped to you rather than to a workspace, so it comes with you when you move to another project. Workspace Intelligence is what changes when the repository does.
Can I correct what Pathrule has learned about me?
Yes. Everything User Intelligence holds is inspectable in Studio with the evidence behind it, and you can correct it, teach it directly, override it for a piece of work, or remove it.
What happens when Pathrule is not sure?
It falls back. A deterministic completeness gate compares what would be delivered against what the source actually said, and when the compiled form does not represent it well enough, the source knowledge is delivered instead.
Does this reduce my token usage?
It reduces the knowledge payload. The compiled, task-scoped form of a narrative memory measured 13 to 30 times smaller than its prose form. That same measurement found it did not reduce an agent's total token usage, and Pathrule does not claim that it does.