The Bot Needs Boring Rules
Pocket Nenek looks like a Telegram bot on the surface, but the chat interface is the smallest part of a reliable bot. It helps people discover heritage food, follow trails, submit memories, and receive notifications, which means every message is really an input into a stateful application.
I first wanted to send everything through one clever prompt. The model could decide what the user meant, which flow they were in, and what should happen next, but one uncertain message could make a food trail forget where somebody was.
The stronger boundary is simple: normal code owns commands, state transitions, permissions, consent, and database writes. AI helps with the fuzzy parts, like classifying free text or summarising a memory, where a little uncertainty is acceptable and useful.
Google Sheets became the editorial interface because the people writing the food stories should not need repository access. The sync layer checks headers and schemas, records what happened, and keeps the runtime on a predictable local copy instead of trusting arbitrary cells live.
Provider fallbacks are part of the same idea. Pocket Nenek can try another model or use a safe response when the preferred provider is unavailable, while known command flows continue to work because they were never renting their logic from the model.
The small Telegram details mattered too: real update payloads, location shares, typing indicators, reply keyboards, duplicate sends, and malformed requests all have their own contracts. A handler that looks correct is not enough; the platform has to carry the full path and produce the behaviour a person expects.
The project keeps reminding me that the personality makes the bot charming, but the boring layers are what let people trust it. AI can make the conversation feel warmer, but it should not be the only thing holding the application together.