Loading...
Loading...
ADHD-optimized task state machine with abandonment detection and interventions. Use when: (1) user initiates any task, (2) providing solutions to problems, (3) detecting context switches, (4) user says "done", "completed", "finished", (5) session ends with pending tasks, (6) >30 minutes since solution provided. Tracks complexity, clarity, domain (BUSINESS/MICHAEL/FAMILY/PERSONAL), and triggers interventions.
npx skill4agent add breverdbidder/life-os task-tracker ┌──────────────────────────────────────────┐
│ │
▼ │
┌──────────┐ ┌──────────────────┐ ┌─────────────┐ │
│ INITIATED│──▶│ SOLUTION_PROVIDED│──▶│ IN_PROGRESS │─────────┤
└──────────┘ └──────────────────┘ └─────────────┘ │
│ │ │ │
│ │ ▼ │
│ │ ┌───────────┐ │
│ │ │ COMPLETED │ │
│ │ └───────────┘ │
│ │ │
│ ├─────────────────┐ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────┐ ┌──────────┐ │
└──────────▶│ ABANDONED │ │ BLOCKED │ │
└───────────┘ └──────────┘ │
│ │ │
▼ ▼ │
┌───────────┐ ┌──────────┐ │
│ DEFERRED │◀────│ (Retry) │───────────────┘
└───────────┘ └──────────┘| State | Trigger | Next Actions |
|---|---|---|
| INITIATED | Task request received | Assess complexity, provide solution |
| SOLUTION_PROVIDED | Solution given | Wait for execution signal |
| IN_PROGRESS | User confirms working | Monitor for completion |
| COMPLETED | User confirms done | Log success, update streak |
| ABANDONED | No response + context switch | Log pattern, intervention |
| BLOCKED | External dependency | Identify blocker, schedule retry |
| DEFERRED | Conscious postponement | Set reminder, capture reason |
task = {
"id": "task_20251219_001",
"description": "Review Q4 insurance renewals",
"state": "INITIATED",
"domain": "BUSINESS", # BUSINESS | MICHAEL | FAMILY | PERSONAL
"complexity": 6, # 1-10 scale
"clarity": 8, # 1-10 scale (how clear were instructions)
"estimated_minutes": 45,
"actual_minutes": None,
"initiated_at": "2025-12-19T10:30:00Z",
"solution_provided_at": None,
"completed_at": None,
"abandonment_count": 0,
"intervention_level": 0
}def check_abandonment(task, current_message, elapsed_minutes):
if task["state"] not in ["SOLUTION_PROVIDED", "IN_PROGRESS"]:
return False
# Time-based trigger
if elapsed_minutes > 30:
return True
# Context switch detection
if not is_related_to_task(current_message, task):
return True
return False📌 Quick check: [task description] - still on it?🔄 I notice [task] from earlier. This is pattern #[N] this week.
Continue or consciously defer?⚠️ ACCOUNTABILITY: [task] started [time] ago.
Current status? Be honest - no judgment, just facts.Just step 1? [tiny specific action] That's it.
Nothing else required right now.Let's do this together. You: [specific action]
Me: ⏱️ Waiting... (I'll check back in 5 minutes)Step 1 only. Confirm when done.
Don't think about step 2 yet.It's [time] - your [peak/dip] period.
[Suggest appropriate task complexity]# After providing solution
task["state"] = "SOLUTION_PROVIDED"
task["solution_provided_at"] = now()task["state"] = "IN_PROGRESS"task["state"] = "COMPLETED"
task["completed_at"] = now()
task["actual_minutes"] = elapsed_time()
update_streak()task["state"] = "ABANDONED"
task["abandonment_count"] += 1
log_pattern()task["state"] = "BLOCKED"
task["blocker"] = identified_dependency
schedule_retry()task["state"] = "DEFERRED"
task["defer_reason"] = reason
task["defer_until"] = scheduled_timestreak = {
"current": 5, # Days with at least 1 completion
"longest": 12,
"total_completions": 47,
"abandonment_rate": 0.23 # 23% tasks abandoned
}
# On completion
"✅ Done. Streak: 5 days. Total: 47 tasks."
# On first task of day
"Day 6 starts now. Keep the streak alive."class TaskState(TypedDict):
task_id: str
description: str
state: str
domain: str
complexity: int
clarity: int
elapsed_minutes: int
intervention_level: int
streak_current: intcreate_taskprovide_solutioncheck_abandonmentintervenecomplete_taskscripts/task_state_machine.pyscripts/abandonment_detector.pyscripts/streak_calculator.pyreferences/intervention_templates.mdreferences/adhd_patterns.md