improve reasoning assistance

This commit is contained in:
AI Christianson 2025-03-08 14:23:35 -05:00
parent 2130334837
commit 8f1e072e20
4 changed files with 20 additions and 5 deletions

2
.gitignore vendored
View File

@ -13,4 +13,4 @@ __pycache__/
/htmlcov
.envrc
appmap.log
*.swp

View File

@ -842,8 +842,6 @@ def run_planning_agent(
expert_guidance_section = ""
if expert_guidance:
expert_guidance_section = f"""<expert guidance>
Expert model has analyzed this task and provided the following guidance:
{expert_guidance}
</expert guidance>"""
@ -969,6 +967,14 @@ def run_task_implementation_agent(
logger.error(f"Failed to access research note repository: {str(e)}")
formatted_research_notes = ""
# Get latest project info
try:
project_info = get_project_info(".")
formatted_project_info = format_project_info(project_info)
except Exception as e:
logger.warning("Failed to get project info: %s", str(e))
formatted_project_info = "Project info unavailable"
# Get environment inventory information
prompt = IMPLEMENTATION_PROMPT.format(
@ -995,6 +1001,7 @@ def run_task_implementation_agent(
else ""
),
env_inv=get_env_inv(),
project_info=formatted_project_info,
)
config = get_config_repository().get_all() if not config else config

View File

@ -13,6 +13,10 @@ from ra_aid.prompts.web_research_prompts import WEB_RESEARCH_PROMPT_SECTION_IMPL
IMPLEMENTATION_PROMPT = """Current Date: {current_date}
Working Directory: {working_directory}
<project info>
{project_info}
</project info>
<key facts>
{key_facts}
</key facts>
@ -86,5 +90,7 @@ FOLLOW TEST DRIVEN DEVELOPMENT (TDD) PRACTICES WHERE POSSIBE. E.G. COMPILE CODE
IF YOU CAN SEE THE CODE WRITTEN/CHANGED BY THE PROGRAMMER, TRUST IT. YOU DO NOT NEED TO RE-READ EVERY FILE WITH EVERY SMALL EDIT.
YOU MUST READ FILES BEFORE WRITING OR CHANGING THEM.
NEVER ANNOUNCE WHAT YOU ARE DOING, JUST DO IT!
"""

View File

@ -45,10 +45,12 @@ Focus on strategic thinking rather than implementation details. Your guidance wi
Please be concise, practical, and specific to this task. Avoid generic advice.
Include beautiful, human-readable pseudo-code of tools you would call and branches in that flowchart to show contingency/conditional paths.
Use an outline/pseudo code format to communicate the approach. Remember I am an agent and will use this logic to guide my actions.
Your sole output is a beautiful outline/pseudo code format to communicate the approach. Remember I am an agent and will use this logic to guide my actions.
It should be the most beautiful, elegant, simple logic ever.
YOUR OUTPUT MUST BE MARKDOWN.
WE ARE IN THE **PLANNING** STAGE RIGHT NOW. NO CODE SHOULD BE WRITTEN. WE SHOULD BE THINKING LOGICALLY ABOUT HOW TO APPROACH THE PROBLEM, PLANNING OUT WHICH TASKS TO REQUEST IMPLEMENTATION OF, ETC.
"""