allow one shot research

This commit is contained in:
AI Christianson 2024-12-11 16:20:01 -05:00
parent d302222c3e
commit c6de93c8d3
2 changed files with 13 additions and 4 deletions

View File

@ -66,16 +66,20 @@ Single-Shot Task Detection
Autonomously determine if a task can be completed immediately without further planning:
- Simple informational queries that can be answered directly from research
- Requests that don't require complex analysis or implementation
- Basic implementation tasks that don't require complex changes
- Cases where further planning would not add value
- Situations where immediate response meets all user requirements
One-shot completion will be blocked if:
- Research subtasks have been requested (must wait for research summary)
- Complex implementation has been explicitly requested
If you determine a task can be completed in a single shot:
1. Complete the necessary research to fully answer the query
1. Complete the necessary research or basic implementation work
2. Document your findings using emit_research_notes
3. Call one_shot_completed() to immediately conclude the task
Only use single-shot completion when you are confident no implementation or further planning is needed.
Only use single-shot completion for truly straightforward tasks that don't require additional planning or extensive changes.
Thoroughness and Completeness

View File

@ -247,11 +247,16 @@ def one_shot_completed(message: str) -> str:
message: Completion message to display
Raises:
TaskCompletedException: Always raised to stop execution
ValueError: If there are pending research subtasks or implementation requests
TaskCompletedException: When task is truly complete with no pending items
Returns:
Never returns, always raises exception
"""
if len(_global_memory['research_subtasks']) > 0:
raise ValueError("Cannot complete in one shot - research subtasks pending")
if len(_global_memory['implementation_requested']) > 0:
raise ValueError("Cannot complete in one shot - implementation was requested")
raise TaskCompletedException(message)
def get_memory_value(key: str) -> str: