ScriptsApr 16, 2026·1 min read

hyperfocus-check-prompt.md

超聚焦检测 prompt

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Script
Install
Stage only
Trust
Trust: Established
Entrypoint
hyperfocus-check-prompt.md
Safe staging command
npx -y tokrepo@latest install bd68bdb0-e861-4f75-9757-77fa6f0007fb --target codex

Stages files first; activation requires review of the staged README and plan.

检测逻辑

1. 查询数据

mcp__dida365__filter_tasks 分别查询以下项目最近 3 天(含今天)的已完成任务:

分类 项目 ID
AI 67fcc856006291a8d9e50e36
短期项目 6810ba692803912354f1d40b
周任务 67764f7333b251086e9ddb56

查询参数:startDate 为 3 天前 00:00 UTC,endDate 为今天 23:59 UTC,status: 2(已完成)。

2. 计算时长

每个任务的时长 = completedTime(或 dueDate)- startDate。如果缺少起止时间则跳过。

按分类累计 3 天总时长(小时)。

3. 判定超聚焦

  • 触发条件:任一分类 3 天累计 ≥ 15 小时
  • 额外关注:AI 和短期项目是高风险分类(有趣+有挑战+即时反馈),阈值可更敏感——如果这两个分类合计 ≥ 18 小时也触发

4. 推送卡片

如果检测到超聚焦,通过 webhook 推送飞书卡片:

curl -s -X POST 'https://open.feishu.cn/open-apis/bot/v2/hook/5dd37bb4-0e98-4880-9b47-98c8c7823347' \
  -H 'Content-Type: application/json' \
  -d '<card_json>'

卡片格式(橙色主题,区别于常规紫色):

{
  "msg_type": "interactive",
  "card": {
    "header": {
      "title": {"tag": "plain_text", "content": "🔍 超聚焦检测"},
      "template": "orange"
    },
    "elements": [
      {"tag": "markdown", "content": "过去 3 天时间分布:\n- AI:X 小时\n- 短期项目:X 小时\n- 周任务:X 小时\n\n⚠️ [具体提醒内容]"},
      {"tag": "hr"},
      {"tag": "note", "elements": [{"tag": "plain_text", "content": "💡 超聚焦不是错,但需要觉察。你的周任务主线还在吗?"}]}
    ]
  }
}

提醒内容示例:

  • ⚠️ 你在 AI 上花了 22 小时(3天),占了醒着时间的近一半。要不要看看周任务偏了多少?
  • ⚠️ AI + 短期项目合计 19 小时。创作主线的时间被挤压了。

如果没有超聚焦,不推送任何卡片(避免通知疲劳)。

规则

  • 时间都是北京时间(UTC+8)
  • 只读数据、只推卡片,不修改任何任务
  • 如果滴答清单没有近 3 天数据(可能用户没同步 timelog),跳过不推
  • 语气温和,不评判

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets