diff --git a/AGENTS.md b/AGENTS.md index 90e5553..32be2f5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,6 +43,15 @@ Use it whenever work requires any of: Do not treat non-chat work as ordinary reply flow. +### Reply Closure Rule + +On Telegram, if the final actionable part of your reply needs the human to decide, confirm, approve, stop, continue, rerun, or choose a next step: +- do **not** end with plain text only +- do **not** say buttons will be used unless you are actually sending them +- either send real inline buttons or execute the most reasonable next step directly + +If you fail this, call it a workflow violation and correct it immediately. + ## Memory You wake up fresh each session. These files are your continuity: diff --git a/WORKFLOW.md b/WORKFLOW.md index c70ac16..8618d4a 100644 --- a/WORKFLOW.md +++ b/WORKFLOW.md @@ -119,6 +119,18 @@ Subagent 指派後 **5 分鐘內若無結果**: - 若需要總管同意修改,應直接用按鈕送出 `OK / 先看改法` 之類的選項 - 若總管已明確表示「就是要你修」,優先直接進入修復流程,不要再把修復方案包成純文字選單 +### Reply Closure Button Gate +- 在 Telegram 上,只要**回覆的最後可執行部分**需要總管做選擇、確認、批准、停止、繼續、重跑、收下或決定下一步,就不能只用普通文字結尾。 +- 這時只能做兩件事: + 1. **真的送出 inline buttons** + 2. 若其實不需要總管決策,**直接執行最合理的下一步** +- 「文字裡說會用按鈕」但沒有實際送出按鈕,視為**同樣違規**。 +- 這條 gate 特別適用於: + - long-task checkpoint 收尾 + - 測試結果判定 + - accept / rerun / stop 類互動 + - approval / confirm 類收尾 + ### Two-phase gate(硬閘門:先報備→再執行) 以下動作一律視為「對外 / 非瑣碎」: - 發 Lobby 訊息(message tool send) diff --git a/WORKFLOW_GATES.md b/WORKFLOW_GATES.md new file mode 100644 index 0000000..23498b5 --- /dev/null +++ b/WORKFLOW_GATES.md @@ -0,0 +1,41 @@ +# WORKFLOW_GATES.md + +## Reply-Closure Button Gate + +When operating on Telegram, if the **final actionable part** of a reply requires the user to choose, confirm, approve, stop, continue, or select a next step, the assistant must not end with plain text alone. + +### Hard rule + +If the reply ends in any owner decision gate, the assistant must do one of two things: +1. **Send real inline buttons** +2. **Execute the most reasonable next step directly** if no real decision is needed + +### Forbidden behavior + +These are violations when used as the closing interaction on Telegram: +- `1 / 2 / 3` +- `A / B / C` +- `請回我 1` +- `如果你要,我可以...` +- `要不要我繼續?` +- saying buttons will be used, but not actually sending them + +### Required interpretation + +The gate applies to: +- long-task checkpoints +- test progress summaries +- approval requests +- next-step choices +- accept / rerun / stop style decisions + +### Violation standard + +If the assistant reaches a user-decision closure and no real inline buttons were delivered, treat it as a workflow violation even if the reply mentioned buttons in text. + +### Corrective rule + +If this violation happens: +- acknowledge the violation plainly +- immediately send the real button message +- record the lesson into workflow / memory if it exposed a missing rule diff --git a/memory/2026-04-22.md b/memory/2026-04-22.md index 99b92d3..962bbb4 100644 --- a/memory/2026-04-22.md +++ b/memory/2026-04-22.md @@ -48,4 +48,5 @@ - skill 目標:把 `general_chat vs long_task` 判準、狀態機、checkpoint 規格、no-fake-progress、stop-clock gate 收斂到外掛式 workflow layer。 - 已同步更新 `WORKFLOW.md`,要求:只要不是 ordinary single-turn general chat,就必須套用 `long-task-governor`。 - live test 期間實際抓到一個缺口:在 Telegram 上做 long-task checkpoint / next-step 收尾時,我仍可能退回純文字 `1 / 2 / 3` 選單。 -- 因此已再補一條 skill 規則:`Telegram interaction guard`,禁止 governed long-task flow 在 Telegram 上用純文字選單收尾;若需要選擇,必須改用 inline buttons,否則直接執行最合理下一步。 +- 因此已先補一條 skill 規則:`Telegram interaction guard`,禁止 governed long-task flow 在 Telegram 上用純文字選單收尾;若需要選擇,必須改用 inline buttons,否則直接執行最合理下一步。 +- 後續再往前補強到更直接的操作層:新增 `Reply Closure Button Gate` 概念,明確規定只要回覆最後的可執行部分需要總管決定、確認、批准、停止、繼續、重跑或選下一步,就不能只在文字裡說會用按鈕,必須真的送出 inline buttons,或直接執行最合理下一步。