omni-context-cli 0.0.12 → 0.0.13
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 -0
- package/dist/agents/explore.md +10 -15
- package/dist/agents/graphic.md +67 -0
- package/dist/agents/pluck.md +49 -0
- package/dist/agents/quest.md +37 -0
- package/dist/agents/ripple.md +47 -0
- package/dist/agents/sculpt.md +62 -0
- package/dist/agents/sweep.md +31 -0
- package/dist/agents/unravel.md +48 -0
- package/dist/agents/weave.md +54 -0
- package/dist/cli.js +7 -7
- package/package.json +3 -1
|
@@ -0,0 +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: [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,28 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explore
|
|
3
|
-
description:
|
|
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
4
|
allowedTools: [read, glob, grep, bash, bashOutput]
|
|
5
5
|
parameters:
|
|
6
6
|
properties:
|
|
7
7
|
query:
|
|
8
8
|
type: string
|
|
9
|
-
description: What
|
|
9
|
+
description: What aspect of the project structure to explore
|
|
10
10
|
required: [query]
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Explore: {{query}}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
1. Use glob to find relevant files
|
|
17
|
-
2. Use grep to search for key terms and patterns
|
|
18
|
-
3. Read important files to understand implementation details
|
|
19
|
-
4. Trace code flow and dependencies
|
|
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.
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Any notable patterns or design decisions
|
|
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
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
Keep code excerpts minimal—just enough to identify locations and responsibilities.
|
|
@@ -0,0 +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: [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.
|
|
@@ -0,0 +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: [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.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quest
|
|
3
|
+
description: Research topics using web search. Returns information matching what you need to know.
|
|
4
|
+
allowedTools: []
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
query:
|
|
8
|
+
type: string
|
|
9
|
+
description: What to research.
|
|
10
|
+
expectedResult:
|
|
11
|
+
type: string
|
|
12
|
+
description: What result you expect—like "latest version number", "list of best practices", "comparison of approaches", or "code examples".
|
|
13
|
+
required: [query, expectedResult]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Query: {{query}}
|
|
17
|
+
Expected result: {{expectedResult}}
|
|
18
|
+
|
|
19
|
+
Use available web search tools to research the query. Gather information from multiple sources if needed for a comprehensive answer.
|
|
20
|
+
|
|
21
|
+
Extract and return the result according to the expected result description in this exact format:
|
|
22
|
+
```
|
|
23
|
+
Result: [extracted result matching the expected result description]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If sources are relevant, you may include them in a brief format:
|
|
27
|
+
```
|
|
28
|
+
Result: [extracted result matching the expected result description]
|
|
29
|
+
Sources: [brief list of sources if relevant]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If the research cannot find relevant information, return:
|
|
33
|
+
```
|
|
34
|
+
Not found: [brief explanation of what was searched]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
@@ -0,0 +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: [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.
|
|
@@ -0,0 +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: [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.
|
|
@@ -0,0 +1,31 @@
|
|
|
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.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unravel
|
|
3
|
+
description: Analyze a function to find what it calls, then retrieve the implementation of each called function. Returns the actual code of dependencies.
|
|
4
|
+
allowedTools: [read, grep, glob]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
filePath:
|
|
8
|
+
type: string
|
|
9
|
+
description: Path to the file containing the function to analyze
|
|
10
|
+
functionName:
|
|
11
|
+
type: string
|
|
12
|
+
description: Name of the function to analyze for its internal function calls
|
|
13
|
+
required: [filePath, functionName]
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
File: {{filePath}}
|
|
17
|
+
Function: {{functionName}}
|
|
18
|
+
|
|
19
|
+
Read the file and locate the function. Analyze its body to identify all function calls it makes.
|
|
20
|
+
|
|
21
|
+
For each significant function call (ignore built-ins, standard library, and trivial operations):
|
|
22
|
+
1. Use grep and glob to locate the implementation
|
|
23
|
+
2. Read the file to extract the implementation code
|
|
24
|
+
|
|
25
|
+
Return the implementations in this exact format. For each called function found, include:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Function: functionName
|
|
29
|
+
File: path/to/file.ts
|
|
30
|
+
Lines X-Y:
|
|
31
|
+
<code>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If multiple functions are called, separate each with "---":
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Function: firstFunction
|
|
38
|
+
File: path/to/file1.ts
|
|
39
|
+
Lines X-Y:
|
|
40
|
+
<code>
|
|
41
|
+
---
|
|
42
|
+
Function: secondFunction
|
|
43
|
+
File: path/to/file2.ts
|
|
44
|
+
Lines A-B:
|
|
45
|
+
<code>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weave
|
|
3
|
+
description: Write content to files. Creates or overwrites files. Automatically fixes errors and retries if writing fails.
|
|
4
|
+
allowedTools: [write, read, bash, bashOutput]
|
|
5
|
+
parameters:
|
|
6
|
+
properties:
|
|
7
|
+
filePath:
|
|
8
|
+
type: string
|
|
9
|
+
description: Destination path—relative or absolute. Parent directories created automatically.
|
|
10
|
+
content:
|
|
11
|
+
type: string
|
|
12
|
+
description: Complete file content. Replaces everything in the file.
|
|
13
|
+
createOnly:
|
|
14
|
+
type: boolean
|
|
15
|
+
description: Only create new files? If true, won't overwrite existing files. Defaults to false.
|
|
16
|
+
required: [filePath, content]
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
Target file: {{filePath}}
|
|
20
|
+
{{#if createOnly}}
|
|
21
|
+
Only create new file, do not overwrite if exists.
|
|
22
|
+
{{else}}
|
|
23
|
+
Overwrite file if it exists.
|
|
24
|
+
{{/if}}
|
|
25
|
+
|
|
26
|
+
Content to write:
|
|
27
|
+
<content>
|
|
28
|
+
{{content}}
|
|
29
|
+
</content>
|
|
30
|
+
|
|
31
|
+
First, attempt to write the content using the write tool.
|
|
32
|
+
|
|
33
|
+
If the write succeeds, return the result immediately in this exact format:
|
|
34
|
+
```
|
|
35
|
+
Success: Wrote N lines to /path/to/file
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If the write fails, analyze the error and attempt to fix it.
|
|
39
|
+
|
|
40
|
+
After fixing, retry the write operation.
|
|
41
|
+
|
|
42
|
+
If it succeeds, return:
|
|
43
|
+
```
|
|
44
|
+
Success after fix: Wrote N lines to /path/to/file
|
|
45
|
+
Fixed issue: [brief description of what was fixed]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If all attempts fail, return:
|
|
49
|
+
```
|
|
50
|
+
Failed: [error description]
|
|
51
|
+
Attempted fixes: [what was tried]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Do not include explanations beyond the result format. Keep responses concise and structured.
|