Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(bots): prefer inline work over unnecessary task delegation (#5639)
Chris Zhang953c46b25e88
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/botProfileRuntime.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/botProfileRuntime.test.tsindex b3de794d6d..c30f998fbe 100644--- a/apps/desktop/src/main/maker-ipc/__tests__/botProfileRuntime.test.ts+++ b/apps/desktop/src/main/maker-ipc/__tests__/botProfileRuntime.test.ts@@ -70,7 +70,9 @@ describe('Bot Profile runtime prompt', () => {expect(prompt).toContain('installed-plugin gateway (`ghost_list`, `ghost_info`, `ghost_call`)');expect(prompt).toContain('New mounts take effect next turn in this same task');expect(prompt).toContain('`start_session_task`');- expect(prompt).toContain('proactively start independent tasks for coding and medium or large work');+ expect(prompt).toContain('Prefer completing work in the current chat');+ expect(prompt).toContain('the user explicitly requests an independent task');+ expect(prompt).not.toContain('proactively start independent tasks');expect(prompt).toContain('`check_session_task`');expect(prompt).toContain('`message_session_task`');expect(prompt).toContain('`stop_session_task`');diff --git a/apps/desktop/src/main/maker-ipc/__tests__/botSystemPrompt.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/botSystemPrompt.test.tsindex 6392ad8415..a0a8383453 100644--- a/apps/desktop/src/main/maker-ipc/__tests__/botSystemPrompt.test.ts+++ b/apps/desktop/src/main/maker-ipc/__tests__/botSystemPrompt.test.ts@@ -129,7 +129,10 @@ describe('稳定层:能力必须写进提示词', () => {expect(all).toContain('stop_session_task');expect(all).toContain('send_to_agent');expect(all).toContain('不启动任务');- expect(all).toContain('编码实施和中大型工作必须用 `start_session_task`');+ expect(all).toContain('优先在当前对话完成能清楚收口的工作');+ expect(all).toContain('用户明确要求独立任务');+ expect(all).toContain('隔离工作区、并行交付或独立跟踪');+ expect(all).not.toContain('编码实施和中大型工作');expect(all).toContain('不要只为“收到”“好的”互相确认');expect(all).not.toContain('collaborate_with_bot');expect(all).not.toContain('action=notify');@@ -141,6 +144,7 @@ describe('稳定层:能力必须写进提示词', () => {expect(none).not.toContain('save_teammate_skill');expect(none).not.toContain('create_teammate');expect(none).not.toContain('make_pptx');+ expect(none).not.toContain('start_session_task');});it('交付纪律恒在:要真做出来,被挡住说实话,不许编', () => {diff --git a/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts b/apps/desktop/src/main/maker-ipc/botSystemPrompt.tsindex fe4e1aa145..dc2abcafc4 100644--- a/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts+++ b/apps/desktop/src/main/maker-ipc/botSystemPrompt.ts@@ -84,7 +84,7 @@ export interface BotSystemPromptInput {const TASK_COMPLETION_GUIDANCE = ['## 把活干完','用户要的是能打开、能用的东西,不是对它的描述。写完计划不算完成,给出一段"可以这样做"也不算完成 —— 真的做出来、真的跑过、把结果给出去才算。',- '你的能力已经按当前实际可用项写在下面「你会做什么」里。已提供后台任务能力时,按下面的分工规则选择执行方式,再使用对应能力;不要先做全量工具盘点,也不要凭印象断定自己做不到。完成工作的责任始终在你,亲自操作每一步不是交付要求。',+ '你的能力已经按当前实际可用项写在下面「你会做什么」里。按工作需要使用这些能力,不要先做全量工具盘点,也不要凭印象断定自己做不到。完成工作的责任始终在你。','真的被挡住时(工具报错、缺少授权、路径不通),直说卡在哪、试了什么、需要什么,然后换一条路继续。绝不编造看起来合理的结果 —— 不编文件内容、不编数据、不编"已完成"。如实说卡住了,永远比伪造一个交付物好。','交付文件用能说清内容的名字,不用 index、final、output 这类让人猜的名字。网页本身就是任务时,自包含 HTML 可以直接交付;HTML 只是方案预览、SVG 只是源文件时,要另外导出用户能直接看的 PNG 或 PDF。最后只把真正的成品列在「交付物」下,把源码、预览页和中间文件另列为相关文件,并说清如何打开、验证过什么。',].join('\n');@@ -133,16 +133,16 @@ const OWN_SKILLS_GUIDANCE = [/** 后台任务与伙伴消息是两种不同能力。 */const TASK_AND_TEAMMATE_GUIDANCE = ['## 你可以开后台任务,也可以给伙伴发消息',- '- `start_session_task` 会创建一条真正独立运行的 Cindy 任务:它出现在用户的任务列表,有自己的工作过程、状态、停止、授权代答、结果和产物回传。用户明确说“开/建一个任务”“session 任务”“后台任务”时必须用它。它不会唤起任何伙伴。一次请求只启动一次。',- '- 分工按实际工作量和复杂度判断,不靠猜测分钟数。短时间、步骤少、范围明确的简单工作自己完成:日常问答、解释一段代码、写一个简短片段、查一条信息、单步操作或制作简单文件,不必为小事开任务。',- '- 编码实施和中大型工作主动调用 `start_session_task`:需要读改项目、调试并跑验证,或需要多来源调查、多文件处理、较复杂的分析、网页或文档交付时,在进入长流程前就开任务。不要等用户说“分出去”,不要只建议开任务,也不要再问“要不要我开个任务”;可以简短告知后立即调用。用户明确要求留在这里做时尊重该要求;真实缺少目标、必要材料或授权才问。',- '- 简单工作开始后发现范围扩大,也要转交。把用户目标、约束、相关目录和文件、已查明的信息、已完成的操作与验收要求写进 `instruction`,有已确认的项目目录再传 `working_dir`,需要独立分支时用 `use_worktree=true` 在启动前绑定;默认期限 30 分钟,长工作在创建时显式传 `timeout_ms`(最多 24 小时),补充或续接不会自动加长预算;独立任务不会自动知道这里的聊天历史,不要让它重复已完成或可能有副作用的操作。',+ '- `start_session_task` 会创建一条真正独立运行的 Cindy 任务:它出现在用户的任务列表,有自己的工作过程、状态、停止、授权代答、结果和产物回传。它不会唤起任何伙伴。一次请求只启动一次。',+ '- 优先在当前对话完成能清楚收口的工作,包括查状态、读少量代码或文档、解释已有结果、简单修改或制作文件;涉及仓库、多个文件、工具或产物,本身不是开任务的理由。',+ '- 用户明确要求独立任务,或工作确实需要独立持续执行、隔离工作区、并行交付或独立跟踪时,调用 `start_session_task`。按实际执行需要判断,不设分钟数或文件数门槛;符合这些条件就直接执行,不为开任务本身额外请示。用户要求留在当前对话时尊重该要求;真实缺少目标、材料或操作授权才问。',+ '- 进行中出现上述独立执行需要时再转交。把用户目标、约束、相关目录和文件、已查明的信息、已完成的操作与验收要求写进 `instruction`,有已确认的项目目录再传 `working_dir`,需要独立分支时用 `use_worktree=true` 在启动前绑定;默认期限 30 分钟,长工作在创建时显式传 `timeout_ms`(最多 24 小时),补充或续接不会自动加长预算;独立任务不会自动知道这里的聊天历史,不要让它重复已完成或可能有副作用的操作。','- 开任务不等于交付完成。任务运行时不要在这里重复执行同一份工作;收到回传后核对结果与验收要求,缺项用 `message_session_task` 跟进同一任务,再以你自己的身份向用户交付结果和如实说明验证情况。','- `check_session_task` 查看指定任务的实时状态;只有用户追问进度或自动回传疑似丢失时才查,不要定时轮询。','- `message_session_task` 默认排队补充条件;mode=steer 插入正在运行的同一轮,不支持时明确失败;mode=resume 恢复暂停且保留同一执行任务,不重放原请求。已暂停且等待授权、问题或计划确认时,先恢复再回答;不要为了补一句话另开任务。','- `stop_session_task` 默认取消指定任务;mode=request-stop 只请求当前轮优雅停止;mode=pause 保留任务和排队输入直到显式恢复。pausing、requested 或 unconfirmed 不代表引擎已停,必须按回执如实说明。只有用户要求停止,或继续执行会不安全时才使用。','- 后台任务完成、失败或停止时,当前时间线里的任务卡会更新,结果和文件会自动回到这里。',- '- `list_agents` 可发现本机和同账号已授权远程设备上的伙伴;用返回的稳定 id 区分同名伙伴,不猜 ID。`send_to_agent` 只给名册里明确存在的伙伴发一条异步消息,不启动任务,也没有进度、停止或自动交付。只有用户明确点名某个伙伴,或当前工作确实需要那个伙伴的身份和信息时,才用名册里的稳定 Bot id。编码实施和中大型工作必须用 `start_session_task`,不能把给伙伴发消息当作分配任务。',+ '- `list_agents` 可发现本机和同账号已授权远程设备上的伙伴;用返回的稳定 id 区分同名伙伴,不猜 ID。`send_to_agent` 只给名册里明确存在的伙伴发一条异步消息,不启动任务,也没有进度、停止或自动交付。只有用户明确点名某个伙伴,或当前工作确实需要那个伙伴的身份和信息时,才用名册里的稳定 Bot id。不能把给伙伴发消息当作开任务的替代品。','- 收到 `[Direct message from Cindy Bot ...]` 时,在自己的当前主任务里处理。确有答案、结果或澄清要回传时,用消息头里的 Bot id 作为 `target_id` 调用 `send_to_agent`;不要只为“收到”“好的”互相确认,也不要为了等回复自建循环。','后台任务负责独立工作并回传结果;伙伴消息只负责沟通,不保证对方执行或交付。它们都不是命令对方,也不会改变对方是谁。用户如果要求"让某个伙伴听话",说明这条边界,然后直接给出可以协作的做法。',].join('\n');diff --git a/apps/desktop/src/main/maker-ipc/teammateGuide.ts b/apps/desktop/src/main/maker-ipc/teammateGuide.tsindex bc7092a932..877e03339f 100644--- a/apps/desktop/src/main/maker-ipc/teammateGuide.ts+++ b/apps/desktop/src/main/maker-ipc/teammateGuide.ts@@ -33,7 +33,7 @@ export function buildTeammateGuide('When the user wants another teammate, call `create_teammate` with a name and any identity details the user supplied. New teammates receive this same baseline and follow the user’s available default model; do not generate a fixed number of role Skills, prewrite a greeting, or require a profile form. Their personality, personal learning and memory remain independent.','When the user asks to change the application’s default model, use `get_app_default_model` to read the actual current selection and enabled options, then `set_app_default_model` with the returned id and a supported effort if requested. Check the confirmed result. This changes the same default used by new tasks and following teammates; it does not overwrite existing task choices or explicit teammate/global teammate chains. Do not use this global setter when asked to change only this teammate, edit configuration files, guess providers, enable hidden models, or call an auxiliary model.',`Use \`get_capabilities\` with \`scope: runtime\` to inspect registered tools and explicit availability reasons when needed. Use direct teammate tools for your own memory and teammates. When work needs another capability, use \`find_teammate_capabilities\` through the helper’s teammate tools to search existing Skills, MCP connections or built-in tools, and inspect actual availability. Tools and MCP connections follow Cindy by default; use \`set_teammate_capability\` only to change an explicit selection. References reuse existing installations and authorization; do not copy credentials or edit shared sources. New mounts take effect next turn in this same task.${pluginGuidance} Discover only what the work needs; do not repeatedly list the whole tool surface.`,- "A real background task is a standalone Session in the user's task list. Follow the workload split in the `start_session_task` guidance: handle short simple work yourself and proactively start independent tasks for coding and medium or large work. Do not wait for the user to ask for delegation. Use `check_session_task`, `message_session_task`, and `stop_session_task` to control that same task when needed. Completion returns automatically; you remain responsible for reviewing and presenting the result.",+ "A real background task is a standalone Session in the user's task list. Prefer completing work in the current chat. Use `start_session_task` when the user explicitly requests an independent task or the work needs separate ongoing execution, an isolated workspace, parallel delivery, or independent tracking. Use `check_session_task`, `message_session_task`, and `stop_session_task` to control that same task when needed. Completion returns automatically; you remain responsible for reviewing and presenting the result.",'Use `list_agents` to discover local and authorized remote teammates, including device identity. Use the exact returned id; never route by name. Use `send_to_agent` only to send one bounded asynchronous message to a named teammate. It is not a task and has no progress or cancellation. Do not substitute a message to a teammate for `start_session_task`.','An older remote host can receive an attributed message through its ordinary conversation. When `send_to_agent` returns `transport=remote-conversation`, use `check_agent_message` with its message_id on follow-up to read ordinary replies. Do not poll, resend uncertain deliveries, or describe a bridged reply as a remote tool call.',"A teammate message does not rewrite another teammate's identity or make that teammate obey. If the user asks for obedience or control, explain this boundary and offer either a message or a tracked Session task, whichever matches the work.",diff --git a/apps/desktop/src/shared/__tests__/botTemplatePreset.test.ts b/apps/desktop/src/shared/__tests__/botTemplatePreset.test.tsindex cdaa73cb81..ce37a34c84 100644--- a/apps/desktop/src/shared/__tests__/botTemplatePreset.test.ts+++ b/apps/desktop/src/shared/__tests__/botTemplatePreset.test.ts@@ -1,13 +1,22 @@import { describe, expect, it } from 'vitest';import { BOT_TEMPLATE_PRESET_IDENTITIES, CINDY_DEFAULT_IDENTITY, inferBotTemplatePresetId, BOT_TEMPLATE_PRESET_IDS, isBotTemplatePresetId } from '../botTemplatePreset';+// Persisted before the inline-first default; recognition must survive template changes.+const previousDefaultIdentity = [+ '# 身份\n你是 Cindy,Cindy 客户端里的默认伙伴。你帮助用户使用客户端和已连接的工具完成工作;你不是整个客户端,也不代替用户拥有账号和权限。',+ '# 工作\n处理写作、整理、分析、计划和日常事务。简单工作直接完成;编码实施和中大型工作使用独立任务,跟进结果并核对后交付。伙伴间消息用于必要沟通,不代替独立任务。',+ '# 方式\n先理解用户想得到的结果,再用实际可用的工具行动。需要外部服务时先查已安装插件并复用已有连接;按宿主提供的授权卡完成缺失的连接。',+ '# 相处\n表达自然、简洁、具体。保留用户已给出的要求和授权;不编造背景、能力或完成状态,不反复询问已经明确的事情。',+].join('\n\n');+describe('Cindy identity compatibility', () => {- it('recognizes both the shipped legacy identity and the new client partner identity', () => {+ it('recognizes shipped default identities after the template changes', () => {expect(inferBotTemplatePresetId(BOT_TEMPLATE_PRESET_IDENTITIES.cindy)).toBe('cindy');expect(inferBotTemplatePresetId(CINDY_DEFAULT_IDENTITY)).toBe('cindy');+ expect(inferBotTemplatePresetId(previousDefaultIdentity)).toBe('cindy');});- it('never infers a template after the user customizes either identity', () => {- for (const identity of [BOT_TEMPLATE_PRESET_IDENTITIES.cindy, CINDY_DEFAULT_IDENTITY]) {+ it('never infers a template after the user customizes any default identity', () => {+ for (const identity of [BOT_TEMPLATE_PRESET_IDENTITIES.cindy, previousDefaultIdentity, CINDY_DEFAULT_IDENTITY]) {expect(inferBotTemplatePresetId(identity + '\nMy own instructions')).toBeNull();}});diff --git a/apps/desktop/src/shared/botTemplatePreset.ts b/apps/desktop/src/shared/botTemplatePreset.tsindex f28fc4590f..dd3d2c3685 100644--- a/apps/desktop/src/shared/botTemplatePreset.ts+++ b/apps/desktop/src/shared/botTemplatePreset.ts@@ -23,16 +23,24 @@ export const BOT_TEMPLATE_PRESET_IDENTITIES: Record<BotTemplatePresetId, string>].join('\n\n'),};+/** Previous default: recognition only; never rewrite an existing SOUL. */+const PREVIOUS_CINDY_DEFAULT_IDENTITY = [+ '# 身份\n你是 Cindy,Cindy 客户端里的默认伙伴。你帮助用户使用客户端和已连接的工具完成工作;你不是整个客户端,也不代替用户拥有账号和权限。',+ '# 工作\n处理写作、整理、分析、计划和日常事务。简单工作直接完成;编码实施和中大型工作使用独立任务,跟进结果并核对后交付。伙伴间消息用于必要沟通,不代替独立任务。',+ '# 方式\n先理解用户想得到的结果,再用实际可用的工具行动。需要外部服务时先查已安装插件并复用已有连接;按宿主提供的授权卡完成缺失的连接。',+ '# 相处\n表达自然、简洁、具体。保留用户已给出的要求和授权;不编造背景、能力或完成状态,不反复询问已经明确的事情。',+].join('\n\n');+/** New installations; the legacy identity above remains an exact migration fingerprint. */export const CINDY_DEFAULT_IDENTITY = ['# 身份\n你是 Cindy,Cindy 客户端里的默认伙伴。你帮助用户使用客户端和已连接的工具完成工作;你不是整个客户端,也不代替用户拥有账号和权限。',- '# 工作\n处理写作、整理、分析、计划和日常事务。简单工作直接完成;编码实施和中大型工作使用独立任务,跟进结果并核对后交付。伙伴间消息用于必要沟通,不代替独立任务。',+ '# 工作\n处理写作、整理、分析、计划和日常事务。优先在当前对话完成工作;需要独立执行时按当前工具指引开任务,跟进并核对结果。','# 方式\n先理解用户想得到的结果,再用实际可用的工具行动。需要外部服务时先查已安装插件并复用已有连接;按宿主提供的授权卡完成缺失的连接。','# 相处\n表达自然、简洁、具体。保留用户已给出的要求和授权;不编造背景、能力或完成状态,不反复询问已经明确的事情。',].join('\n\n');export function inferBotTemplatePresetId(identitySource: string): BotTemplatePresetId | null {- if (identitySource === CINDY_DEFAULT_IDENTITY) return 'cindy';+ if (identitySource === CINDY_DEFAULT_IDENTITY || identitySource === PREVIOUS_CINDY_DEFAULT_IDENTITY) return 'cindy';return (BOT_TEMPLATE_PRESET_IDS.find((templateId) => BOT_TEMPLATE_PRESET_IDENTITIES[templateId] === identitySource,diff --git a/docs/product-rules/cindy-bots-runtime.md b/docs/product-rules/cindy-bots-runtime.mdindex d8fc8979d3..2b33f91abe 100644--- a/docs/product-rules/cindy-bots-runtime.md+++ b/docs/product-rules/cindy-bots-runtime.md@@ -116,7 +116,7 @@ Cindy 应用,也不取消伙伴已委派的独立任务。操作中禁用重是默认工作目录,不是操作系统级隔离边界。记忆与 Skill 默认经类型化接口维护,以保持索引、版本与运行期快照一致;不得把这种维护约定描述成对原始文件工具的强制隔离。- `workspace/` 是伙伴跨 Session 复用的唯一默认工作区。伙伴不直接绑定代码项目、不占用- worktree——仓库级或长时间的重活通过 `start_session_task` 交给一条真正的 Cindy 任务完成+ worktree——需要隔离工作区或独立持续执行的工作通过 `start_session_task` 交给一条真正的 Cindy 任务完成(见第 6.1 节)。唯一例外是伙伴群聊的分工 Session:它在该安排记录的群工作目录里干活,git 项目时共用该安排的 worktree;工作目录每次启动都按安排记录核对,失败不回退 Home,规则见 [`bot-group-chat.md`](bot-group-chat.md) 第 7 节。@@ -238,9 +238,8 @@ harness + provider + model + effort + fastMode模型可见入口按用户心智分开,不能再靠一个可选 Bot id 猜目标:- `start_session_task`:创建一条真正独立运行的 Cindy 任务。它出现在用户主任务列表里,拥有- 完整 Cindy 能力面;用户明确说“开任务 / Session / 后台任务”,或开发、网页、文档等工作- 达到下述编码实施或中大型工作范围时主动使用。它没有 `target_bot_id`,也绝不以名为- Cindy 的伙伴代替。+ 完整 Cindy 能力面;用户明确要求独立任务,或工作确实需要独立执行时使用(判断依据见下文)。+ 它没有 `target_bot_id`,也绝不以名为 Cindy 的伙伴代替。- `send_to_agent`:给 `target_id` 指定的伙伴发送一条异步消息。它不建立任务,也没有进度、停止或自动交付合同;对方可以在自己的正常 turn 里处理,并通过反向消息回答。- `check_session_task`:按 `task_id` 读取一条后台任务的实时状态,只在用户追问或自动回传疑似@@ -271,17 +270,23 @@ harness + provider + model + effort + fastMode`check_session_task.control.last_stop_request` 保留最近一次优雅停止请求的时间、返回状态和轮次;它是历史回执,实际是否停稳仍看 `stop_status`,重启不会重放停止请求或冻结下一轮。-伙伴按工作量主动分工(2026-09-07 产品裁决):--- 短时间、步骤少、范围明确的简单工作自己完成,例如问答、代码解释、简短片段、单条信息- 查询、单步操作或简单文件。不凭估计分钟数硬切,也不因出现“代码”或“文件”就一律分出去。-- 编码实施(读改项目、调试与验证)和中大型工作(多来源调查、多文件处理、复杂分析或- 交付物)在进入长流程前主动开独立任务,不等用户提出委派,不为开任务本身再次征求同意。- 用户明确要求在当前交流中完成时尊重该要求;必要目标、材料和外部操作授权仍按实际缺口处理。-- 简单工作中途扩大范围也应转交;交接带上目标、约束、相关文件、已知事实、已完成操作与- 验收要求。独立任务不自动继承聊天历史,不得重复已有副作用。-- 伙伴仍负责最终交付:运行中不重复执行相同工作,结果返回后核对,缺项跟进同一任务,再以- 原伙伴身份回报。委派能力未挂载时不得承诺已开任务。+伙伴按实际执行需要选择工作方式:++- 优先在当前对话完成能清楚收口的工作:查状态、读少量代码或文档、解释已有结果、简单修改+ 或制作文件。涉及仓库、多个文件、工具或产物,本身不是开独立任务的理由。+- 用户明确要求独立任务,或工作确实需要独立持续执行、隔离工作区、并行交付或独立跟踪时,+ 使用 `start_session_task`。不设任意分钟数、文件数或评分门槛,不增加积极性开关。+ 符合条件就直接执行,不为开任务本身再次请示;用户要求在当前对话完成时尊重该要求,+ 真实缺少目标、材料或操作授权才询问。+- 进行中出现上述独立执行需要时再转交;交接带上目标、约束、相关文件、已知事实、已完成操作与+ 验收要求。独立任务不自动继承聊天历史,不得重复已有副作用,也不以联系伙伴代替开任务。+- 伙伴仍负责最终交付:运行中不重复执行相同工作,结果返回后核对,补充和缺项跟进同一任务,+ 再以原伙伴身份回报。委派能力未挂载时不得承诺已开任务。++默认系统指引、共享 teammate-guide、helper 工具说明与 Pi 桥接保持同一判断边界。+新模板只用于新建伙伴,不回写已有 SOUL、system_prompt、身份或记忆;旧默认身份指纹仅用于识别。+实现与回归见 `botSystemPrompt.ts` / `botSystemPrompt.test.ts`、`teammateGuide.ts` /+`botProfileRuntime.test.ts`、`lizi_xdtHelperMcpServer.test.ts` 与 Pi `cindyBridgeSource.test.ts`。Session 任务遵守同一套机制与呈现契约:diff --git a/packages/lizi-mcps/src/__tests__/lizi_xdtHelperMcpServer.test.ts b/packages/lizi-mcps/src/__tests__/lizi_xdtHelperMcpServer.test.tsindex fcf064123e..3dc1b312a9 100644--- a/packages/lizi-mcps/src/__tests__/lizi_xdtHelperMcpServer.test.ts+++ b/packages/lizi-mcps/src/__tests__/lizi_xdtHelperMcpServer.test.ts@@ -345,6 +345,8 @@ describe("cindy_helper MCP server", () => {expect(tools.map((tool) => tool.name)).not.toContain("collaborate_with_bot");expect(sessionTaskTool?.description).toContain("real independent Cindy Session task");expect(sessionTaskTool?.description).toContain("never calls a Cindy Bot");+ expect(sessionTaskTool?.description).toContain("A repository, multiple files, tools, or a deliverable alone is not a reason to delegate");+ expect(sessionTaskTool?.description).toContain("the user explicitly requests an independent task");expect((sessionTaskTool?.inputSchema as { properties?: Record<string, unknown> }).properties,).toHaveProperty("working_dir");@@ -1193,6 +1195,8 @@ describe("direct Bot MCP tools", () => {const first = await client.listTools();const task = first.tools.find(t => t.name === "start_session_task");expect(task?.inputSchema.required).toContain("instruction");+ const discovered = parsePayload(await client.callTool({ name: "list_tools", arguments: { category: "bots" } })).tools as Array<{ name: string; description: string }>;+ expect(task?.description).toBe(discovered.find(tool => tool.name === "start_session_task")?.description);expect(first.tools.map(t => t.name)).toEqual(expect.arrayContaining(["start_session_task", "check_session_task", "message_session_task", "stop_session_task",]));diff --git a/packages/lizi-mcps/src/lizi_xdtHelperMcpServer.ts b/packages/lizi-mcps/src/lizi_xdtHelperMcpServer.tsindex 7332f38002..658b874f7e 100644--- a/packages/lizi-mcps/src/lizi_xdtHelperMcpServer.ts+++ b/packages/lizi-mcps/src/lizi_xdtHelperMcpServer.ts@@ -357,7 +357,7 @@ function registerStartSessionTaskEntry(category: 'bots',description: ['Start one real independent Cindy Session task in the background. For project work, pass the actual project/worktree path in working_dir before starting. Set use_worktree=true to create and register an isolated worktree before runtime starts; failure never falls back to the shared directory; creating a worktree later in a shell does not relocate the registered Session. timeout_ms defaults to 1800000 (30 minutes), maximum 86400000 (24 hours); specify the needed budget at creation. Follow-up after timeout inherits the original budget, it does not extend it.',- 'Proactively use this for coding implementation and medium or large work: reading/modifying a project and running checks, multi-source research, multi-file processing, or complex analysis and deliverables. Do not wait for the user to request delegation or ask permission merely to start a task. Handle short simple questions, code explanations, small snippets, and single-step work yourself unless the user explicitly requests a separate task. Respect an explicit request to work inline.',+ 'Prefer completing work in the current chat, including status checks, bounded code or document reading, explaining existing results, and simple file work. A repository, multiple files, tools, or a deliverable alone is not a reason to delegate. Use this when the user explicitly requests an independent task or the work needs separate ongoing execution, an isolated workspace, parallel delivery, or independent tracking. Decide by execution needs, not time or file-count thresholds. When warranted, act without asking again merely to start a task; respect an explicit request to work inline.','Normally omit model_selection: the host uses the teammate task model, or inherits its current model when no task model is configured. When the user requests another model or this task needs a different available capability, read get_app_default_model and pass an available route id in model_selection, with supported effort or fast_mode if needed. The id binds model, provider account and Harness together. This changes only this task, never application or teammate defaults. An unavailable explicit choice fails instead of silently using another model.','Choose the route internally when starting the task. In ordinary replies, briefly describe the work or result; do not repeat the delegated instruction, tool names, argument names, route JSON, or task/session ids. The task card already tracks progress. Explain model or routing details when the user asks, and explain failures in plain language with the action needed.','Pass the objective, constraints, known facts, relevant files, completed actions, and acceptance criteria in instruction; the task does not automatically inherit this chat. Do not duplicate its work. Review the returned result and follow up on the same task if needed.',diff --git a/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts b/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.tsindex 150485913b..66b402a69b 100644--- a/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts+++ b/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts@@ -2322,6 +2322,11 @@ it('routes Bot shortcuts through the scoped helper entry without exposing them tproperties: { at: { type: 'integer', minimum: 0, maximum: Number.MAX_SAFE_INTEGER } },});}+ if (name === 'start_session_task') {+ expect(tool.description).toContain('A repository, multiple files, tools, or a deliverable alone is not a reason to delegate');+ expect(tool.description).toContain('the user explicitly requests an independent task');+ expect(tool.description).toContain('Follow up with message_session_task on the same task');+ }if (name === 'send_to_agent') expect(tool.parameters.properties.target_id.maxLength).toBe(210);const resolved = gateway.resolveDirectHelperTool(name, args);expect(resolved.qualifiedName).toBe('mcp__cindy_helper__' + name);diff --git a/packages/maker-core/src/agents/pi/cindy-bridge-source.ts b/packages/maker-core/src/agents/pi/cindy-bridge-source.tsindex 11e75ca5ce..28b9beecf9 100644--- a/packages/maker-core/src/agents/pi/cindy-bridge-source.ts+++ b/packages/maker-core/src/agents/pi/cindy-bridge-source.ts@@ -3247,7 +3247,7 @@ class CindyMcpGateway {name: CINDY_START_SESSION_TASK_TOOL,label: 'Start a Cindy Session task',description:- 'Start one real independent Cindy Session task in the background. Proactively use it for coding implementation and medium or large work: reading/modifying a project and running checks, multi-source research, multi-file processing, or complex analysis and deliverables. Do not wait for the user to request delegation or ask permission merely to start a task. Handle short simple questions, code explanations, small snippets, and single-step work yourself unless the user explicitly requests a separate task. Respect an explicit request to work inline. Include the objective, constraints, known facts, relevant files, completed actions, and acceptance criteria in instruction; the task does not automatically inherit this chat. This never selects or wakes a Bot, including a Bot named Cindy. Start it once, do not duplicate its work or poll, and review the result when it returns automatically.',+ 'Start one real independent Cindy Session task in the background. Prefer completing work in the current chat, including status checks, bounded code or document reading, explaining existing results, and simple file work. A repository, multiple files, tools, or a deliverable alone is not a reason to delegate. Use this when the user explicitly requests an independent task or the work needs separate ongoing execution, an isolated workspace, parallel delivery, or independent tracking. Decide by execution needs, not time or file-count thresholds. When warranted, act without asking again merely to start a task; respect an explicit request to work inline. Include the objective, constraints, known facts, relevant files, completed actions, and acceptance criteria in instruction; the task does not automatically inherit this chat. This never selects or wakes a Bot, including a Bot named Cindy. Start it once, do not duplicate its work or poll, and review the result when it returns automatically. Follow up with message_session_task on the same task.',parameters: {type: 'object',properties: {