🚀 Major Enhancement: Workflow-Based Tool Architecture v5.5.0 (#95)
* WIP: new workflow architecture * WIP: further improvements and cleanup * WIP: cleanup and docks, replace old tool with new * WIP: cleanup and docks, replace old tool with new * WIP: new planner implementation using workflow * WIP: precommit tool working as a workflow instead of a basic tool Support for passing False to use_assistant_model to skip external models completely and use Claude only * WIP: precommit workflow version swapped with old * WIP: codereview * WIP: replaced codereview * WIP: replaced codereview * WIP: replaced refactor * WIP: workflow for thinkdeep * WIP: ensure files get embedded correctly * WIP: thinkdeep replaced with workflow version * WIP: improved messaging when an external model's response is received * WIP: analyze tool swapped * WIP: updated tests * Extract only the content when building history * Use "relevant_files" for workflow tools only * WIP: updated tests * Extract only the content when building history * Use "relevant_files" for workflow tools only * WIP: fixed get_completion_next_steps_message missing param * Fixed tests Request for files consistently * Fixed tests Request for files consistently * Fixed tests * New testgen workflow tool Updated docs * Swap testgen workflow * Fix CI test failures by excluding API-dependent tests - Update GitHub Actions workflow to exclude simulation tests that require API keys - Fix collaboration tests to properly mock workflow tool expert analysis calls - Update test assertions to handle new workflow tool response format - Ensure unit tests run without external API dependencies in CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * WIP - Update tests to match new tools * WIP - Update tests to match new tools --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
4dae6e457e
commit
69a3121452
@@ -157,16 +157,23 @@ async def test_unknown_tool_defaults_to_prompt():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_tool_parameter_standardization():
|
||||
"""Test that most tools use standardized 'prompt' parameter (debug uses investigation pattern)"""
|
||||
from tools.analyze import AnalyzeRequest
|
||||
"""Test that workflow tools use standardized investigation pattern"""
|
||||
from tools.analyze import AnalyzeWorkflowRequest
|
||||
from tools.codereview import CodeReviewRequest
|
||||
from tools.debug import DebugInvestigationRequest
|
||||
from tools.precommit import PrecommitRequest
|
||||
from tools.thinkdeep import ThinkDeepRequest
|
||||
from tools.thinkdeep import ThinkDeepWorkflowRequest
|
||||
|
||||
# Test analyze tool uses prompt
|
||||
analyze = AnalyzeRequest(files=["/test.py"], prompt="What does this do?")
|
||||
assert analyze.prompt == "What does this do?"
|
||||
# Test analyze tool uses workflow pattern
|
||||
analyze = AnalyzeWorkflowRequest(
|
||||
step="What does this do?",
|
||||
step_number=1,
|
||||
total_steps=1,
|
||||
next_step_required=False,
|
||||
findings="Initial analysis",
|
||||
relevant_files=["/test.py"],
|
||||
)
|
||||
assert analyze.step == "What does this do?"
|
||||
|
||||
# Debug tool now uses self-investigation pattern with different fields
|
||||
debug = DebugInvestigationRequest(
|
||||
@@ -179,14 +186,32 @@ async def test_tool_parameter_standardization():
|
||||
assert debug.step == "Investigating error"
|
||||
assert debug.findings == "Initial error analysis"
|
||||
|
||||
# Test codereview tool uses prompt
|
||||
review = CodeReviewRequest(files=["/test.py"], prompt="Review this")
|
||||
assert review.prompt == "Review this"
|
||||
# Test codereview tool uses workflow fields
|
||||
review = CodeReviewRequest(
|
||||
step="Initial code review investigation",
|
||||
step_number=1,
|
||||
total_steps=2,
|
||||
next_step_required=True,
|
||||
findings="Initial review findings",
|
||||
relevant_files=["/test.py"],
|
||||
)
|
||||
assert review.step == "Initial code review investigation"
|
||||
assert review.findings == "Initial review findings"
|
||||
|
||||
# Test thinkdeep tool uses prompt
|
||||
think = ThinkDeepRequest(prompt="My analysis")
|
||||
assert think.prompt == "My analysis"
|
||||
# Test thinkdeep tool uses workflow pattern
|
||||
think = ThinkDeepWorkflowRequest(
|
||||
step="My analysis", step_number=1, total_steps=1, next_step_required=False, findings="Initial thinking analysis"
|
||||
)
|
||||
assert think.step == "My analysis"
|
||||
|
||||
# Test precommit tool uses prompt (optional)
|
||||
precommit = PrecommitRequest(path="/repo", prompt="Fix bug")
|
||||
assert precommit.prompt == "Fix bug"
|
||||
# Test precommit tool uses workflow fields
|
||||
precommit = PrecommitRequest(
|
||||
step="Validating changes for commit",
|
||||
step_number=1,
|
||||
total_steps=2,
|
||||
next_step_required=True,
|
||||
findings="Initial validation findings",
|
||||
path="/repo", # path only needed for step 1
|
||||
)
|
||||
assert precommit.step == "Validating changes for commit"
|
||||
assert precommit.findings == "Initial validation findings"
|
||||
|
||||
Reference in New Issue
Block a user