Suggested layout
core/— intents, policies, pure functions, testsadapters/telegram/— update parsing, sendMessage wrappersadapters/discord/— interactions, embedsadapters/slack/— Bolt listenershost/— HTTP server, workers, cron
Normalize early
Map each platform event to a small internal type: { platform, chatId, userId, text, interactionId }.
Limits differ
Message length, button caps and markdown dialects differ. Put splitting and escaping at the adapter edge. Use the message splitter and markdown escape tools while developing.
Feature flags
Not every platform gets every feature on day one. Gate with config.