Pathrule
Pathrule injects team memories, rules, and skills into Claude Code, Cursor, Codex, and Windsurf before the first tool call for consistent repo guidance.
What is Pathrule?
Pathrule is a context-routing system for coding assistants. It stores team memories, rules, and skills in a path-indexed knowledge graph that mirrors a repository tree, then injects the relevant slice of context into tools such as Claude Code, Cursor, Codex, and Windsurf before the first tool call.
The product is designed to reduce the need for repeated repo reading and ad hoc prompting across sessions. It combines a cloud workspace, local desktop and CLI runtimes, and an MCP server so teams can keep one shared knowledge layer across browser, desktop, terminal, and remote AI clients.
Key Features
- Path-indexed knowledge graph: memories, rules, and skills are attached to nodes in a workspace tree that mirrors the repo, so context can be retrieved by path proximity rather than manual tagging.
- Typed knowledge objects: memories store facts, rules store constraints with priority and enforcement mode, and skills store named procedures the assistant can invoke.
- Hook-time context injection: Pathrule uses PreToolUse and UserPromptSubmit hooks to push context before the first tool call, which helps the assistant start with the right information instead of rediscovering it.
- Multi-assistant MCP surface: one MCP server exposes the same tool surface to Claude Code, Cursor, Codex, and Windsurf over stdio, reducing configuration drift between clients.
- Shape-aware routing: the router classifies prompts by intent, such as UI tweak, bug fix, refactor, or discovery, and adjusts response depth based on the request.
- Local and remote deployment options: Pathrule ships as Web, Desktop, and CLI, with a Remote MCP option for cloud-only clients that cannot run a local runtime.
How to Use Pathrule?
A typical setup starts by creating or connecting a workspace, then attaching a repository tree so Pathrule can index it against paths. Teams add memories, rules, and skills at the appropriate nodes, choosing strict or advisory behavior for rules when needed.
From there, users run Pathrule in the browser, desktop app, or CLI, or connect a coding assistant through the MCP server. The system then routes relevant context into the session before tool calls, and the CLI can also install clients, sync companion files, run checks, and act as a local bridge for the web app.
Use Cases
- Team knowledge sharing in coding assistants: keep schema notes, implementation decisions, and recurring constraints available to agents without re-explaining them in each session.
- Path-specific guidance in a monorepo: attach rules and memories to folders so narrower paths can override broader workspace guidance when a team works in different parts of the repo.
- Enforcing important constraints: use strict rules to block changes that would violate a required pattern, policy, or repo-specific convention.
- Standardizing assistant behavior across tools: give Claude Code, Cursor, Codex, and Windsurf the same underlying context and tool surface so different editors follow the same team knowledge.
- Terminal and CI workflows: use the CLI for headless operations, JSON output, SSH device-code login, repo attachment, and scripted setup or repair tasks.
FAQ
Does Pathrule work only in the browser? No. The product is available as a web app, a macOS desktop app, and a CLI for macOS, Linux, and Windows. It also offers a Remote MCP endpoint for cloud-only clients.
Can Pathrule run without a local install? Yes, for cloud-only AI clients the source describes a hosted Remote MCP endpoint. For Pathrule Web, local actions such as repo access and hook sync can pair with the CLI runtime on your machine.
Which coding assistants are supported? The source explicitly names Claude Code, Cursor, Codex, and Windsurf.
What kinds of context can teams store? Pathrule organizes team memories, rules, and skills. Rules can be advisory or strict, and skills are named procedures the assistant can invoke.
Alternatives
- Manual prompt files or repo notes: these can store team guidance, but they do not provide path-scoped retrieval, hook-based injection, or a shared MCP surface.
- General knowledge bases or wiki tools: these are useful for documentation, but they are not built to route context directly into coding assistants before tool calls.
- Prompt management or agent framework tools: these may help structure prompts or workflows, but Pathrule is positioned around repository-aware retrieval, enforcement, and injection.
- Native assistant memory features: some coding assistants may retain limited context, but Pathrule centralizes knowledge across multiple clients and surfaces rather than keeping it inside one product.
Alternatives
garden-md
Turn meeting transcripts into a structured, linked company wiki with local markdown and an HTML browser view. Sync from supported sources.
Devin
Devin is an AI coding agent that helps software teams complete code migrations and large refactoring by running subtasks in parallel.
imgcook
imgcook is an intelligent tool that converts design mockups into high-quality, production-ready code with a single click.
Lasso
Lasso is an AI-first PIM for ecommerce teams that enriches product attributes and descriptions, processes supplier data, and monitors competitors via app or API.
Biji
Biji is a versatile platform designed to enhance productivity through innovative tools and features.
Struere
Struere is an AI-native operational system that replaces spreadsheet workflows with structured software—dashboards, alerts, and automations.