@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.37",
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 deterministic output
29
- const PROJECT_SUMMARY_PROMPT = `Analyze this codebase and provide a structured summary. Be concise and factual.
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 Type:** [e.g., Web Application, CLI Tool, Library, API Server]
33
+ **What This Project Does:** [1-2 sentences: the domain problem, who uses it, what it produces. NOT the tech stack.]
34
34
 
35
- **Languages:** [Primary language(s) with version requirements if specified]
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
- **Frameworks & Libraries:**
38
- - [Framework/library name]: [version] - [brief purpose]
39
- - [Continue for major dependencies only]
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
- **Build & Tooling:**
42
- - Package Manager: [npm/yarn/pnpm/etc]
43
- - Build Tool: [if applicable]
44
- - Test Framework: [if applicable]
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
- **Architecture:**
47
- - [Key architectural pattern, e.g., "MVC", "Microservices", "Monorepo"]
48
- - [Entry point(s)]
49
- - [Notable patterns]
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
- **Key Directories:**
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 that are relevant. Be concise.`;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimzino/sgrep",
3
- "version": "1.3.37",
3
+ "version": "1.3.38",
4
4
  "description": "Semantic grep - search codebases by meaning using the Augment SDK",
5
5
  "type": "module",
6
6
  "main": "build/index.js",