返回顶部
c

commitment-engine承诺引擎

小梦的承诺引擎——将口头任务转化为可追踪的定时承诺,确保到点执行、不遗漏、不等人催。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
86
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

commitment-engine

Commitment Engine v2(承诺引擎)

设计原理

LLM 的 context window 是短期记忆,heartbeat 每次唤醒时 context 几乎是空的。靠记住规则来保证定时执行,和靠记住闹钟来准时起床一样不靠谱。

核心思想:把记忆变成文件,把意愿变成状态机,把希望他做变成系统保证他做。

参考架构:HZL 共享任务账本(durable task state + atomic claiming + session-safe handoffs)。

承诺账本(Commitment Ledger)

位置:workspace/commitments.md

录入规则(⛔H12 硬规则)

小梦收到带时间点的任务时,必须在回复前先写入承诺账本(WAL 协议的延伸)。

自动识别的模式:

  • - A梦说每天X点做Y → recurring 承诺
  • A梦说X点前给我Y → one-time 承诺
  • A梦说记得做X(无明确时间)→ one-time,deadline=当天21:00
  • 小梦对外承诺我稍后给你 → one-time,deadline=1小时内
  • A梦说取消XX/不用了 → 对应承诺改为 cancelled

录入即确认:录入后立即在回复中说记下了,[时间]前搞定。

账本格式

markdown
| ID | 承诺内容 | 类型 | 触发时间 | 状态 | 创建时间 | 下次执行 | 最近执行 | 备注 |

状态枚举:active → preparing → awaiting_confirm → executing → completed/failed/overdue/cancelled

状态机

[录入] → active

├── cron 触发 / heartbeat 发现 ≤30min → preparing(开始准备产出物)
│ │
│ ├── 准备完成 → awaiting_confirm(私聊A梦发草稿)
│ │ ├── A梦OK → executing → completed(one-time)/ reset下次时间(recurring)
│ │ └── A梦要求修改 → 改完重新 awaiting_confirm
│ │
│ └── 准备失败 → failed → 私聊A梦说明原因

└── 超过触发时间仍为 active → overdue → 私聊A梦告警

每次状态变化必须:①更新 commitments.md ②写入当日 memory。

Heartbeat 承诺检查协议

每次 heartbeat 的第一个动作(优先于消息扫描、info-scout 等一切):

  1. 1. 读 commitments.md
  2. 过滤所有 status=active 的承诺
  3. 对每条 active 承诺:
a. 距触发时间 > 30min → 跳过 b. 距触发时间 ≤ 30min → 状态改 preparing,开始准备 c. 距触发时间 ≤ 10min → 中断其他任务,最高优先级 d. 已超过触发时间 → 标记 overdue,立即私聊A梦
  1. 4. 检查完毕后,继续正常 heartbeat 流程

与 cron 的协同

承诺引擎是软保障(每次 heartbeat 检查),cron 是硬保障(到点必触发)。

对于 recurring 且时间固定的承诺(如C001每日17:50报告),同时注册一个 openclaw cron job:

bash
openclaw cron add --name daily-report-prep --cron 50 17 1-5 --message 承诺引擎触发:C001 工作报告准备。立即读 commitments.md 执行 C001。

这样即使 heartbeat 恰好错过时间窗口,cron 也会准时触发。

与 H10 硬规则的关系

H10(显式承诺必须自追踪)是行为规则——告诉小梦你必须追踪。
H12(承诺即录入)是执行规则——告诉小梦怎么录入。
承诺引擎是系统机制——保证heartbeat+cron 双重检查,不依赖记忆。

三层防线:H10要求追踪 → H12确保录入 → heartbeat+cron确保执行。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 commitment-engine-1775914628 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 commitment-engine-1775914628 技能

通过命令行安装

skillhub install commitment-engine-1775914628

下载

⬇ 下载 commitment-engine v1.0.0(免费)

文件大小: 2.65 KB | 发布时间: 2026-4-12 09:32

v1.0.0 最新 2026-4-12 09:32
Commitment Engine v2.0.0 introduces a robust, file-based system to reliably track and execute time-bound commitments.

- All verbal commitments with timepoints are now recorded in a structured "commitments.md" ledger.
- Commitment states and transitions are managed by a defined state machine, ensuring tasks move from creation to completion or appropriate closure.
- Automated heartbeat and cron processes provide dual assurance for timely execution, reducing reliance on short-term memory.
- State changes and critical events are systematically logged to enhance traceability and accountability.
- Supports recurring and one-time tasks, explicit cancellation, and automatic reminders and escalations for overdue commitments.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部