Tasks
Onboarding tasks that reward organization credits on completion.
"Tasks" in Layers today are onboarding milestones with credit rewards.
The system is deliberately generic (category field with values like
onboarding, milestone, challenge, activation) — the initial
roster is all onboarding tasks.
Where tasks live
- An onboarding-task widget on the dashboard lists outstanding tasks with their credit reward amount and a CTA (for example, a link to the layer install page).
- Completion is tracked on
user_task_progressrows (pending→completed|skipped). - Credit grants write to
organization_credit_eventswithevent_type: 'grant'andsource: 'onboarding_task'so they show up alongside billing history.
Task definition fields
Every task is a row in task_definitions with:
task_key— stable identifier (e.g.connect_instagram).title,description,icon.category(onboarding,milestone,challenge,activation), plus optionalsubcategory(social,ads,sdk,content).credit_reward— how many credits to grant on completion.scope—organization(credits awarded once per org) oruser(credits awarded per user).lifecycle—one_time,recurring, ortime_boxed.completion_type— how the task gets marked complete:event— frontend-emitted event.backend_event— server-emitted event.backend_validation— server explicitly validates (e.g., SDK began receiving events).manual— user dismisses or explicitly marks done.
completion_event— the event key that triggers completion (for event-based tasks).cta_label,cta_url— the nudge action shown on the widget.velocity_eligible— feeds an internal "velocity credits" promo.is_active,display_order— roster management.
Anti-gaming
scope: organization+lifecycle: one_timemeans credits only land once per org no matter how many members trigger the event.- Disconnect-and-reconnect flows don't re-grant — completion is permanent on the progress row.
- The event-to-task matcher runs server-side via
complete_onboarding_task_by_eventRPC, so client tampering can't mint credits.
What tasks are NOT
Tasks are not a human taskboard — there is no "snooze," no "assign to a teammate," no SLA escalation, no Linear / Jira sync, no "in progress" state, and no "reassign." It's strictly a complete-milestone-to-earn-credits flow today.