Pip Bot logo

MIH Bot Docs

Task + Deadline System

OverviewCore ConceptsCommand ReferenceFull Command ListWorkflows & UI
Home
Back to Home
Core Concepts

MIH Bot Architecture and Workflow Logic

This section explains how MIH Bot models project domains, enforces task transitions, and schedules reminders in production using cron-based workers.

Projects vs. Tasks

Projects provide the governance boundary. Tasks are immutable units tracked within that boundary.

A project acts as a container for team ownership, channel routing, and visibility rules. Each project generates a unique prefix (for example, WEB) that MIH Bot uses to produce task IDs like WEB-T001, WEB-T002, and so on.

Visibility can be Public (discoverable by all permitted users) or Private (restricted to approved members). Dedicated channels allow project updates, embed cards, and reminders to stay context-local.

The Task Lifecycle

Every status transition is command-driven and auditable.

Task creation starts in To Do. When the assignee executes /start_task, status transitions to In Progress and timestamp tracking starts.

The assignee submits work with /submit_task, which opens a Discord modal for accomplishments, blockers, and effort notes. Submission transitions the task to Under Review and notifies admins in REVIEW_CHANNEL_ID.

Admins finalize status using approval or rejection actions. Approval marks Done; rejection returns the task to In Progress with feedback attached to the record.

Reminder System (Cron Strategy)

Reminder jobs execute in Philippine Time (PHT) and are gated by status + deadline windows.

  • Daily digest reminders run at 8:00 AM and 1:00 PM for active/pending tasks.
  • 24-hour warning triggers one day before due date for unresolved tasks.
  • Persistent countdown warnings trigger at 30, 20, and 10 minutes before deadline.
  • Overdue pings run repeatedly from 8:00 AM to 5:00 PM PHT until status is resolved.

Jobs query MongoDB for candidate tasks and suppress reminders for terminal states to reduce alert fatigue. This model ensures high compliance for shift-based and fixed-time assignments.