task-tracker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTask Tracker - ADHD State Machine
任务追踪器 - ADHD状态机
Overview
概述
Systematic task tracking designed for ADHD patterns. Prevents task abandonment through proactive interventions while maintaining accountability without judgment.
专为ADHD行为模式设计的系统化任务追踪系统。通过主动干预防止任务放弃,同时在无评判的前提下保持任务问责性。
State Machine
状态机
┌──────────────────────────────────────────┐
│ │
▼ │
┌──────────┐ ┌──────────────────┐ ┌─────────────┐ │
│ INITIATED│──▶│ SOLUTION_PROVIDED│──▶│ IN_PROGRESS │─────────┤
└──────────┘ └──────────────────┘ └─────────────┘ │
│ │ │ │
│ │ ▼ │
│ │ ┌───────────┐ │
│ │ │ COMPLETED │ │
│ │ └───────────┘ │
│ │ │
│ ├─────────────────┐ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────┐ ┌──────────┐ │
└──────────▶│ ABANDONED │ │ BLOCKED │ │
└───────────┘ └──────────┘ │
│ │ │
▼ ▼ │
┌───────────┐ ┌──────────┐ │
│ DEFERRED │◀────│ (Retry) │───────────────┘
└───────────┘ └──────────┘ ┌──────────────────────────────────────────┐
│ │
▼ │
┌──────────┐ ┌──────────────────┐ ┌─────────────┐ │
│ INITIATED│──▶│ SOLUTION_PROVIDED│──▶│ IN_PROGRESS │─────────┤
└──────────┘ └──────────────────┘ └─────────────┘ │
│ │ │ │
│ │ ▼ │
│ │ ┌───────────┐ │
│ │ │ COMPLETED │ │
│ │ └───────────┘ │
│ │ │
│ ├─────────────────┐ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────┐ ┌──────────┐ │
└──────────▶│ ABANDONED │ │ BLOCKED │ │
└───────────┘ └──────────┘ │
│ │ │
▼ ▼ │
┌───────────┐ ┌──────────┐ │
│ DEFERRED │◀────│ (Retry) │───────────────┘
└───────────┘ └──────────┘State Definitions
状态定义
| 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 Metadata
任务元数据
Every task tracks:
python
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
}每个任务都会追踪以下信息:
python
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
}Abandonment Detection Triggers
任务放弃检测触发条件
Monitor for these patterns:
- Context Switch - New topic without closing current task
- Session End - Chat ends with task in SOLUTION_PROVIDED or IN_PROGRESS
- Time Decay - >30 minutes since solution with no update
- Topic Drift - User asks unrelated question while task pending
监控以下行为模式:
- 上下文切换 - 未关闭当前任务即开启新话题
- 会话结束 - 会话结束时任务处于“已提供解决方案”或“进行中”状态
- 时间流逝 - 提供解决方案后超过30分钟无更新
- 话题偏离 - 用户在任务未完成时询问无关问题
Detection Algorithm
检测算法
python
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 Falsepython
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 FalseIntervention Protocol
干预协议
Level 1: Gentle Check (0-30 minutes)
1级:温和提醒(0-30分钟)
📌 Quick check: [task description] - still on it?📌 快速确认:[任务描述] - 还在处理吗?Level 2: Pattern Observation (30-60 minutes)
2级:模式提示(30-60分钟)
🔄 I notice [task] from earlier. This is pattern #[N] this week.
Continue or consciously defer?🔄 我注意到之前的[任务]。这是本周第[N]次出现此类模式。
继续处理还是主动推迟?Level 3: Direct Accountability (>60 minutes)
3级:直接问责(超过60分钟)
⚠️ ACCOUNTABILITY: [task] started [time] ago.
Current status? Be honest - no judgment, just facts.⚠️ 问责提醒:[任务]在[时间]前已开始。
当前状态如何?请如实告知 - 无评判,仅记录事实。ADHD Intervention Strategies
ADHD干预策略
When abandonment detected, apply these techniques:
检测到任务放弃时,应用以下技巧:
Micro-Commitment
微承诺
Break to smallest possible action:
Just step 1? [tiny specific action] That's it.
Nothing else required right now.将任务拆解为最小可行动作:
只做第一步?[具体微小动作]就好。
当前无需完成其他步骤。Body Doubling
虚拟陪伴
Create virtual co-working presence:
Let's do this together. You: [specific action]
Me: ⏱️ Waiting... (I'll check back in 5 minutes)创建虚拟协作场景:
我们一起完成它。你:[具体动作]
我:⏱️ 等待中...(5分钟后我会再次确认)Chunking
分块处理
Focus tunnel vision:
Step 1 only. Confirm when done.
Don't think about step 2 yet.聚焦单一环节:
只做第一步。完成后请告知。
暂时不要考虑第二步。Energy Matching
能量匹配
Align with daily patterns:
It's [time] - your [peak/dip] period.
[Suggest appropriate task complexity]贴合日常精力模式:
现在是[时间] - 你的[高峰/低谷]时段。
[建议匹配的任务复杂度]Workflow: Task Creation
工作流:任务创建
Trigger: Any request that implies work to be done
- Extract task description from message
- Assess complexity (1-10) based on:
- Number of steps
- External dependencies
- Decision-making required
- Time estimate
- Assess clarity (1-10) based on:
- Specificity of request
- Known vs unknown elements
- Ambiguity level
- Assign domain (BUSINESS/MICHAEL/FAMILY/PERSONAL)
- Set state to INITIATED
- Provide solution → state to SOLUTION_PROVIDED
触发条件: 任何隐含需要完成工作的请求
- 从消息中提取任务描述
- 基于以下维度评估复杂度(1-10分):
- 步骤数量
- 外部依赖
- 所需决策量
- 时间预估
- 基于以下维度评估清晰度(1-10分):
- 请求的具体程度
- 已知与未知要素
- 模糊程度
- 分配领域(BUSINESS/MICHAEL/FAMILY/PERSONAL)
- 将状态设置为“已发起”
- 提供解决方案 → 状态更新为“已提供解决方案”
Workflow: State Transitions
工作流:状态转换
INITIATED → SOLUTION_PROVIDED
已发起 → 已提供解决方案
python
undefinedpython
undefinedAfter providing solution
After providing solution
task["state"] = "SOLUTION_PROVIDED"
task["solution_provided_at"] = now()
undefinedtask["state"] = "SOLUTION_PROVIDED"
task["solution_provided_at"] = now()
undefinedSOLUTION_PROVIDED → IN_PROGRESS
已提供解决方案 → 进行中
Trigger: User says "working on it", "starting now", "doing this"
python
task["state"] = "IN_PROGRESS"触发条件: 用户表示“正在处理”“现在开始”“做这个”
python
task["state"] = "IN_PROGRESS"IN_PROGRESS → COMPLETED
进行中 → 已完成
Trigger: User says "done", "finished", "completed"
python
task["state"] = "COMPLETED"
task["completed_at"] = now()
task["actual_minutes"] = elapsed_time()
update_streak()触发条件: 用户表示“完成”“做完了”“结束了”
python
task["state"] = "COMPLETED"
task["completed_at"] = now()
task["actual_minutes"] = elapsed_time()
update_streak()Any → ABANDONED
任意状态 → 已放弃
Trigger: Abandonment detection + no response to intervention
python
task["state"] = "ABANDONED"
task["abandonment_count"] += 1
log_pattern()触发条件: 检测到任务放弃 + 对干预无响应
python
task["state"] = "ABANDONED"
task["abandonment_count"] += 1
log_pattern()Any → BLOCKED
任意状态 → 受阻
Trigger: User identifies external dependency
python
task["state"] = "BLOCKED"
task["blocker"] = identified_dependency
schedule_retry()触发条件: 用户指出存在外部依赖
python
task["state"] = "BLOCKED"
task["blocker"] = identified_dependency
schedule_retry()Any → DEFERRED
任意状态 → 已推迟
Trigger: Conscious postponement with reason
python
task["state"] = "DEFERRED"
task["defer_reason"] = reason
task["defer_until"] = scheduled_time触发条件: 用户主动选择推迟并说明原因
python
task["state"] = "DEFERRED"
task["defer_reason"] = reason
task["defer_until"] = scheduled_timeStreak Tracking
连续完成天数追踪
Maintain completion streak for motivation:
python
streak = {
"current": 5, # Days with at least 1 completion
"longest": 12,
"total_completions": 47,
"abandonment_rate": 0.23 # 23% tasks abandoned
}记录连续完成天数以提升动力:
python
streak = {
"current": 5, # Days with at least 1 completion
"longest": 12,
"total_completions": 47,
"abandonment_rate": 0.23 # 23% tasks abandoned
}On completion
On completion
"✅ Done. Streak: 5 days. Total: 47 tasks."
"✅ Done. Streak: 5 days. Total: 47 tasks."
On first task of day
On first task of day
"Day 6 starts now. Keep the streak alive."
undefined"Day 6 starts now. Keep the streak alive."
undefinedDomain-Specific Behavior
领域专属行为
BUSINESS (Everest Capital)
BUSINESS(Everest Capital)
- Higher urgency weighting
- Deadline awareness
- Revenue impact assessment
- 更高的紧急权重
- 截止日期提醒
- 营收影响评估
MICHAEL (D1 Swimming)
MICHAEL(D1游泳队)
- Connect to swim schedule
- Nutrition/training alignment
- Recruiting deadlines
- 关联游泳日程
- 营养/训练协同
- 招募截止日期追踪
FAMILY (Orthodox Observance)
FAMILY(东正教守规)
- Shabbat/holiday awareness
- No work pressure evenings
- Family event priority
- 安息日/节假日提醒
- 晚间无工作压力
- 家庭活动优先
PERSONAL (Health/Learning)
PERSONAL(健康/学习)
- Energy level consideration
- Learning capture integration
- Health metric correlation
- 精力水平考量
- 学习内容整合
- 健康指标关联
LangGraph Integration
LangGraph集成
State Schema
状态模式
python
class TaskState(TypedDict):
task_id: str
description: str
state: str
domain: str
complexity: int
clarity: int
elapsed_minutes: int
intervention_level: int
streak_current: intpython
class TaskState(TypedDict):
task_id: str
description: str
state: str
domain: str
complexity: int
clarity: int
elapsed_minutes: int
intervention_level: int
streak_current: intNodes
节点
- - Initialize from user message
create_task - - Generate response, update state
provide_solution - - Periodic abandonment check
check_abandonment - - Apply intervention strategy
intervene - - Log completion, update streak
complete_task
- - 从用户消息初始化任务
create_task - - 生成回复,更新状态
provide_solution - - 定期检查任务是否被放弃
check_abandonment - - 应用干预策略
intervene - - 记录完成状态,更新连续完成天数
complete_task
Scripts
脚本
- - State transition logic
scripts/task_state_machine.py - - Pattern detection
scripts/abandonment_detector.py - - Streak maintenance
scripts/streak_calculator.py
- - 状态转换逻辑
scripts/task_state_machine.py - - 模式检测
scripts/abandonment_detector.py - - 连续完成天数维护
scripts/streak_calculator.py
References
参考资料
- - Full intervention scripts
references/intervention_templates.md - - Common patterns and responses
references/adhd_patterns.md
- - 完整干预脚本
references/intervention_templates.md - - 常见行为模式与应对方案
references/adhd_patterns.md