SYSTEM / 003 / AI OPERATIONS & AGENTS / PRODUCTION / ACTIVE / 2026

Philipp

An ambient AI project manager that listens to team chatter without conversational spam, maintains a structured Kanban board, and dispatches validated tasks to an autonomous coding execution loop.

PYTHON GEMINI 3.8 FLASH SQLITE / WAL ANTIGRAVITY CLI TELEGRAM BOT API WHISPER V3 TURBO SYSTEMD TIMERS
01 / QUESTION

What problem was framed

Engineering teams rarely document requirements cleanly. Core architectural decisions, bug reports, and UX feedback happen organically in high-velocity chat threads (Telegram, Slack). Conventional project management tools fail because keeping boards synchronized requires continuous manual grooming, copy-pasting, and administrative drag.

Conversely, existing AI chatbots in group chats are notoriously intrusive: they trigger unprompted answers on casual chatter, hallucinate tickets from jokes or fleeting thoughts, and lack any execution authority.

The core question: Can an ambient AI project manager observe real-time team chatter without conversational noise, reliably distinguish actionable technical work from casual banter, maintain an audit-trailed Kanban board, and autonomously dispatch approved tickets to a headless coding agent to generate tested pull requests?

02 / CONSTRAINTS

Guiding technical constraints

NOISE & SPAM CONTROL
Zero Unsolicited Interruption
The bot must never interrupt group conversations unless explicitly addressed or triggered via reply. A strict final NO_REPLY filter suppresses output before any chat bubble is dispatched.
COST EFFICIENCY
0 LLM Tokens for Routines
Deadline tracking, reminders, morning digests, and weekly board hygiene run entirely on deterministic Python/SQLite systemd timers without invoking LLM tokens.
SINGLE-PASS INFERENCE
Dual Decision Architecture
Avoids a two-stage classifier-then-generator cascade. A 12-second conversation-burst window allows the primary model to simultaneously decide board mutations and speech action in one turn.
SECURITY & ISOLATION
Fail-Closed Scopes
No arbitrary shell or bash access from Telegram. Autonomous execution is sandboxed in a dedicated worker process triggered only by strictly typed ticket dispatches.
03 / SYSTEM

End-to-End System Topology

Philipp bridges the gap between chaotic conversation and concrete git commits through an asynchronous event journal, an ambient triage buffer, and a headless execution worker.

PHILIPP SUBSYSTEM & EXECUTION TOPOLOGY
┌────────────────────────────────────────────────────────────────────────┐
│ TEAM CONVERSATION STREAM (Telegram Group / DMs: Text, Voice, Images)   │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│ PRE-GATEWAY INTAKE & DEBOUNCE HOOK                                     │
│ - Exact chat/user allowlist (fail-closed scope)                        │
│ - Voice transcription via DeepInfra Whisper Large V3 Turbo             │
│ - Append event to SQLite/WAL journal + deduplicate delivery IDs         │
│ - Reset 12-second rolling burst timer per topic                         │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ (12-second conversation batch)
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│ GEMINI 3.8 FLASH WITH REASONING (Single-Pass Dual Decision)            │
│ ┌───────────────────────────────────┬────────────────────────────────┐ │
│ │ PM DECISION                       │ SPEECH DECISION                │ │
│ │ - Triage vs Candidate evaluation  │ - Reply / Clarify in chat      │ │
│ │ - Mechanical duplicate review     │ - Silence: Final NO_REPLY      │ │
│ └─────────────────┬─────────────────┴────────────────┬───────────────┘ │
└───────────────────┼──────────────────────────────────┼─────────────────┘
                    │                                  │
                    ▼                                  ▼
┌─────────────────────────────────────┐  ┌───────────────────────────────┐
│ TASK METADATA & KANBAN STORE        │  │ TELEGRAM DELIVERY SUBSYSTEM   │
│ - Human-readable keys (`BUG-042`)   │  │ - Suppresses NO_REPLY bubbles │
│ - Candidate inbox for vague ideas   │  │ - Clean markdown formatting   │
│ - Append-only field audit trail     │  │ - Direct owner DM alerts      │
└───────────────────┬─────────────────┘  └───────────────────────────────┘
                    │
                    ▼ (When ticket is approved for execution)
┌────────────────────────────────────────────────────────────────────────┐
│ AUTONOMOUS EXECUTION LOOP: ANTIGRAVITY CLI WORKER                      │
│ - Spins off isolated git branch (`task/KEY` or `batch/...`)            │
│ - Synthesizes structured prompt (acceptance criteria + repro steps)    │
│ - Executes headless code synthesis, unit tests & diff verification     │
│ - Generates pull request & reports diffstat back to PM board           │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│ DETERMINISTIC SYSTEMD CRONS (0 LLM Tokens)                             │
│ - 5-min deadline reminder monitor (snooze/ack aware)                   │
│ - 09:00 morning PM review & task prioritization                        │
│ - Weekly board hygiene & stale ticket pruning                          │
└────────────────────────────────────────────────────────────────────────┘
PYTHON 3.12 / SYSTEMD SERVICES / HEADLESS LINUX VPS DEPLOYMENT
04 / KEY MECHANICS

Core Engineering Decisions

0 API Tokens
DETERMINISTIC CRON FOR HYGIENE & DEADLINES
Issue → PR
END-TO-END AUTONOMOUS CODE EXECUTION LOOP
15–20 / wk
SUSTAINED TASK TRIAGE & TRACKING THROUGHPUT
12s Debounce
AMBIENT BATCHING (ZERO CHAT INTERRUPTIONS)

1. Ambient Debounce & The Dual Decision Model

When developers chat in Telegram, thoughts are fragmented across multiple short messages within seconds. Standard webhook integrations trigger an LLM turn on every single line, creating intolerable latency, context thrashing, and high costs.

Philipp implements a rolling 12-second debounce timer backed by a write-ahead log in SQLite. All incoming messages, voice notes, and image attachments within a conversational burst are combined into one attributed, injection-labelled turn.

In a single forward pass, Gemini 3.8 Flash makes two independent determinations:

  • The PM Decision: Does this conversation create a new requirement, update an existing issue, or surface a vague thought?
  • The Speech Decision: Should the bot speak to clarify or confirm, or should it execute silently? If silence is chosen, the engine emits an internal NO_REPLY token that is caught by the output filter before touching the Telegram Bot API.

2. Candidate Inbox & Mechanical Duplicate Shield

In messy team conversations, people often brainstorm or joke about features they never intend to build. Dumping every conversational whim directly onto a Kanban board destroys board signal-to-noise ratio.

Philipp splits task intake into two paths:

  • Clear, actionable work: Instantly created on the board in triage status with auto-assigned human keys (e.g. `FEAT-012`).
  • Vague or ambiguous ideas: Stored in an isolated candidate_inbox. Philipp quietly notifies the technical lead in a private DM with context, requesting confirmation or dismissal.
  • Mechanical deduplication: Before any ticket is registered, an algorithmic similarity filter checks existing titles and summaries. If a match is detected, creation is blocked until the user explicitly confirms an update or override.

3. Autonomous Execution Loop: Antigravity CLI Worker

The most significant differentiator of Philipp is that it is not just a passive tracking bot; it possesses an autonomous execution loop.

When the technical lead instructs Philipp to implement a ticket or batch of tickets (e.g. "Philipp, resolve `BUG-014` and `FEAT-015` in a PR"), Philipp invokes philipp_antigravity_dispatch:

  1. The worker pulls requirements, acceptance criteria, and reproduction steps from the task metadata store.
  2. It checks out a dedicated git branch (e.g. batch/feat-015-bug-014) in the target repository on the server.
  3. It invokes the Antigravity CLI in headless mode, which loads repository context, plans modifications, executes code changes, and verifies builds.
  4. Upon completion, the worker formats the diffstat, verifies test status, creates a pull request, and posts the summary directly back to the project management ledger.

4. Tokenless Deterministic Crons

Most AI assistant architectures burn significant LLM tokens by polling boards every few minutes to check deadlines and draft reminder messages.

Philipp offloads all time-based logic to native systemd timers:

  • A 5-minute systemd timer queries SQLite for upcoming or overdue deadlines. If an alert is due, it formats a crisp notification using deterministic templates without calling an LLM.
  • Interactive snooze, acknowledge, and reschedule actions update metadata records instantly.
  • Morning digests (09:00) and weekly backlog hygiene reports run on zero-token cron jobs, keeping operational costs strictly predictable.
05 / VERIFICATION & FAILURE MODES

Failure Modes & Defensive Design

Production deployment in real engineering teams requires strict failure containment:

  • Telegram Reconnection & Webhook Retries: Events are written to the SQLite journal before debounce processing. Retries with duplicate message IDs are dropped idempotently.
  • Stale Chatter Expiration: If the worker process restarts or network connectivity drops, pending events older than 30 minutes expire automatically rather than replaying obsolete context.
  • Strict Shell Boundary: The Telegram adapter has zero access to raw shell or bash commands. All code execution is mediated by the Antigravity worker sandbox with pre-defined workspace allowlists.
  • Private Context Leakage Prevention: Private discussions between the founder and Philipp in DM share board status, but project policy strictly prohibits quoting private DM wording back into the group chat.