handoff 新增必填 title 参数:交接时刻的标题回写会话标题

顾问在 handoff 此刻最懂这单任务,其起的标题比首交互后自动生成(maybeGenerateTitle)
的更有价值。落地:
- definitions.json:handoff 参数加 title(必填),描述对齐 title-prompt 口径
  (3-7 词/中文 6-14 字,无引号无前缀);工具字母序复查未破坏;
- executor.toolHandoff:清洗(压空白+截 60,同 cleanTitle 口径;executor 反引用
  engine 会成环故就地实现),task.md 落盘成功后才 UPDATE sessions.title
  (切换半途失败不留「有名无书」残局);空 title 拒回执;
- engine 批尾 handoffDone:enterExecuting 前广播 title 事件,已开窗口刷详情页
  标题+重拉列表(与自动生成同链路);finalize 的 maybeGenerateTitle 见非空即跳过,
  getSession 现读 DB 无覆盖竞态;
- advising-system.txt:handoff 调用说明同步带 title(提示词与必填参数对齐)。

存量被画像污染的旧标题可被下次 handoff 直接顶掉。
This commit is contained in:
2026-09-26 07:04:06 +08:00
parent 5535d4cd0d
commit 0dca2ab7f5
4 changed files with 25 additions and 4 deletions
+4 -2
View File
@@ -50,8 +50,10 @@ When planning:
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 stores your `brief` as
tool with a `reason`, the full `brief`, and a concise `title` for this
conversation (in the user's language; it becomes the session's display title).
You have no file-writing tools: 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: