jonsoc 1.1.43 → 1.1.45
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/Dockerfile +18 -18
- package/bin/jonsoc +265 -265
- package/bunfig.toml +7 -7
- package/package.json +27 -25
- package/src/agent/generate.txt +75 -75
- package/src/agent/prompt/compaction.txt +12 -12
- package/src/agent/prompt/explore.txt +18 -18
- package/src/agent/prompt/summary.txt +11 -11
- package/src/agent/prompt/title.txt +44 -44
- package/src/brand/index.ts +16 -0
- package/src/command/template/initialize.txt +10 -10
- package/src/command/template/review.txt +99 -99
- package/src/session/prompt/anthropic-20250930.txt +168 -168
- package/src/session/prompt/anthropic.txt +99 -99
- package/src/session/prompt/anthropic_spoof.txt +1 -1
- package/src/session/prompt/beast.txt +149 -149
- package/src/session/prompt/build-switch.txt +5 -5
- package/src/session/prompt/codex_header.txt +81 -81
- package/src/session/prompt/copilot-gpt-5.txt +145 -145
- package/src/session/prompt/gemini.txt +157 -157
- package/src/session/prompt/max-steps.txt +15 -15
- package/src/session/prompt/plan-reminder-anthropic.txt +67 -67
- package/src/session/prompt/plan.txt +26 -26
- package/src/session/prompt/qwen.txt +111 -111
- package/src/tool/apply_patch.txt +33 -33
- package/src/tool/bash.txt +115 -115
- package/src/tool/batch.txt +23 -23
- package/src/tool/codesearch.txt +12 -12
- package/src/tool/edit.txt +10 -10
- package/src/tool/glob.txt +6 -6
- package/src/tool/grep.txt +8 -8
- package/src/tool/ls.txt +1 -1
- package/src/tool/lsp.txt +19 -19
- package/src/tool/multiedit.txt +41 -41
- package/src/tool/plan-enter.txt +14 -14
- package/src/tool/plan-exit.txt +13 -13
- package/src/tool/question.txt +10 -10
- package/src/tool/read.txt +12 -12
- package/src/tool/task.txt +60 -60
- package/src/tool/todoread.txt +14 -14
- package/src/tool/todowrite.txt +167 -167
- package/src/tool/webfetch.txt +13 -13
- package/src/tool/websearch.txt +14 -14
- package/src/tool/write.txt +8 -8
- package/test/fixture/lsp/fake-lsp-server.js +77 -77
- package/test/tool/__snapshots__/tool.test.ts.snap +9 -9
package/src/tool/edit.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Performs exact string replacements in files.
|
|
2
|
-
|
|
3
|
-
Usage:
|
|
4
|
-
- You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
|
|
5
|
-
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.
|
|
6
|
-
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
7
|
-
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
8
|
-
- The edit will FAIL if `oldString` is not found in the file with an error "oldString not found in content".
|
|
9
|
-
- The edit will FAIL if `oldString` is found multiple times in the file with an error "oldString found multiple times and requires more code context to uniquely identify the intended match". Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
|
|
10
|
-
- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
|
1
|
+
Performs exact string replacements in files.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
- You must use your `Read` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.
|
|
5
|
+
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the oldString or newString.
|
|
6
|
+
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
7
|
+
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
8
|
+
- The edit will FAIL if `oldString` is not found in the file with an error "oldString not found in content".
|
|
9
|
+
- The edit will FAIL if `oldString` is found multiple times in the file with an error "oldString found multiple times and requires more code context to uniquely identify the intended match". Either provide a larger string with more surrounding context to make it unique or use `replaceAll` to change every instance of `oldString`.
|
|
10
|
+
- Use `replaceAll` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
package/src/tool/glob.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
- Fast file pattern matching tool that works with any codebase size
|
|
2
|
-
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
3
|
-
- Returns matching file paths sorted by modification time
|
|
4
|
-
- Use this tool when you need to find files by name patterns
|
|
5
|
-
- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
|
|
6
|
-
- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.
|
|
1
|
+
- Fast file pattern matching tool that works with any codebase size
|
|
2
|
+
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
3
|
+
- Returns matching file paths sorted by modification time
|
|
4
|
+
- Use this tool when you need to find files by name patterns
|
|
5
|
+
- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
|
|
6
|
+
- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.
|
package/src/tool/grep.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
- Fast content search tool that works with any codebase size
|
|
2
|
-
- Searches file contents using regular expressions
|
|
3
|
-
- Supports full regex syntax (eg. "log.*Error", "function\s+\w+", etc.)
|
|
4
|
-
- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")
|
|
5
|
-
- Returns file paths and line numbers with at least one match sorted by modification time
|
|
6
|
-
- Use this tool when you need to find files containing specific patterns
|
|
7
|
-
- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.
|
|
8
|
-
- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
|
|
1
|
+
- Fast content search tool that works with any codebase size
|
|
2
|
+
- Searches file contents using regular expressions
|
|
3
|
+
- Supports full regex syntax (eg. "log.*Error", "function\s+\w+", etc.)
|
|
4
|
+
- Filter files by pattern with the include parameter (eg. "*.js", "*.{ts,tsx}")
|
|
5
|
+
- Returns file paths and line numbers with at least one match sorted by modification time
|
|
6
|
+
- Use this tool when you need to find files containing specific patterns
|
|
7
|
+
- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.
|
|
8
|
+
- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead
|
package/src/tool/ls.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Lists files and directories in a given path. The path parameter must be absolute; omit it to use the current workspace directory. You can optionally provide an array of glob patterns to ignore with the ignore parameter. You should generally prefer the Glob and Grep tools, if you know which directories to search.
|
|
1
|
+
Lists files and directories in a given path. The path parameter must be absolute; omit it to use the current workspace directory. You can optionally provide an array of glob patterns to ignore with the ignore parameter. You should generally prefer the Glob and Grep tools, if you know which directories to search.
|
package/src/tool/lsp.txt
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
2
|
-
|
|
3
|
-
Supported operations:
|
|
4
|
-
- goToDefinition: Find where a symbol is defined
|
|
5
|
-
- findReferences: Find all references to a symbol
|
|
6
|
-
- hover: Get hover information (documentation, type info) for a symbol
|
|
7
|
-
- documentSymbol: Get all symbols (functions, classes, variables) in a document
|
|
8
|
-
- workspaceSymbol: Search for symbols across the entire workspace
|
|
9
|
-
- goToImplementation: Find implementations of an interface or abstract method
|
|
10
|
-
- prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
|
|
11
|
-
- incomingCalls: Find all functions/methods that call the function at a position
|
|
12
|
-
- outgoingCalls: Find all functions/methods called by the function at a position
|
|
13
|
-
|
|
14
|
-
All operations require:
|
|
15
|
-
- filePath: The file to operate on
|
|
16
|
-
- line: The line number (1-based, as shown in editors)
|
|
17
|
-
- character: The character offset (1-based, as shown in editors)
|
|
18
|
-
|
|
19
|
-
Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.
|
|
1
|
+
Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
2
|
+
|
|
3
|
+
Supported operations:
|
|
4
|
+
- goToDefinition: Find where a symbol is defined
|
|
5
|
+
- findReferences: Find all references to a symbol
|
|
6
|
+
- hover: Get hover information (documentation, type info) for a symbol
|
|
7
|
+
- documentSymbol: Get all symbols (functions, classes, variables) in a document
|
|
8
|
+
- workspaceSymbol: Search for symbols across the entire workspace
|
|
9
|
+
- goToImplementation: Find implementations of an interface or abstract method
|
|
10
|
+
- prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
|
|
11
|
+
- incomingCalls: Find all functions/methods that call the function at a position
|
|
12
|
+
- outgoingCalls: Find all functions/methods called by the function at a position
|
|
13
|
+
|
|
14
|
+
All operations require:
|
|
15
|
+
- filePath: The file to operate on
|
|
16
|
+
- line: The line number (1-based, as shown in editors)
|
|
17
|
+
- character: The character offset (1-based, as shown in editors)
|
|
18
|
+
|
|
19
|
+
Note: LSP servers must be configured for the file type. If no server is available, an error will be returned.
|
package/src/tool/multiedit.txt
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
This is a tool for making multiple edits to a single file in one operation. It is built on top of the Edit tool and allows you to perform multiple find-and-replace operations efficiently. Prefer this tool over the Edit tool when you need to make multiple edits to the same file.
|
|
2
|
-
|
|
3
|
-
Before using this tool:
|
|
4
|
-
|
|
5
|
-
1. Use the Read tool to understand the file's contents and context
|
|
6
|
-
2. Verify the directory path is correct
|
|
7
|
-
|
|
8
|
-
To make multiple file edits, provide the following:
|
|
9
|
-
1. file_path: The absolute path to the file to modify (must be absolute, not relative)
|
|
10
|
-
2. edits: An array of edit operations to perform, where each edit contains:
|
|
11
|
-
- oldString: The text to replace (must match the file contents exactly, including all whitespace and indentation)
|
|
12
|
-
- newString: The edited text to replace the oldString
|
|
13
|
-
- replaceAll: Replace all occurrences of oldString. This parameter is optional and defaults to false.
|
|
14
|
-
|
|
15
|
-
IMPORTANT:
|
|
16
|
-
- All edits are applied in sequence, in the order they are provided
|
|
17
|
-
- Each edit operates on the result of the previous edit
|
|
18
|
-
- All edits must be valid for the operation to succeed - if any edit fails, none will be applied
|
|
19
|
-
- This tool is ideal when you need to make several changes to different parts of the same file
|
|
20
|
-
|
|
21
|
-
CRITICAL REQUIREMENTS:
|
|
22
|
-
1. All edits follow the same requirements as the single Edit tool
|
|
23
|
-
2. The edits are atomic - either all succeed or none are applied
|
|
24
|
-
3. Plan your edits carefully to avoid conflicts between sequential operations
|
|
25
|
-
|
|
26
|
-
WARNING:
|
|
27
|
-
- The tool will fail if edits.oldString doesn't match the file contents exactly (including whitespace)
|
|
28
|
-
- The tool will fail if edits.oldString and edits.newString are the same
|
|
29
|
-
- Since edits are applied in sequence, ensure that earlier edits don't affect the text that later edits are trying to find
|
|
30
|
-
|
|
31
|
-
When making edits:
|
|
32
|
-
- Ensure all edits result in idiomatic, correct code
|
|
33
|
-
- Do not leave the code in a broken state
|
|
34
|
-
- Always use absolute file paths (starting with /)
|
|
35
|
-
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
36
|
-
- Use replaceAll for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
|
37
|
-
|
|
38
|
-
If you want to create a new file, use:
|
|
39
|
-
- A new file path, including dir name if needed
|
|
40
|
-
- First edit: empty oldString and the new file's contents as newString
|
|
41
|
-
- Subsequent edits: normal edit operations on the created content
|
|
1
|
+
This is a tool for making multiple edits to a single file in one operation. It is built on top of the Edit tool and allows you to perform multiple find-and-replace operations efficiently. Prefer this tool over the Edit tool when you need to make multiple edits to the same file.
|
|
2
|
+
|
|
3
|
+
Before using this tool:
|
|
4
|
+
|
|
5
|
+
1. Use the Read tool to understand the file's contents and context
|
|
6
|
+
2. Verify the directory path is correct
|
|
7
|
+
|
|
8
|
+
To make multiple file edits, provide the following:
|
|
9
|
+
1. file_path: The absolute path to the file to modify (must be absolute, not relative)
|
|
10
|
+
2. edits: An array of edit operations to perform, where each edit contains:
|
|
11
|
+
- oldString: The text to replace (must match the file contents exactly, including all whitespace and indentation)
|
|
12
|
+
- newString: The edited text to replace the oldString
|
|
13
|
+
- replaceAll: Replace all occurrences of oldString. This parameter is optional and defaults to false.
|
|
14
|
+
|
|
15
|
+
IMPORTANT:
|
|
16
|
+
- All edits are applied in sequence, in the order they are provided
|
|
17
|
+
- Each edit operates on the result of the previous edit
|
|
18
|
+
- All edits must be valid for the operation to succeed - if any edit fails, none will be applied
|
|
19
|
+
- This tool is ideal when you need to make several changes to different parts of the same file
|
|
20
|
+
|
|
21
|
+
CRITICAL REQUIREMENTS:
|
|
22
|
+
1. All edits follow the same requirements as the single Edit tool
|
|
23
|
+
2. The edits are atomic - either all succeed or none are applied
|
|
24
|
+
3. Plan your edits carefully to avoid conflicts between sequential operations
|
|
25
|
+
|
|
26
|
+
WARNING:
|
|
27
|
+
- The tool will fail if edits.oldString doesn't match the file contents exactly (including whitespace)
|
|
28
|
+
- The tool will fail if edits.oldString and edits.newString are the same
|
|
29
|
+
- Since edits are applied in sequence, ensure that earlier edits don't affect the text that later edits are trying to find
|
|
30
|
+
|
|
31
|
+
When making edits:
|
|
32
|
+
- Ensure all edits result in idiomatic, correct code
|
|
33
|
+
- Do not leave the code in a broken state
|
|
34
|
+
- Always use absolute file paths (starting with /)
|
|
35
|
+
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
|
|
36
|
+
- Use replaceAll for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.
|
|
37
|
+
|
|
38
|
+
If you want to create a new file, use:
|
|
39
|
+
- A new file path, including dir name if needed
|
|
40
|
+
- First edit: empty oldString and the new file's contents as newString
|
|
41
|
+
- Subsequent edits: normal edit operations on the created content
|
package/src/tool/plan-enter.txt
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
Use this tool to suggest switching to plan agent when the user's request would benefit from planning before implementation.
|
|
2
|
-
|
|
3
|
-
If they explicitly mention wanting to create a plan ALWAYS call this tool first.
|
|
4
|
-
|
|
5
|
-
This tool will ask the user if they want to switch to plan agent.
|
|
6
|
-
|
|
7
|
-
Call this tool when:
|
|
8
|
-
- The user's request is complex and would benefit from planning first
|
|
9
|
-
- You want to research and design before making changes
|
|
10
|
-
- The task involves multiple files or significant architectural decisions
|
|
11
|
-
|
|
12
|
-
Do NOT call this tool:
|
|
13
|
-
- For simple, straightforward tasks
|
|
14
|
-
- When the user explicitly wants immediate implementation
|
|
1
|
+
Use this tool to suggest switching to plan agent when the user's request would benefit from planning before implementation.
|
|
2
|
+
|
|
3
|
+
If they explicitly mention wanting to create a plan ALWAYS call this tool first.
|
|
4
|
+
|
|
5
|
+
This tool will ask the user if they want to switch to plan agent.
|
|
6
|
+
|
|
7
|
+
Call this tool when:
|
|
8
|
+
- The user's request is complex and would benefit from planning first
|
|
9
|
+
- You want to research and design before making changes
|
|
10
|
+
- The task involves multiple files or significant architectural decisions
|
|
11
|
+
|
|
12
|
+
Do NOT call this tool:
|
|
13
|
+
- For simple, straightforward tasks
|
|
14
|
+
- When the user explicitly wants immediate implementation
|
package/src/tool/plan-exit.txt
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Use this tool when you have completed the planning phase and are ready to exit plan agent.
|
|
2
|
-
|
|
3
|
-
This tool will ask the user if they want to switch to build agent to start implementing the plan.
|
|
4
|
-
|
|
5
|
-
Call this tool:
|
|
6
|
-
- After you have written a complete plan to the plan file
|
|
7
|
-
- After you have clarified any questions with the user
|
|
8
|
-
- When you are confident the plan is ready for implementation
|
|
9
|
-
|
|
10
|
-
Do NOT call this tool:
|
|
11
|
-
- Before you have created or finalized the plan
|
|
12
|
-
- If you still have unanswered questions about the implementation
|
|
13
|
-
- If the user has indicated they want to continue planning
|
|
1
|
+
Use this tool when you have completed the planning phase and are ready to exit plan agent.
|
|
2
|
+
|
|
3
|
+
This tool will ask the user if they want to switch to build agent to start implementing the plan.
|
|
4
|
+
|
|
5
|
+
Call this tool:
|
|
6
|
+
- After you have written a complete plan to the plan file
|
|
7
|
+
- After you have clarified any questions with the user
|
|
8
|
+
- When you are confident the plan is ready for implementation
|
|
9
|
+
|
|
10
|
+
Do NOT call this tool:
|
|
11
|
+
- Before you have created or finalized the plan
|
|
12
|
+
- If you still have unanswered questions about the implementation
|
|
13
|
+
- If the user has indicated they want to continue planning
|
package/src/tool/question.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
2
|
-
1. Gather user preferences or requirements
|
|
3
|
-
2. Clarify ambiguous instructions
|
|
4
|
-
3. Get decisions on implementation choices as you work
|
|
5
|
-
4. Offer choices to the user about what direction to take.
|
|
6
|
-
|
|
7
|
-
Usage notes:
|
|
8
|
-
- When `custom` is enabled (default), a "Type your own answer" option is added automatically; don't include "Other" or catch-all options
|
|
9
|
-
- Answers are returned as arrays of labels; set `multiple: true` to allow selecting more than one
|
|
10
|
-
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
1
|
+
Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
2
|
+
1. Gather user preferences or requirements
|
|
3
|
+
2. Clarify ambiguous instructions
|
|
4
|
+
3. Get decisions on implementation choices as you work
|
|
5
|
+
4. Offer choices to the user about what direction to take.
|
|
6
|
+
|
|
7
|
+
Usage notes:
|
|
8
|
+
- When `custom` is enabled (default), a "Type your own answer" option is added automatically; don't include "Other" or catch-all options
|
|
9
|
+
- Answers are returned as arrays of labels; set `multiple: true` to allow selecting more than one
|
|
10
|
+
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
package/src/tool/read.txt
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
Reads a file from the local filesystem. You can access any file directly by using this tool.
|
|
2
|
-
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
|
|
3
|
-
|
|
4
|
-
Usage:
|
|
5
|
-
- The filePath parameter must be an absolute path, not a relative path
|
|
6
|
-
- By default, it reads up to 2000 lines starting from the beginning of the file
|
|
7
|
-
- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
|
|
8
|
-
- Any lines longer than 2000 characters will be truncated
|
|
9
|
-
- Results are returned using cat -n format, with line numbers starting at 1
|
|
10
|
-
- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.
|
|
11
|
-
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
|
|
12
|
-
- You can read image files using this tool.
|
|
1
|
+
Reads a file from the local filesystem. You can access any file directly by using this tool.
|
|
2
|
+
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
- The filePath parameter must be an absolute path, not a relative path
|
|
6
|
+
- By default, it reads up to 2000 lines starting from the beginning of the file
|
|
7
|
+
- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
|
|
8
|
+
- Any lines longer than 2000 characters will be truncated
|
|
9
|
+
- Results are returned using cat -n format, with line numbers starting at 1
|
|
10
|
+
- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.
|
|
11
|
+
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
|
|
12
|
+
- You can read image files using this tool.
|
package/src/tool/task.txt
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
Launch a new agent to handle complex, multistep tasks autonomously.
|
|
2
|
-
|
|
3
|
-
Available agent types and the tools they have access to:
|
|
4
|
-
{agents}
|
|
5
|
-
|
|
6
|
-
When using the Task tool, you must specify a subagent_type parameter to select which agent type to use.
|
|
7
|
-
|
|
8
|
-
When to use the Task tool:
|
|
9
|
-
- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description="Check the file", prompt="/check-file path/to/file.py")
|
|
10
|
-
|
|
11
|
-
When NOT to use the Task tool:
|
|
12
|
-
- If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly
|
|
13
|
-
- If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
|
|
14
|
-
- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly
|
|
15
|
-
- Other tasks that are not related to the agent descriptions above
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Usage notes:
|
|
19
|
-
1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses
|
|
20
|
-
2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
|
|
21
|
-
3. Each agent invocation is stateless unless you provide a session_id. Your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
|
|
22
|
-
4. The agent's outputs should generally be trusted
|
|
23
|
-
5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent
|
|
24
|
-
6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.
|
|
25
|
-
|
|
26
|
-
Example usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):
|
|
27
|
-
|
|
28
|
-
<example_agent_descriptions>
|
|
29
|
-
"code-reviewer": use this agent after you are done writing a significant piece of code
|
|
30
|
-
"greeting-responder": use this agent when to respond to user greetings with a friendly joke
|
|
31
|
-
</example_agent_description>
|
|
32
|
-
|
|
33
|
-
<example>
|
|
34
|
-
user: "Please write a function that checks if a number is prime"
|
|
35
|
-
assistant: Sure let me write a function that checks if a number is prime
|
|
36
|
-
assistant: First let me use the Write tool to write a function that checks if a number is prime
|
|
37
|
-
assistant: I'm going to use the Write tool to write the following code:
|
|
38
|
-
<code>
|
|
39
|
-
function isPrime(n) {
|
|
40
|
-
if (n <= 1) return false
|
|
41
|
-
for (let i = 2; i * i <= n; i++) {
|
|
42
|
-
if (n % i === 0) return false
|
|
43
|
-
}
|
|
44
|
-
return true
|
|
45
|
-
}
|
|
46
|
-
</code>
|
|
47
|
-
<commentary>
|
|
48
|
-
Since a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code
|
|
49
|
-
</commentary>
|
|
50
|
-
assistant: Now let me use the code-reviewer agent to review the code
|
|
51
|
-
assistant: Uses the Task tool to launch the code-reviewer agent
|
|
52
|
-
</example>
|
|
53
|
-
|
|
54
|
-
<example>
|
|
55
|
-
user: "Hello"
|
|
56
|
-
<commentary>
|
|
57
|
-
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke
|
|
58
|
-
</commentary>
|
|
59
|
-
assistant: "I'm going to use the Task tool to launch the with the greeting-responder agent"
|
|
60
|
-
</example>
|
|
1
|
+
Launch a new agent to handle complex, multistep tasks autonomously.
|
|
2
|
+
|
|
3
|
+
Available agent types and the tools they have access to:
|
|
4
|
+
{agents}
|
|
5
|
+
|
|
6
|
+
When using the Task tool, you must specify a subagent_type parameter to select which agent type to use.
|
|
7
|
+
|
|
8
|
+
When to use the Task tool:
|
|
9
|
+
- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description="Check the file", prompt="/check-file path/to/file.py")
|
|
10
|
+
|
|
11
|
+
When NOT to use the Task tool:
|
|
12
|
+
- If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly
|
|
13
|
+
- If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
|
|
14
|
+
- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly
|
|
15
|
+
- Other tasks that are not related to the agent descriptions above
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Usage notes:
|
|
19
|
+
1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses
|
|
20
|
+
2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
|
|
21
|
+
3. Each agent invocation is stateless unless you provide a session_id. Your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
|
|
22
|
+
4. The agent's outputs should generally be trusted
|
|
23
|
+
5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent
|
|
24
|
+
6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.
|
|
25
|
+
|
|
26
|
+
Example usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):
|
|
27
|
+
|
|
28
|
+
<example_agent_descriptions>
|
|
29
|
+
"code-reviewer": use this agent after you are done writing a significant piece of code
|
|
30
|
+
"greeting-responder": use this agent when to respond to user greetings with a friendly joke
|
|
31
|
+
</example_agent_description>
|
|
32
|
+
|
|
33
|
+
<example>
|
|
34
|
+
user: "Please write a function that checks if a number is prime"
|
|
35
|
+
assistant: Sure let me write a function that checks if a number is prime
|
|
36
|
+
assistant: First let me use the Write tool to write a function that checks if a number is prime
|
|
37
|
+
assistant: I'm going to use the Write tool to write the following code:
|
|
38
|
+
<code>
|
|
39
|
+
function isPrime(n) {
|
|
40
|
+
if (n <= 1) return false
|
|
41
|
+
for (let i = 2; i * i <= n; i++) {
|
|
42
|
+
if (n % i === 0) return false
|
|
43
|
+
}
|
|
44
|
+
return true
|
|
45
|
+
}
|
|
46
|
+
</code>
|
|
47
|
+
<commentary>
|
|
48
|
+
Since a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code
|
|
49
|
+
</commentary>
|
|
50
|
+
assistant: Now let me use the code-reviewer agent to review the code
|
|
51
|
+
assistant: Uses the Task tool to launch the code-reviewer agent
|
|
52
|
+
</example>
|
|
53
|
+
|
|
54
|
+
<example>
|
|
55
|
+
user: "Hello"
|
|
56
|
+
<commentary>
|
|
57
|
+
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke
|
|
58
|
+
</commentary>
|
|
59
|
+
assistant: "I'm going to use the Task tool to launch the with the greeting-responder agent"
|
|
60
|
+
</example>
|
package/src/tool/todoread.txt
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of
|
|
2
|
-
the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:
|
|
3
|
-
- At the beginning of conversations to see what's pending
|
|
4
|
-
- Before starting new tasks to prioritize work
|
|
5
|
-
- When the user asks about previous tasks or plans
|
|
6
|
-
- Whenever you're uncertain about what to do next
|
|
7
|
-
- After completing tasks to update your understanding of remaining work
|
|
8
|
-
- After every few messages to ensure you're on track
|
|
9
|
-
|
|
10
|
-
Usage:
|
|
11
|
-
- This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
|
|
12
|
-
- Returns a list of todo items with their status, priority, and content
|
|
13
|
-
- Use this information to track progress and plan next steps
|
|
14
|
-
- If no todos exist yet, an empty list will be returned
|
|
1
|
+
Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of
|
|
2
|
+
the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:
|
|
3
|
+
- At the beginning of conversations to see what's pending
|
|
4
|
+
- Before starting new tasks to prioritize work
|
|
5
|
+
- When the user asks about previous tasks or plans
|
|
6
|
+
- Whenever you're uncertain about what to do next
|
|
7
|
+
- After completing tasks to update your understanding of remaining work
|
|
8
|
+
- After every few messages to ensure you're on track
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
- This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
|
|
12
|
+
- Returns a list of todo items with their status, priority, and content
|
|
13
|
+
- Use this information to track progress and plan next steps
|
|
14
|
+
- If no todos exist yet, an empty list will be returned
|