Skip to content

feat(telegram): expose slash commands via Bot Menu (setMyCommands) #1466

@133Felix

Description

@133Felix

Problem

The Telegram adapter does not register its slash commands with the Bot API. Users have to either know the commands or send /help to discover them — Telegram's native "/" autocomplete dropdown stays empty.

For other surfaces this is a non-issue:

  • Slack: slash commands are declared in the app manifest
  • Web UI: command-palette / explicit links
  • GitHub comments: free text, no menu expectation

…but Telegram users get the worst discoverability of any chat platform Archon supports, and the orchestrator's slash commands (/help, /status, /reset, /workflow, /register-project, /update-project, /remove-project, /commands, /init, /worktree) become invisible until you've memorized them.

Proposed Solution

Call bot.api.setMyCommands(...) once at adapter startup. grammy supports this directly. ~10 lines in packages/adapters/src/chat/telegram/adapter.ts (somewhere in the bot-init flow, before bot.start()).

Example:

await this.bot.api.setMyCommands([
  { command: 'help',             description: 'Show available commands' },
  { command: 'status',           description: 'Show conversation + project context' },
  { command: 'reset',            description: 'Clear AI session (keeps codebase binding)' },
  { command: 'workflow',         description: 'Workflow commands (list/run/status/cancel/...)' },
  { command: 'commands',         description: 'List available custom commands' },
  { command: 'worktree',         description: 'Manage isolation worktree' },
  { command: 'register-project', description: 'Register a local project' },
  { command: 'update-project',   description: 'Update a project path' },
  { command: 'remove-project',   description: 'Remove a registered project' },
  { command: 'init',             description: 'Initialize .archon/ in current repo' },
]);

Notes:

  • setMyCommands is per-bot, persisted on Telegram's side. Re-applying on every start is idempotent and ensures the menu reflects what the running adapter version actually supports.
  • The orchestrator's deterministic-command list (in orchestrator-agent.ts) is the source of truth for what should appear here — keeping the two in sync is the only maintenance cost.

Files to Change

  • packages/adapters/src/chat/telegram/adapter.ts — call setMyCommands at startup
  • packages/adapters/src/chat/telegram/adapter.test.ts — assert the call happens (mock bot.api.setMyCommands)

Related

  • feat: /setproject command to bind codebase to conversation #1044 — once /setproject lands, it should be added to this menu in the same change (the two together make multi-repo Telegram usage discoverable AND switchable). The two issues are coupled by user-journey: discover the commands via menu, then switch project via /setproject.

Out of Scope

  • Localized command descriptions per language code — setMyCommands supports a language_code param, but YAGNI for a single-developer tool until someone asks.
  • Slack-side parity (its commands are already declared in the manifest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority - Nice to have, consider closing if stalearea: adaptersPlatform adaptersfeatureNew functionality (planned)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions