operator-approval-loop
它能做什么
这个系统可以确保 AI 智能体起草的重要消息在发送给别人之前,经过人工审核和批准。它会记录所有发出的消息,以及是谁批准的。
适用场景
- ✓AI 智能体需要给客户或合作伙伴回复消息时。
- ✓你需要准确记录每条消息是由谁批准的时。
- ✓你想避免错误或重复的消息被发送出去时。
技能链接
https://github.com/affaan-m/ECC/blob/main/skills/operator-approval-loop/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请审核并批准这条发给客户的消息,内容是关于他们的订单状态的。”
每周 5 个新技能,1 分钟读完。
工作原理
消息生成后,会先保存为草稿,并标记为待审核。人工审核草稿后决定批准或拒绝。如果批准,系统会记录是谁在什么时候批准的,并确保发出的正是获得批准的那条消息。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Operator Approval Loop
An agent that talks to external counterparties should never send on its own judgment and should keep the operator informed internally. This skill defines the contract: every outbound draft is filed as an obligation, an operator decides on the exact text, and a delivery ledger proves what went out.
When to Use
- An agent drafts replies to customers, suppliers, investors, or partners in a shared channel, email, or chat, and a human must approve before send.
- You need an audit trail that links each sent message to the exact draft text, the operator who approved it, and the decision time.
- You have seen a stale approval release a rewritten draft, or two workers deliver the same approved message twice.
- Drafts keep re-asking counterparties for facts the ledger already holds.
How It Works
Objects
| Object | Meaning |
|---|---|
| Obligation | One thing we owe a counterparty. Status moves drafted, then approved or rejected, then sent. Carries direction, counterparty, channel, and an updated_at epoch. |
| Draft | Sidecar row holding the exact draft text, a sha256 of that text, origin coordinates (platform, channel, thread, user), and priority (P0 to P3). One per obligation, replaced on re-file. |
| Decision | An operator's approve or reject, recorded with the operator id, a nonce, and the draft epoch it was made against. |
| Approval snapshot | Immutable text, hash, epoch and destination recorded by the already-authorized decision writer. Missing snapshots cannot grant dispatch. |
| Claim | Durable reservation with a random token and state; at most one active claim per obligation. |
| Delivery | Ledger row proving one send or notice for one (obligation, decision) pair. |
The reference schema is in references/approval-ledger.sql.
Filing a draft
- Clean inputs. Strip control characters, collapse whitespace in single-line fields, and enforce length caps (draft, summary, context, counterparty). Empty or oversized fields are refused, not truncated silently.
- Run the baseline gate (below). It may refuse the filing.
- Hash the draft text with sha256. The hash prefix goes into the summary so the approval panel shows which text it is approving.
- Upsert. If an open drafted obligation already exists for the same
(counterparty, channel), replace the draft sidecar and advance the
obligation's
updated_at. That advance is the epoch rotation: any decision keyed to the old epoch can no longer release the new text. Otherwise insert a new obligation with statusdrafted. - Route the filing receipt only to a configured, verified internal ops destination. If the origin is that internal destination, acknowledge there. Never-silent means internal reporting, not an automatic external reply. Keep draft hashes, approval status, operator identity and workflow metadata out of counterparty-visible channels. Unknown or unclassified origins stay quiet; a direct message is not automatically internal.
If a verified internal destination is unavailable, retain the filing result in the internal tool result or operator surface. Never fall back to an external or unknown origin. A tool result exposed to outsiders is not an internal surface.
Filing a draft does not authorize an external response. Any policy-permitted clarifying question or neutral response is a separate outbound decision, subject to the existing mention, channel, draft-only, frozen and never constraints in counterparty-channel-discipline. It must not disclose internal approval metadata.
Baseline gate
Before any draft is filed, query the current baseline for the counterparty (a temporal ledger, contract store, or CRM):
- Signed or delivered contract on record: refuse the filing with the evidence and a recommendation. Asking a counterparty about specs after signing is the exact failure this gate exists to stop.
- Operator override:
force_despite_signed_contractlets the filing through and stamps[BASELINE_OVERRIDE_SIGNED_CONTRACT]into the draft context. - Gate service unreachable: the filing proceeds and the context is stamped
[BASELINE_CHECK_UNAVAILABLE]. The panel sees that the guard was off. Failures never silently disable the gate. - When facts are available, attach the freshest few to the context as a
[BASELINE FACTS: ...]digest so the draft lands with current truth.
Deciding
…
常见问题
草稿在批准后被修改了怎么办?
如果草稿在批准后有改动,就需要重新审核和批准。这样可以确保最终发出的消息是你真正同意的内容。
系统如何防止同一条消息被重复发送?
系统会记录所有已发送和已批准的消息。在发送前,它会根据对应的批准记录,检查是否已经发送过完全相同的消息。
什么是“基线门槛”(baseline gate)?
这是一项初始检查,会在创建草稿之前查看收件人的现有信息(比如已签署的合同)。这样可以避免智能体去询问本该已经掌握的信息。
详情
作者的原始描述
Operator approval contract with internal filing notices for agent-drafted outbound messages, hashed drafts, epoch-keyed decisions, durable delivery claims and receipts, and a pre-draft baseline gate. Use when an agent drafts messages to external counterparties and a human operator must approve, reject, or steer each send before it leaves.
repo: affaan-m/ECC
热度
- GitHub 星标
- 280k
- 排名
- #371
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
accessibility
280k帮你的智能体创建人人都能使用的界面。确保网站和应用对残障人士友好,比如失明或行动不便的用户也能顺畅使用。
agent-architecture-audit
280k让你的智能体检查一切是否正常运行。它能找出并修复 AI 系统中的问题,确保系统按预期工作。
agent-eval
280k帮你的智能体比较不同的 AI 编程工具。它能衡量哪个工具在特定任务上更快、更便宜、更可靠。
agent-harness-construction
280k让你的智能体更好地理解如何完成任务。它会优化智能体使用的工具和指令,提高成功的几率。