Re-imagined and re-written Debug tool. Instead of prompting Claude to perform initial analysis (and hoping it did), the tool now works through the debug process as an 'investigation', encouraging Claud to gather its 'findings' / 'hypothesis', stepping back as needed, collecting files it's gone through and keeping track of files relevant to the issue at hand. This structured investiion is then passed to the other model with far greater insight than the original debug tool ever could.
Improved prompts, guard against overengineering and flag that as an antipattern
This commit is contained in:
@@ -157,10 +157,10 @@ async def test_unknown_tool_defaults_to_prompt():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_tool_parameter_standardization():
|
||||
"""Test that all tools use standardized 'prompt' parameter"""
|
||||
"""Test that most tools use standardized 'prompt' parameter (debug uses investigation pattern)"""
|
||||
from tools.analyze import AnalyzeRequest
|
||||
from tools.codereview import CodeReviewRequest
|
||||
from tools.debug import DebugIssueRequest
|
||||
from tools.debug import DebugInvestigationRequest
|
||||
from tools.precommit import PrecommitRequest
|
||||
from tools.thinkdeep import ThinkDeepRequest
|
||||
|
||||
@@ -168,9 +168,16 @@ async def test_tool_parameter_standardization():
|
||||
analyze = AnalyzeRequest(files=["/test.py"], prompt="What does this do?")
|
||||
assert analyze.prompt == "What does this do?"
|
||||
|
||||
# Test debug tool uses prompt
|
||||
debug = DebugIssueRequest(prompt="Error occurred")
|
||||
assert debug.prompt == "Error occurred"
|
||||
# Debug tool now uses self-investigation pattern with different fields
|
||||
debug = DebugInvestigationRequest(
|
||||
step="Investigating error",
|
||||
step_number=1,
|
||||
total_steps=3,
|
||||
next_step_required=True,
|
||||
findings="Initial error analysis",
|
||||
)
|
||||
assert debug.step == "Investigating error"
|
||||
assert debug.findings == "Initial error analysis"
|
||||
|
||||
# Test codereview tool uses prompt
|
||||
review = CodeReviewRequest(files=["/test.py"], prompt="Review this")
|
||||
|
||||
Reference in New Issue
Block a user