Surfaces

Pathrule for VS Code

The Pathrule extension for VS Code, Cursor and Windsurf. A full client with a knowledge tree, markdown-tab editing and one-command agent setup, in local or cloud mode.


Pathrule for VS Code is a native editor surface. It brings the workspace knowledge tree, content editing, and AI client setup inside the editor, so the folder you have open is the workspace and the file you are editing is the path. It is the right surface if you live in VS Code, Cursor, or Windsurf and would rather not install a separate app.

It is a full client, not a viewer. The same content, the same hooks, and the same AI client integrations as the other surfaces, driven from the editor you already use.

Install

Install it from the Visual Studio Marketplace, or from Open VSX so Cursor and Windsurf can install it too. From the editor, open the Quick Open prompt and run:

ext install Pathrule.pathrule-vscode

It is free, and local mode needs no account, so you can start the moment it installs.

What the extension owns

  • Knowledge tree. A sidebar that shows only the paths carrying knowledge, repo-shaped, with memories, rules, and skills grouped under each path. Content counts appear as badges on tree rows and on the matching files and folders in the built-in explorer.
  • Active-file sync. As you move between files the tree follows the editor to the deepest path that covers the current file, and the status bar shows that path with its content counts.
  • Content editing. Memories, rules, and skills open as ordinary markdown editor tabs. Saving persists through Pathrule, with full editor tooling for free.
  • Agent setup. One command connects your AI clients and injects the path-scoped hooks, the same setup the CLI performs.
  • Onboarding. Open a folder with no workspace yet and the extension walks you from set up to a bound workspace without leaving the editor.
  • Doctor. A single command that checks each client is connected, the hooks are present, and the context server is reachable.

Local mode and cloud mode

The extension runs in two modes behind one user interface, the same split as the CLI and the open source core.

  • Local mode needs no account. Initialize a folder locally and your memories, rules, and skills live on your machine. It is the fastest way to start, with the open core engine doing the routing.
  • Cloud mode signs you in and adds the team layer: shared knowledge, live activity across teammates, and the managed backend.

The mode is a property of the open folder, not a guess. A signed-in user whose folder is not yet a cloud workspace is offered both creating one in the current organization and initializing locally. Cloud-only actions are hidden, not broken, when a folder is in local mode, so the same extension serves both.

Editing as markdown tabs

Open a memory, rule, or skill from the tree and it opens as a normal markdown tab. Edit it like any file and save to persist the change. If a teammate changed the same item while you had it open, the save does not silently overwrite their work: you are offered to reload, keep a copy of your version, or overwrite with your own. Conflicts surface as a decision, never as lost edits.

From the explorer, right-click any file or folder for a Pathrule submenu: browse the knowledge that applies there, or create a new memory, rule, or skill scoped to that path. From a tree item you can copy it as a prompt pointer, view its details, rename, move it to another path, or delete it with an undo. Multi-select supports bulk move and delete, and a fuzzy search spans every title across the workspace.

Identity shared with the CLI

Signing in from the extension uses the same hosted login as the CLI, with your choice of GitHub, Google, or email. The session is shared: signing in here signs the CLI in too, and switching organization in one switches it in the other. One identity across the extension, the CLI, and your AI assistant.

Connect your AI clients

A single Connect AI clients command wires your assistant to Pathrule with no JSON editing.

  • Copilot agent mode is registered automatically for the bound folder.
  • Claude Code, Cursor, Codex, and Windsurf receive managed entries, pointing at the context server the extension ships with.
  • Hooks are injected through the same pipeline the CLI uses, and the result notification lists exactly what was written.

After this, your assistant sees the Pathrule context section for the current path before its first tool call. Run the doctor command at any time to confirm each client is connected and the hooks are fresh.

Working with your team

In cloud mode the tree refreshes live as teammates edit, so shared knowledge stays current without a manual reload. Organization-level work stays on the web: team management, plans and billing, and the cross-workspace overview are reached through deep links rather than reimplemented in the editor.

If you started in local mode and want to bring a folder to your team, a single action signs you in, picks an organization, and copies the workspace and its content to the cloud, keeping your local copy as a fallback.

When to use Pathrule for VS Code

Use the extension when you work primarily in VS Code, Cursor, or Windsurf and want the workspace knowledge tree, content editing, and agent setup in the editor that already knows your open folder and active file. It is the no-install path: start in local mode in seconds, and sign in later when you want the team layer.

If you want a standalone visual app on macOS, prefer Pathrule Desktop. If you live in the terminal or script Pathrule into CI, prefer Pathrule CLI.

  • Pathrule CLI for the terminal first runtime that shares the same identity and hooks.
  • Open source core for what local mode runs and what Cloud adds.
  • How hooks work for what the extension hands to your assistant.