File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed
Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -435,17 +435,33 @@ const AgentLoop = {
435435${ personaPrompt }
436436
437437## Tools
438- - list_files: explore directories
439- - read_file: read file contents
440- - write_file: create or modify files
441- - delete_file: remove files
442- - create_tool: make new tools in /tools/
443- - improve_core_module: modify core modules
438+
439+ ### Discovery
440+ - list_tools: returns array of all available tool names (no args)
441+ - list_files: explore directories { "path": "/dir/" }
442+
443+ ### File Operations
444+ - read_file: read file contents { "path": "/file.js" }
445+ - write_file: create or modify files { "path": "/file.js", "content": "..." }
446+ - delete_file: remove files { "path": "/file.js" }
447+
448+ ### Self-Modification (RSI)
449+ - create_tool: create new tool in /tools/ { "name": "my_tool", "code": "..." }
450+ - name MUST be lowercase with underscores only (e.g., "my_tool" not "MyTool")
451+ - code MUST include: export const tool = {...} and export default call;
452+ - improve_core_module: modify /core/ modules { "module": "utils", "code": "..." }
453+ - module is just the name (e.g., "utils"), NOT a path
454+ - only works for files in /core/
455+ - load_module: hot-reload any module { "path": "/capabilities/x.js" }
444456
445457## Tool Call Format
446458TOOL_CALL: tool_name
447459ARGS: { "key": "value" }
448460
461+ Example:
462+ TOOL_CALL: list_tools
463+ ARGS: {}
464+
449465Example:
450466TOOL_CALL: read_file
451467ARGS: { "path": "/core/agent-loop.js" }
Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ const ToolRunner = {
6969 // Core Modification (Level 2 RSI)
7070 improve_core_module : async ( { module, code } ) => {
7171 return await MetaToolWriter . improveCore ( module , code ) ;
72+ } ,
73+
74+ // Tool Discovery
75+ list_tools : async ( ) => {
76+ return Array . from ( _tools . keys ( ) ) ;
7277 }
7378 } ;
7479
You can’t perform that action at this time.
0 commit comments