@probelabs/probe 0.6.0-rc211 → 0.6.0-rc213

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.
@@ -2832,6 +2832,10 @@ Follow these instructions carefully:
2832
2832
  if (this.enableDelegate && this.allowedTools.isEnabled('delegate')) {
2833
2833
  validTools.push('delegate');
2834
2834
  }
2835
+ // Analyze All tool (for bulk data processing with map-reduce)
2836
+ if (this.allowedTools.isEnabled('analyze_all')) {
2837
+ validTools.push('analyze_all');
2838
+ }
2835
2839
  // Task tool (require both enableTasks flag AND allowedTools permission)
2836
2840
  if (this.enableTasks && this.allowedTools.isEnabled('task')) {
2837
2841
  validTools.push('task');
@@ -4250,28 +4250,44 @@ ${chunkSummaries}`;
4250
4250
  }
4251
4251
  async function planAnalysis(question, path9, options) {
4252
4252
  if (options.debug) {
4253
- console.error(`[analyze_all] Phase 1: Planning analysis strategy...`);
4253
+ console.error(`[analyze_all] Phase 1: Planning analysis strategy (with exploration)...`);
4254
4254
  }
4255
- const planningTask = `Create an analysis plan for this question about a codebase:
4255
+ const planningTask = `You are planning a bulk data analysis. Your goal is to find the BEST search strategy through exploration and experimentation.
4256
4256
 
4257
- "${question}"
4257
+ QUESTION TO ANSWER: "${question}"
4258
+ SEARCH SCOPE: ${path9}
4259
+
4260
+ YOUR TASK: Explore, experiment, then plan.
4261
+
4262
+ STEP 1: EXPLORE THE REPOSITORY STRUCTURE
4263
+ Use listFiles to understand:
4264
+ - What types of files exist? (code, markdown, configs, etc.)
4265
+ - What are the naming patterns? (e.g., "Playbook", "Debrief", "spec", "test")
4266
+ - What directories and subdirectories exist?
4267
+
4268
+ STEP 2: TEST DIFFERENT SEARCH QUERIES
4269
+ Run several experimental searches to find what works:
4270
+ - Try different keyword combinations related to the question
4271
+ - Test queries based on file naming patterns you discovered
4272
+ - Check which queries return relevant results vs empty results
4273
+ - Iterate until you find queries that actually return data
4274
+
4275
+ For example, if looking for customer data:
4276
+ - First try: search for "customer" - see what comes back
4277
+ - If empty, try: search for "playbook" or "debrief" (common doc names)
4278
+ - Check the actual content to understand terminology used
4258
4279
 
4259
- Search scope: ${path9}
4280
+ STEP 3: CREATE THE FINAL PLAN
4281
+ Based on your experiments, output the BEST search strategy.
4260
4282
 
4261
- Use attempt_completion to output your plan in this EXACT format:
4283
+ Use attempt_completion with this EXACT format:
4262
4284
 
4263
- SEARCH_QUERY: <elasticsearch query using OR for multiple terms, quotes for exact phrases>
4285
+ SEARCH_QUERY: <the query that WORKED in your experiments - use OR for multiple terms>
4264
4286
  AGGREGATION: <summarize | list_unique | count | group_by>
4265
4287
  EXTRACTION_PROMPT: <what to extract from each search result>
4266
- REASONING: <brief explanation>
4288
+ REASONING: <what you discovered, what queries you tested, why the final query works>
4267
4289
 
4268
- Example plan:
4269
- SEARCH_QUERY: export OR function OR class OR tool
4270
- AGGREGATION: list_unique
4271
- EXTRACTION_PROMPT: Extract tool names and their purpose
4272
- REASONING: Using list_unique to deduplicate tool definitions
4273
-
4274
- IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to search or answer the question - just create the analysis plan.`;
4290
+ CRITICAL: Do NOT guess keywords. Actually run searches and see what returns results!`;
4275
4291
  try {
4276
4292
  const result = await delegate({
4277
4293
  task: planningTask,
@@ -4284,10 +4300,9 @@ IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to sear
4284
4300
  tracer: options.tracer,
4285
4301
  enableBash: false,
4286
4302
  promptType: "code-researcher",
4287
- allowedTools: [],
4288
- // attempt_completion only (default tool)
4289
- maxIterations: 3,
4290
- timeout: 60
4303
+ // Full tool access for exploration and experimentation
4304
+ maxIterations: 15,
4305
+ timeout: 180
4291
4306
  });
4292
4307
  const plan = parsePlanningResult(stripResultTags(result));
4293
4308
  if (options.debug) {
@@ -9610,7 +9625,7 @@ var init_common = __esm({
9610
9625
  env: external_exports.record(external_exports.string()).optional().describe("Additional environment variables (optional)")
9611
9626
  });
9612
9627
  analyzeAllSchema = external_exports.object({
9613
- question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically plan the search strategy, process all matching data, and synthesize a comprehensive answer.'),
9628
+ question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically explore the repository, test search strategies, and synthesize a comprehensive answer.'),
9614
9629
  path: external_exports.string().optional().default(".").describe("Directory path to search in")
9615
9630
  });
9616
9631
  attemptCompletionSchema = {
@@ -71965,6 +71980,9 @@ You are working with a repository located at: ${searchDirectory}
71965
71980
  if (this.enableDelegate && this.allowedTools.isEnabled("delegate")) {
71966
71981
  validTools.push("delegate");
71967
71982
  }
71983
+ if (this.allowedTools.isEnabled("analyze_all")) {
71984
+ validTools.push("analyze_all");
71985
+ }
71968
71986
  if (this.enableTasks && this.allowedTools.isEnabled("task")) {
71969
71987
  validTools.push("task");
71970
71988
  }
@@ -339,6 +339,8 @@ Organize all findings into clear categories with items listed under each.${compl
339
339
 
340
340
  /**
341
341
  * PHASE 1: Planning - Analyze the question and determine optimal strategy
342
+ * Uses a full agent that can explore the repository to understand its structure
343
+ * before creating the search plan.
342
344
  * @param {string} question - The user's free-form question
343
345
  * @param {string} path - Path to search in
344
346
  * @param {Object} options - Delegate options
@@ -346,32 +348,48 @@ Organize all findings into clear categories with items listed under each.${compl
346
348
  */
347
349
  async function planAnalysis(question, path, options) {
348
350
  if (options.debug) {
349
- console.error(`[analyze_all] Phase 1: Planning analysis strategy...`);
351
+ console.error(`[analyze_all] Phase 1: Planning analysis strategy (with exploration)...`);
350
352
  }
351
353
 
352
- const planningTask = `Create an analysis plan for this question about a codebase:
354
+ const planningTask = `You are planning a bulk data analysis. Your goal is to find the BEST search strategy through exploration and experimentation.
353
355
 
354
- "${question}"
356
+ QUESTION TO ANSWER: "${question}"
357
+ SEARCH SCOPE: ${path}
358
+
359
+ YOUR TASK: Explore, experiment, then plan.
360
+
361
+ STEP 1: EXPLORE THE REPOSITORY STRUCTURE
362
+ Use listFiles to understand:
363
+ - What types of files exist? (code, markdown, configs, etc.)
364
+ - What are the naming patterns? (e.g., "Playbook", "Debrief", "spec", "test")
365
+ - What directories and subdirectories exist?
366
+
367
+ STEP 2: TEST DIFFERENT SEARCH QUERIES
368
+ Run several experimental searches to find what works:
369
+ - Try different keyword combinations related to the question
370
+ - Test queries based on file naming patterns you discovered
371
+ - Check which queries return relevant results vs empty results
372
+ - Iterate until you find queries that actually return data
355
373
 
356
- Search scope: ${path}
374
+ For example, if looking for customer data:
375
+ - First try: search for "customer" - see what comes back
376
+ - If empty, try: search for "playbook" or "debrief" (common doc names)
377
+ - Check the actual content to understand terminology used
357
378
 
358
- Use attempt_completion to output your plan in this EXACT format:
379
+ STEP 3: CREATE THE FINAL PLAN
380
+ Based on your experiments, output the BEST search strategy.
359
381
 
360
- SEARCH_QUERY: <elasticsearch query using OR for multiple terms, quotes for exact phrases>
382
+ Use attempt_completion with this EXACT format:
383
+
384
+ SEARCH_QUERY: <the query that WORKED in your experiments - use OR for multiple terms>
361
385
  AGGREGATION: <summarize | list_unique | count | group_by>
362
386
  EXTRACTION_PROMPT: <what to extract from each search result>
363
- REASONING: <brief explanation>
364
-
365
- Example plan:
366
- SEARCH_QUERY: export OR function OR class OR tool
367
- AGGREGATION: list_unique
368
- EXTRACTION_PROMPT: Extract tool names and their purpose
369
- REASONING: Using list_unique to deduplicate tool definitions
387
+ REASONING: <what you discovered, what queries you tested, why the final query works>
370
388
 
371
- IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to search or answer the question - just create the analysis plan.`;
389
+ CRITICAL: Do NOT guess keywords. Actually run searches and see what returns results!`;
372
390
 
373
391
  try {
374
- // Planning phase - attempt_completion only
392
+ // Planning phase - full agent with exploration capabilities
375
393
  const result = await delegate({
376
394
  task: planningTask,
377
395
  debug: options.debug,
@@ -383,9 +401,9 @@ IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to sear
383
401
  tracer: options.tracer,
384
402
  enableBash: false,
385
403
  promptType: 'code-researcher',
386
- allowedTools: [], // attempt_completion only (default tool)
387
- maxIterations: 3,
388
- timeout: 60
404
+ // Full tool access for exploration and experimentation
405
+ maxIterations: 15,
406
+ timeout: 180
389
407
  });
390
408
 
391
409
  const plan = parsePlanningResult(stripResultTags(result));
@@ -47,7 +47,7 @@ export const bashSchema = z.object({
47
47
  });
48
48
 
49
49
  export const analyzeAllSchema = z.object({
50
- question: z.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically plan the search strategy, process all matching data, and synthesize a comprehensive answer.'),
50
+ question: z.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically explore the repository, test search strategies, and synthesize a comprehensive answer.'),
51
51
  path: z.string().optional().default('.').describe('Directory path to search in')
52
52
  });
53
53
 
@@ -33576,28 +33576,44 @@ ${chunkSummaries}`;
33576
33576
  }
