Pathrule
Intelligence

Architecture overview

How Pathrule turns workspace and user knowledge into task-specific guidance for coding agents, from observation through local understanding, compilation, enforcement and learning.


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 half of what Pathrule learns is about how you prefer to work, not about the code. Between your workspace and your agents, because the other half is what one repository has learned about itself. A layer, because it is not inside any agent: switching from Claude to Codex changes who executes, not what is known.

What Pathrule is not: a coding model. It does not write your application code. The model it runs on your machine exists to understand knowledge, not to produce software.

The shape of the system

                    YOU
                     |
                     v
             USER INTELLIGENCE
                     |
WORKSPACE  -->  WORKSPACE INTELLIGENCE
                     |
                     v
              TASK INTELLIGENCE
                     |
                     v
                  AGENT IR
                     |
                     v
          Claude / Codex / agents

Two sources of learning converge. For a given piece of work, the part of both that matters is selected and compiled into one compact representation, and that representation is what an agent receives.

Above all of it sits the surface where a person joins in:

               PATHRULE STUDIO
                     |
        ask / teach / inspect / direct
                     |
                     v
              Pathrule itself

The six layers

LayerWhat it does
Pathrule IntelligenceUnderstands knowledge and compiles it, with inference running on your device.
Workspace IntelligenceLearns how one project works.
User IntelligenceLearns how you prefer to work, across projects.
Pathrule RuntimeDelivers compiled knowledge, enforces constraints and checks, records what happened.
Pathrule StudioThe interface where you talk to, inspect and direct the intelligence.
Pathrule CLIThe same intelligence and runtime, in a terminal or a headless pipeline.

The lifecycle

Six stages, and every one of them is a real step in the product rather than a diagram.

Observe. Instructions, corrections, decisions, agent sessions, failures and the fixes that resolved them are all evidence. Each carries where it came from.

Understand. The local model reads narrative knowledge and works out what it means operationally: what is forbidden, what must be verified, what is preferred under which condition, what is merely true and useful.

Compile. Meaning becomes typed, structured knowledge, and for one task the relevant part of that structure becomes an Agent IR. The expensive interpretation happens once, at write time, not on every prompt.

Enforce. Constraints and checks are handled by the runtime. A rule that must not be broken is not delivered as a paragraph and hoped for.

Verify. What was delivered, what the agent actually consulted, how many tool calls the turn took and how many failed are recorded, which makes the effect of a piece of knowledge a measurement rather than an impression.

Learn. Evidence accumulates. Repeated corrections strengthen a working preference; a remedy that keeps applying earns its standing; knowledge the code has moved past loses ground.

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 the structured representation of what that record means, with the evidence that supports it.
  • Intelligence is the system that decides what that knowledge means and when it matters.
  • Context is the answer for one task: what matters, here, now.
  • Agent IR is the compiled representation an agent actually receives.
  • Runtime is the layer that delivers, enforces, verifies and observes.

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

Where to go next