Implements and maintains the Szerencsejáték Zrt. lottery Telegram bot on Deno and TypeScript. Covers Hungarian lottery game types (e.g. Ötöslottó, Hatoslottó, Skandináv, Keno), user ticket storage, draw result ingestion, match calculation, and Telegram notifications. Use when editing bot code, draw logic, storage, scheduling, or compliance around official results.
docs/requirements.md — FR-1…FR-6, NFR-1…NFR-5, command table
(§3), traceability map (§9), open questions (§11). Update requirements in the same PR when
changing behaviour or scope agents would consider “product”.docs/requirements.md §3 table).docs/architecture.md §2.1): draw.update.requested → fetch
→ draw.result.persist → DB insert if new → draw.result.stored → for each subscriber
user.notification.requested → OutboundNotifier (Telegram or future adapters).format_otoslotto_user_message); prize tiers later.deno task check, scan the
diff for scope creep and regressions, align with docs/ (see AGENTS.md § After each iteration).AGENTS.md).OTEL_EXPORTER_OTLP_ENDPOINT is set —
see ADR 0007 and src/observability/.docs/architecture.md and ADR 0002. HTTP
entry: src/server.ts (CloudEvents); telegram_bot.ts for long polling. Helm default:
both in one Pod + hourly CronJob (deploy/helm/...). Keep docs/ and docs/adr/ aligned
after substantive edits (ADR 0004). For
architecture ADRs: ask the user to approve ADR text before filling Approved by and
Approved at (UTC ISO timestamp) in the Review section.src/),
record it in the same PR in the appropriate ADR Dependencies section (or a new ADR) and
dependency inventory—same rule as
ADR 0004 §6.src/i18n/ (t(), locales/hu.ts). Hungarian
v1.<code> for numbers, not for slash-commands
(see FR-5 in docs/requirements.md). Keep messages concise: game name, draw id, winning
numbers, per-line hits.src/domain/*, tests, docs/requirements.md (and architecture if
needed).docs/requirements.md §3/§9/§10, i18n keys,
tests.(drawResult, userLine) => MatchResult. Unit test edge
cases (duplicate numbers, order independence).docs/requirements.md and user approval.