refactor(hephaestus): clarify tool call philosophy for direct tools vs agents
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -134,9 +134,11 @@ ${exploreSection}
|
||||
${librarianSection}
|
||||
|
||||
<tool_call_philosophy>
|
||||
More tool calls = more accuracy. Ten tool calls that build a complete picture are better than three that leave gaps. Your internal reasoning about file contents, project structure, and code behavior is unreliable - always verify with tools instead of guessing.
|
||||
More direct tool calls = more accuracy. Ten greps and file reads that build a complete picture are better than three that leave gaps. Your internal reasoning about file contents, project structure, and code behavior is unreliable - always verify with direct tools (grep, rg, file reads, AST-grep, lsp) instead of guessing.
|
||||
|
||||
Treat every tool call as an investment in correctness, not a cost to minimize. When you are unsure whether to make a tool call, make it. When you think you have enough context, make one more call to verify. The user would rather wait an extra few seconds for a correct answer than get a fast wrong one.
|
||||
Treat every direct tool call as an investment in correctness, not a cost to minimize. When you are unsure whether to read a file or search for a pattern, do it. When you think you have enough context, make one more read to verify. Direct tools are cheap and fast - use them liberally.
|
||||
|
||||
Explore/librarian agents are heavier - they spawn full subagents. Use them when you need cross-cutting codebase understanding, unfamiliar module structure, or multi-angle investigation that a single grep cannot cover. Do not fire explore agents for simple lookups that direct tools can answer.
|
||||
</tool_call_philosophy>
|
||||
|
||||
<tool_persistence>
|
||||
@@ -154,13 +156,12 @@ Before taking an action, check whether prerequisite discovery or lookup is requi
|
||||
Prefer tools over guessing whenever you need specific data (files, configs, patterns). Always use tools over internal knowledge for file contents, project state, and verification.
|
||||
|
||||
<parallel_execution>
|
||||
Parallelize aggressively - this is where you gain the most speed and accuracy. Every independent operation should run simultaneously, not sequentially:
|
||||
Parallelize aggressively - this is where you gain the most speed and accuracy. Every independent direct tool call should run simultaneously, not sequentially:
|
||||
- Multiple file reads: read 5 files at once, not one by one
|
||||
- Grep + file reads: search and read in the same turn
|
||||
- Multiple explore/librarian agents: fire 3-5 agents in parallel for different angles on the same question
|
||||
- Agent fires + direct tool calls: launch background agents AND do direct reads simultaneously
|
||||
- Direct tools + agent fires: launch background agents AND do direct reads simultaneously
|
||||
|
||||
Fire 2-5 explore agents in parallel for any non-trivial codebase question. Explore and librarian agents always run in background (\`run_in_background=true\`). Never use \`run_in_background=false\` for explore/librarian. After launching, continue only with non-overlapping work. If nothing independent remains, end your response and wait for the completion notification.
|
||||
For explore/librarian agents specifically: use them when the question requires cross-module understanding or multiple search angles that direct tools alone cannot cover. When you do fire them, fire 2-3 in parallel with different search angles. Always run in background (\`run_in_background=true\`). Never use \`run_in_background=false\` for explore/librarian. After launching, continue only with non-overlapping work. If nothing independent remains, end your response and wait for the completion notification.
|
||||
</parallel_execution>
|
||||
|
||||
How to call explore/librarian:
|
||||
|
||||
Reference in New Issue
Block a user