How ProTask works
What happens where — from setting up masters to the evening report.
The daily loop
Steps 3 → 6 repeat every working day automatically. Replies after 21:00 stay in the log but are not counted. Checkpoints and progress can always be corrected by hand on the project page — those edits are logged as “manual”, AI edits as “AI”.
Where to find things
| Page | What you do there | Data (tables) |
|---|---|---|
| Dashboard | Live counts (done, in progress, overdue, due today, at risk, blocked), progress by work and by project, overdue list, latest AI updates, latest report. Buttons to send follow-ups / generate the report now. | tasks, projects, task_updates, daily_reports |
| Projects | All projects with progress. Open one for its tasks grouped by work → component; expand a task to tick checkpoints, change status/progress/dates/assignees, see its update history. Switch to Gantt for the timeline. | projects, project_components, tasks, checkpoints, task_assignees |
| New project | The wizard: details → work streams → components (presets load automatically) → review tasks → create. | writes projects, project_components, tasks, task_assignees, checkpoints |
| Tasks | Every task across projects. Filter by overdue / due today / at risk / blocked / not started / done and by work type. List or Gantt. | tasks |
| Message log (follow-ups, replies waiting / processed, receipts, confirmations, reports), the reply simulator with “Process now”, recent batch runs, and the Meta templates tab with copy-ready text. | wa_messages, followups, processing_runs | |
| Daily reports | One report per day — summary text, completion, replies received vs followed-up, progress by work, updates, blockers and overdue items. | daily_reports |
| Employees | People who get follow-ups. The phone number must be their WhatsApp number. Tick “send daily report” for managers. | employees |
| Masters | Work master (colour), task master (labels, colour), component master (+ task presets), employee master (roles). | work_types, task_types, components, component_preset_tasks, roles |
How the AI decides
- Every reply is read by Claude (high effort, structured output checked against the list sent). If Claude can't be reached, nothing is guessed — the replies wait for the next run.
- A task without steps is either done or not done. A task with steps shows them lettered (2a, 2b…) in the message; progress is finished steps ÷ total, never a guessed percentage.
- It reads everything a person sent between 17:00 and 21:00 together, against the numbered list they were sent — a later message overrides an earlier one.
- It understands numbers and normal phrasing: “3 ko chhod ke sab ho gaye” = all done except 3; “1 aur 2 ho gaya, baaki kal” = 1 and 2 done, the rest not done; “2 me 50%” = 2 in progress.
- Two or more people on a task: each is asked separately. The task is marked done only if everyone who answered says done — one “not done” keeps it open, and the report lists it under “answers differ”.
- Delayed tasks are asked about explicitly; whatever excuse is given is stored as the task's delay reason and shown on the task and in the report.
- It only sees the open tasks of the person who replied — it can't touch anyone else's work.
- A checkpoint is ticked only when the reply says that step is finished (“started” or “half done” doesn't count).
- Progress never drops below the share of checkpoints done; a task becomes Done only when the person says the whole task is finished.
- Problems (“material nahi aaya”, “machine down”) mark the task Blocked and appear in the report.
- Unclear replies change nothing — the bot asks one specific question back.
- Every change is stored in
task_updateswith the original message, so it can be audited or undone.
Status labels
- OverdueEnd date has passed and the task isn't done.
- Due todayEnd date is today.
- At riskIn its window but progress is more than 25 points behind the share of time already used.
- On trackIn its window and progress keeps up with time.
- UpcomingStart date is in the future — not followed up yet.
- BlockedSomeone reported a problem stopping work (material, machine, drawing).
Automations
| 18:00 IST, Mon–Sat | Numbered follow-ups · /api/cron/followup |
| On every reply | Saved + one receipt per evening · /api/whatsapp/webhook |
| 21:00 IST, Mon–Sat | Batch: read 17:00–21:00 replies, mark tasks, confirm, report to managers · /api/cron/process |
| On every push to main | GitHub Actions builds and deploys to the VPS |
Schedules run from the VPS crontab and call the endpoints with the CRON_SECRET. The buttons on the dashboard trigger the same code.
Integrations
- WhatsApp (Meta Cloud API)Live — messages are really sent
- Opening templateNot set — needed to message people outside the 24h window
- AI analysisKeyword rules (no ANTHROPIC_API_KEY)
- Webhook signature checkOn
- Webhook URL
https://protask.cerebrotech.in/api/whatsapp/webhook
What's in the database right now
work_types
5
task_types
8
roles
8
employees
9
components
8
component_preset_tasks
23
projects
4
project_components
25
tasks
79
checkpoints
233
followups
54
wa_messages
211
task_responses
118
processing_runs
8
task_updates
63
daily_reports
8
Supabase schema protask · tables defined in supabase/schema.sql.
Demo data
Wipes everything in protask and reloads the demo: 4 crane projects (one delivered, one in planning), 9 employees, presets, and a week of WhatsApp history, AI updates and daily reports. Takes about a minute and a half.