diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 07c445e..5266272 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -345,6 +345,23 @@ curl -X POST http://{self.api_host}:{self.api_port}/api/projects/{project_id}/ta 成功:status → {success_status} | 失败:status → "failed" """ + def _build_discussion_prompt(self, task_id: str, title: str, + description: str, must_haves: str, + project_id: str, agent_id: str) -> str: + """构建讨论类 spawn prompt(§3.3 框架 + Boids)""" + goal_snapshot = description or title + constraints = must_haves or "(无特殊约束)" + + return DISCUSSION_PROMPT_TEMPLATE.format( + goal_snapshot=goal_snapshot, + constraints=constraints, + project_id=project_id, + task_id=task_id, + agent_id=agent_id, + api_host=self.api_host, + api_port=self.api_port, + ) + def _build_mail_prompt(self, task_id: str, title: str, description: str, must_haves: str, agent_id: str) -> str: """构建 Mail 专用精简模板"""