Reference telegram format helpers
Two new canonical artifacts for Telegram bot formatting, built 2026-04-30:
scripts/forge_telegram_format.py -- shared helper module all bots and skills import. Key functions:
- kv_block(rows) -- dict to aligned key-value lines
- mono_table(headers, rows, max_width=30) -- pseudo-table in code fence
- expandable_quote(text) -- collapsible long content
- inline_keyboard(buttons) -- list of (label, callback_data) rows to InlineKeyboardMarkup
- edit_or_send(chat_id, message_id, text) -- edit in place or send new
- pin_and_track(chat_id, message_id, slot) -- pin with slot tracking in data/telegram_pins.json
- progress_message(chat_id, initial) -- editable progress handle for worker updates
- chat_action(chat_id, action) -- typing / upload_photo / record_voice signals
- sanitize_for_telegram(text) -- detects markdown tables, converts to mono_table or kv_block; strips em-dashes; escapes MarkdownV2 reserved chars
docs/telegram-bot-playbook.md -- mkdocs-indexed doctrine doc. Single source of truth for formatting rules, feature catalog, when-to-use-what. Every bot brain and new skill reads it before sending anything novel.
[Claude Code]
[auto-memory session 3c02edcd-8ac5-45a8-9ee9-4039226efbb9, confidence 0.70, mode staged]