omni-context-cli 0.0.32 → 0.0.34
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 +20 -18
- package/dist/agents/explore.md +12 -4
- package/dist/agents/morph.md +52 -0
- package/dist/agents/pluck.md +22 -23
- package/dist/agents/quest.md +20 -11
- package/dist/agents/ripple.md +22 -12
- package/dist/agents/sculpt.md +24 -24
- package/dist/agents/slice.md +41 -0
- package/dist/agents/sweep.md +18 -6
- package/dist/agents/weave.md +19 -20
- package/dist/cli.js +7 -7
- package/package.json +1 -1
- package/dist/agents/graphic.md +0 -67
- package/dist/agents/unravel.md +0 -48
package/dist/agents/craft.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: craft
|
|
3
|
-
description: Execute bash commands. Automatically fixes errors and retries if the command fails.
|
|
3
|
+
description: Execute bash commands when no suitable specialized tool exists. Automatically fixes errors and retries if the command fails.
|
|
4
4
|
allowedTools: [Bash, BashOutput, Read, Write]
|
|
5
5
|
parameters:
|
|
6
6
|
properties:
|
|
@@ -9,42 +9,44 @@ parameters:
|
|
|
9
9
|
description: Bash command to run. Pipes, redirects, and chains all work.
|
|
10
10
|
expectedResult:
|
|
11
11
|
type: string
|
|
12
|
-
description: What result you expect from this command
|
|
12
|
+
description: What result you expect from this command, like "list of JavaScript files", "successful installation message", or "version number".
|
|
13
13
|
timeout:
|
|
14
14
|
type: number
|
|
15
15
|
description: Max runtime in milliseconds. Defaults to 120000 (2 minutes).
|
|
16
16
|
workdir:
|
|
17
17
|
type: string
|
|
18
|
-
description: Where to run the command
|
|
18
|
+
description: Where to run the command, relative or absolute path. Defaults to current directory.
|
|
19
19
|
required: [command, expectedResult]
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
Expected result: {{expectedResult}}
|
|
24
|
-
{{#if timeout}}Timeout: {{timeout}}ms{{/if}}
|
|
25
|
-
{{#if workdir}}Working directory: {{workdir}}{{/if}}
|
|
22
|
+
Use the bash tool to run this command: {{command}}
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
Working directory: {{#if workdir}}{{workdir}}{{else}}current directory{{/if}}.
|
|
25
|
+
|
|
26
|
+
Timeout: {{#if timeout}}{{timeout}}ms{{else}}120000ms (2 minutes){{/if}}.
|
|
27
|
+
|
|
28
|
+
Expected result: {{expectedResult}}.
|
|
29
|
+
|
|
30
|
+
If it works, extract what was asked for and return:
|
|
28
31
|
|
|
29
|
-
If the command succeeds, extract and return the result according to the expected result description in this exact format:
|
|
30
32
|
```
|
|
31
|
-
|
|
33
|
+
Done: [the result matching what was expected]
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
If
|
|
36
|
+
If something goes wrong, figure out why and fix it. Then try again.
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
If the fix worked, return:
|
|
37
39
|
|
|
38
|
-
If it succeeds after fix, return:
|
|
39
40
|
```
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
Done: [the result matching what was expected]
|
|
42
|
+
What I fixed: [quick note on what went wrong and how you fixed it]
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
If
|
|
45
|
+
If nothing worked after a few tries, return:
|
|
46
|
+
|
|
45
47
|
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
Couldn't complete this: [what went wrong]
|
|
49
|
+
What I tried: [the fixes you attempted]
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/explore.md
CHANGED
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explore
|
|
3
|
-
description: Survey project structure and architecture. Shows directory layout, where features live, and how the codebase is organized. For
|
|
3
|
+
description: Survey project structure and architecture. Shows directory layout, where features live, and how the codebase is organized. For structural overview, not detailed analysis.
|
|
4
4
|
allowedTools: [Read, Glob, Grep, Bash, BashOutput]
|
|
5
5
|
parameters:
|
|
6
6
|
properties:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
9
9
|
description: What aspect of the project structure to explore
|
|
10
|
+
directory:
|
|
11
|
+
type: string
|
|
12
|
+
description: Limit the search to this directory. If not provided, searches the entire project.
|
|
10
13
|
required: [query]
|
|
11
14
|
---
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Survey the project structure and find out: {{query}}
|
|
17
|
+
|
|
18
|
+
{{#if directory}}Limit the search to this directory: {{directory}}.{{/if}}
|
|
19
|
+
|
|
20
|
+
Use glob to survey the file structure and identify relevant areas. Use grep to scan for where functionality lives.
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
Focus on the big picture: what directories exist, how the project is organized, where different concerns are separated.
|
|
16
23
|
|
|
17
24
|
Return a report covering:
|
|
25
|
+
- A brief overview of what you found
|
|
18
26
|
- Relevant directories and their purposes
|
|
19
27
|
- Key files and their roles
|
|
20
28
|
- How the codebase is organized (features, layers, modules)
|
|
21
29
|
- Where the queried functionality lives
|
|
22
30
|
|
|
23
|
-
Keep
|
|
31
|
+
Keep the report concise and to the point. Focus on what matters, skip the fluff.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: morph
|
|
3
|
+
description: Refactor code across multiple files. Performs mechanical transformations like renaming or updating references.
|
|
4
|
+
allowedTools: [Read, Edit, Grep, Glob, Bash]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
task:
|
|
8
|
+
type: string
|
|
9
|
+
description: What refactor to perform. Be specific about what to change and where.
|
|
10
|
+
directory:
|
|
11
|
+
type: string
|
|
12
|
+
description: Limit the refactor to this directory. If not provided, searches the entire project.
|
|
13
|
+
required: [task]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Perform this refactor: {{task}}
|
|
17
|
+
|
|
18
|
+
{{#if directory}}Limit the scope to this directory: {{directory}}.{{/if}}
|
|
19
|
+
|
|
20
|
+
Use grep to find all relevant occurrences. Read files to verify matches are real references. Edit each file to apply the change.
|
|
21
|
+
|
|
22
|
+
This is mechanical work. Don't make judgment calls, just execute precisely.
|
|
23
|
+
|
|
24
|
+
If everything works, return:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Done: [summary of what changed]
|
|
28
|
+
|
|
29
|
+
Files updated:
|
|
30
|
+
- path/to/file1.ts
|
|
31
|
+
- path/to/file2.ts
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If you ran into something and fixed it along the way:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Done: [summary of what changed]
|
|
38
|
+
What I fixed: [what went wrong and how you handled it]
|
|
39
|
+
|
|
40
|
+
Files updated:
|
|
41
|
+
- path/to/file1.ts
|
|
42
|
+
- path/to/file2.ts
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If it didn't work out:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Couldn't complete this: [what went wrong]
|
|
49
|
+
What I tried: [the approaches you attempted]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/pluck.md
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pluck
|
|
3
|
-
description: Find and extract specific code segments
|
|
4
|
-
allowedTools: [Read
|
|
3
|
+
description: Find and extract specific code segments from a file. Returns matching code with line numbers only.
|
|
4
|
+
allowedTools: [Read]
|
|
5
5
|
parameters:
|
|
6
6
|
properties:
|
|
7
|
-
filePath:
|
|
8
|
-
type: string
|
|
9
|
-
description: Path to search within. If not provided, searches across the entire project.
|
|
10
7
|
query:
|
|
11
8
|
type: string
|
|
12
|
-
description: What code segment to find
|
|
13
|
-
|
|
9
|
+
description: What code segment to find, e.g. "the registerTool function implementation", "UserService class definition", "where formatOutput is called", "error handling in the login flow"
|
|
10
|
+
filePath:
|
|
11
|
+
type: string
|
|
12
|
+
description: Exact path to the file to search within.
|
|
13
|
+
required: [query, filePath]
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
{{
|
|
17
|
-
|
|
18
|
-
{{
|
|
19
|
-
Search across entire project
|
|
20
|
-
{{/if}}
|
|
21
|
-
Query: {{query}}
|
|
16
|
+
Find and extract this code segment: {{query}}
|
|
17
|
+
|
|
18
|
+
Search within this file: {{filePath}}.
|
|
22
19
|
|
|
23
|
-
|
|
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}}
|
|
20
|
+
Read the file and locate the code segment that matches the query.
|
|
28
21
|
|
|
29
|
-
Return
|
|
22
|
+
Return what you find in this format:
|
|
30
23
|
|
|
31
24
|
```
|
|
32
25
|
File: path/to/file.ts
|
|
33
26
|
Lines X-Y:
|
|
34
|
-
<code>
|
|
27
|
+
<the matching code>
|
|
35
28
|
```
|
|
36
29
|
|
|
37
|
-
If there are multiple matches:
|
|
30
|
+
If there are multiple matches, separate them like this:
|
|
38
31
|
|
|
39
32
|
```
|
|
40
33
|
File: path/to/file1.ts
|
|
41
34
|
Lines X-Y:
|
|
42
|
-
<code>
|
|
35
|
+
<the matching code>
|
|
43
36
|
---
|
|
44
37
|
File: path/to/file2.ts
|
|
45
38
|
Lines A-B:
|
|
46
|
-
<code>
|
|
39
|
+
<the matching code>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If you can't find what was asked for:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Couldn't find it: [brief explanation of what you searched and why nothing matched]
|
|
47
46
|
```
|
|
48
47
|
|
|
49
48
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/quest.md
CHANGED
|
@@ -9,29 +9,38 @@ parameters:
|
|
|
9
9
|
description: What to research.
|
|
10
10
|
expectedResult:
|
|
11
11
|
type: string
|
|
12
|
-
description: What result you expect
|
|
12
|
+
description: What result you expect, like "latest version number", "list of best practices", "comparison of approaches", or "code examples".
|
|
13
13
|
required: [query, expectedResult]
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
Expected result: {{expectedResult}}
|
|
16
|
+
Research this topic: {{query}}
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Expected result: {{expectedResult}}.
|
|
19
|
+
|
|
20
|
+
Use available web search tools and external knowledge bases to find the answer.
|
|
21
|
+
|
|
22
|
+
Gather information from multiple sources if needed for a comprehensive result.
|
|
23
|
+
|
|
24
|
+
Return what you find in this format:
|
|
20
25
|
|
|
21
|
-
Extract and return the result according to the expected result description in this exact format:
|
|
22
26
|
```
|
|
23
|
-
|
|
27
|
+
Here's what I found: [the result matching what was expected]
|
|
24
28
|
```
|
|
25
29
|
|
|
26
|
-
If sources are
|
|
30
|
+
If sources are worth mentioning:
|
|
31
|
+
|
|
27
32
|
```
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
Here's what I found: [the result matching what was expected]
|
|
34
|
+
|
|
35
|
+
Sources:
|
|
36
|
+
- [source 1]
|
|
37
|
+
- [source 2]
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
If
|
|
40
|
+
If you couldn't find relevant information:
|
|
41
|
+
|
|
33
42
|
```
|
|
34
|
-
|
|
43
|
+
Couldn't find this: [brief explanation of what you searched and why nothing turned up]
|
|
35
44
|
```
|
|
36
45
|
|
|
37
46
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/ripple.md
CHANGED
|
@@ -12,36 +12,46 @@ parameters:
|
|
|
12
12
|
description: Name of the symbol to find references for
|
|
13
13
|
symbolType:
|
|
14
14
|
type: string
|
|
15
|
-
description: Type of symbol
|
|
16
|
-
contextLines:
|
|
17
|
-
type: number
|
|
18
|
-
description: Lines to include before and after each reference. Defaults to 5.
|
|
15
|
+
description: Type of symbol (function, class, interface, variable, etc.). Helps narrow the search.
|
|
19
16
|
required: [filePath, symbolName]
|
|
20
17
|
---
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
Symbol: {{symbolName}}{{#if symbolType}} ({{symbolType}}){{/if}}
|
|
19
|
+
Find all references to a symbol in the codebase.
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Symbol name: {{symbolName}}.
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
{{#if symbolType}}Symbol type: {{symbolType}}.{{/if}}
|
|
24
|
+
|
|
25
|
+
Defined in: {{filePath}}.
|
|
26
|
+
|
|
27
|
+
Use grep and glob to search for all places where this symbol is referenced.
|
|
28
|
+
|
|
29
|
+
For each reference found, read the file and extract the code snippet with 5 lines of context before and after.
|
|
30
|
+
|
|
31
|
+
Return the references in this format:
|
|
28
32
|
|
|
29
33
|
```
|
|
30
34
|
File: path/to/file.ts
|
|
31
35
|
Lines X-Y:
|
|
32
|
-
<code>
|
|
36
|
+
<the code with context>
|
|
33
37
|
```
|
|
34
38
|
|
|
35
|
-
If
|
|
39
|
+
If there are multiple references, separate them like this:
|
|
36
40
|
|
|
37
41
|
```
|
|
38
42
|
File: path/to/file1.ts
|
|
39
43
|
Lines X-Y:
|
|
40
|
-
<code>
|
|
44
|
+
<the code with context>
|
|
41
45
|
---
|
|
42
46
|
File: path/to/file2.ts
|
|
43
47
|
Lines A-B:
|
|
44
|
-
<code>
|
|
48
|
+
<the code with context>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If you can't find any references:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
No references found: [brief explanation of what you searched]
|
|
45
55
|
```
|
|
46
56
|
|
|
47
57
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/sculpt.md
CHANGED
|
@@ -6,7 +6,7 @@ parameters:
|
|
|
6
6
|
properties:
|
|
7
7
|
filePath:
|
|
8
8
|
type: string
|
|
9
|
-
description: File to edit
|
|
9
|
+
description: File to edit, relative or absolute path.
|
|
10
10
|
oldString:
|
|
11
11
|
type: string
|
|
12
12
|
description: Exact text to replace. Must match perfectly, including whitespace and indentation.
|
|
@@ -19,44 +19,44 @@ parameters:
|
|
|
19
19
|
required: [filePath, oldString, newString]
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
{{#if replaceAll}}
|
|
24
|
-
Replace all occurrences.
|
|
25
|
-
{{else}}
|
|
26
|
-
Replace single occurrence only.
|
|
27
|
-
{{/if}}
|
|
22
|
+
Edit this file by replacing text: {{filePath}}
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
{{#if replaceAll}}Replace all occurrences of the old text.{{else}}Replace only the first occurrence.{{/if}}
|
|
25
|
+
|
|
26
|
+
Old text to find and replace:
|
|
27
|
+
|
|
28
|
+
<old_text>
|
|
31
29
|
{{oldString}}
|
|
32
|
-
</
|
|
30
|
+
</old_text>
|
|
31
|
+
|
|
32
|
+
New text to insert:
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
<newString>
|
|
34
|
+
<new_text>
|
|
36
35
|
{{newString}}
|
|
37
|
-
</
|
|
36
|
+
</new_text>
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
Try to make the edit using the edit tool.
|
|
39
|
+
|
|
40
|
+
If it works, return:
|
|
40
41
|
|
|
41
|
-
If the edit succeeds, return the result immediately in this exact format:
|
|
42
42
|
```
|
|
43
|
-
|
|
43
|
+
Done: Edited {{filePath}}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
If
|
|
46
|
+
If it fails, figure out why. Maybe the text doesn't match exactly, or there's a whitespace issue. Fix it and try again.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
If the fix worked:
|
|
49
49
|
|
|
50
|
-
If it succeeds, return:
|
|
51
50
|
```
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
Done: Edited {{filePath}}
|
|
52
|
+
What I fixed: [quick note on what was off and how you corrected it]
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
If
|
|
55
|
+
If nothing worked after a few tries:
|
|
56
|
+
|
|
57
57
|
```
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
Couldn't complete this: [what went wrong]
|
|
59
|
+
What I tried: [the fixes you attempted]
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slice
|
|
3
|
+
description: Extract code snippets relevant to answering a specific question. Returns targeted code segments from across the codebase that address the query.
|
|
4
|
+
allowedTools: [Read, Grep, Glob, Bash, BashOutput]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
question:
|
|
8
|
+
type: string
|
|
9
|
+
description: What you want to understand. Be specific, like "How does session persistence work?" or "Where are tool calls dispatched?"
|
|
10
|
+
directory:
|
|
11
|
+
type: string
|
|
12
|
+
description: Limit the search to this directory. If not provided, searches the entire project.
|
|
13
|
+
required: [question]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Find and extract code that answers this question: {{question}}
|
|
17
|
+
|
|
18
|
+
{{#if directory}}Limit the search to this directory: {{directory}}.{{/if}}
|
|
19
|
+
|
|
20
|
+
Use grep to search for keywords related to the question. Trace function calls, imports, and references.
|
|
21
|
+
|
|
22
|
+
Use glob to identify relevant files based on your grep findings.
|
|
23
|
+
|
|
24
|
+
Read the files that contain the answer to the question. Focus on the specific code sections that address what's being asked.
|
|
25
|
+
|
|
26
|
+
For complex flows, read multiple files to understand the complete picture.
|
|
27
|
+
|
|
28
|
+
Return the code in this format. Use line ranges when only a section is relevant, complete contents for small files:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
File: path/to/file.ts
|
|
32
|
+
Lines X-Y:
|
|
33
|
+
<relevant code segment>
|
|
34
|
+
---
|
|
35
|
+
File: path/to/another.ts
|
|
36
|
+
<complete file contents>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the code references other parts that explain the answer, include those too.
|
|
40
|
+
|
|
41
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/sweep.md
CHANGED
|
@@ -6,19 +6,25 @@ parameters:
|
|
|
6
6
|
properties:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
9
|
-
description: What files to find
|
|
9
|
+
description: What files to find, like "configuration files", "React components", or "test files for user authentication".
|
|
10
|
+
directory:
|
|
11
|
+
type: string
|
|
12
|
+
description: Limit the search to this directory. If not provided, searches the entire project.
|
|
10
13
|
maxFiles:
|
|
11
14
|
type: number
|
|
12
15
|
description: Maximum number of files to return. Defaults to 50.
|
|
13
16
|
required: [query]
|
|
14
17
|
---
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
Find files in the project that match this criteria: {{query}}
|
|
20
|
+
|
|
21
|
+
{{#if directory}}Limit the search to this directory: {{directory}}.{{/if}}
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
Maximum files to return: {{#if maxFiles}}{{maxFiles}}{{else}}50 (default){{/if}}.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
Use glob and grep to search for matching files. Only return file paths, don't read the contents.
|
|
26
|
+
|
|
27
|
+
Return just the list of matching file paths:
|
|
22
28
|
|
|
23
29
|
```
|
|
24
30
|
path/to/file1.ts
|
|
@@ -26,6 +32,12 @@ path/to/file2.tsx
|
|
|
26
32
|
path/to/file3.json
|
|
27
33
|
```
|
|
28
34
|
|
|
29
|
-
If more files match than the
|
|
35
|
+
If more files match than the limit allows, return the most relevant ones.
|
|
36
|
+
|
|
37
|
+
If you can't find any matching files:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Couldn't find any matches: [brief explanation of what you searched]
|
|
41
|
+
```
|
|
30
42
|
|
|
31
43
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|
package/dist/agents/weave.md
CHANGED
|
@@ -6,7 +6,7 @@ parameters:
|
|
|
6
6
|
properties:
|
|
7
7
|
filePath:
|
|
8
8
|
type: string
|
|
9
|
-
description: Destination path
|
|
9
|
+
description: Destination path, relative or absolute. Parent directories created automatically.
|
|
10
10
|
content:
|
|
11
11
|
type: string
|
|
12
12
|
description: Complete file content. Replaces everything in the file.
|
|
@@ -16,39 +16,38 @@ parameters:
|
|
|
16
16
|
required: [filePath, content]
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Only create
|
|
22
|
-
{{else}}
|
|
23
|
-
Overwrite file if it exists.
|
|
24
|
-
{{/if}}
|
|
19
|
+
Write content to this file: {{filePath}}
|
|
20
|
+
|
|
21
|
+
{{#if createOnly}}Only create the file if it doesn't exist. Do not overwrite existing files.{{else}}Overwrite the file if it already exists.{{/if}}
|
|
25
22
|
|
|
26
23
|
Content to write:
|
|
27
|
-
|
|
24
|
+
|
|
25
|
+
<file_content>
|
|
28
26
|
{{content}}
|
|
29
|
-
</
|
|
27
|
+
</file_content>
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
Try to write the content using the write tool.
|
|
30
|
+
|
|
31
|
+
If it works, return:
|
|
32
32
|
|
|
33
|
-
If the write succeeds, return the result immediately in this exact format:
|
|
34
33
|
```
|
|
35
|
-
|
|
34
|
+
Done: Wrote N lines to {{filePath}}
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
If
|
|
37
|
+
If it fails, figure out why and fix it. Then try again.
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
If the fix worked:
|
|
41
40
|
|
|
42
|
-
If it succeeds, return:
|
|
43
41
|
```
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
Done: Wrote N lines to {{filePath}}
|
|
43
|
+
What I fixed: [quick note on what went wrong and how you fixed it]
|
|
46
44
|
```
|
|
47
45
|
|
|
48
|
-
If
|
|
46
|
+
If nothing worked after a few tries:
|
|
47
|
+
|
|
49
48
|
```
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
Couldn't complete this: [what went wrong]
|
|
50
|
+
What I tried: [the fixes you attempted]
|
|
52
51
|
```
|
|
53
52
|
|
|
54
53
|
Do not include explanations beyond the result format. Keep responses concise and structured.
|