33577
33577
  async function planAnalysis(question, path9, options) {
33578
33578
  if (options.debug) {
33579
- console.error(`[analyze_all] Phase 1: Planning analysis strategy...`);
33579
+ console.error(`[analyze_all] Phase 1: Planning analysis strategy (with exploration)...`);
33580
33580
  }
33581
- const planningTask = `Create an analysis plan for this question about a codebase:
33581
+ const planningTask = `You are planning a bulk data analysis. Your goal is to find the BEST search strategy through exploration and experimentation.
33582
33582
 
33583
- "${question}"
33583
+ QUESTION TO ANSWER: "${question}"
33584
+ SEARCH SCOPE: ${path9}
33585
+
33586
+ YOUR TASK: Explore, experiment, then plan.
33587
+
33588
+ STEP 1: EXPLORE THE REPOSITORY STRUCTURE
33589
+ Use listFiles to understand:
33590
+ - What types of files exist? (code, markdown, configs, etc.)
33591
+ - What are the naming patterns? (e.g., "Playbook", "Debrief", "spec", "test")
33592
+ - What directories and subdirectories exist?
33593
+
33594
+ STEP 2: TEST DIFFERENT SEARCH QUERIES
33595
+ Run several experimental searches to find what works:
33596
+ - Try different keyword combinations related to the question
33597
+ - Test queries based on file naming patterns you discovered
33598
+ - Check which queries return relevant results vs empty results
33599
+ - Iterate until you find queries that actually return data
33600
+
33601
+ For example, if looking for customer data:
33602
+ - First try: search for "customer" - see what comes back
33603
+ - If empty, try: search for "playbook" or "debrief" (common doc names)
33604
+ - Check the actual content to understand terminology used
33584
33605
 
33585
- Search scope: ${path9}
33606
+ STEP 3: CREATE THE FINAL PLAN
33607
+ Based on your experiments, output the BEST search strategy.
33586
33608
 
33587
- Use attempt_completion to output your plan in this EXACT format:
33609
+ Use attempt_completion with this EXACT format:
33588
33610
 
33589
- SEARCH_QUERY: <elasticsearch query using OR for multiple terms, quotes for exact phrases>
33611
+ SEARCH_QUERY: <the query that WORKED in your experiments - use OR for multiple terms>
33590
33612
  AGGREGATION: <summarize | list_unique | count | group_by>
33591
33613
  EXTRACTION_PROMPT: <what to extract from each search result>
33592
- REASONING: <brief explanation>
33614
+ REASONING: <what you discovered, what queries you tested, why the final query works>
33593
33615
 
33594
- Example plan:
33595
- SEARCH_QUERY: export OR function OR class OR tool
33596
- AGGREGATION: list_unique
33597
- EXTRACTION_PROMPT: Extract tool names and their purpose
33598
- REASONING: Using list_unique to deduplicate tool definitions
33599
-
33600
- IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to search or answer the question - just create the analysis plan.`;
33616
+ CRITICAL: Do NOT guess keywords. Actually run searches and see what returns results!`;
33601
33617
  try {
33602
33618
  const result = await delegate({
33603
33619
  task: planningTask,
@@ -33610,10 +33626,9 @@ IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to sear
33610
33626
  tracer: options.tracer,
33611
33627
  enableBash: false,
33612
33628
  promptType: "code-researcher",
33613
- allowedTools: [],
33614
- // attempt_completion only (default tool)
33615
- maxIterations: 3,
33616
- timeout: 60
33629
+ // Full tool access for exploration and experimentation
33630
+ maxIterations: 15,
33631
+ timeout: 180
33617
33632
  });
33618
33633
  const plan = parsePlanningResult(stripResultTags(result));
33619
33634
  if (options.debug) {
@@ -38936,7 +38951,7 @@ var init_common2 = __esm({
38936
38951
  env: external_exports.record(external_exports.string()).optional().describe("Additional environment variables (optional)")
38937
38952
  });
38938
38953
  analyzeAllSchema = external_exports.object({
38939
- question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically plan the search strategy, process all matching data, and synthesize a comprehensive answer.'),
38954
+ question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically explore the repository, test search strategies, and synthesize a comprehensive answer.'),
38940
38955
  path: external_exports.string().optional().default(".").describe("Directory path to search in")
38941
38956
  });
38942
38957
  attemptCompletionSchema = {
@@ -101034,6 +101049,9 @@ You are working with a repository located at: ${searchDirectory}
101034
101049
  if (this.enableDelegate && this.allowedTools.isEnabled("delegate")) {
101035
101050
  validTools.push("delegate");
101036
101051
  }
101052
+ if (this.allowedTools.isEnabled("analyze_all")) {
101053
+ validTools.push("analyze_all");
101054
+ }
101037
101055
  if (this.enableTasks && this.allowedTools.isEnabled("task")) {
101038
101056
  validTools.push("task");
101039
101057
  }
package/cjs/index.cjs CHANGED
@@ -38267,7 +38267,7 @@ var init_common2 = __esm({
38267
38267
  env: external_exports.record(external_exports.string()).optional().describe("Additional environment variables (optional)")
38268
38268
  });
38269
38269
  analyzeAllSchema = external_exports.object({
38270
- question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically plan the search strategy, process all matching data, and synthesize a comprehensive answer.'),
38270
+ question: external_exports.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically explore the repository, test search strategies, and synthesize a comprehensive answer.'),
38271
38271
  path: external_exports.string().optional().default(".").describe("Directory path to search in")
38272
38272
  });
38273
38273
  attemptCompletionSchema = {
@@ -97945,6 +97945,9 @@ You are working with a repository located at: ${searchDirectory}
97945
97945
  if (this.enableDelegate && this.allowedTools.isEnabled("delegate")) {
97946
97946
  validTools.push("delegate");
97947
97947
  }
97948
+ if (this.allowedTools.isEnabled("analyze_all")) {
97949
+ validTools.push("analyze_all");
97950
+ }
97948
97951
  if (this.enableTasks && this.allowedTools.isEnabled("task")) {
97949
97952
  validTools.push("task");
97950
97953
  }
@@ -99649,28 +99652,44 @@ ${chunkSummaries}`;
99649
99652
  }
99650
99653
  async function planAnalysis(question, path9, options) {
99651
99654
  if (options.debug) {
99652
- console.error(`[analyze_all] Phase 1: Planning analysis strategy...`);
99655
+ console.error(`[analyze_all] Phase 1: Planning analysis strategy (with exploration)...`);
99653
99656
  }
99654
- const planningTask = `Create an analysis plan for this question about a codebase:
99657
+ const planningTask = `You are planning a bulk data analysis. Your goal is to find the BEST search strategy through exploration and experimentation.
99655
99658
 
99656
- "${question}"
99659
+ QUESTION TO ANSWER: "${question}"
99660
+ SEARCH SCOPE: ${path9}
99661
+
99662
+ YOUR TASK: Explore, experiment, then plan.
99663
+
99664
+ STEP 1: EXPLORE THE REPOSITORY STRUCTURE
99665
+ Use listFiles to understand:
99666
+ - What types of files exist? (code, markdown, configs, etc.)
99667
+ - What are the naming patterns? (e.g., "Playbook", "Debrief", "spec", "test")
99668
+ - What directories and subdirectories exist?
99669
+
99670
+ STEP 2: TEST DIFFERENT SEARCH QUERIES
99671
+ Run several experimental searches to find what works:
99672
+ - Try different keyword combinations related to the question
99673
+ - Test queries based on file naming patterns you discovered
99674
+ - Check which queries return relevant results vs empty results
99675
+ - Iterate until you find queries that actually return data
99657
99676
 
99658
- Search scope: ${path9}
99677
+ For example, if looking for customer data:
99678
+ - First try: search for "customer" - see what comes back
99679
+ - If empty, try: search for "playbook" or "debrief" (common doc names)
99680
+ - Check the actual content to understand terminology used
99659
99681
 
99660
- Use attempt_completion to output your plan in this EXACT format:
99682
+ STEP 3: CREATE THE FINAL PLAN
99683
+ Based on your experiments, output the BEST search strategy.
99661
99684
 
99662
- SEARCH_QUERY: <elasticsearch query using OR for multiple terms, quotes for exact phrases>
99685
+ Use attempt_completion with this EXACT format:
99686
+
99687
+ SEARCH_QUERY: <the query that WORKED in your experiments - use OR for multiple terms>
99663
99688
  AGGREGATION: <summarize | list_unique | count | group_by>
99664
99689
  EXTRACTION_PROMPT: <what to extract from each search result>
99665
- REASONING: <brief explanation>
99666
-
99667
- Example plan:
99668
- SEARCH_QUERY: export OR function OR class OR tool
99669
- AGGREGATION: list_unique
99670
- EXTRACTION_PROMPT: Extract tool names and their purpose
99671
- REASONING: Using list_unique to deduplicate tool definitions
99690
+ REASONING: <what you discovered, what queries you tested, why the final query works>
99672
99691
 
99673
- IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to search or answer the question - just create the analysis plan.`;
99692
+ CRITICAL: Do NOT guess keywords. Actually run searches and see what returns results!`;
99674
99693
  try {
99675
99694
  const result = await delegate({
99676
99695
  task: planningTask,
@@ -99683,10 +99702,9 @@ IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to sear
99683
99702
  tracer: options.tracer,
99684
99703
  enableBash: false,
99685
99704
  promptType: "code-researcher",
99686
- allowedTools: [],
99687
- // attempt_completion only (default tool)
99688
- maxIterations: 3,
99689
- timeout: 60
99705
+ // Full tool access for exploration and experimentation
99706
+ maxIterations: 15,
99707
+ timeout: 180
99690
99708
  });
99691
99709
  const plan = parsePlanningResult(stripResultTags(result));
99692
99710
  if (options.debug) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc211",
3
+ "version": "0.6.0-rc213",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -2832,6 +2832,10 @@ Follow these instructions carefully:
2832
2832
  if (this.enableDelegate && this.allowedTools.isEnabled('delegate')) {
2833
2833
  validTools.push('delegate');
2834
2834
  }
2835
+ // Analyze All tool (for bulk data processing with map-reduce)
2836
+ if (this.allowedTools.isEnabled('analyze_all')) {
2837
+ validTools.push('analyze_all');
2838
+ }
2835
2839
  // Task tool (require both enableTasks flag AND allowedTools permission)
2836
2840
  if (this.enableTasks && this.allowedTools.isEnabled('task')) {
2837
2841
  validTools.push('task');
@@ -339,6 +339,8 @@ Organize all findings into clear categories with items listed under each.${compl
339
339
 
340
340
  /**
341
341
  * PHASE 1: Planning - Analyze the question and determine optimal strategy
342
+ * Uses a full agent that can explore the repository to understand its structure
343
+ * before creating the search plan.
342
344
  * @param {string} question - The user's free-form question
343
345
  * @param {string} path - Path to search in
344
346
  * @param {Object} options - Delegate options
@@ -346,32 +348,48 @@ Organize all findings into clear categories with items listed under each.${compl
346
348
  */
347
349
  async function planAnalysis(question, path, options) {
348
350
  if (options.debug) {
349
- console.error(`[analyze_all] Phase 1: Planning analysis strategy...`);
351
+ console.error(`[analyze_all] Phase 1: Planning analysis strategy (with exploration)...`);
350
352
  }
351
353
 
352
- const planningTask = `Create an analysis plan for this question about a codebase:
354
+ const planningTask = `You are planning a bulk data analysis. Your goal is to find the BEST search strategy through exploration and experimentation.
353
355
 
354
- "${question}"
356
+ QUESTION TO ANSWER: "${question}"
357
+ SEARCH SCOPE: ${path}
358
+
359
+ YOUR TASK: Explore, experiment, then plan.
360
+
361
+ STEP 1: EXPLORE THE REPOSITORY STRUCTURE
362
+ Use listFiles to understand:
363
+ - What types of files exist? (code, markdown, configs, etc.)
364
+ - What are the naming patterns? (e.g., "Playbook", "Debrief", "spec", "test")
365
+ - What directories and subdirectories exist?
366
+
367
+ STEP 2: TEST DIFFERENT SEARCH QUERIES
368
+ Run several experimental searches to find what works:
369
+ - Try different keyword combinations related to the question
370
+ - Test queries based on file naming patterns you discovered
371
+ - Check which queries return relevant results vs empty results
372
+ - Iterate until you find queries that actually return data
355
373
 
356
- Search scope: ${path}
374
+ For example, if looking for customer data:
375
+ - First try: search for "customer" - see what comes back
376
+ - If empty, try: search for "playbook" or "debrief" (common doc names)
377
+ - Check the actual content to understand terminology used
357
378
 
358
- Use attempt_completion to output your plan in this EXACT format:
379
+ STEP 3: CREATE THE FINAL PLAN
380
+ Based on your experiments, output the BEST search strategy.
359
381
 
360
- SEARCH_QUERY: <elasticsearch query using OR for multiple terms, quotes for exact phrases>
382
+ Use attempt_completion with this EXACT format:
383
+
384
+ SEARCH_QUERY: <the query that WORKED in your experiments - use OR for multiple terms>
361
385
  AGGREGATION: <summarize | list_unique | count | group_by>
362
386
  EXTRACTION_PROMPT: <what to extract from each search result>
363
- REASONING: <brief explanation>
364
-
365
- Example plan:
366
- SEARCH_QUERY: export OR function OR class OR tool
367
- AGGREGATION: list_unique
368
- EXTRACTION_PROMPT: Extract tool names and their purpose
369
- REASONING: Using list_unique to deduplicate tool definitions
387
+ REASONING: <what you discovered, what queries you tested, why the final query works>
370
388
 
371
- IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to search or answer the question - just create the analysis plan.`;
389
+ CRITICAL: Do NOT guess keywords. Actually run searches and see what returns results!`;
372
390
 
373
391
  try {
374
- // Planning phase - attempt_completion only
392
+ // Planning phase - full agent with exploration capabilities
375
393
  const result = await delegate({
376
394
  task: planningTask,
377
395
  debug: options.debug,
@@ -383,9 +401,9 @@ IMPORTANT: Use attempt_completion immediately with your plan. Do NOT try to sear
383
401
  tracer: options.tracer,
384
402
  enableBash: false,
385
403
  promptType: 'code-researcher',
386
- allowedTools: [], // attempt_completion only (default tool)
387
- maxIterations: 3,
388
- timeout: 60
404
+ // Full tool access for exploration and experimentation
405
+ maxIterations: 15,
406
+ timeout: 180
389
407
  });
390
408
 
391
409
  const plan = parsePlanningResult(stripResultTags(result));
@@ -47,7 +47,7 @@ export const bashSchema = z.object({
47
47
  });
48
48
 
49
49
  export const analyzeAllSchema = z.object({
50
- question: z.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically plan the search strategy, process all matching data, and synthesize a comprehensive answer.'),
50
+ question: z.string().min(1).describe('Free-form question to answer (e.g., "What features are customers using?", "List all API endpoints"). The AI will automatically explore the repository, test search strategies, and synthesize a comprehensive answer.'),
51
51
  path: z.string().optional().default('.').describe('Directory path to search in')
52
52
  });
53
53