@pimzino/sgrep 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -69,11 +69,32 @@ async function main() {
|
|
|
69
69
|
const source = payload.source || "unknown";
|
|
70
70
|
debugLog(`Session source: ${source}`);
|
|
71
71
|
|
|
72
|
-
// Output the sgrep awareness context
|
|
72
|
+
// Output the sgrep awareness context with XML structure for better model compliance
|
|
73
|
+
const sgrepInstruction = `
|
|
74
|
+
<sgrep-skill-instruction>
|
|
75
|
+
<priority>CRITICAL - Execute before other codebase exploration tools</priority>
|
|
76
|
+
<action>INVOKE the /sgrep skill using the Skill tool at the START of every session</action>
|
|
77
|
+
<requirement>
|
|
78
|
+
You MUST use sgrep as your PRIMARY tool for codebase exploration and understanding.
|
|
79
|
+
Before using Grep, Glob, Read, or Task(Explore), you MUST first try sgrep.
|
|
80
|
+
</requirement>
|
|
81
|
+
<commands>
|
|
82
|
+
<command name="search">sgrep "natural language query" - Find code by meaning/functionality</command>
|
|
83
|
+
<command name="ask">sgrep ask "question" - Get explanations about the codebase</command>
|
|
84
|
+
</commands>
|
|
85
|
+
<use-cases>
|
|
86
|
+
- Finding code by functionality (e.g., "authentication handling", "database queries")
|
|
87
|
+
- Understanding how features work
|
|
88
|
+
- Locating related files across the codebase
|
|
89
|
+
- Exploring unfamiliar architecture
|
|
90
|
+
</use-cases>
|
|
91
|
+
<advantage>sgrep searches by MEANING, not text patterns - far more effective than grep/glob for understanding code</advantage>
|
|
92
|
+
</sgrep-skill-instruction>`.trim();
|
|
93
|
+
|
|
73
94
|
const response = {
|
|
74
95
|
hookSpecificOutput: {
|
|
75
96
|
hookEventName: "SessionStart",
|
|
76
|
-
additionalContext:
|
|
97
|
+
additionalContext: sgrepInstruction,
|
|
77
98
|
},
|
|
78
99
|
};
|
|
79
100
|
|