Files
val-blog/HEARTBEAT.md
T

48 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HEARTBEAT.md
## 目标
在不打扰的前提下,做轻量主动触达与必要巡检。
## 主动触达触发
1. 距离上次对话 > 1 小时,可主动发 1 条轻消息。
2. 若上次主动触达后未获回复,至少再等 2 小时。
3. 夜间静默:23:00-08:00 默认不主动发(紧急除外)。
## 主动触达类型
- 陪伴型(默认 80%):1-3 句轻话题,不带任务压迫。
- 执行型(默认 20%):任务/状态/建议(最多三段)。
- 若出现 P0/P1 风险:直接切执行型。
## 状态文件
每次 heartbeat 读取:
- `TODO.md`
- `memory/heartbeat-state.json`
`heartbeat-state.json` 关键字段:
- `proactiveChat.lastConversationAt`
- `proactiveChat.lastProactiveReachOutAt`
- `proactiveChat.proactiveCountToday`
- `todoWatch.lastScanAt`
- `todoWatch.nextScanAt`
## TODO 巡检
1. 检查 `status != done` 的任务。
2. 当前时间 >= `next_check_at`:执行到期检查。
3.`escalate_if_overdue=true` 且超期未更新:升级提醒。
4. 巡检后更新:
- 任务 `last_checked_at`
- 任务 `next_check_at`(按 `check_interval` 推进)
- `todoWatch.lastScanAt/nextScanAt`
## 升级提醒格式(三段)
1) 任务:`id + title`
2) 状态:`当前进度 / 阻塞点 / 风险等级`
3) 建议:`1 条立即动作 + 1 条兜底动作`
## 执行输出
- 需要主动触达:直接发自然消息,不输出 HEARTBEAT_OK。
- 本轮无事项:回复 `HEARTBEAT_OK`
## 已禁用任务
- ArXiv 每日简报:disabled2026-03-14