memforge-human-confirm

memforge-human-confirm is a cursor rule for coding agents from zql0805/memforge. It costs 784 tokens per session, scanned A, original, MIT.

A rule requiring an AI agent to ask a person for confirmation before changing code or carrying out major operations. It specifies what the confirmation must include and lists limited read-only exceptions.

In plain words
What is it for?
Use it to require approval before editing or deleting files, creating files, changing configuration, modifying dependencies or databases, and running shell commands with side effects.
Why use it?
It keeps a person in control of potentially risky or irreversible work and makes the planned changes visible beforehand.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/zql0805/memforge/memforge-human-confirm
Clone the repo
git clone --depth 1 https://github.com/zql0805/memforge

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memforge-human-confirm

README.md
[![agentmods](https://agentmods.dev/badge/rules/zql0805/memforge/memforge-human-confirm.svg)](https://agentmods.dev/rules/zql0805/memforge/memforge-human-confirm)
Your own site
<a href="https://agentmods.dev/rules/zql0805/memforge/memforge-human-confirm"><img src="https://agentmods.dev/badge/rules/zql0805/memforge/memforge-human-confirm.svg" alt="Measured on agentmods" height="20"></a>
Per session 784 This file is loaded in full into every session.
When invoked 784 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00784 $0.00784
Opus 5 $0.00392 $0.00392
Sonnet 5 $0.00157 $0.00157
Haiku 4.5 $0.00078 $0.00078

Measured 3d ago against content hash 40c9e267779e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memforge-human-confirm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/memory-service/src/rules-templates/memforge-human-confirm.mdc · 87 lines

What it actually says

Memforge 变更前人工确认

核心原则

AI 在做任何实际改动之前,必须先向用户陈述计划并获得明确确认后才能执行。

此规则确保人类始终掌握最终决策权,避免 AI 在理解偏差的情况下执行不可逆操作。

必须确认的操作

P0 — 强制确认(绝对不可跳过)

操作类型 确认内容
修改代码文件 列出将修改的文件、改动要点、影响范围
创建新文件 说明文件路径、用途、与现有代码的关系
删除文件/代码 明确列出将删除的内容,说明删除原因
执行 Shell 命令 展示完整命令,说明预期效果(尤其是 npm install、数据库操作等有副作用的命令)
架构或设计决策 阐述方案选型理由、备选方案及其权衡

P1 — 建议确认(复杂场景下必须确认)

操作类型 确认内容
重构/重命名 影响的文件列表、重构策略、回归风险
修改配置文件 配置项变更对照表、影响的环境/服务
依赖变更 新增/升级/删除依赖的名称、版本、安全性
数据库变更 DDL/DML 的完整内容、对现有数据的影响

确认流程

第一步:分析并制定计划

AI 在理解用户需求后,先完成分析,然后输出结构化的执行计划:

## 执行计划

**目标**:<一句话描述要达成的目标>

**改动清单**:
1. `path/to/file.ts` — <改动要点>
2. `path/to/another.ts` — <改动要点>

**影响评估**:
- <哪些功能可能受影响>
- <是否需要更新测试>

**风险点**:
- <潜在风险及应对>

第二步:等待用户确认

必须明确询问用户是否同意执行,例如:

  • "以上计划是否可以执行?"
  • "需要调整哪些部分?"

第三步:获得确认后执行

只有在用户明确同意后(如"可以"、"执行"、"OK"、"没问题"),才开始实际执行改动。

例外场景(可跳过确认)

以下操作因无副作用,可直接执行无需确认:

  • 读取文件(Read / Glob / Grep)
  • 查看 lint 结果(ReadLints)
  • 回答知识性问题(不涉及代码改动)
  • 检索记忆(recall_memory)
  • **用户明确说"直接做"/"不用问"/"自动执行"**时

违规识别

以下行为视为违规:

  • 未说明计划就直接修改代码文件
  • 未等用户确认就执行有副作用的 Shell 命令
  • 在用户说"我想了解一下"时直接开始改代码
  • 跳过风险评估直接执行高风险操作(如删除、数据库变更)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 87 lines · 784 tokens per session scan A 40c9e267779e

Subscribe to this mod's changes

memforge-human-confirm is a cursor rule published in the GitHub repository zql0805/memforge (2 stars, last pushed 2mo ago), licensed MIT. It adds 784 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.