skills: add implicit yes-no trigger to telegram buttons
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: telegram-inline-buttons
|
name: telegram-inline-buttons
|
||||||
description: Use when sending proactive Telegram messages that ask Eric to confirm, choose, defer, or pick from a few next actions; especially for yes/no, A/B/C, do-now-vs-later, short multi-step button flows, or numbered option lists like 1.xxx / 2.ooo / 3.yyy that should be converted into inline buttons.
|
description: Use when sending proactive Telegram messages that ask Eric to confirm, choose, defer, or pick from a few next actions; especially for yes/no, A/B/C, do-now-vs-later, short multi-step button flows, implicit yes/no prompts like 如果你要..., and numbered option lists like 1.xxx / 2.ooo / 3.yyy that should be converted into inline buttons.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Telegram Inline Buttons
|
# Telegram Inline Buttons
|
||||||
@@ -9,6 +9,7 @@ Prefer inline buttons over free-text prompts when sending a proactive Telegram m
|
|||||||
|
|
||||||
## Use buttons for
|
## Use buttons for
|
||||||
- Yes / No confirmations
|
- Yes / No confirmations
|
||||||
|
- Implicit yes / no prompts like `如果你要...`
|
||||||
- A / B / C choices
|
- A / B / C choices
|
||||||
- Do it now vs later
|
- Do it now vs later
|
||||||
- Picking one of a few next actions
|
- Picking one of a few next actions
|
||||||
@@ -21,18 +22,28 @@ Prefer inline buttons over free-text prompts when sending a proactive Telegram m
|
|||||||
|
|
||||||
If there are >5 options, summarize and offer a `Show more` button.
|
If there are >5 options, summarize and offer a `Show more` button.
|
||||||
|
|
||||||
|
## Trigger interpretation
|
||||||
|
Treat these as button-worthy even if they are not written as direct questions:
|
||||||
|
- `如果你要,我可以現在幫你處理`
|
||||||
|
- `如果你要我繼續,我就直接做`
|
||||||
|
- `如果你要 ooooxxxxx`
|
||||||
|
|
||||||
|
These are usually implicit binary decisions and should default to inline buttons such as `[好,繼續] [先不要]` rather than requiring free-text confirmation.
|
||||||
|
|
||||||
## Button design
|
## Button design
|
||||||
- Keep labels short: 1-4 words
|
- Keep labels short: 1-4 words
|
||||||
- 2-4 buttons is ideal
|
- 2-4 buttons is ideal
|
||||||
- Include a safe exit when appropriate: `Not now`, `Cancel`, `Later`, `Skip`
|
- Include a safe exit when appropriate: `Not now`, `Cancel`, `Later`, `Skip`
|
||||||
- Keep `callback_data` stable and unique per flow step, e.g. `reminder_time_15m`, `deploy_confirm_yes`
|
- Keep `callback_data` stable and unique per flow step, e.g. `reminder_time_15m`, `deploy_confirm_yes`
|
||||||
- When the source prompt is a numbered list, convert each visible option into a short button label while preserving the original order
|
- When the source prompt is a numbered list, convert each visible option into a short button label while preserving the original order
|
||||||
|
- When the source prompt is implicit yes/no, convert it into a clear binary choice without changing the underlying intent
|
||||||
|
|
||||||
Recommended layouts:
|
Recommended layouts:
|
||||||
- Binary: one row `[Yes] [No]`
|
- Binary: one row `[Yes] [No]`
|
||||||
- Decision + defer: row 1 `[Do it] [Not now]`, row 2 `[More info]`
|
- Decision + defer: row 1 `[Do it] [Not now]`, row 2 `[More info]`
|
||||||
- A/B/C: one row `[A] [B] [C]`
|
- A/B/C: one row `[A] [B] [C]`
|
||||||
- Numbered list: `[1] [2] [3]` or short labels derived from each option
|
- Numbered list: `[1] [2] [3]` or short labels derived from each option
|
||||||
|
- Implicit yes/no: `[好,繼續] [先不要]`, `[要] [不用]`, `[現在做] [稍後]`
|
||||||
|
|
||||||
## Telegram message tool pattern
|
## Telegram message tool pattern
|
||||||
For user-visible delivery, use `message(action="send")` with `buttons`.
|
For user-visible delivery, use `message(action="send")` with `buttons`.
|
||||||
@@ -107,5 +118,9 @@ Pick one:
|
|||||||
```
|
```
|
||||||
Buttons: `[1] [2] [3]` or `[xxx] [ooo] [yyy]`
|
Buttons: `[1] [2] [3]` or `[xxx] [ooo] [yyy]`
|
||||||
|
|
||||||
|
### Implicit yes/no
|
||||||
|
Text: `如果你要,我可以現在幫你處理。`
|
||||||
|
Buttons: `[好,繼續] [先不要]`
|
||||||
|
|
||||||
## Decision rule
|
## Decision rule
|
||||||
Default to buttons whenever Eric is being asked to choose, confirm, defer, or select the next action on Telegram. This includes numbered lists that would otherwise require a reply like `1`, `2`, or `3`.
|
Default to buttons whenever Eric is being asked to choose, confirm, defer, or select the next action on Telegram. This includes numbered lists that would otherwise require a reply like `1`, `2`, or `3`, and implicit yes/no prompts that would otherwise require a reply like `好` or `不用`.
|
||||||
|
|||||||
Reference in New Issue
Block a user