diff --git a/app/server/engine.js b/app/server/engine.js index 7b2052c..3085e14 100644 --- a/app/server/engine.js +++ b/app/server/engine.js @@ -304,7 +304,8 @@ function enterExecuting(sessionId) { saveMessage(sessionId, { role: 'user', type: 'task_brief', content: '【任务书】顾问阶段结束,会话已进入执行模式。以下任务书快照(task.md)是唯一目标依据;' - + '之前的顾问对话已存档、不再发送。若正文列有 Missing/未澄清事项,先向用户提问确认再动手;' + + '之前的顾问对话已存档、不再发送。若任务书列有 Missing/待确认事项:开工前逐项向用户提问并等待答复——' + + '用户跳过的只是顾问阶段,不是确认环节,不得据此自行拍板;只有用户明确说过「别问,直接做」才可用默认值,且须把每个默认决定列出供用户检查;禁止把待确认项改写成「按默认执行」。' + '执行中可修订 task.md(以文件现状为准);上一轮任务书归档在 .task-history/,仅限用户明确要求时查阅。\n\n' + snapshot, }); db.prepare("UPDATE sessions SET phase='executing', updated_at=? WHERE id=?").run(now(), sessionId); diff --git a/app/server/templates/advising-system.txt b/app/server/templates/advising-system.txt index 8efca44..3c80fbf 100644 --- a/app/server/templates/advising-system.txt +++ b/app/server/templates/advising-system.txt @@ -38,8 +38,9 @@ Therefore: - If planning was skipped or key facts are still missing, keep the brief minimal: state the goal in the user's own words and list every unknown under a "Missing" section instead of guessing or writing generic advice. The executor - will ask the user for these directly. Do not turn a skipped-planning brief - into a methodology document. + will ask the user about these directly before doing the work — the user + skipped the planning chat, not these questions. 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. Only your handoff call commits. diff --git a/app/server/tools/definitions.json b/app/server/tools/definitions.json index 87958df..efebb16 100644 --- a/app/server/tools/definitions.json +++ b/app/server/tools/definitions.json @@ -109,7 +109,7 @@ "type": "function", "function": { "name": "handoff", - "description": "Hand off from the advising phase to the execution phase. Call this when the task brief is ready. The system stores your `brief` as the task brief and switches to execution. There are three cases:\n\n- ready: The requirement is clear enough to execute.\n- user_skip: The user explicitly asks to skip planning (\"just do it\", or similar). Do not call this on tone or mood alone — only on explicit signals.\n- user_stuck: You have asked 2-3 rounds and the user is still not providing key information, and they seem to want to move on.\n\nWhen reason is not \"ready\", pass the user's own words as `brief` and leave it at that. Do not invent a methodology or generic plan. The executor will ask the user for missing information directly.", + "description": "Hand off from the advising phase to the execution phase. Call this when the task brief is ready. The system stores your `brief` as the task brief and switches to execution. There are three cases:\n\n- ready: The requirement is clear enough to execute.\n- user_skip: The user explicitly asks to stop planning with you (\"just move on\", or similar) — this skips only the advising conversation, it never waives the user's later confirmations. Do not call this on tone or mood alone — only on explicit signals.\n- user_stuck: You have asked 2-3 rounds and the user is still not providing key information, and they seem to want to move on.\n\nWhen reason is not \"ready\", the `brief` must carry the user's own words plus every open question under a Missing section — the executor is required to ask the user these before acting. Do not invent a methodology or generic plan.", "parameters": { "type": "object", "required": [