omni-context-cli 0.0.27 → 0.0.28
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.
- package/dist/agents/craft.md +50 -50
- package/dist/agents/explore.md +23 -23
- package/dist/agents/graphic.md +67 -67
- package/dist/agents/pluck.md +49 -49
- package/dist/agents/ripple.md +47 -47
- package/dist/agents/sculpt.md +62 -62
- package/dist/agents/sweep.md +31 -31
- package/dist/agents/unravel.md +48 -48
- package/dist/agents/weave.md +54 -54
- package/dist/cli.js +7 -7
- package/package.json +1 -1
package/dist/agents/craft.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: craft
|
|
3
|
-
description: Execute bash commands. Automatically fixes errors and retries if the command fails. Returns the result you expect.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
command:
|
|
8
|
-
type: string
|
|
9
|
-
description: Bash command to run. Pipes, redirects, and chains all work.
|
|
10
|
-
expectedResult:
|
|
11
|
-
type: string
|
|
12
|
-
description: What result you expect from this command—like "list of JavaScript files", "successful installation message", or "version number".
|
|
13
|
-
timeout:
|
|
14
|
-
type: number
|
|
15
|
-
description: Max runtime in milliseconds. Defaults to 120000 (2 minutes).
|
|
16
|
-
workdir:
|
|
17
|
-
type: string
|
|
18
|
-
description: Where to run the command—relative or absolute path. Defaults to current directory.
|
|
19
|
-
required: [command, expectedResult]
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
Command: {{command}}
|
|
23
|
-
Expected result: {{expectedResult}}
|
|
24
|
-
{{#if timeout}}Timeout: {{timeout}}ms{{/if}}
|
|
25
|
-
{{#if workdir}}Working directory: {{workdir}}{{/if}}
|
|
26
|
-
|
|
27
|
-
First, attempt to execute the command using the bash tool.
|
|
28
|
-
|
|
29
|
-
If the command succeeds, extract and return the result according to the expected result description in this exact format:
|
|
30
|
-
```
|
|
31
|
-
Success: [extracted result matching the expected result description]
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
If the command fails, analyze the error and attempt to fix it.
|
|
35
|
-
|
|
36
|
-
After fixing, retry the command.
|
|
37
|
-
|
|
38
|
-
If it succeeds after fix, return:
|
|
39
|
-
```
|
|
40
|
-
Success after fix: [extracted result matching the expected result description]
|
|
41
|
-
Fixed issue: [brief description of what was fixed]
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
If all attempts fail, return:
|
|
45
|
-
```
|
|
46
|
-
Failed: [error description]
|
|
47
|
-
Attempted fixes: [what was tried]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
1
|
+
---
|
|
2
|
+
name: craft
|
|
3
|
+
description: Execute bash commands. Automatically fixes errors and retries if the command fails. Returns the result you expect.
|
|
4
|
+
allowedTools: [Bash, BashOutput, Read, Write]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
command:
|
|
8
|
+
type: string
|
|
9
|
+
description: Bash command to run. Pipes, redirects, and chains all work.
|
|
10
|
+
expectedResult:
|
|
11
|
+
type: string
|
|
12
|
+
description: What result you expect from this command—like "list of JavaScript files", "successful installation message", or "version number".
|
|
13
|
+
timeout:
|
|
14
|
+
type: number
|
|
15
|
+
description: Max runtime in milliseconds. Defaults to 120000 (2 minutes).
|
|
16
|
+
workdir:
|
|
17
|
+
type: string
|
|
18
|
+
description: Where to run the command—relative or absolute path. Defaults to current directory.
|
|
19
|
+
required: [command, expectedResult]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Command: {{command}}
|
|
23
|
+
Expected result: {{expectedResult}}
|
|
24
|
+
{{#if timeout}}Timeout: {{timeout}}ms{{/if}}
|
|
25
|
+
{{#if workdir}}Working directory: {{workdir}}{{/if}}
|
|
26
|
+
|
|
27
|
+
First, attempt to execute the command using the bash tool.
|
|
28
|
+
|
|
29
|
+
If the command succeeds, extract and return the result according to the expected result description in this exact format:
|
|
30
|
+
```
|
|
31
|
+
Success: [extracted result matching the expected result description]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If the command fails, analyze the error and attempt to fix it.
|
|
35
|
+
|
|
36
|
+
After fixing, retry the command.
|
|
37
|
+
|
|
38
|
+
If it succeeds after fix, return:
|
|
39
|
+
```
|
|
40
|
+
Success after fix: [extracted result matching the expected result description]
|
|
41
|
+
Fixed issue: [brief description of what was fixed]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If all attempts fail, return:
|
|
45
|
+
```
|
|
46
|
+
Failed: [error description]
|
|
47
|
+
Attempted fixes: [what was tried]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/explore.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explore
|
|
3
|
-
description: Survey project structure and architecture. Shows directory layout, where features live, and how the codebase is organized. For high-level mapping, not detailed code analysis.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
query:
|
|
8
|
-
type: string
|
|
9
|
-
description: What aspect of the project structure to explore
|
|
10
|
-
required: [query]
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
Explore: {{query}}
|
|
14
|
-
|
|
15
|
-
Use glob to survey the file structure and identify relevant areas. Use grep to scan for where functionality lives. Focus on the big picture—what directories exist, how the project is organized, where different concerns are separated.
|
|
16
|
-
|
|
17
|
-
Return a report covering:
|
|
18
|
-
- Relevant directories and their purposes
|
|
19
|
-
- Key files and their roles
|
|
20
|
-
- How the codebase is organized (features, layers, modules)
|
|
21
|
-
- Where the queried functionality lives
|
|
22
|
-
|
|
23
|
-
Keep code excerpts minimal—just enough to identify locations and responsibilities.
|
|
1
|
+
---
|
|
2
|
+
name: explore
|
|
3
|
+
description: Survey project structure and architecture. Shows directory layout, where features live, and how the codebase is organized. For high-level mapping, not detailed code analysis.
|
|
4
|
+
allowedTools: [Read, Glob, Grep, Bash, BashOutput]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
query:
|
|
8
|
+
type: string
|
|
9
|
+
description: What aspect of the project structure to explore
|
|
10
|
+
required: [query]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Explore: {{query}}
|
|
14
|
+
|
|
15
|
+
Use glob to survey the file structure and identify relevant areas. Use grep to scan for where functionality lives. Focus on the big picture—what directories exist, how the project is organized, where different concerns are separated.
|
|
16
|
+
|
|
17
|
+
Return a report covering:
|
|
18
|
+
- Relevant directories and their purposes
|
|
19
|
+
- Key files and their roles
|
|
20
|
+
- How the codebase is organized (features, layers, modules)
|
|
21
|
+
- Where the queried functionality lives
|
|
22
|
+
|
|
23
|
+
Keep code excerpts minimal—just enough to identify locations and responsibilities.
|
package/dist/agents/graphic.md
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: graphic
|
|
3
|
-
description: Generate a diagram for a feature or module. Creates flowchart, dependency graph, class diagram, or sequence diagram in Mermaid format.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
target:
|
|
8
|
-
type: string
|
|
9
|
-
description: The feature, module, or component to diagram
|
|
10
|
-
diagramType:
|
|
11
|
-
type: string
|
|
12
|
-
description: Type of diagram—flowchart, dependency, class, or sequence
|
|
13
|
-
required: [target, diagramType]
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Target: {{target}}
|
|
17
|
-
Diagram type: {{diagramType}}
|
|
18
|
-
|
|
19
|
-
First, locate all files related to the target feature or module using glob and grep.
|
|
20
|
-
|
|
21
|
-
Analyze the code structure to understand the architecture and relationships.
|
|
22
|
-
|
|
23
|
-
{{#if (eq diagramType "flowchart")}}
|
|
24
|
-
Generate a flowchart showing the logic flow and decision points:
|
|
25
|
-
|
|
26
|
-
```mermaid
|
|
27
|
-
flowchart TD
|
|
28
|
-
[diagram code]
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Include a brief description explaining the flow.
|
|
32
|
-
{{/if}}
|
|
33
|
-
|
|
34
|
-
{{#if (eq diagramType "dependency")}}
|
|
35
|
-
Generate a dependency graph showing how modules depend on each other:
|
|
36
|
-
|
|
37
|
-
```mermaid
|
|
38
|
-
graph LR
|
|
39
|
-
[diagram code]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Include a brief description explaining the dependencies.
|
|
43
|
-
{{/if}}
|
|
44
|
-
|
|
45
|
-
{{#if (eq diagramType "class")}}
|
|
46
|
-
Generate a class diagram showing class structure and relationships:
|
|
47
|
-
|
|
48
|
-
```mermaid
|
|
49
|
-
classDiagram
|
|
50
|
-
[diagram code]
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Include a brief description explaining the class architecture.
|
|
54
|
-
{{/if}}
|
|
55
|
-
|
|
56
|
-
{{#if (eq diagramType "sequence")}}
|
|
57
|
-
Generate a sequence diagram showing interaction flow between components:
|
|
58
|
-
|
|
59
|
-
```mermaid
|
|
60
|
-
sequenceDiagram
|
|
61
|
-
[diagram code]
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Include a brief description explaining the interaction sequence.
|
|
65
|
-
{{/if}}
|
|
66
|
-
|
|
67
|
-
Keep the diagram focused and readable—show the most important elements, not every detail.
|
|
1
|
+
---
|
|
2
|
+
name: graphic
|
|
3
|
+
description: Generate a diagram for a feature or module. Creates flowchart, dependency graph, class diagram, or sequence diagram in Mermaid format.
|
|
4
|
+
allowedTools: [Read, Grep, Glob]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
target:
|
|
8
|
+
type: string
|
|
9
|
+
description: The feature, module, or component to diagram
|
|
10
|
+
diagramType:
|
|
11
|
+
type: string
|
|
12
|
+
description: Type of diagram—flowchart, dependency, class, or sequence
|
|
13
|
+
required: [target, diagramType]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Target: {{target}}
|
|
17
|
+
Diagram type: {{diagramType}}
|
|
18
|
+
|
|
19
|
+
First, locate all files related to the target feature or module using glob and grep.
|
|
20
|
+
|
|
21
|
+
Analyze the code structure to understand the architecture and relationships.
|
|
22
|
+
|
|
23
|
+
{{#if (eq diagramType "flowchart")}}
|
|
24
|
+
Generate a flowchart showing the logic flow and decision points:
|
|
25
|
+
|
|
26
|
+
```mermaid
|
|
27
|
+
flowchart TD
|
|
28
|
+
[diagram code]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Include a brief description explaining the flow.
|
|
32
|
+
{{/if}}
|
|
33
|
+
|
|
34
|
+
{{#if (eq diagramType "dependency")}}
|
|
35
|
+
Generate a dependency graph showing how modules depend on each other:
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
graph LR
|
|
39
|
+
[diagram code]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Include a brief description explaining the dependencies.
|
|
43
|
+
{{/if}}
|
|
44
|
+
|
|
45
|
+
{{#if (eq diagramType "class")}}
|
|
46
|
+
Generate a class diagram showing class structure and relationships:
|
|
47
|
+
|
|
48
|
+
```mermaid
|
|
49
|
+
classDiagram
|
|
50
|
+
[diagram code]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Include a brief description explaining the class architecture.
|
|
54
|
+
{{/if}}
|
|
55
|
+
|
|
56
|
+
{{#if (eq diagramType "sequence")}}
|
|
57
|
+
Generate a sequence diagram showing interaction flow between components:
|
|
58
|
+
|
|
59
|
+
```mermaid
|
|
60
|
+
sequenceDiagram
|
|
61
|
+
[diagram code]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Include a brief description explaining the interaction sequence.
|
|
65
|
+
{{/if}}
|
|
66
|
+
|
|
67
|
+
Keep the diagram focused and readable—show the most important elements, not every detail.
|
package/dist/agents/pluck.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pluck
|
|
3
|
-
description: Find and extract specific code segments. Searches project-wide or in a single file. Returns matching code with line numbers only.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
filePath:
|
|
8
|
-
type: string
|
|
9
|
-
description: Path to search within. If not provided, searches across the entire project.
|
|
10
|
-
query:
|
|
11
|
-
type: string
|
|
12
|
-
description: What code segment to find
|
|
13
|
-
required: [query]
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
{{#if filePath}}
|
|
17
|
-
File: {{filePath}}
|
|
18
|
-
{{else}}
|
|
19
|
-
Search across entire project
|
|
20
|
-
{{/if}}
|
|
21
|
-
Query: {{query}}
|
|
22
|
-
|
|
23
|
-
{{#if filePath}}
|
|
24
|
-
Read the specified file and locate the code segment that matches the query.
|
|
25
|
-
{{else}}
|
|
26
|
-
First use glob and grep to search across the project and identify which file contains the code segment that matches the query. Then read that file to extract the exact code.
|
|
27
|
-
{{/if}}
|
|
28
|
-
|
|
29
|
-
Return ONLY the matching code segments with their file paths and line numbers in this exact format. If multiple matches are found, list all of them separated by "---":
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
File: path/to/file.ts
|
|
33
|
-
Lines X-Y:
|
|
34
|
-
<code>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
If there are multiple matches:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
File: path/to/file1.ts
|
|
41
|
-
Lines X-Y:
|
|
42
|
-
<code>
|
|
43
|
-
---
|
|
44
|
-
File: path/to/file2.ts
|
|
45
|
-
Lines A-B:
|
|
46
|
-
<code>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
1
|
+
---
|
|
2
|
+
name: pluck
|
|
3
|
+
description: Find and extract specific code segments. Searches project-wide or in a single file. Returns matching code with line numbers only.
|
|
4
|
+
allowedTools: [Read, Grep, Glob]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
filePath:
|
|
8
|
+
type: string
|
|
9
|
+
description: Path to search within. If not provided, searches across the entire project.
|
|
10
|
+
query:
|
|
11
|
+
type: string
|
|
12
|
+
description: What code segment to find
|
|
13
|
+
required: [query]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
{{#if filePath}}
|
|
17
|
+
File: {{filePath}}
|
|
18
|
+
{{else}}
|
|
19
|
+
Search across entire project
|
|
20
|
+
{{/if}}
|
|
21
|
+
Query: {{query}}
|
|
22
|
+
|
|
23
|
+
{{#if filePath}}
|
|
24
|
+
Read the specified file and locate the code segment that matches the query.
|
|
25
|
+
{{else}}
|
|
26
|
+
First use glob and grep to search across the project and identify which file contains the code segment that matches the query. Then read that file to extract the exact code.
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
Return ONLY the matching code segments with their file paths and line numbers in this exact format. If multiple matches are found, list all of them separated by "---":
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
File: path/to/file.ts
|
|
33
|
+
Lines X-Y:
|
|
34
|
+
<code>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If there are multiple matches:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
File: path/to/file1.ts
|
|
41
|
+
Lines X-Y:
|
|
42
|
+
<code>
|
|
43
|
+
---
|
|
44
|
+
File: path/to/file2.ts
|
|
45
|
+
Lines A-B:
|
|
46
|
+
<code>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/ripple.md
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ripple
|
|
3
|
-
description: Find all references to a symbol (function, class, method, etc.). Returns code snippets showing where it's used with surrounding context.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
filePath:
|
|
8
|
-
type: string
|
|
9
|
-
description: Path to the file containing the symbol definition
|
|
10
|
-
symbolName:
|
|
11
|
-
type: string
|
|
12
|
-
description: Name of the symbol to find references for
|
|
13
|
-
symbolType:
|
|
14
|
-
type: string
|
|
15
|
-
description: Type of symbol—function, class, interface, variable, etc. Helps narrow the search.
|
|
16
|
-
contextLines:
|
|
17
|
-
type: number
|
|
18
|
-
description: Lines to include before and after each reference. Defaults to 5.
|
|
19
|
-
required: [filePath, symbolName]
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
File: {{filePath}}
|
|
23
|
-
Symbol: {{symbolName}}{{#if symbolType}} ({{symbolType}}){{/if}}
|
|
24
|
-
|
|
25
|
-
Use grep and glob to search for all places where the symbol is referenced. For each reference found, read the file and extract the code snippet with {{#if contextLines}}{{contextLines}}{{else}}5{{/if}} lines of context before and after.
|
|
26
|
-
|
|
27
|
-
Return the reference sites in this exact format. For each location found, include:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
File: path/to/file.ts
|
|
31
|
-
Lines X-Y:
|
|
32
|
-
<code>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
If multiple reference sites are found, separate each with "---":
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
File: path/to/file1.ts
|
|
39
|
-
Lines X-Y:
|
|
40
|
-
<code>
|
|
41
|
-
---
|
|
42
|
-
File: path/to/file2.ts
|
|
43
|
-
Lines A-B:
|
|
44
|
-
<code>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
1
|
+
---
|
|
2
|
+
name: ripple
|
|
3
|
+
description: Find all references to a symbol (function, class, method, etc.). Returns code snippets showing where it's used with surrounding context.
|
|
4
|
+
allowedTools: [Read, Grep, Glob]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
filePath:
|
|
8
|
+
type: string
|
|
9
|
+
description: Path to the file containing the symbol definition
|
|
10
|
+
symbolName:
|
|
11
|
+
type: string
|
|
12
|
+
description: Name of the symbol to find references for
|
|
13
|
+
symbolType:
|
|
14
|
+
type: string
|
|
15
|
+
description: Type of symbol—function, class, interface, variable, etc. Helps narrow the search.
|
|
16
|
+
contextLines:
|
|
17
|
+
type: number
|
|
18
|
+
description: Lines to include before and after each reference. Defaults to 5.
|
|
19
|
+
required: [filePath, symbolName]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
File: {{filePath}}
|
|
23
|
+
Symbol: {{symbolName}}{{#if symbolType}} ({{symbolType}}){{/if}}
|
|
24
|
+
|
|
25
|
+
Use grep and glob to search for all places where the symbol is referenced. For each reference found, read the file and extract the code snippet with {{#if contextLines}}{{contextLines}}{{else}}5{{/if}} lines of context before and after.
|
|
26
|
+
|
|
27
|
+
Return the reference sites in this exact format. For each location found, include:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
File: path/to/file.ts
|
|
31
|
+
Lines X-Y:
|
|
32
|
+
<code>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If multiple reference sites are found, separate each with "---":
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
File: path/to/file1.ts
|
|
39
|
+
Lines X-Y:
|
|
40
|
+
<code>
|
|
41
|
+
---
|
|
42
|
+
File: path/to/file2.ts
|
|
43
|
+
Lines A-B:
|
|
44
|
+
<code>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/sculpt.md
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sculpt
|
|
3
|
-
description: Edit files by replacing text. Automatically fixes matching errors and retries if the edit fails.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
filePath:
|
|
8
|
-
type: string
|
|
9
|
-
description: File to edit—relative or absolute path.
|
|
10
|
-
oldString:
|
|
11
|
-
type: string
|
|
12
|
-
description: Exact text to replace. Must match perfectly, including whitespace and indentation.
|
|
13
|
-
newString:
|
|
14
|
-
type: string
|
|
15
|
-
description: Replacement text. Use empty string to delete.
|
|
16
|
-
replaceAll:
|
|
17
|
-
type: boolean
|
|
18
|
-
description: Replace all occurrences? Defaults to false (single replacement).
|
|
19
|
-
required: [filePath, oldString, newString]
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
Target file: {{filePath}}
|
|
23
|
-
{{#if replaceAll}}
|
|
24
|
-
Replace all occurrences.
|
|
25
|
-
{{else}}
|
|
26
|
-
Replace single occurrence only.
|
|
27
|
-
{{/if}}
|
|
28
|
-
|
|
29
|
-
Old text to replace:
|
|
30
|
-
<oldString>
|
|
31
|
-
{{oldString}}
|
|
32
|
-
</oldString>
|
|
33
|
-
|
|
34
|
-
New text:
|
|
35
|
-
<newString>
|
|
36
|
-
{{newString}}
|
|
37
|
-
</newString>
|
|
38
|
-
|
|
39
|
-
First, attempt to edit the file using the edit tool.
|
|
40
|
-
|
|
41
|
-
If the edit succeeds, return the result immediately in this exact format:
|
|
42
|
-
```
|
|
43
|
-
Success: Edited /path/to/file
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If the edit fails, analyze the error and attempt to fix it.
|
|
47
|
-
|
|
48
|
-
After fixing, retry the edit operation.
|
|
49
|
-
|
|
50
|
-
If it succeeds, return:
|
|
51
|
-
```
|
|
52
|
-
Success after fix: Edited /path/to/file
|
|
53
|
-
Fixed issue: [brief description of what was fixed]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
If all attempts fail, return:
|
|
57
|
-
```
|
|
58
|
-
Failed: [error description]
|
|
59
|
-
Attempted fixes: [what was tried]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
1
|
+
---
|
|
2
|
+
name: sculpt
|
|
3
|
+
description: Edit files by replacing text. Automatically fixes matching errors and retries if the edit fails.
|
|
4
|
+
allowedTools: [Edit, Read, Grep]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
filePath:
|
|
8
|
+
type: string
|
|
9
|
+
description: File to edit—relative or absolute path.
|
|
10
|
+
oldString:
|
|
11
|
+
type: string
|
|
12
|
+
description: Exact text to replace. Must match perfectly, including whitespace and indentation.
|
|
13
|
+
newString:
|
|
14
|
+
type: string
|
|
15
|
+
description: Replacement text. Use empty string to delete.
|
|
16
|
+
replaceAll:
|
|
17
|
+
type: boolean
|
|
18
|
+
description: Replace all occurrences? Defaults to false (single replacement).
|
|
19
|
+
required: [filePath, oldString, newString]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Target file: {{filePath}}
|
|
23
|
+
{{#if replaceAll}}
|
|
24
|
+
Replace all occurrences.
|
|
25
|
+
{{else}}
|
|
26
|
+
Replace single occurrence only.
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
Old text to replace:
|
|
30
|
+
<oldString>
|
|
31
|
+
{{oldString}}
|
|
32
|
+
</oldString>
|
|
33
|
+
|
|
34
|
+
New text:
|
|
35
|
+
<newString>
|
|
36
|
+
{{newString}}
|
|
37
|
+
</newString>
|
|
38
|
+
|
|
39
|
+
First, attempt to edit the file using the edit tool.
|
|
40
|
+
|
|
41
|
+
If the edit succeeds, return the result immediately in this exact format:
|
|
42
|
+
```
|
|
43
|
+
Success: Edited /path/to/file
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If the edit fails, analyze the error and attempt to fix it.
|
|
47
|
+
|
|
48
|
+
After fixing, retry the edit operation.
|
|
49
|
+
|
|
50
|
+
If it succeeds, return:
|
|
51
|
+
```
|
|
52
|
+
Success after fix: Edited /path/to/file
|
|
53
|
+
Fixed issue: [brief description of what was fixed]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If all attempts fail, return:
|
|
57
|
+
```
|
|
58
|
+
Failed: [error description]
|
|
59
|
+
Attempted fixes: [what was tried]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/sweep.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sweep
|
|
3
|
-
description: Find files matching search criteria. Returns file paths only, doesn't read contents.
|
|
4
|
-
allowedTools: [
|
|
5
|
-
parameters:
|
|
6
|
-
properties:
|
|
7
|
-
query:
|
|
8
|
-
type: string
|
|
9
|
-
description: What files to find—like "configuration files", "React components", or "test files for user authentication".
|
|
10
|
-
maxFiles:
|
|
11
|
-
type: number
|
|
12
|
-
description: Maximum number of files to return. Defaults to 50.
|
|
13
|
-
required: [query]
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Query: {{query}}
|
|
17
|
-
Max files to return: {{#if maxFiles}}{{maxFiles}}{{else}}50{{/if}}
|
|
18
|
-
|
|
19
|
-
Use glob and grep to search across the project for files matching the criteria.
|
|
20
|
-
|
|
21
|
-
Return ONLY the list of matching file paths in this exact format:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
path/to/file1.ts
|
|
25
|
-
path/to/file2.tsx
|
|
26
|
-
path/to/file3.json
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
If more files match than the maximum limit, return the most relevant ones.
|
|
30
|
-
|
|
31
|
-
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
1
|
+
---
|
|
2
|
+
name: sweep
|
|
3
|
+
description: Find files matching search criteria. Returns file paths only, doesn't read contents.
|
|
4
|
+
allowedTools: [Glob, Grep, Read]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
query:
|
|
8
|
+
type: string
|
|
9
|
+
description: What files to find—like "configuration files", "React components", or "test files for user authentication".
|
|
10
|
+
maxFiles:
|
|
11
|
+
type: number
|
|
12
|
+
description: Maximum number of files to return. Defaults to 50.
|
|
13
|
+
required: [query]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Query: {{query}}
|
|
17
|
+
Max files to return: {{#if maxFiles}}{{maxFiles}}{{else}}50{{/if}}
|
|
18
|
+
|
|
19
|
+
Use glob and grep to search across the project for files matching the criteria.
|
|
20
|
+
|
|
21
|
+
Return ONLY the list of matching file paths in this exact format:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
path/to/file1.ts
|
|
25
|
+
path/to/file2.tsx
|
|
26
|
+
path/to/file3.json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If more files match than the maximum limit, return the most relevant ones.
|
|
30
|
+
|
|
31
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|