Skip to content

Commit d6b82c4

Browse files
committed
feat: recognize ::pathrule:package pattern imports
Distinguish pattern-import directives from ::skill-name invocations so the agent imports the bundle instead of running skill discovery. Signed-off-by: Sertan Helvacı <sertanhelvaci@icloud.com>
1 parent 6d1bd4c commit d6b82c4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/shared/src/pathrule-protocol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const PATHRULE_PROTOCOL: PathruleProtocol = {
3636
before: [
3737
"Pathrule is the first knowledge layer for this workspace. Hooks auto-inject path-scoped memory/rule titles + session digest on every tool call and user prompt (M12). Trust that context before falling back to files, git, or general knowledge.",
3838
"`::skill-name` is a hard gate: use the exact injected skill; if missing, stop and resolve it through Pathrule/MCP before file edits.",
39+
"`::pathrule:package:<slug>` is a PATTERN import, NOT a skill. When the user pastes one, call pathrule_import_pattern(workspace_id, slug) — the bare <slug> after `package:` — to add that bundle (memories + rules + skills) to the workspace, then relay the returned human_message. Never run the find-skills protocol for it. Works the same in the cloud and local editions.",
3940
"Do NOT reflexively call pathrule_get_context before every small known-path code task. DO call pathrule_get_context(cwd, user_intent, omit_protocol: true) before any grep/read/fallback when hook context is missing, ambiguous, stale, or the user asks for discovery, inventory, architecture, recent activity, or list/show/find/where/which style questions (including Turkish: listele, göster, bul, nerede, hangi, neler).",
4041
"Hook silence on a topic does not mean Pathrule has no relevant memory/rule. For discovery/inventory/architecture questions, call pathrule_get_context first; fall back to files, git, or general knowledge only after Pathrule returns nothing relevant. It's a single unified tool (M13): the router classifies intent and returns a depth-appropriate response - minimal for ui_tweak/new_feature on a known path, focused for bug_fix/refactor, deep for debug/discovery.",
4142
"For discovery/inventory questions, treat `subtree_memory_index`, `discovery_signal`, and `semantic_candidates` as Pathrule evidence before filesystem fallback. Semantic candidates are not answers or rules: call pathrule_read_memory(id) and inspect the body before citing or following one.",

0 commit comments

Comments
 (0)