Files
reporting-governance-plugin/skills/telegram-inline-buttons/SKILL.md

7.6 KiB
Raw Blame History

name, description
name description
telegram-inline-buttons 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 如果你要..., agent-proposed next-step lists, and numbered option lists like 1.xxx / 2.ooo / 3.yyy that should be converted into inline buttons.

Telegram Inline Buttons

Prefer inline buttons over free-text prompts when sending a proactive Telegram message that expects a choice.

Use buttons for

  • Yes / No confirmations
  • Implicit yes / no prompts like 如果你要...
  • A / B / C choices
  • Do it now vs later
  • Picking one of a few next actions
  • Numbered option lists like 1.xxx, 2.ooo, 3.yyy
  • Agent-proposed next-step menus written as 1. ... 2. ... 3. ...
  • Hybrid prompts like 如果你要我下一步可以1... 2... 3...

Do not use buttons for

  • Purely informational messages
  • Input that requires typed text
  • More than 5 options

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
  • 1. 立刻重發一次 2. 改成更明顯的測試文案 3. 直接在這裡做另一種測試
  • 如果你要我下一步可以1. 再測一次 2. 重新打包 3. 看修正摘要

These are usually implicit binary decisions or compact next-step menus and should default to inline buttons rather than requiring free-text confirmation.

Natural-language preservation rule

When the original sentence is already natural Chinese, preserve the original wording as much as possible. Prefer changing only the reply mechanism to inline buttons instead of rewriting the sentence into a stiffer or more mechanical question.

Good:

  • Original: 如果你要,我現在就幫你開跑。
  • Keep the sentence, add buttons: [好,開始] [先不要]

Avoid unnecessary rewrites like:

  • 請問是否要立即執行?
  • 是否要我現在開始處理此事項?

Next-step menu rule

When the assistant itself proposes 2-4 concrete next actions, do not leave them as a plain numbered text list if Telegram buttons are available. Convert the options directly into inline buttons.

Good:

  • Text: 要怎麼測比較好?
  • Buttons: [立刻重發] [改文案] [另一種測試]

Avoid:

1. 立刻重發一次
2. 改成更明顯的測試文案
3. 直接在這裡做另一種測試

when the whole point is to let Eric choose one.

Hybrid natural-language + numbered-options rule

When the message uses a natural Chinese lead-in and then lists next actions, preserve the lead-in and turn the numbered choices into buttons.

Good:

  • Text: 如果你要,我下一步可以:
  • Buttons: [再測一次] [重新打包] [看修正摘要]

Also good:

  • Text: 如果你要,我接下來可以這樣做:
  • Buttons: [先修規則] [再做測試] [直接打包]

Avoid leaving this as plain text like:

如果你要,我下一步可以
1. 再測一次
2. 重新打包
3. 看修正摘要

If the sentence is already natural, keep the sentence. Only convert the reply path into inline buttons.

Button design

  • Keep labels short: 1-4 words
  • 2-4 buttons is ideal
  • 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
  • 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
  • Prefer preserving natural Chinese phrasing and only replacing the free-text reply path with buttons
  • When the assistant proposes next steps, use buttons instead of a numbered response menu whenever the user is expected to pick one
  • For 如果你要,我下一步可以... style prompts, keep the lead-in sentence and convert only the listed options into buttons

Recommended layouts:

  • Binary: one row [Yes] [No]
  • Decision + defer: row 1 [Do it] [Not now], row 2 [More info]
  • A/B/C: one row [A] [B] [C]
  • Numbered list: [1] [2] [3] or short labels derived from each option
  • Implicit yes/no: [好,繼續] [先不要], [要] [不用], [現在做] [稍後]
  • Next-step menu: [立刻重發] [改文案] [另一種測試]
  • Hybrid lead-in + options: text 如果你要,我下一步可以: + buttons [再測一次] [重新打包] [看修正摘要]

Telegram message tool pattern

For user-visible delivery, use message(action="send") with buttons.

Example shape:

{
  "action": "send",
  "channel": "telegram",
  "target": "...",
  "message": "Want me to proceed?",
  "buttons": [[
    {"text": "Proceed", "callback_data": "deploy_confirm_yes", "style": "primary"},
    {"text": "Hold", "callback_data": "deploy_confirm_no"}
  ]]
}

After a button click

Telegram bot messages do not support arbitrary text color. To make the selection stand out:

  1. Edit the original message
  2. Remove the inline keyboard
  3. Append one short committed-selection line with emoji

Standard emoji mapping:

  • or 🟩 = yes / approve / proceed / confirm
  • 🟥 = no / cancel / stop
  • ⬛️ = later / skip / defer

Do not send a separate follow-up that only repeats the selection. Editing is enough unless you also need to report results or ask the next question.

Multi-step flows

For branching flows:

  1. Edit the prior message to commit the selection
  2. Send the next question with fresh buttons
  3. Do not narrate the previous selection again

Keep the first message short. Put details in the next step after the click.

Duplicate / stale callbacks

If a callback arrives after the message is already finalized:

  • Do nothing
  • No extra message
  • No further edits
  • Silently ignore it

Tooling rule

If message(send/edit) delivered the user-visible response, reply in chat with NO_REPLY unless you must add extra context beyond what the message edit already shows.

Copy-ready templates

Confirm action

Text: Want me to proceed with <action>? Buttons: [Proceed] [Hold]

Pick next step

Text: Pick the next move: Buttons: [Option A] [Option B] [Option C] [Not now]

Scheduling

Text: When should I remind you? Buttons: [15m] [1h] [Tonight] [Tomorrow]

Numbered options

Text:

Pick one:
1. xxx
2. ooo
3. yyy

Buttons: [1] [2] [3] or [xxx] [ooo] [yyy]

Implicit yes/no

Text: 如果你要,我可以現在幫你處理。 Buttons: [好,繼續] [先不要]

Natural Chinese phrasing

Text: 如果你要,我現在就幫你開跑。 Buttons: [好,開始] [先不要]

Assistant-proposed next steps

Text: 要怎麼測比較好? Buttons: [立刻重發] [改文案] [另一種測試]

Hybrid lead-in + options

Text: 如果你要,我下一步可以: Buttons: [再測一次] [重新打包] [看修正摘要]

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, implicit yes/no prompts that would otherwise require a reply like or 不用, assistant-proposed next-step menus where Eric is clearly meant to pick one option, and hybrid prompts like 如果你要我下一步可以1... 2... 3....

When the original wording is already natural Chinese, keep the wording and just turn the response path into buttons.