v1.0.0

Decision Flow

How a Telegram message becomes a stored, explainable decision.

Ingest

The bot webhook receives the update and extracts the message text and chat id; the chat id becomes the group id used everywhere else. Updates with no text, such as photos and callback queries, are acknowledged with 200 so Telegram stops retrying them. The webhook path is /api/webhooks/telegram on the app host.

curl -X POST https://tgfilter.co/api/webhooks/telegram \ -H 'X-Telegram-Bot-Api-Secret-Token: <secret>' \ -d '{"message":{"text":"hi","chat":{"id":-100}}}'

Fast acknowledgement

Telegram retries anything it does not see a 200 for, so work is kept small and bounded.

Text only

Media, edits and callbacks are acknowledged but not classified.

Decide and Record

Local layers produce a verdict and its reason codes. Review-band messages consult the verdict cache first and only then the judge. The decision is written with its score, reasons, group and ruleset version, and repeated blasts are recognised by content hash so the same text across many groups is convicted without another model call.

Cached by content

Identical text is judged once. Repeat blasts cost nothing extra.

Versioned

Every decision records the ruleset version that produced it, so a change can be traced.