From 3e6caca0aa9b9f17b15d71d01592c9f1d289c0c0 Mon Sep 17 00:00:00 2001 From: kicer Date: Fri, 25 Sep 2026 19:19:10 +0800 Subject: [PATCH] =?UTF-8?q?advising=E6=8F=90=E7=A4=BA=E8=AF=8D=E4=B8=8Eexa?= =?UTF-8?q?mple=E9=85=8D=E7=BD=AE=E5=8E=BBtask.md=E6=AE=8B=E7=95=99:?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=8D=E4=B8=8D=E5=86=8D=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E8=90=BD=E7=9B=98=E6=96=87=E4=BB=B6=E5=90=8D(=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=AD=98brief=E4=B8=BA=E4=BB=BB=E5=8A=A1=E4=B9=A6?= =?UTF-8?q?=E3=80=81=E6=89=A7=E8=A1=8C=E8=80=85=E4=BB=8Ebrief=E7=BB=AD?= =?UTF-8?q?=E4=BD=9C,task.md=E6=98=AF=E7=B3=BB=E7=BB=9F=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=B8=8D=E8=AF=A5=E8=BF=9B=E9=A1=BE=E9=97=AE?= =?UTF-8?q?=E8=AE=A4=E7=9F=A5);config.example.yml=E5=AF=B9=E9=BD=90config.?= =?UTF-8?q?js=E6=96=B0DEFAULTS(tools=5Fdeny=E5=8A=A0handoff=E3=80=81advisi?= =?UTF-8?q?ng=E5=90=8D=E5=8D=95read=5Ffile/fetch/handoff+=E6=98=BE?= =?UTF-8?q?=E5=BC=8Ftools=5Fdeny=E6=B8=85=E7=A9=BA,=E8=A1=A5lab=E5=BC=8F?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E9=98=B2=E7=BB=A7=E6=89=BF=E5=8F=8D=E5=99=AC?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config.example.yml | 9 +++++---- app/server/templates/advising-system.txt | 9 ++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/config.example.yml b/app/config.example.yml index 7255dd0..2722fc2 100644 --- a/app/config.example.yml +++ b/app/config.example.yml @@ -5,14 +5,15 @@ platforms: [] # 全局工具黑名单:profile 未配 tools_deny 时继承它;allow 先、deny 后叠加(deny 赢,与 mcp_servers 同构)。 -# 写数组即整体覆盖默认值,写 [] 即清空。默认屏蔽元工具 lab。 -tools_deny: [lab] +# 写数组即整体覆盖默认值,写 [] 即清空。默认屏蔽元工具 lab 与阶段出口 handoff(后者仅 advising 显式清空后可见)。 +tools_deny: [lab, handoff] # 模型 profile:prompt + tools 名单组合,模型用 profile: <名> 引用(不配 = 全量)。 # 内置 advising 不靠引用:会话处于 advising 阶段(顾问澄清需求/规划)时强制命中,见 server/engine.js resolveProfileName。 model_profiles: - advising: # 顾问阶段:只留问答/调研/写任务书工具,配专属提示词 - tools_allow: [read_file, fetch, write_file] + advising: # 顾问阶段:只聊和读不写,唯一出口 handoff,配专属提示词 + tools_allow: [read_file, fetch, handoff] + tools_deny: [] # 必须显式清空全局黑名单,否则 handoff 自己也被 deny(同 lab 的教训) system_prompt_file: advising-system.txt lab: # 统一入口自测:tools 只有 lab,其余能力经 lab(help) 现场发现 tools_allow: [lab] diff --git a/app/server/templates/advising-system.txt b/app/server/templates/advising-system.txt index 21b2b57..8efca44 100644 --- a/app/server/templates/advising-system.txt +++ b/app/server/templates/advising-system.txt @@ -24,9 +24,9 @@ unless stated otherwise. When work should start — the requirement is clear, or the user explicitly asks to skip planning, or clarification has visibly stalled — call the `handoff` tool with a `reason` and the full `brief`. You have no file-writing tools: -handoff is the ONLY way to leave this phase. The system writes your `brief` -verbatim to `task.md` at the working-directory root, switches this session into -execution mode, and a full-capability agent continues from that file alone. +handoff is the ONLY way to leave this phase. The system stores your `brief` as +the task brief, switches this session into execution mode, and a full-capability +agent continues from that brief alone. Therefore: - The brief must be self-contained: someone who has never seen this chat must be @@ -41,8 +41,7 @@ Therefore: will ask the user for these directly. Do not turn a skipped-planning brief into a methodology document. - Never fake the handoff: an empty or stub `brief` is refused by the system and - the session stays in advising. An uploaded file named task.md is never the - brief — only your handoff call commits. + the session stays in advising. Only your handoff call commits. ## What you must not do