Process the unified proactive heartbeat by reading PROACTIVE.md and executing all due tasks across every frequency (hourly/daily/weekly/monthly).
Silent background skill for executing scheduled proactive tasks. A single unified heartbeat runs every hour and checks ALL frequencies — hourly, daily, weekly, and monthly tasks are evaluated in one pass.
You receive a single heartbeat trigger with:
type: "proactive_heartbeat"This skill overrides standard task completion rules. Unlike regular tasks:
task_end immediately after processing, without user interactionsend_message for tier 1 notifications, but set wait_for_user_reply=falseWhy? Heartbeat tasks run automatically at regular intervals. Waiting for user confirmation would cause tasks to pile up indefinitely.
When executing proactive tasks, you MUST choose between two execution types:
Execute the task directly within this heartbeat session.
Use INLINE when:
Examples: Send notification, search information, read and summarize files
Schedule the task as a separate session using schedule_task.
Use SCHEDULED when:
Examples: Comprehensive research, multi-file analysis, web scraping, code generation
IMPORTANT for SCHEDULED tasks: When scheduling a task, you MUST include in the instruction that the spawned task should call recurring_update_task(task_id, add_outcome={result, success}) before ending. This ensures the proactive task outcome is recorded.
schedule_task(
name="[Task Name]",
instruction="Execute [task description]. IMPORTANT: Before ending, call recurring_update_task(task_id='[proactive_task_id]', add_outcome={'result': '[description of what was done]', 'success': true/false}) to record the outcome.",
schedule="immediate",
mode="complex",
action_sets=["required", "action", "sets"],
skills=["relevant-skills"],
payload={"source": "proactive", "task_id": "[proactive_task_id]"}
)
All recurring proactive tasks use tier 0 or tier 1. Tasks requiring user approval should not be added as recurring tasks.
Tier 0 - Silent (No Notification):
- Search and summarize information
- Detect anomalies and patterns
- Draft recommendations internally
- Read files and analyze data
Tier 1 - Notify Then Execute:
- Notify user with star prefix, then execute immediately
- Send a proposed plan or draft to user
- Share analysis results or recommendations
Score 1-5 for each dimension to determine if you should execute a proactive task:
1. IMPACT (How significant is the outcome?)
1 = Negligible impact
2 = Minor improvement
3 = Moderate benefit
4 = Significant positive outcome
5 = Critical/transformative impact
2. RISK (What could go wrong?)
1 = High risk, potential for serious harm
2 = Moderate risk, some potential issues
3 = Low risk, manageable concerns
4 = Very low risk, unlikely issues
5 = No risk, completely safe
3. COST (Resources/effort required)
1 = Very high cost/effort
2 = Significant resources needed
3 = Moderate effort required
4 = Low cost/minimal effort
5 = Negligible resources needed
4. URGENCY (How time-sensitive?)
1 = Not urgent, can wait indefinitely
2 = Low urgency, within weeks
3 = Moderate urgency, within days
4 = High urgency, within hours
5 = Critical urgency, immediate action needed
5. CONFIDENCE (User acceptance likelihood)
1 = Very unlikely to accept
2 = Unlikely to accept
3 = Uncertain/50-50
4 = Likely to accept
5 = Very likely/certain to accept
Decision Threshold:
- Total score >= 18: Strong candidate for execution
- Total score 13-17: Consider execution, may need user input
- Total score < 13: Skip or defer this task
Use recurring_read with frequency="all" to get all enabled tasks, then process the ones that are due.
recurring_read(frequency="all", enabled_only=true)
The unified heartbeat checks tasks across ALL frequencies in one pass. Time and day filtering is already handled before tasks reach you — the tasks in your instruction are due now. However, you should still verify:
time field: If current time < task time, schedule for later using schedule_task with the specified time, then skipday field: Confirm today matches (the pre-filter handles most cases, but verify edge cases)Scheduling a task for later:
schedule_task(
name="[Task Name]",
instruction="Execute recurring task: [task_id]. [original instruction]. IMPORTANT: Before ending, call recurring_update_task(task_id='[task_id]', add_outcome={'result': '[what was done]', 'success': true/false}).",
schedule="at [task_time]",
mode="complex",
action_sets=["proactive", "file_operations"],
payload={"source": "proactive", "task_id": "[task_id]"}
)
Then record that task was scheduled:
recurring_update_task(
task_id="[task_id]",
add_outcome={"result": "Scheduled for [time]", "success": true}
)
For each task:
Check Conditions: If the task has conditions, evaluate them:
market_hours_only: Skip if outside 9:30 AM - 4:00 PM on weekdaysuser_available: Check if user has responded recentlyScore Using Rubric: Evaluate each dimension 1-5 as described above.
Decision:
For each task that passes evaluation, determine HOW to execute it:
| Criteria | INLINE | SCHEDULED |
|---|---|---|
| Complexity | Simple, single-step | Multi-step, complex |
| Action sets needed | Available in heartbeat | Requires different sets |
| Duration | Quick | Extended |
| Sub-tasks needed | No | Yes |
Check Permission Tier:
Execute the Task: Follow the task's instruction using available actions
Record Outcome: Use recurring_update_task to record:
recurring_update_task(
task_id="task_id",
add_outcome={"result": "Description of what was done", "success": true}
)
Use schedule_task with the instruction that includes the outcome recording requirement:
schedule_task(
name="Weekly Code Review",
instruction="Perform weekly code review. IMPORTANT: Before ending this task, you MUST call recurring_update_task(task_id='weekly_code_review', add_outcome={'result': '[what was done]', 'success': true/false}) to record the outcome.",
schedule="immediate",
mode="complex",
action_sets=["code_analysis", "file_operations"],
skills=[],
payload={"source": "proactive", "task_id": "weekly_code_review"}
)
Record that the task was scheduled:
recurring_update_task(
task_id="task_id",
add_outcome={"result": "Scheduled as separate task (session: xxx)", "success": true}
)
After processing all tasks, end the task silently.
task_end without waiting for user confirmationwait_for_user_reply=falseAll recurring proactive tasks use tier 0 or tier 1:
| Tier | Name | Behavior |
|---|---|---|
| 0 | Silent | Execute without notification |
| 1 | Notify | Notify user then execute immediately |
recurring_read(frequency="all", enabled_only=true)daily_morning_briefing (daily, tier 1, enabled, due now)recurring_update_task(task_id="daily_morning_briefing", add_outcome={...})recurring_read(frequency="all", enabled_only=true)weekly_code_review (weekly, tier 1, enabled, today is Sunday, due now)schedule_task(
name="Weekly Code Review",
instruction="Review code changes from the past week. Analyze for patterns, issues, and improvements. IMPORTANT: Before ending, call recurring_update_task(task_id='weekly_code_review', add_outcome={'result': '[summary of findings]', 'success': true/false}).",
schedule="immediate",
mode="complex",
action_sets=["code_analysis", "file_operations"],
payload={"source": "proactive", "task_id": "weekly_code_review"}
)
recurring_update_task(task_id="weekly_code_review", add_outcome={"result": "Scheduled as separate task", "success": true})recurring_read, recurring_update_task, send_message, memory_search,
read_file, stream_read, web_search, web_fetch, schedule_task,
task_update_todos, task_end
Direct file writes to PROACTIVE.md (use recurring_update_task instead)
分析心理健康数据、识别心理模式、评估心理健康状况、提供个性化心理健康建议。支持与睡眠、运动、营养等其他健康数据的关联分析。