diff --git a/core/agent.py b/core/agent.py index 44d2cd7..cc5eb95 100644 --- a/core/agent.py +++ b/core/agent.py @@ -115,4 +115,5 @@ class CavemanAgent(BaseAgent): def __init__(self, model_name: str) -> None: super().__init__(model_name) - self.system_prompt = CAVEMAN_PROMPT + self.system_prompt: str = CAVEMAN_PROMPT + diff --git a/core/coding_agent.py b/core/coding_agent.py index b7cd64d..f392336 100644 --- a/core/coding_agent.py +++ b/core/coding_agent.py @@ -10,4 +10,5 @@ class CodingAgent(BaseAgent): def __init__(self, model_name: str) -> None: super().__init__(model_name) - self.system_prompt = CODING_AGENT_SYSTEM_PROMPT + self.system_prompt: str = CODING_AGENT_SYSTEM_PROMPT + diff --git a/core/coordinator_agent.py b/core/coordinator_agent.py index e50f1b1..7ee8204 100644 --- a/core/coordinator_agent.py +++ b/core/coordinator_agent.py @@ -17,7 +17,8 @@ class CoordinatorAgent(BaseAgent): def __init__(self, model_name: str) -> None: super().__init__(model_name) - self.system_prompt = COORDINATOR_SYSTEM_PROMPT + self.system_prompt: str = COORDINATOR_SYSTEM_PROMPT + async def decide_action( self, diff --git a/core/notification_agent.py b/core/notification_agent.py index b36869e..e7fb840 100644 --- a/core/notification_agent.py +++ b/core/notification_agent.py @@ -17,7 +17,8 @@ class NotificationReaderAgent(BaseAgent): def __init__(self, model_name: str) -> None: super().__init__(model_name) - self.system_prompt = NOTIFICATION_READER_SYSTEM_PROMPT + self.system_prompt: str = NOTIFICATION_READER_SYSTEM_PROMPT + async def decide_notification( self, diff --git a/core/planning_agent.py b/core/planning_agent.py index 858a510..3a30eb7 100644 --- a/core/planning_agent.py +++ b/core/planning_agent.py @@ -1,6 +1,6 @@ import logging from core.agent import BaseAgent -from .coding_prompt import CODING_AGENT_SYSTEM_PROMPT +from core.prompts import PLANNING_AGENT_SYSTEM_PROMPT logger: logging.Logger = logging.getLogger("agent-planning") @@ -10,4 +10,5 @@ class PlanningAgent(BaseAgent): def __init__(self, model_name: str) -> None: super().__init__(model_name) - self.system_prompt = CODING_AGENT_SYSTEM_PROMPT + self.system_prompt: str = PLANNING_AGENT_SYSTEM_PROMPT + diff --git a/core/prompts.py b/core/prompts.py index 7c43038..7b1c9f4 100644 --- a/core/prompts.py +++ b/core/prompts.py @@ -49,3 +49,16 @@ CRITICAL INSTRUCTIONS: - You can use the provided inspection tools (like get_issue, get_pull_request, get_issue_comments, get_pull_request_comments) to gather more details if the basic notification metadata is insufficient to make a decision. """ + +PLANNING_AGENT_SYSTEM_PROMPT: str = """ +You are an AI Planning Agent. Your job is to research the codebase and any external resources to produce a detailed, step-by-step implementation plan for a Gitea issue or Pull Request. + +CRITICAL RULES: +1. You are ONLY generating an implementation plan. DO NOT write files, DO NOT edit files, DO NOT commit, DO NOT push, and DO NOT create branches or PRs. +2. RESEARCH FIRST: + - Use web search to find documentation, solutions, APIs, and best practices. + - Use read_file, list_files, grep_search, and run_command to explore the repository structure and test commands. +3. Your plan must be clear and structured, identifying which files need to be modified, created, or deleted, and detailing the exact verification steps. +""" + +