Compilation
How Pathrule compiles a workspace's knowledge into the instruction files each coding agent already reads, at the paths it governs, when that happens, and why the compiled files carry your team's own words.
Compilation prepares workspace knowledge for the files and hooks of Claude Code, and of Codex when the repository has Codex files. The result is a view of the knowledge, not a second place to author it.
Hooks and instruction files
With a Pathrule hook installed, the session-start hook supplies the protocol and team context, and path knowledge arrives through the prompt and tool hooks. Claude Code also gets its knowledge as path-scoped rule files in .claude/rules/pathrule/, which it loads when work enters an area, and Codex's AGENTS.md keeps a short managed note. Pathrule removes older managed protocol copies and knowledge files that this delivery replaces.
Without an installed hook, Pathrule writes the fuller protocol and path-scoped knowledge files in the client's native format. Cursor, GitHub Copilot and Windsurf get no compiled files: they request knowledge through Pathrule's MCP tools.
| Client | Prepared delivery |
|---|---|
| Claude Code | Local hook index and path-scoped rule files in .claude/rules/pathrule/; fuller instruction files when no hook is installed |
| Codex, in a repository with Codex files | Local hook index and a short managed note in AGENTS.md; fuller instruction files when no hook is installed |
| Cursor, GitHub Copilot, Windsurf | No local files; the client requests knowledge through the local MCP server |
| Remote MCP | No local compilation or files; the client requests Cloud knowledge through tools |
The exact paths are listed in the client guides.
Source and compiled guidance
An approved compiled entry can replace longer source prose only while the runtime can establish that it remains grounded in the source and its scope. If that check fails, Pathrule delivers source text instead. Rules keep their authority, findings remain advice and explicit reads return the authored body.
This is different from asking a model to rewrite the whole workspace into a summary. The knowledge remains inspectable, and uncertain compilation does not become a new requirement. See Knowledge IR and Safety and fallback.
When it runs
pathrule setup prepares the integration when a workspace is connected. pathrule sync refreshes managed files and local indexes from current workspace knowledge and cleans up managed files that no longer apply.
Edit entries in Local Console, VS Code or MCP; Cloud workspaces also support CLI authoring. Text inside a Pathrule managed region is regenerated, while text outside it remains yours.
Per-task delivery
Compilation cannot know the next prompt. Claude Code and Codex prompt hooks select task context; Cursor, Windsurf and GitHub Copilot ask Pathrule's MCP server for it. A direct pathrule_get_context call requests the deeper knowledge path.
See Agent IR for what reaches one task and How hooks work for client coverage.