@pimzino/sgrep 1.3.37 → 1.3.38
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sgrep",
|
|
3
3
|
"description": "Semantic grep - ask questions about codebases using AI. Use sgrep \"question\" to understand code (default) or sgrep search for raw code snippets.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.38",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "pimzino"
|
|
7
7
|
},
|
|
@@ -25,34 +25,36 @@ const INDEX_READY_WAIT_MS = 60000; // Wait up to 60s for index to be ready
|
|
|
25
25
|
const DEBUG_ENABLED = process.env.SGREP_DEBUG === "1" || process.env.SGREP_DEBUG === "true";
|
|
26
26
|
const DEBUG_LOG_FILE = process.env.SGREP_PROJECT_LOG || path.join(os.tmpdir(), "sgrep-project-summary.log");
|
|
27
27
|
|
|
28
|
-
// Structured prompt for
|
|
29
|
-
const PROJECT_SUMMARY_PROMPT = `
|
|
28
|
+
// Structured prompt optimized for agentic LLM context
|
|
29
|
+
const PROJECT_SUMMARY_PROMPT = `You are briefing an AI coding agent that is about to work on this codebase for the first time. Provide the information that will save it the most tool calls and prevent mistakes. Be concise and specific — no filler.
|
|
30
30
|
|
|
31
31
|
FORMAT YOUR RESPONSE EXACTLY AS:
|
|
32
32
|
|
|
33
|
-
**Project
|
|
33
|
+
**What This Project Does:** [1-2 sentences: the domain problem, who uses it, what it produces. NOT the tech stack.]
|
|
34
34
|
|
|
35
|
-
**
|
|
35
|
+
**Core Concepts:** [The 3-6 key domain abstractions/entities and how they relate. e.g., "Users own Workspaces, which contain Projects. Projects have Deployments."]
|
|
36
36
|
|
|
37
|
-
**
|
|
38
|
-
-
|
|
39
|
-
- [
|
|
37
|
+
**How It's Wired Together:**
|
|
38
|
+
- Entry point(s): [exact file paths]
|
|
39
|
+
- Request/data flow: [e.g., "Routes → Controllers → Services → Repositories" or "CLI parses commands → each command module handles execution"]
|
|
40
|
+
- State management: [where state lives, how it flows]
|
|
40
41
|
|
|
41
|
-
**
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
42
|
+
**Conventions (match these when writing code):**
|
|
43
|
+
- File naming: [e.g., kebab-case, PascalCase for components]
|
|
44
|
+
- File organization: [e.g., co-located tests, barrel exports, feature folders]
|
|
45
|
+
- Import style: [e.g., path aliases like @/, relative imports, barrel re-exports]
|
|
46
|
+
- Error handling pattern: [e.g., Result types, thrown exceptions, error boundaries]
|
|
47
|
+
- Any other strong patterns the agent should follow
|
|
45
48
|
|
|
46
|
-
**
|
|
47
|
-
- [
|
|
48
|
-
- [
|
|
49
|
-
- [
|
|
49
|
+
**Commands:**
|
|
50
|
+
- Build: [exact command]
|
|
51
|
+
- Test: [exact command, plus how to run a single test]
|
|
52
|
+
- Dev/Run: [exact command]
|
|
53
|
+
- Lint/Format: [exact command, if applicable]
|
|
50
54
|
|
|
51
|
-
**
|
|
52
|
-
- [dir]: [purpose]
|
|
53
|
-
- [Continue for main directories]
|
|
55
|
+
**Gotchas:** [Non-obvious things that would trip up a newcomer: required env vars, unusual build steps, files that are auto-generated and shouldn't be edited, quirky patterns, etc.]
|
|
54
56
|
|
|
55
|
-
Only include sections
|
|
57
|
+
Only include sections where you have concrete information. Omit rather than guess.`;
|
|
56
58
|
|
|
57
59
|
function debugLog(message) {
|
|
58
60
|
if (!DEBUG_ENABLED) return;
|